html,body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #f0f9f4;
}
.custom-container {
    padding: 20px 20px 40px 20px;
    max-width: 100%;
}

.row-full {
    width: 100%;
}

/* ========================================
   统一模态框样式 - update_userinfo.ftl 浅绿色渐变风格
   ======================================== */

/* Bootstrap 模态框 - 强力覆盖 */
.modal-dialog {
    margin: 30px auto !important;
}

.modal-content {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    overflow: hidden !important;
}

/* 模态框头部 - 浅绿色渐变 */
.modal-header {
    background: linear-gradient(135deg, #88b988 0%, #a0d6a0 100%) !important;
    color: #fff !important;
    padding: 20px 24px !important;
    border-bottom: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.modal-header .modal-title,
.modal-header h4,
.modal-header h3 {
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.modal-header .close {
    color: #fff !important;
    opacity: 0.9 !important;
    font-size: 24px !important;
    font-weight: normal !important;
    text-shadow: none !important;
    padding: 0 4px !important;
    margin: 0 !important;
}

.modal-header .close:hover {
    opacity: 1 !important;
    color: #fff !important;
}

/* 模态框主体 */
.modal-body {
    padding: 24px !important;
}

/* 模态框底部 */
.modal-footer {
    padding: 16px 24px !important;
    border-top: 1px solid #f0f0f0 !important;
    background: #fafafa !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

.modal-footer .btn {
    height: 44px !important;
    padding: 0 28px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: none !important;
    min-width: 100px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

/* 主按钮 - 浅绿色渐变 */
.modal-footer .btn-primary {
    background: linear-gradient(135deg, #88b988 0%, #a0d6a0 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(136,185,136,0.3) !important;
}

.modal-footer .btn-primary:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(136,185,136,0.4) !important;
}

/* 次按钮 */
.modal-footer .btn-secondary,
.modal-footer .btn-default {
    background: #f0f2f5 !important;
    color: #666 !important;
}

.modal-footer .btn-secondary:hover,
.modal-footer .btn-default:hover {
    background: #e8eaed !important;
    color: #555 !important;
}

/* 自定义模态框（前端页面用） */
.yy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.yy-modal.show {
    display: flex;
}

.yy-modal .yy-modal-box {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.yy-modal .yy-modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #88b988 0%, #a0d6a0 100%);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.yy-modal .yy-modal-header h3,
.yy-modal .yy-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.yy-modal .yy-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    opacity: 0.9;
    padding: 0 4px;
    line-height: 1;
}

.yy-modal .yy-modal-close:hover {
    opacity: 1;
}

.yy-modal .yy-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.yy-modal .yy-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    background: #fafafa;
}

.yy-modal .yy-modal-footer .yy-btn {
    height: 44px;
    padding: 0 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    min-width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.yy-modal .yy-modal-footer .yy-btn-primary {
    background: linear-gradient(135deg, #88b988 0%, #a0d6a0 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(136,185,136,0.3);
}

.yy-modal .yy-modal-footer .yy-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(136,185,136,0.4);
}

.yy-modal .yy-modal-footer .yy-btn-default {
    background: #f0f2f5;
    color: #666;
}

.yy-modal .yy-modal-footer .yy-btn-default:hover {
    background: #e8eaed;
    color: #555;
}

/* ========================================
   模态框头像组件（参考 update_userinfo.ftl）
   ======================================== */
.yy-modal-avatar {
    margin-top: -40px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 10;
    padding: 0 24px;
}

.yy-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
}

.yy-avatar-wrapper img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.yy-avatar-edit {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #88b988;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid #fff;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(136,185,136,0.4);
}

.yy-avatar-edit:hover {
    background: #7aa87a;
    transform: scale(1.05);
}

/* 模态框表单网格（两列布局） */
.yy-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.yy-form-grid .yy-form-group.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .yy-form-grid {
        grid-template-columns: 1fr;
    }
}

/* 统一表单样式 */
.yy-form-group {
    margin-bottom: 18px;
}

.yy-form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.yy-form-label .required {
    color: #f53f3f;
    margin-right: 4px;
}

.yy-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s;
}

.yy-form-control:focus {
    outline: none;
    border-color: #5a8a4f;
    box-shadow: 0 0 0 2px rgba(90, 138, 79, 0.1);
}

.yy-form-row {
    display: flex;
    gap: 20px;
}

.yy-form-row .yy-form-group {
    flex: 1;
}

.yy-radio-group {
    display: flex;
    gap: 20px;
}

.yy-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.yy-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all 0.3s;
}

.yy-btn-primary {
    background: linear-gradient(135deg, #3d5a3a 0%, #5a8a4f 100%);
    color: #fff;
}

.yy-btn-primary:hover {
    background: linear-gradient(135deg, #2d4a2a 0%, #4a7a3f 100%);
}

.yy-btn-default {
    background: #f0f0f0;
    color: #666;
}

.yy-btn-default:hover {
    background: #e8e8e8;
}

.yy-btn-danger {
    background: #f53f3f;
    color: #fff;
}

.yy-btn-danger:hover {
    background: #e03030;
}

.yy-btn-warning {
    background: #f5a623;
    color: #fff;
}

.yy-btn-warning:hover {
    background: #e09510;
}
/* 主按钮 - 老师端家长端切换 */
.switch-role-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}