
        :root { --primary: #ea580c; --secondary: #f59e0b; --bg-color: #f8fafc; --card-bg: #ffffff; --text-dark: #1e293b; --text-light: #64748b; --border: #e2e8f0; --success: #059669; --danger: #dc2626; --zalo: #0068FF; --teal: #0d9488; --drive: #1FA463; }
        * { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; -webkit-tap-highlight-color: transparent; }
        body { background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); margin: 0; padding: 20px; color: var(--text-dark); padding-bottom: 80px; min-height: 100vh; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
        
        a[href*="netlify"], #netlify-badge, .netlify-badge, div[style*="z-index: 2147483647"], div[style*="position: fixed"][style*="bottom: 0"] a[href*="netlify.com"] { display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; height: 0 !important; width: 0 !important; }

        .page-wrapper { display: flex; justify-content: center; align-items: flex-start; gap: 20px; max-width: 1400px; margin: 0 auto; }
        .sidebar { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }
        .main-wrapper { flex: 1; min-width: 0; max-width: 950px; display: flex; flex-direction: column; gap: 20px; }
        .m-br { display: none; }

        #auth-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #fff1f2, #ffe4e6, #ffedd5); display: flex; justify-content: center; align-items: center; z-index: 9999; padding: 15px; overflow-y: auto; }
        .landing-container { display: flex; gap: 30px; max-width: 980px; width: 100%; align-items: center; justify-content: center; flex-wrap: wrap; }
        .preview-slider-box { background: white; padding: 20px; border-radius: 24px; width: 380px; box-shadow: 0 20px 40px rgba(225, 29, 72, 0.15); border: 2px solid #fbcfe8; text-align: center; }
        .preview-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #fff; margin-bottom: 12px; transition: all 0.3s;}
        .preview-header { padding: 14px; text-align: center; color: white; font-weight: bold; transition: all 0.3s;}
        .preview-body { padding: 18px; font-size: 13px; text-align: left; font-weight: bold; color: var(--text-dark); }
        .dot-indicator { width: 8px; height: 8px; border-radius: 50%; background: #fbcfe8; display: inline-block; cursor: pointer; transition: 0.3s; }
        .dot-indicator.active { background: #db2777; width: 22px; border-radius: 4px; }

        .auth-box { background: white; padding: 35px; border-radius: 25px; width: 100%; max-width: 400px; box-shadow: 0 15px 35px rgba(225, 29, 72, 0.15); text-align: center; border: 1px solid var(--border); }
        .auth-box h2 { color: #db2777; margin-bottom: 5px; font-weight: 900; }
        .auth-subtitle { font-size: 13px; color: var(--text-light); margin-bottom: 20px; }
        .auth-input, textarea.auth-input { width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 12px; border: 2px solid var(--border); font-size: 14px; outline: none; font-weight: bold; font-family: inherit;}
        .auth-input:focus { border-color: #db2777; }
        .auth-switch { margin-top: 15px; font-size: 13px; color: var(--text-light); }
        .auth-switch span { color: #db2777; font-weight: bold; cursor: pointer; text-decoration: underline; }
        .auth-link-row { display:flex; justify-content:flex-end; margin:-5px 0 12px; font-size:12px; }
        .auth-link { color:#db2777; font-weight:800; cursor:pointer; text-decoration:underline; }
        .security-note { background:#f8fafc; border:1px solid var(--border); border-radius:12px; padding:12px; margin-bottom:15px; font-size:12px; line-height:1.55; color:var(--text-light); text-align:left; }
        .security-status { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:999px; font-size:11px; font-weight:900; }

        .tuition-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
        .tuition-title h3 { margin:0; font-size:20px; color:var(--primary); }
        .tuition-title p { margin:4px 0 0; font-size:12px; color:var(--text-light); }
        .tuition-month { padding:9px 12px; border:1px solid var(--border); border-radius:10px; background:#fff; font-weight:800; }
        .tuition-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:16px; }
        .tuition-card { background:#fff; border:1px solid var(--border); border-radius:14px; padding:14px; box-shadow:0 4px 12px rgba(15,23,42,.04); }
        .tuition-card .label { font-size:11px; font-weight:900; text-transform:uppercase; color:var(--text-light); }
        .tuition-card .money { font-size:22px; font-weight:950; margin-top:6px; }
        .tuition-card.expected { border-top:4px solid #2563eb; }
        .tuition-card.collected { border-top:4px solid #059669; }
        .tuition-card.pending { border-top:4px solid #f59e0b; }
        .tuition-status { display:inline-flex; padding:5px 8px; border-radius:999px; font-size:11px; font-weight:900; white-space:nowrap; }
        .tuition-status.pending { background:#fff7ed; color:#c2410c; border:1px solid #fed7aa; }
        .tuition-status.sent { background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; }
        .tuition-status.paid { background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; }
        .tuition-actions { display:flex; gap:5px; justify-content:flex-end; flex-wrap:wrap; }
        .tuition-actions .btn { padding:5px 8px; height:auto; font-size:10px; }
        .dashboard-money-note { font-size:10px; color:var(--text-light); margin-top:2px; font-weight:700; }
        @media (max-width: 700px) {
            .tuition-summary { grid-template-columns:1fr; gap:8px; }
            .tuition-card { display:flex; align-items:center; justify-content:space-between; padding:11px 13px; }
            .tuition-card .money { font-size:18px; margin-top:0; }
            .tuition-head { align-items:flex-start; }
            .tuition-actions { justify-content:flex-start; }
        }
        .hidden { display: none !important; }

        .top-nav { background: rgba(255, 255, 255, 0.95); border-radius: 16px; padding: 10px 25px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 15px rgba(234, 88, 12, 0.08); border: 1px solid rgba(255, 255, 255, 1); }
        .app-logo { font-weight: 900; font-size: 18px; color: var(--text-dark); display: flex; align-items: center; gap: 8px;}
        .nav-right { display: flex; align-items: center; gap: 10px; }
        
        .profile-menu { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px 15px 5px 5px; border-radius: 30px; border: 1px solid transparent; transition: all 0.2s; background: #fff7ed; }
        .avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #ea580c, #f59e0b); color: white; display: flex; justify-content: center; align-items: center; font-weight: 900; font-size: 16px; box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4); text-transform: uppercase;}
        .profile-name { font-size: 14px; font-weight: 800; color: var(--text-dark); max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        
        .dropdown-content { position: absolute; top: 120%; right: 0; background: white; border-radius: 16px; width: 240px; box-shadow: 0 15px 35px rgba(0,0,0,0.15); border: 1px solid var(--border); display: none; transition: all 0.3s; z-index: 1000; overflow: hidden; }
        .dropdown-content.show { display: block; }
        .dropdown-header { padding: 15px; border-bottom: 1px solid var(--border); text-align: center; background: #f8fafc; }
        .acc-badge { padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 900; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 8px;}
        .badge-free { background: #fef08a; color: #9a3412; border: 1px solid #fde047; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        .badge-pro { background: #dcfce3; color: #166534; border: 1px solid #bbf7d0; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        .acc-desc { font-size: 12px; color: var(--text-light); font-weight: 600; display: block;}
        .dropdown-item { padding: 12px 20px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text-dark); text-decoration: none; transition: background 0.2s; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
        .dropdown-item:hover { background: #fff7ed; color: var(--primary); padding-left: 25px; } 
        .dropdown-item.danger:hover { background: #fef2f2; color: var(--danger); }

        .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
        .stat-card { border-radius: 16px; padding: 15px; display: flex; align-items: center; justify-content: center; flex-direction: column; box-shadow: 0 8px 20px rgba(234, 88, 12, 0.08); background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%); border-top: 4px solid #f97316; transition: all 0.3s; cursor: pointer; }
        .stat-card:hover { transform: translateY(-3px); }
        .stat-card.static { cursor: default; }
        .stat-card.static:hover { transform: none; }
        .stat-card h3 { margin: 0; font-size: 11px; color: var(--text-light); text-transform: uppercase; font-weight: 800; }
        .stat-card .value { font-size: 28px; font-weight: 900; margin-top: 5px; background: linear-gradient(to right, #ea580c, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

        .main-box { background: rgba(255, 255, 255, 0.95); border-radius: 20px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid var(--border); overflow: hidden; }
        .toolbar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; align-items: center;}
        
        .date-combo { display: flex; align-items: center; justify-content: center; background: #fff7ed; border: 2px solid #fed7aa; border-radius: 10px; padding: 0 5px; height: 38px; position: relative; box-shadow: 0 4px 6px rgba(0,0,0,0.02); transition: all 0.2s; }
        .compact-desktop-date { min-width:58px; width:58px; padding:0 8px; font-size:12px; font-weight:950; color:var(--primary); cursor:pointer; flex:0 0 58px; }
        .compact-desktop-date input[type="date"] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; border:0; padding:0; margin:0; }
        .toolbar { gap:7px; }
        .btn { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text-dark); font-weight: bold; font-size: 13px; white-space: nowrap; box-shadow: 0 4px 6px rgba(0,0,0,0.02); transition: all 0.2s; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; box-sizing: border-box;}
        .btn:hover { background: #fff7ed; border-color: #fed7aa; }
        .btn.active { background: linear-gradient(135deg, #ea580c, #f59e0b); color: white; border: none; box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3); }
        .btn.danger { background: var(--danger); color: white; border: none; }
        .btn.success { background: var(--success); color: white; border: none; box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3); }

        .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 10px; }
        table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 650px;}
        thead th { text-align: left; padding: 15px 10px; font-size: 11px; text-transform: uppercase; font-weight: 900; background: linear-gradient(to right, #1d4ed8, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; border-bottom: 2px solid #e2e8f0; vertical-align: middle; white-space: nowrap;}
        thead th:first-child { padding-left: 20px; }
        tbody td { padding: 15px 10px; border-bottom: 1px solid #f1f5f9; font-size: 14px; font-weight: 700; color: #334155; vertical-align: middle;}
        tbody tr:hover td { background: #fff7ed; } 
        tbody td:first-child { padding-left: 20px; }
        
        .student-name-btn { font-family: 'Cambria', Georgia, serif; font-size: 17px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; background: linear-gradient(to right, #ea580c, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; padding: 4px 0;}
        .student-name-btn .folder-icon { -webkit-text-fill-color: initial; font-size: 14px; filter: drop-shadow(0 2px 2px rgba(234, 88, 12, 0.2)); }
        .badge { background: #ffedd5; color: var(--primary); padding: 5px 12px; border-radius: 8px; font-size: 11px; border: 1px solid #fed7aa; display: inline-block; }
        .btn-chot { background: linear-gradient(135deg, #f59e0b, #ea580c); color: white; border-radius: 10px; font-size: 12px; font-weight: bold; border: none; cursor: pointer; }
        .btn-fast-att { background: linear-gradient(135deg, #10b981, #059669); color: white; border-radius: 10px; font-weight: bold; border: none; display: inline-flex; justify-content: center; align-items: center; cursor: pointer; }

        .day-btn { width: 35px; height: 35px; border-radius: 8px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 13px; cursor: pointer; transition: 0.2s; background: white; color: var(--text-dark); margin: 0 auto; }
        .day-btn.selected { background: linear-gradient(135deg, var(--primary), var(--secondary)) !important; color: white !important; border: none !important; box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3); }

        .timetable { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; min-width: 850px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
        .timetable th { background: linear-gradient(135deg, #2563eb, #06b6d4) !important; color: white !important; -webkit-text-fill-color: white !important; padding: 14px 10px !important; font-weight: 900 !important; text-align: center; border: 1px solid #93c5fd !important; font-size: 13px !important; }
        .timetable th.corner-th { background: #f8fafc !important; color: var(--primary) !important; -webkit-text-fill-color: transparent !important; background-clip: text !important; background-image: linear-gradient(135deg, #ea580c, #f59e0b) !important; border: 1px solid var(--border) !important; width: 110px; font-size: 13px !important; font-weight: 900 !important; }
        .timetable td { border: 1px solid var(--border); padding: 8px; vertical-align: top; width: 12.8%; min-height: 90px; }
        .shift-cell { font-weight: 900; text-align: center; vertical-align: middle !important; font-size: 14px; border: 1px solid var(--border); line-height: 1.3; }
        .shift-morning { background: #fffbeb !important; color: #d97706 !important; -webkit-text-fill-color: #d97706 !important; font-size: 15px !important; }
        .shift-afternoon { background: #f0fdfa !important; color: #0d9488 !important; -webkit-text-fill-color: #0d9488 !important; font-size: 15px !important;}
        .shift-evening { background: #fdf4ff !important; color: #7e22ce !important; -webkit-text-fill-color: #7e22ce !important; font-size: 15px !important;}
        .tt-item { background: #fff7ed; border-left: 3px solid var(--primary); padding: 8px; border-radius: 6px; margin-bottom: 6px; font-size: 11px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
        .tt-name { font-weight: 900; color: var(--primary); display: block; font-size: 13px; margin-bottom: 2px; }
        .tt-time { color: var(--text-light); font-weight: 600; font-size: 11px;}

        .sidebar-box { background: white; border-radius: 16px; padding: 18px; text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,0.06); margin-bottom: 15px;}
        .sidebar-ad-card { background: #ffffff; border-radius: 16px; padding: 20px 15px; text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,0.06); border: 2px solid var(--border); margin-bottom: 15px; position: relative; display: flex; flex-direction: column; align-items: center; }
        .ad-tag { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 900; text-transform: uppercase; margin-bottom: 8px; }
        .ad-title { font-size: 15px; font-weight: 900; color: var(--text-dark); margin: 0 0 6px 0; }
        .ad-price { font-size: 18px; font-weight: 900; color: var(--primary); margin: 0 0 8px 0; }
        .ad-desc { font-size: 12px; color: var(--text-light); font-weight: 600; margin: 0 0 15px 0; line-height: 1.4; text-align: center; }
        .footer { text-align: center; font-size: 13px; font-style: italic; font-weight: 800; margin-top: 40px; margin-bottom: 20px; color: var(--primary); opacity: 0.8;}

        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; z-index: 10000; padding: 15px; }
        .modal-large-content { background: #fff; width: 900px; max-width: 100%; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); overflow: hidden; display: flex; flex-direction: column; max-height: 90vh; }
        .manage-header { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; padding: 15px 20px; font-weight: 900; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
        .manage-header button { background: none; border: none; color: white; font-size: 20px; font-weight: bold; cursor: pointer; }
        .manage-body { padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch;}
        
        .form-row { display: grid; grid-template-columns: 2fr 1fr 1.5fr auto; gap: 10px; align-items: end; margin-bottom: 15px; }
        .form-group { display: flex; flex-direction: column; gap: 5px; width: 100%; margin-bottom: 10px;}
        .form-group label { font-size: 12px; font-weight: bold; color: var(--primary); }
        input[type="text"], input[type="number"], input[type="tel"], input[type="month"], input[type="time"], input[type="date"], select { font-family: inherit; font-weight: bold; color: var(--text-dark); outline: none; padding: 10px; border-radius: 10px; border: 1px solid var(--border); width: 100%; box-sizing: border-box;}
        
        .modal-receipt-content { background: #fff; width: 100%; max-width: 480px; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.25); position: relative; max-height: 95vh; overflow-y: auto;}
        #captureArea { padding: 35px 25px; background: white; transition: background-color 0.3s; }
        .receipt-card { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 25px rgba(0,0,0,0.08); border: 1px solid var(--border); background: #fff;}
        .receipt-top-header { padding: 25px 15px; text-align: center; color: white; }
        .receipt-top-header h4 { margin: 0; font-size: 12px; opacity: 0.9; text-transform: uppercase; letter-spacing: 1px;}
        .receipt-top-header h2 { margin: 8px 0; font-size: 26px; font-weight: 900; }
        .receipt-top-header p { margin: 0; font-size: 14px; font-weight: bold; opacity: 0.9;}
        
        .receipt-body { padding: 24px; }
        .modal-header { border-bottom: 2px dashed #e2e8f0; padding-bottom: 15px; margin-bottom: 15px; }
        .modal-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-weight: bold; align-items: center; font-size: 14px; color: var(--text-dark);}
        #modalStudentName { font-size: 18px; font-weight: 900; }
        
        .total-box { border-radius: 12px; text-align: center; padding: 18px; margin: 20px 0 15px 0; border: 2px solid transparent;}
        .total-box h4 { margin: 0; font-size: 11px; text-transform: uppercase; font-weight: 800; }
        .total-box .price { font-size: 34px; font-weight: 900; margin-top: 5px; }
        
        .dates-box { text-align: center; margin-bottom: 15px; }
        .date-tag { background: #f8fafc; color: var(--text-dark); padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: bold; border: 1px solid var(--border); margin: 3px; display: inline-block; }
        textarea.comment-box { width: 100%; border: 2px solid #e2e8f0; border-radius: 12px; padding: 12px; min-height: 60px; font-family: inherit; resize: none; font-weight: 600; font-size: 13px; color: var(--text-dark); background: #f8fafc;}
        
        .receipt-bank { border-top: 1px solid #e2e8f0; padding-top: 20px; margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px;}
        .rb-info { font-size: 13px; color: var(--text-dark); font-weight: 600; line-height: 1.6; text-align: left; }
        .rb-info strong { color: var(--primary); font-weight: 900; font-size: 15px; display: block; margin-top: 3px;}
        .rb-qr { width: 195px; height: 195px; border-radius: 12px; border: 1px solid var(--border); padding: 4px; object-fit: contain; background: #fff;}

        .theme-1 .receipt-top-header { background: linear-gradient(135deg, #ea580c, #f59e0b); }
        .theme-1 #modalStudentName, .theme-1 .rb-info strong { color: #ea580c; }
        .theme-1 .total-box { border-color: #ea580c; background: #fff7ed; }
        .theme-1 .total-box h4 { color: #c2410c; }
        .theme-1 .total-box .price { color: #ea580c; }
        .theme-2 .receipt-top-header { background: linear-gradient(135deg, #2563eb, #06b6d4); }
        .theme-2 #modalStudentName, .theme-2 .rb-info strong { color: #2563eb; }
        .theme-2 .total-box { border-color: #2563eb; background: #eff6ff; }
        .theme-2 .total-box h4 { color: #1d4ed8; }
        .theme-2 .total-box .price { color: #2563eb; }
        .theme-3 .receipt-top-header { background: linear-gradient(135deg, #9333ea, #db2777); }
        .theme-3 #modalStudentName, .theme-3 .rb-info strong { color: #9333ea; }
        .theme-3 .total-box { border-color: #9333ea; background: #faf5ff; }
        .theme-3 .total-box h4 { color: #7e22ce; }
        .theme-3 .total-box .price { color: #9333ea; }

        .modal-actions { padding: 15px; border-top: 1px solid var(--border); background: #f8fafc; }
        .theme-selector { display: flex; gap: 8px; justify-content: center; margin-bottom: 15px; }
        .btn-theme { flex: 1; padding: 8px; border-radius: 8px; border: 2px solid transparent; font-weight: bold; font-size: 11px; cursor: pointer; background: white;}
        .btn-theme.t1 { border-color: #f59e0b; color: #ea580c; }
        .btn-theme.t2 { border-color: #06b6d4; color: #2563eb; }
        .btn-theme.t3 { border-color: #db2777; color: #9333ea; }
        .btn-theme.active { background: var(--text-dark); color: white !important; border-color: var(--text-dark) !important; }

        .btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 14px; border-radius: 12px;}
        .btn-download { background: #fff7ed; color: var(--primary); border: 1px solid #fed7aa; }

        #toast { position: fixed; top: 20%; left: 50%; transform: translate(-50%, -50%) scale(0.9); background: linear-gradient(135deg, #f59e0b, #ea580c); color: white; padding: 15px 30px; border-radius: 16px; font-size: 16px; font-weight: 900; box-shadow: 0 15px 35px rgba(234, 88, 12, 0.4); z-index: 100000; opacity: 0; visibility: hidden; transition: all 0.3s; text-align: center; }
        #toast.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

        .guide-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; margin-bottom: 15px;}
        .guide-box h4 { margin-top: 0; color: #0369a1; font-size: 15px; display: flex; align-items: center; gap: 8px;}
        .guide-box ul { padding-left: 20px; margin-bottom: 0; font-size: 14px; line-height: 1.6;}
        .guide-box li { margin-bottom: 8px; }

        #uploadSpinnerOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); z-index: 100000; display: flex; flex-direction: column; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
        .spinner { width: 60px; height: 60px; border: 6px solid #e2e8f0; border-top: 6px solid #ea580c; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        .welcome-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 20000; padding: 15px; }
        .welcome-box { background: white; padding: 30px; border-radius: 24px; width: 100%; max-width: 400px; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
        .welcome-box h3 { color: var(--primary); font-size: 24px; margin-top: 0; margin-bottom: 10px; font-weight: 900; }
        .welcome-box p { font-size: 14px; color: var(--text-light); margin-bottom: 25px; line-height: 1.5; font-weight: 600; }

        .grade-input { width: 50px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; text-align: center; font-weight: bold; color: var(--primary); outline: none; }
        .grade-input:focus { border-color: var(--primary); }


        .mobile-home-head { display:none; }
        .library-student-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px; }
        .library-student-card { background:#fff; border:1px solid var(--border); border-radius:14px; padding:14px; cursor:pointer; transition:.18s; box-shadow:0 3px 10px rgba(15,23,42,.04); }
        .library-student-card:hover { transform:translateY(-1px); border-color:#7dd3fc; box-shadow:0 6px 16px rgba(2,132,199,.08); }
        .library-student-card .lib-name { font-size:15px; font-weight:950; color:var(--text-dark); }
        .library-student-card .lib-meta { margin-top:6px; font-size:11px; color:var(--text-light); font-weight:700; display:flex; justify-content:space-between; gap:8px; }
        .library-count { background:#e0f2fe; color:#0369a1; border:1px solid #bae6fd; border-radius:999px; padding:3px 7px; font-size:10px; font-weight:900; white-space:nowrap; }
        .library-session-list { display:flex; flex-direction:column; gap:9px; }
        .library-session { display:flex; align-items:center; justify-content:space-between; gap:12px; background:#fff; border:1px solid var(--border); border-radius:12px; padding:12px 14px; }
        .library-session .session-date { font-weight:950; color:var(--primary); }
        .library-session .session-note { font-size:11px; color:var(--text-light); margin-top:3px; }
        .library-lesson-row { width:100%; text-align:left; font-family:inherit; cursor:pointer; }
        .library-lesson-row:hover { border-color:#7dd3fc; background:#f8fdff; }
        .library-lesson-number { flex:0 0 58px; color:#0369a1; font-size:12px; font-weight:950; }
        .library-open-arrow { margin-left:auto; color:#0284c7; font-size:26px; font-weight:700; }
        .journal-material-actions { display:flex; gap:7px; flex-wrap:wrap; margin-top:7px; }
        .journal-upload-btn { cursor:pointer; margin:0; }
        .journal-upload-status { display:block; margin-top:6px; color:#64748b; font-size:10px; line-height:1.4; }
        .mobile-more-sheet { position:fixed; inset:0; z-index:12000; background:rgba(15,23,42,.42); display:flex; align-items:flex-end; justify-content:center; padding:12px; }
        .mobile-more-panel { width:100%; max-width:520px; background:#fff; border-radius:22px 22px 14px 14px; padding:14px; box-shadow:0 -10px 30px rgba(0,0,0,.16); }
        .mobile-more-handle { width:42px; height:4px; border-radius:999px; background:#cbd5e1; margin:0 auto 8px; }
        .mobile-more-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:9px; }
        .mobile-more-btn { border:1px solid var(--border); background:#fff; border-radius:12px; padding:13px 10px; text-align:left; font-size:13px; font-weight:900; color:var(--text-dark); cursor:pointer; }
        .mobile-more-btn small { display:block; margin-top:3px; font-size:10px; font-weight:600; color:var(--text-light); }

        .mobile-bottom-nav { display: none; }
        @media (max-width: 900px) {
            body { padding: 10px; padding-bottom: 90px; }
            .sidebar, .sidebar-ad-card, .sidebar-box { display: none !important; }
            .page-wrapper { display:block; max-width:100%; }
            .main-wrapper { max-width:100%; width:100%; gap:12px; }
            .copyright, footer { display:none !important; }
            .top-nav { padding: 10px 15px; border-radius: 12px; }
            .app-logo { font-size: 16px; }
            .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
            .stat-card { padding: 12px; border-radius: 14px; }
            .stat-card .value { font-size: 24px; }
            .main-box { padding: 15px; border-radius: 16px; }
            .toolbar { display: none !important; }
            .mobile-home-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; padding:2px 2px 4px; }
            .mobile-home-title { font-size:17px; font-weight:950; color:var(--text-dark); }
            .mobile-home-sub { font-size:10px; color:var(--text-light); font-weight:700; margin-top:2px; }
            .mobile-date-wrap { position:relative; min-width:64px; height:36px; }
            .mobile-date-label { height:36px; min-width:64px; display:flex; align-items:center; justify-content:center; padding:0 10px; border:1.5px solid #fdba74; border-radius:10px; background:#fff7ed; color:var(--primary); font-size:13px; font-weight:950; }
            .mobile-date-wrap input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
            .form-row { grid-template-columns: 1fr !important; gap: 8px; margin-bottom: 10px; }
            .modal-large-content { width: 95% !important; max-height: 90vh; border-radius: 18px; }
            .manage-body { padding: 15px; }
            .modal-receipt-content { width: 95% !important; }
            .day-btn { width: 32px; height: 32px; font-size: 12px; margin: 0; }
            .hide-on-mobile { display: none !important; }
            table { min-width: 100%; } 
            .timetable { min-width: 700px; }
            th, td { padding: 10px 4px !important; font-size: 12px !important; }
            .mobile-bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgba(0,0,0,0.08); z-index: 999; justify-content: space-around; padding: 8px 0 env(safe-area-inset-bottom, 8px) 0; }
            .nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; background: none; border: none; font-size: 10px; font-weight: 800; color: var(--text-light); cursor: pointer; gap: 2px; flex: 1; padding: 4px; transition: 0.2s; }
            .nav-item span.nav-icon { font-size: 19px; }
            .nav-item.active { color: var(--primary); }
            .nav-item { min-height:52px; }
            .library-student-grid { grid-template-columns:1fr; gap:9px; }
            .library-student-card { padding:12px; }
            .library-session { align-items:flex-start; padding:11px; }
            .library-session .btn { flex:0 0 auto; }
        }
    
        @media (max-width: 900px) {
            .mobile-bottom-nav { padding-left:4px; padding-right:4px; }
            .nav-item { min-width:0; }
            .nav-item span:last-child { white-space:nowrap; font-size:9px; }
            #mNav-more .nav-icon { font-size:21px; }
            .stats-grid { margin-top:0; }
            .top-nav { margin-bottom:0; }
            .main-box { margin-top:0; }
        }

    
        .compact-mobile-date { display:none; }

        @media (max-width: 900px) {
            /* Header mobile: greeting + date + avatar only */
            .top-nav {
                min-height:64px;
                padding:10px 12px;
                display:flex;
                align-items:center;
                justify-content:space-between;
                gap:8px;
                border-radius:14px;
                margin-bottom:8px !important;
            }
            .nav-left { min-width:0; flex:1; }
            .app-logo {
                font-size:15px !important;
                line-height:1.25;
                white-space:normal;
            }
            #dailyCountDisplay { display:none !important; }

            .nav-right {
                display:flex;
                align-items:center;
                gap:7px;
                flex:0 0 auto;
            }
            .compact-mobile-date {
                position:relative;
                display:flex;
                height:34px;
                min-width:58px;
                align-items:center;
                justify-content:center;
                padding:0 9px;
                border:1px solid #fed7aa;
                border-radius:10px;
                background:#fff7ed;
                color:var(--primary);
                font-size:12px;
                font-weight:950;
                cursor:pointer;
            }
            .compact-mobile-date input {
                position:absolute;
                inset:0;
                width:100%;
                height:100%;
                opacity:0;
                cursor:pointer;
            }
            .profile-menu {
                width:38px;
                height:38px;
                padding:0 !important;
                gap:0 !important;
                justify-content:center;
                border-radius:50% !important;
                background:transparent !important;
                border:none !important;
            }
            .profile-menu .avatar {
                width:38px;
                height:38px;
                min-width:38px;
                margin:0;
                box-shadow:0 3px 10px rgba(234,88,12,.18);
            }
            .profile-name,
            .dropdown-icon { display:none !important; }
            .profile-menu .dropdown-content {
                right:0;
                top:46px;
                min-width:235px;
            }

            /* One compact stats strip instead of four large cards */
            .stats-grid {
                display:grid !important;
                grid-template-columns:repeat(4,1fr) !important;
                gap:0 !important;
                background:#fff;
                border:1px solid var(--border);
                border-radius:13px;
                padding:7px 4px;
                margin:0 0 8px !important;
                box-shadow:0 3px 10px rgba(15,23,42,.035);
            }
            .stats-grid .stat-card {
                min-width:0;
                border:0 !important;
                border-radius:0 !important;
                box-shadow:none !important;
                background:transparent !important;
                padding:4px 5px !important;
                text-align:center;
            }
            .stats-grid .stat-card + .stat-card {
                border-left:1px solid #e2e8f0 !important;
            }
            .stats-grid .stat-card h3 {
                margin:0 0 2px !important;
                font-size:8px !important;
                line-height:1.15;
                color:var(--text-light);
            }
            .stats-grid .stat-card .value {
                margin:0 !important;
                font-size:17px !important;
                line-height:1.2;
            }
            .stats-grid .dashboard-money-note { display:none !important; }

            /* Greeting header already acts as the page title */
            .mobile-home-head { display:none !important; }

            .main-box {
                padding:10px 12px !important;
                margin-top:0 !important;
                border-radius:14px;
            }

            #view-dashboard table { margin-top:0; }
        }


        .start-date-selects select {
            width:100%;
            min-width:0;
            padding:9px 7px;
            border:1px solid var(--border);
            border-radius:8px;
            background:#fff;
            color:var(--text-dark);
            font-weight:800;
            outline:none;
        }
        .schedule-planned {
            display:inline-flex;
            align-items:center;
            justify-content:center;
            width:22px;
            height:22px;
            border-radius:7px;
            background:#f0fdf4;
            color:#166534;
            border:1px solid #86efac;
            font-size:14px;
            line-height:1;
            font-weight:950;
        }
        @media (max-width:900px) {
            .start-date-selects { grid-template-columns:1fr 1fr 1.2fr !important; }
            .start-date-selects select { padding:8px 4px; font-size:12px; }
            .schedule-planned { width:20px; height:20px; font-size:13px; }
        }


        .profile-menu {
            width:44px;
            height:44px;
            min-width:44px;
            padding:0 !important;
            justify-content:center;
            gap:0 !important;
            border-radius:50% !important;
        }
        .profile-menu .profile-name,
        .profile-menu .dropdown-icon { display:none !important; }
        .profile-menu .avatar { margin:0; }


        .receipt-branding {
            margin-top:14px;
            padding-top:9px;
            border-top:1px dashed #e2e8f0;
            text-align:center;
            color:#94a3b8;
            font-size:9px;
            font-weight:800;
            letter-spacing:.15px;
        }


        .footer {
            white-space:nowrap;
            font-size:11px !important;
            text-align:center;
        }


        .pro-chip{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#ede9fe;color:#6d28d9;font-size:9px;font-weight:950;white-space:nowrap}
        .pro-tools{border:1px solid #ddd6fe;background:linear-gradient(135deg,#faf5ff,#fff);border-radius:14px;padding:12px;margin-bottom:12px}
        .pro-tools-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:9px;color:#4c1d95}
        .pro-tools-title small{display:block;color:#7c6f95;font-size:10px;margin-top:3px}
        .pro-tools-actions{display:flex;gap:7px;flex-wrap:wrap}.pro-tools-actions .btn{font-size:11px;padding:7px 9px}
        .pro-todo-box{margin:0 0 12px}.todo-card{border:1px solid #e2e8f0;border-radius:12px;background:#fff;padding:10px 12px}
        .todo-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;font-size:12px;font-weight:950;color:#0f172a}
        .todo-list{display:grid;gap:5px}.todo-item{display:flex;justify-content:space-between;gap:8px;padding:7px 8px;border-radius:8px;background:#f8fafc;font-size:10px;font-weight:750}
        .todo-item b{color:#b45309}.todo-locked{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px dashed #c4b5fd;background:#faf5ff;border-radius:11px;padding:9px 10px;font-size:10px;color:#6d28d9;font-weight:800}
        .receipt-logo{width:46px;height:46px;object-fit:contain;margin:0 auto 6px;border-radius:10px;background:#fff}
        .pro-modal{width:min(620px,94vw)}.parent-report-card{border:1px solid #e2e8f0;border-radius:18px;overflow:hidden;background:#fff}
        .parent-report-head{display:flex;justify-content:space-between;gap:10px;padding:18px;background:linear-gradient(135deg,#6d28d9,#8b5cf6);color:#fff}.parent-report-head h2{margin:3px 0;font-size:23px}
        .parent-report-kicker{font-size:10px;font-weight:900;letter-spacing:1px;opacity:.86}.parent-report-logo{width:46px;height:46px;border-radius:14px;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;font-weight:950}
        .parent-report-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;border-bottom:1px solid #e2e8f0}.parent-report-grid>div{padding:14px 8px;text-align:center;border-right:1px solid #e2e8f0}.parent-report-grid>div:last-child{border-right:0}
        .parent-report-grid small{display:block;font-size:9px;color:#64748b;font-weight:850;margin-bottom:4px}.parent-report-grid b{font-size:14px;color:#0f172a}
        .parent-report-status{padding:11px 14px;background:#f8fafc;font-size:12px}.parent-report-note{padding:15px;font-size:12px;line-height:1.55;min-height:92px}.parent-report-note b{display:block;margin-bottom:6px}.parent-report-foot{text-align:center;padding:8px;border-top:1px dashed #e2e8f0;color:#94a3b8;font-size:9px;font-weight:750}
        .pro-modal-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.income-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-bottom:12px}.income-kpi{padding:12px;border-radius:12px;border:1px solid #ccfbf1;background:#f0fdfa;text-align:center}.income-kpi small{display:block;font-size:9px;color:#64748b;font-weight:850}.income-kpi b{display:block;font-size:18px;margin-top:4px;color:#0f766e}.income-list{border:1px solid #e2e8f0;border-radius:12px;overflow:hidden}.income-row{display:flex;justify-content:space-between;gap:10px;padding:9px 11px;border-bottom:1px solid #f1f5f9;font-size:11px}.income-row:last-child{border-bottom:0}
        @media (max-width:900px){.pro-tools-actions{display:grid;grid-template-columns:repeat(2,1fr)}.pro-tools-actions .btn{justify-content:center}.parent-report-grid{grid-template-columns:repeat(2,1fr)}.parent-report-grid>div:nth-child(2){border-right:0}.parent-report-grid>div:nth-child(-n+2){border-bottom:1px solid #e2e8f0}.income-kpis{grid-template-columns:1fr}}


        .receipt-month-btn{background:#fff7ed!important;color:#c2410c!important;border:2px solid #fdba74!important;margin-bottom:8px!important;font-weight:950!important}
        .closed-label{display:inline-flex;padding:2px 5px;border-radius:999px;background:#ecfdf5;color:#047857;border:1px solid #a7f3d0;font-size:9px;font-weight:900}
        #receiptBranding{font-family:Arial,sans-serif;letter-spacing:.3px}


        .report-period-picker{display:grid;grid-template-columns:36px 1fr 110px 36px;gap:7px;align-items:end;margin-bottom:7px;padding:10px;border:1px solid #ddd6fe;border-radius:13px;background:#faf5ff}
        .report-period-picker label span{display:block;font-size:9px;font-weight:900;color:#6d28d9;margin-bottom:4px;text-transform:uppercase}
        .report-period-picker select{width:100%;height:36px;border:1px solid #c4b5fd;border-radius:9px;background:#fff;color:#4c1d95;font-weight:900;padding:0 8px}
        .report-period-arrow{height:36px;border:1px solid #c4b5fd;border-radius:9px;background:#fff;color:#6d28d9;font-size:23px;line-height:1;font-weight:900;cursor:pointer}
        .report-period-shortcuts{display:flex;gap:6px;margin-bottom:10px}
        .report-period-shortcuts button{border:1px solid #e2e8f0;background:#fff;color:#475569;border-radius:999px;padding:5px 9px;font-size:9px;font-weight:850;cursor:pointer}
        .sent-note{display:block;margin-top:4px;color:#2563eb;font-size:9px;font-weight:850;white-space:nowrap}
        @media(max-width:900px){.report-period-picker{grid-template-columns:32px 1fr 92px 32px;padding:8px;gap:5px}.report-period-picker select,.report-period-arrow{height:34px}}


        .today-schedule-box{margin:0 0 12px}
        .today-schedule-card{border:1px solid #bfdbfe;background:#f8fbff;border-radius:13px;padding:10px}
        .today-schedule-card.empty{background:#fff;border-color:#e2e8f0}
        .today-schedule-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;font-size:12px;font-weight:950;color:#0f172a}
        .today-schedule-head button{border:0;background:transparent;color:#2563eb;font-size:10px;font-weight:900;cursor:pointer;padding:3px}
        .today-lesson-list{display:grid;gap:6px}
        .today-lesson-item{width:100%;border:1px solid #dbeafe;background:#fff;border-radius:9px;padding:8px 9px;display:grid;grid-template-columns:92px 1fr auto;align-items:center;gap:8px;text-align:left;cursor:pointer;color:#0f172a}
        .today-lesson-time{font-size:11px;font-weight:950;color:#ea580c}
        .today-lesson-info b{display:block;font-size:11px}.today-lesson-info small{display:block;color:#64748b;font-size:9px;margin-top:2px}
        .today-lesson-action{font-size:9px;font-weight:900;color:#059669}
        .today-schedule-empty{font-size:10px;color:#64748b}

        .pro-tools.compact{padding:0!important;background:transparent!important;border:0!important;margin:0 0 8px!important}
        .pro-tools-toggle{width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid #ddd6fe;background:#faf5ff;color:#6d28d9;border-radius:10px;padding:8px 10px;font-size:10px;font-weight:900;cursor:pointer}
        .pro-tools.compact .pro-tools-actions{margin-top:7px;padding:8px;border:1px solid #ede9fe;border-radius:10px;background:#fff}
        .finance-help-btn{border:0;background:transparent;color:#2563eb;padding:5px 2px;margin:0 0 8px;font-size:10px;font-weight:850;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
        .finance-help-modal{width:min(520px,94vw)}
        .finance-flow{display:grid;gap:8px}
        .finance-flow>div{padding:10px;border:1px solid #e2e8f0;border-radius:10px;background:#fff}
        .finance-flow b{display:block;font-size:12px;color:#0f172a;margin-bottom:3px}.finance-flow span{display:block;font-size:10px;color:#64748b;line-height:1.45}
        .finance-help-note{margin-top:10px;padding:10px;border-radius:10px;background:#f0fdfa;border:1px solid #99f6e4;font-size:10px;color:#115e59;line-height:1.5}
        .month-close-list{display:grid;gap:6px;margin:10px 0 14px;max-height:330px;overflow:auto}
        .month-close-row{display:flex;align-items:center;gap:9px;padding:9px;border:1px solid #e2e8f0;border-radius:10px;cursor:pointer}
        .month-close-row span{min-width:0}.month-close-row b{display:block;font-size:11px}.month-close-row small{display:block;font-size:9px;color:#64748b;margin-top:2px}

        .finance-student small{display:block;font-size:9px;color:#64748b;margin-top:3px}
        .finance-sessions{text-align:center;font-weight:900}.finance-amount{text-align:right;font-weight:950;color:#ea580c}.finance-status{text-align:center}.finance-update{text-align:right}
        .finance-paid-btn,.finance-unpaid-btn{font-size:10px!important;padding:6px 8px!important}

        @media(max-width:900px){
            .today-schedule-card{padding:9px}
            .today-lesson-item{grid-template-columns:78px 1fr auto;padding:7px}
            .today-lesson-time{font-size:10px}

            /* Summary becomes one compact horizontal strip */
            .tuition-summary{grid-template-columns:repeat(3,1fr)!important;gap:0!important;border:1px solid #e2e8f0;border-radius:12px;background:#fff;overflow:hidden;margin-bottom:8px!important}
            .tuition-card{display:block!important;padding:8px 4px!important;border:0!important;border-radius:0!important;box-shadow:none!important;text-align:center}
            .tuition-card + .tuition-card{border-left:1px solid #e2e8f0!important}
            .tuition-card .label{font-size:7px!important;line-height:1.2}.tuition-card .money{font-size:14px!important;margin-top:2px!important}
            .tuition-head{margin-bottom:8px!important}.tuition-title p{font-size:9px!important;margin-top:2px!important}.tuition-title h3{font-size:16px!important;margin-bottom:1px!important}
            .tuition-month{height:36px!important;font-size:11px!important}

            /* Mobile finance is card-like and always shows student name first */
            #tuition-table thead{display:none}
            #tuition-table,#tuition-table tbody,#tuition-table tr,#tuition-table td{display:block!important;width:100%!important}
            #tuition-table tr.finance-row{position:relative;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:8px;padding:10px;background:#fff}
            #tuition-table tr.finance-row td{border:0!important;padding:2px 0!important;text-align:left!important}
            #tuition-table .finance-student{padding-right:90px!important;margin-bottom:7px!important}
            #tuition-table .finance-student b{font-size:13px}
            #tuition-table .finance-sessions::before{content:'Số buổi: ';font-size:9px;color:#64748b;font-weight:750}
            #tuition-table .finance-sessions{display:inline-block!important;width:auto!important;margin-right:12px;font-size:11px}
            #tuition-table .finance-amount::before{content:'Học phí: ';font-size:9px;color:#64748b;font-weight:750}
            #tuition-table .finance-amount{display:inline-block!important;width:auto!important;font-size:12px}
            #tuition-table .finance-status{position:absolute;right:9px;top:9px;width:auto!important}
            #tuition-table .finance-update{margin-top:8px!important;padding-top:8px!important;border-top:1px dashed #e2e8f0!important}
            #tuition-table .finance-update .btn{width:100%;justify-content:center}
        }


        .report-student-btn{background:#f5f3ff!important;border-color:#ddd6fe!important;color:#6d28d9!important;font-weight:850!important}
        @media(max-width:900px){.report-student-btn{font-size:9px!important;padding:6px 7px!important}}


        .student-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px;padding:12px 14px;background:#f8fafc;border:1px solid var(--border);border-radius:12px}
        .student-list-title{font-size:15px;font-weight:900;color:var(--text-dark)}
        .student-list-sub{font-size:11px;color:var(--text-light);margin-top:2px}
        .student-add-main{white-space:nowrap;padding:9px 15px!important;height:auto!important}
        .student-editor-panel{margin-top:18px;padding-top:18px;border-top:2px solid #e2e8f0}
        .student-editor-head{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff7ed;border:1px solid #fed7aa;border-radius:12px;padding:11px 13px;margin-bottom:14px}
        .student-editor-head b{display:block;color:#c2410c;font-size:14px}
        .student-editor-head span{display:block;color:#78716c;font-size:11px;margin-top:2px}
        @media(max-width:700px){
          .student-manage-modal .manage-header{align-items:flex-start;gap:8px}
          .student-list-toolbar{align-items:stretch;flex-direction:column}
          .student-add-main{width:100%}
          .student-editor-head{align-items:flex-start}
          #manageModal .table-responsive{margin-top:0}
        }


        /* V3.5 · Danh sách học sinh gọn trên mobile */
        .student-name-mobile,.fee-mobile{display:none}
        .student-actions{display:flex;flex-direction:column;gap:5px;align-items:flex-start}
        .student-action-bottom{display:flex;gap:5px}
        .student-actions .btn{margin:0;padding:5px 8px;font-size:11px;white-space:nowrap}
        .student-action-edit{color:#2563eb!important}
        .student-action-delete{color:#dc2626!important}
        @media(max-width:700px){
          #manageModal .modal-large-content{width:min(96vw,520px);max-height:92vh}
          #manageModal .manage-body{padding:10px}
          #manageModal .manage-header{padding:10px 12px;min-height:auto}
          #manageModal .manage-header>span{font-size:14px;line-height:1.25;max-width:155px}
          #manageModal .manage-header>div{display:grid;grid-template-columns:1fr 1fr auto;gap:5px;align-items:start}
          #manageModal .manage-header a,#manageModal .manage-header>div>button{margin:0!important;padding:6px 7px!important;font-size:9px!important;white-space:nowrap}
          #manageModal .student-list-toolbar{padding:9px;margin-bottom:8px}
          #manageModal .student-list-sub{display:none}
          #manageModal .student-list-title{font-size:13px}
          #manageModal .student-add-main{padding:8px 10px!important;font-size:11px!important}
          #manageModal .table-responsive{overflow-x:hidden;padding-bottom:2px}
          #manageModal table{table-layout:fixed;width:100%;min-width:0}
          #manageModal thead th{padding:7px 3px;font-size:9px;line-height:1.05;text-align:center}
          #manageModal thead th:nth-child(1){width:30%}
          #manageModal thead th:nth-child(2){width:14%}
          #manageModal thead th:nth-child(3){width:18%}
          #manageModal thead th:nth-child(4){width:38%}
          #manageModal tbody td{padding:8px 3px;font-size:11px;vertical-align:middle;text-align:center;overflow:hidden}
          #manageModal .manage-col-name{text-align:left;padding-left:5px}
          #manageModal .student-name-full,#manageModal .fee-full{display:none}
          #manageModal .student-name-mobile,#manageModal .fee-mobile{display:inline}
          #manageModal .student-name-mobile{font-size:13px;font-weight:900;line-height:1.12;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
          #manageModal .manage-col-class .badge{padding:4px 7px;font-size:10px;min-width:0}
          #manageModal .manage-col-fee{font-size:12px;font-weight:900;color:#334155;line-height:1.05}
          #manageModal thead th:nth-child(3){font-size:0}
          #manageModal thead th:nth-child(3)::after{content:'HỌC\\A PHÍ';white-space:pre;font-size:9px;line-height:1.05}
          #manageModal .student-actions{align-items:stretch;gap:4px}
          #manageModal .student-action-report{width:100%;justify-content:center;padding:5px 4px!important;font-size:9px!important}
          #manageModal .student-action-bottom{display:grid;grid-template-columns:1fr 1fr;gap:4px}
          #manageModal .student-action-bottom .btn{width:100%;padding:5px 3px!important;font-size:10px!important}
        }




.parent-report-grid.learning-only{grid-template-columns:repeat(3,1fr)}.parent-report-grid.learning-only>div:nth-child(2){border-right:1px solid #e2e8f0}@media(max-width:900px){.parent-report-grid.learning-only{grid-template-columns:repeat(3,1fr)}.parent-report-grid.learning-only>div{border-bottom:0!important}}

/* ===== V4 share button ===== */
.student-action-top{display:flex;gap:5px;flex-wrap:wrap}
.student-action-share{border-color:#c4b5fd!important;color:#6d28d9!important;background:#faf5ff!important}
@media(max-width:900px){
  .student-action-top{display:grid;grid-template-columns:1fr 1fr;gap:4px;width:100%}
  .student-action-top .btn{padding:5px 4px!important;font-size:10px!important}
}


/* ===== V4.2 class study content ===== */
.study-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.study-editor-box{border:1px solid #dbeafe;background:#f8fbff;border-radius:12px;padding:12px;margin-top:10px}
.study-editor-heading{font-weight:900;color:#1d4ed8;margin-bottom:4px}
.study-editor-help{font-size:11px;color:#64748b;margin-bottom:8px;line-height:1.5}
.study-textarea{width:100%;border:1.5px solid #cbd5e1;border-radius:10px;padding:10px;font:inherit;resize:vertical;outline:none}
.study-textarea:focus{border-color:#60a5fa;box-shadow:0 0 0 3px #dbeafe}
.study-math-grid{grid-template-columns:1.2fr 1fr 1fr;align-items:end}
.study-check{display:flex;align-items:center;gap:7px;font-weight:900;padding:12px 0}
.study-op-row{display:flex;gap:18px;flex-wrap:wrap;margin-top:8px;font-size:12px;font-weight:800}
.class-study-card{border-color:#ddd6fe!important}
.class-study-session{align-items:center;gap:10px}
.class-study-session-main{flex:1;min-width:0}
.class-study-actions{display:flex;gap:5px}
.study-material-link{display:inline-block;margin-top:6px;font-size:11px;font-weight:900;color:#2563eb;text-decoration:none}
@media(max-width:650px){
  .study-form-grid,.study-math-grid{grid-template-columns:1fr}
  .class-study-session{align-items:flex-start}
  .class-study-actions{width:100%}
  .class-study-actions .btn{flex:1}
}


/* ===== V4.3 AI Hybrid ===== */
.study-ai-box{border:1.5px solid #c4b5fd;background:linear-gradient(135deg,#faf5ff,#eff6ff);border-radius:14px;padding:13px;margin-top:12px}
.study-ai-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:9px}
.study-ai-title{font-weight:1000;color:#6d28d9;font-size:13px}
.study-ai-help{font-size:11px;line-height:1.5;color:#64748b;margin-top:4px}
.study-ai-badge{background:#7c3aed;color:white;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:900}
.study-ai-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.study-file-btn{cursor:pointer;border:1px solid #cbd5e1;background:white;border-radius:9px;padding:8px 10px;font-size:11px;font-weight:900}
.study-ai-file-name{flex:1;min-width:150px;color:#64748b;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.study-ai-generate{background:#7c3aed!important;border-color:#7c3aed!important;color:white!important}
.study-ai-generate:disabled{opacity:.6;cursor:wait}
.study-ai-status{font-size:10.5px;margin-top:8px;color:#64748b;line-height:1.4}
.study-ai-status[data-type="success"]{color:#047857;font-weight:800}
.study-ai-status[data-type="warn"]{color:#b45309;font-weight:800}
.study-ai-status[data-type="error"]{color:#b91c1c;font-weight:800}
.study-ai-status[data-type="loading"]{color:#6d28d9;font-weight:800}
/* ===== V4.5 · NHẬT KÝ & LỘ TRÌNH ===== */
.journal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;padding:18px;border-radius:16px;background:linear-gradient(135deg,#eff6ff,#f5f3ff);border:1px solid #c7d2fe}.journal-head h3{margin:0;color:#1e40af;font-size:19px}.journal-head p{margin:5px 0 0;color:#64748b;font-size:12px}.journal-filters{display:grid;grid-template-columns:minmax(180px,260px) minmax(170px,220px) 1fr;gap:12px;align-items:end;margin-bottom:14px}.journal-filters label{display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:900;color:#475569}.journal-filters select,.journal-filters input{height:40px;border:1px solid var(--border);border-radius:10px;padding:0 11px;background:#fff;font:inherit}.journal-summary{min-height:40px;display:flex;align-items:center;padding:0 14px;border-radius:10px;background:#f8fafc;border:1px solid var(--border);font-size:12px;color:#475569}.journal-session-list{display:flex;flex-direction:column;gap:10px}.journal-session-card{display:grid;grid-template-columns:42px 1fr auto;gap:12px;align-items:start;padding:14px;border:1px solid #bfdbfe;border-left:5px solid #2563eb;border-radius:14px;background:#fff}.journal-session-card.planned{border-left-color:#8b5cf6;background:#fdfcff}.journal-order{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#dbeafe;color:#1d4ed8;font-weight:900}.journal-session-card.planned .journal-order{background:#ede9fe;color:#6d28d9}.journal-session-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#1e293b}.journal-status{font-size:9px;text-transform:uppercase;letter-spacing:.04em;padding:3px 7px;border-radius:999px;background:#dcfce7;color:#15803d;font-weight:900}.planned .journal-status{background:#ede9fe;color:#6d28d9}.journal-session-meta{font-size:10px;color:#64748b;margin-top:4px;font-weight:700}.journal-session-main p{font-size:12px;line-height:1.5;margin:8px 0 0;color:#334155;white-space:pre-line}.journal-homework{font-size:11px;line-height:1.45;margin-top:7px;padding:7px 9px;background:#fff7ed;border-radius:8px;color:#9a3412}.journal-actions{display:flex;gap:6px}.journal-empty{min-height:180px;border:1px dashed #cbd5e1;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#64748b;text-align:center}.journal-empty>div{font-size:34px}.journal-empty span{font-size:11px}.journal-modal-card{width:1120px!important;max-width:97%!important}.journal-modal-body{max-height:82vh;overflow:auto}.journal-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.journal-form-grid.compact{grid-template-columns:repeat(4,1fr)}.journal-form-grid.compact .form-group:first-child{grid-column:auto}.journal-form-grid textarea,.journal-evaluation-table textarea{width:100%;border:1px solid var(--border);border-radius:9px;padding:9px;resize:vertical;font:inherit;box-sizing:border-box}.journal-student-head{margin-top:14px;padding:10px 12px;border-radius:10px;background:#eff6ff;color:#1e40af}.journal-student-head span{display:block;font-size:10px;color:#64748b;margin-top:3px}.journal-evaluation-wrap{margin-top:8px}.journal-evaluation-table{min-width:1050px}.journal-evaluation-table th{font-size:10px;white-space:nowrap}.journal-evaluation-table td{padding:7px}.journal-evaluation-table select,.journal-evaluation-table input{width:100%;min-width:75px;border:1px solid var(--border);border-radius:8px;padding:8px;font:inherit;box-sizing:border-box}.journal-evaluation-table td:nth-child(1){min-width:130px}.journal-evaluation-table td:nth-child(4){min-width:130px}.journal-evaluation-table td:nth-child(6),.journal-evaluation-table td:nth-child(7){min-width:190px}.journal-save-bar{position:sticky;bottom:-15px;margin:12px -15px -15px;padding:12px 15px;background:rgba(255,255,255,.96);border-top:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:12px;z-index:2}.journal-save-bar span{font-size:10px;color:#64748b}

@media(max-width:900px){.journal-head{align-items:flex-start;flex-direction:column}.journal-head .btn{width:100%}.journal-filters{grid-template-columns:1fr 1fr}.journal-summary{grid-column:1/-1}.journal-session-card{grid-template-columns:34px 1fr}.journal-actions{grid-column:2;justify-content:flex-end}.journal-form-grid,.journal-form-grid.compact{grid-template-columns:1fr}.journal-save-bar{align-items:stretch;flex-direction:column}.journal-save-bar .btn{width:100%}}

/* V4.7.1: hai thẻ buổi học trên một hàng ở màn hình đủ rộng */
.journal-session-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.journal-session-card{grid-template-columns:42px minmax(0,1fr);gap:10px 12px;min-width:0}
.journal-session-top b{overflow-wrap:anywhere}
.journal-session-meta{line-height:1.45}
.journal-session-main p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.journal-homework{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.journal-actions{grid-column:1/-1;justify-content:flex-end;border-top:1px solid #e2e8f0;padding-top:9px;margin-top:2px}
.journal-actions .btn:first-child{flex:1}
.journal-empty{grid-column:1/-1}
@media(max-width:900px){.journal-session-list{grid-template-columns:1fr}.journal-session-card{grid-template-columns:34px minmax(0,1fr)}.journal-actions{grid-column:1/-1}}
.parent-report-journal{margin:14px 0;border:1px solid #dbeafe;border-radius:12px;overflow:hidden;background:#fff}.parent-report-section-title{padding:8px 10px;background:#eff6ff;color:#1e40af;font-size:10px;font-weight:900;letter-spacing:.05em}.parent-report-session{display:grid;grid-template-columns:26px 1fr;gap:8px;padding:9px 10px;border-top:1px solid #e2e8f0}.parent-report-session:first-child{border-top:0}.parent-report-session-no{width:22px;height:22px;border-radius:50%;background:#dbeafe;color:#1d4ed8;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:900}.parent-report-session b{font-size:10px;color:#1e293b}.parent-report-session small{display:block;margin-top:2px;color:#64748b;font-size:8px}.parent-report-session p{margin:3px 0 0;font-size:8px;line-height:1.4;color:#334155;white-space:pre-line}.parent-report-journal-empty{padding:16px;text-align:center;color:#94a3b8;font-size:10px}

/* V4.9.1 — scoped attendance selection + compact parent report */
.attendance-table .attendance-select-col{width:58px;min-width:58px;text-align:center;padding-left:6px;padding-right:6px}
.attendance-all-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;cursor:pointer;font-size:10px;font-weight:900;color:#475569;white-space:nowrap}
.attendance-all-toggle input,.attendance-select-cell input{width:18px;height:18px;accent-color:var(--primary);cursor:pointer}
.attendance-select-cell{width:58px;min-width:58px;text-align:center;padding-left:6px!important;padding-right:6px!important}

.parent-report-card-compact{overflow:hidden}
.parent-report-compact-body{display:grid;grid-template-columns:minmax(155px,.85fr) minmax(0,1.65fr);align-items:stretch}
.parent-report-overview{border-right:1px solid #e2e8f0;background:#fff}
.parent-report-card-compact .parent-report-head{padding:11px 13px}
.parent-report-card-compact .parent-report-head h2{font-size:18px;margin:2px 0}
.parent-report-card-compact .parent-report-logo{width:38px;height:38px;border-radius:11px;font-size:12px}
.parent-report-card-compact .parent-report-grid.learning-only{grid-template-columns:1fr!important;border-bottom:1px solid #e2e8f0}
.parent-report-card-compact .parent-report-grid.learning-only>div{padding:8px 6px!important;border-right:0!important;border-bottom:1px solid #e2e8f0!important}
.parent-report-card-compact .parent-report-grid.learning-only>div:last-child{border-bottom:0!important}
.parent-report-card-compact .parent-report-grid small{font-size:8px;margin-bottom:2px}
.parent-report-card-compact .parent-report-grid b{font-size:13px}
.parent-report-card-compact .parent-report-note{padding:10px 11px;min-height:0;font-size:10px;line-height:1.4}
.parent-report-card-compact .parent-report-note b{font-size:9px;margin-bottom:4px;color:#475569}
.parent-report-card-compact .parent-report-journal{margin:0;border:0;border-radius:0;background:#fff;min-width:0}
.parent-report-card-compact .parent-report-section-title{padding:7px 9px;font-size:9px}
.parent-report-journal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start}
.parent-report-journal-grid .parent-report-session{grid-template-columns:20px minmax(0,1fr);gap:5px;padding:6px 7px;border-top:1px solid #e2e8f0;border-right:1px solid #e2e8f0;min-width:0}
.parent-report-journal-grid .parent-report-session:nth-child(-n+2){border-top:0}
.parent-report-journal-grid .parent-report-session:nth-child(even){border-right:0}
.parent-report-card-compact .parent-report-session-no{width:18px;height:18px;font-size:8px}
.parent-report-card-compact .parent-report-session b{font-size:8px;line-height:1.25;display:block}
.parent-report-card-compact .parent-report-session small{font-size:7px;line-height:1.25}
.parent-report-card-compact .parent-report-session p{font-size:7px;line-height:1.3;margin-top:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.parent-report-card-compact .parent-report-foot{padding:5px;font-size:8px}

@media(max-width:520px){
  .attendance-table{min-width:520px}
  .attendance-table .student-name{font-size:14px!important}
  .attendance-all-toggle{gap:3px;font-size:9px}
  .attendance-all-toggle input,.attendance-select-cell input{width:17px;height:17px}
  .parent-report-compact-body{grid-template-columns:118px minmax(0,1fr)}
  .parent-report-card-compact .parent-report-head{padding:9px 10px}
  .parent-report-card-compact .parent-report-head h2{font-size:16px}
  .parent-report-card-compact .parent-report-grid.learning-only>div{padding:6px 4px!important}
  .parent-report-card-compact .parent-report-grid b{font-size:11px}
  .parent-report-card-compact .parent-report-note{padding:7px 8px;font-size:8px}
  .parent-report-journal-grid .parent-report-session{padding:5px;grid-template-columns:17px minmax(0,1fr);gap:4px}
  .parent-report-card-compact .parent-report-session-no{width:15px;height:15px;font-size:7px}
  .parent-report-card-compact .parent-report-session b{font-size:7px}
  .parent-report-card-compact .parent-report-session small,.parent-report-card-compact .parent-report-session p{font-size:6.5px}
}
.day-btn.recorded:not(.selected){position:relative;border-color:#86efac;background:#f0fdf4;color:#166534}
.day-btn.recorded:not(.selected)::after{content:'';position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-radius:50%;background:#22c55e}

/* V4.9.3 · Journal AI Auto */
.journal-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}.journal-label-row label{margin:0}.journal-ai-btn{padding:6px 10px;font-size:11px;white-space:nowrap;background:linear-gradient(135deg,#7c3aed,#2563eb);color:#fff;border:none}.journal-ai-btn:disabled{opacity:.65;cursor:wait}.journal-ai-status{display:block;margin-top:6px;font-size:10px;line-height:1.4;color:#64748b}.journal-ai-status[data-type="success"]{color:#15803d}.journal-ai-status[data-type="error"]{color:#b91c1c}.journal-ai-status[data-type="warn"]{color:#b45309}.journal-ai-status[data-type="loading"]{color:#1d4ed8}@media(max-width:640px){.journal-label-row{align-items:flex-start}.journal-ai-btn{font-size:10px;padding:6px 8px}}

/* V5.0.1 report identity */
.parent-report-head .parent-report-logo{width:auto!important;min-width:46px;max-width:42%;padding:0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px!important}

.floating-support{position:fixed;right:18px;bottom:18px;z-index:900;display:inline-flex;align-items:center;gap:8px;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(248,250,252,.96));border:1px solid #dbe7f3;border-radius:14px;padding:8px 11px;box-shadow:0 12px 30px rgba(15,23,42,.12),0 2px 8px rgba(217,119,6,.08);text-decoration:none;color:#172033;backdrop-filter:blur(10px);transition:.18s}.floating-support .zalo-mini{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;background:linear-gradient(145deg,#1688f8,#0068ff);color:#fff;font-size:9px;font-weight:800;letter-spacing:-.03em;box-shadow:0 4px 10px rgba(0,104,255,.22)}.floating-support b{font-size:11px;color:#475569;font-weight:650}.floating-support:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(15,23,42,.16)}@media(max-width:760px){.floating-support{right:10px;bottom:76px;padding:7px 9px}.floating-support b{display:none}.floating-support .zalo-mini{width:28px;height:28px}}

/* V5.2.1 · Visual polish — calmer, wider teacher workspace */
:root{--primary:#d97706;--secondary:#f59e0b;--bg-color:#f6f8fb;--card-bg:#fff;--text-dark:#172033;--text-light:#667085;--border:#e5eaf0;--surface-soft:#f8fafc;--blue-soft:#eef5ff;--blue-line:#d7e5f7}
*{font-family:"Segoe UI Variable","Segoe UI",Roboto,Arial,sans-serif}
body{background:linear-gradient(145deg,#f8fafc 0%,#fffaf3 55%,#f4f7fb 100%);color:var(--text-dark)}
.page-wrapper{max-width:1540px;gap:18px}.main-wrapper{max-width:1180px;gap:16px}.sidebar{width:230px;gap:16px}
.top-nav,.main-box{border-color:#e7ebf0;box-shadow:0 8px 24px rgba(15,23,42,.055)}
.top-nav{padding:11px 22px}.main-box{border-radius:16px;padding:22px}
.stats-grid{gap:12px}.stat-card{border-radius:14px;border-top:0;border:1px solid #e7ebf0;background:linear-gradient(145deg,#fff,#fbfcfe);box-shadow:0 6px 18px rgba(15,23,42,.045)}
.stat-card h3{font-weight:650;letter-spacing:.025em}.stat-card .value{font-weight:750;background:none;-webkit-text-fill-color:var(--primary);color:var(--primary)}
.btn,.dropdown-item,input[type="text"],input[type="number"],input[type="tel"],input[type="month"],input[type="time"],input[type="date"],select{font-weight:600}
.student-name-btn{font-family:inherit;font-weight:700;background:none;-webkit-text-fill-color:#172033;color:#172033}
.toolbar button,.tab-btn{font-weight:650}.main-box h2,.main-box h3{letter-spacing:-.015em}
.timetable{box-shadow:none;border:1px solid #dfe7ef}.timetable th{background:#466b9e!important;border-color:#d6e1ef!important;font-weight:650!important;letter-spacing:.01em}.timetable th.corner-th{background:#f7f9fc!important;color:#334155!important;-webkit-text-fill-color:#334155!important;background-image:none!important}
.journal-head{background:linear-gradient(135deg,#f7f9fc,#eef5ff);border-color:#dbe6f3}.journal-head h3{color:#294f7d;font-weight:700}.journal-session-card{border-color:#dce7f2;border-left-color:#668bb8;box-shadow:0 3px 10px rgba(15,23,42,.025)}
@media(min-width:1180px){.page-wrapper:has(.sidebar.hidden) .main-wrapper{max-width:1320px}.main-wrapper{width:calc(100% - 248px)}}
@media(max-width:1050px){.main-wrapper{max-width:100%;width:100%}}


/* V5.2.2 · mobile density, calmer gradients, CMS */
.dash-name-mobile,.dash-fee-mobile{display:none}.dashboard-fee{font-weight:700}.dash-fee-full{white-space:nowrap}
.cms-section{margin-top:20px;padding-top:18px;border-top:1px solid #e5eaf0}.cms-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}.cms-section-head h3{margin:0;font-size:16px;font-weight:700;color:#334155}.cms-section-head p{margin:3px 0 0;font-size:11px;color:#667085;line-height:1.45}.cms-layout{display:grid;grid-template-columns:minmax(240px,.82fr) minmax(340px,1.18fr);gap:14px}.cms-list,.cms-editor{border:1px solid #e4eaf1;border-radius:16px;background:linear-gradient(145deg,#fbfdff,#f8fafc);padding:12px;box-shadow:0 7px 20px rgba(15,23,42,.035)}.cms-article-row{width:100%;display:grid;grid-template-columns:34px 1fr 18px;align-items:center;gap:9px;text-align:left;border:0;border-bottom:1px solid #edf1f5;background:transparent;padding:10px 6px;cursor:pointer;color:#334155}.cms-article-row:last-child{border-bottom:0}.cms-article-row:hover{background:#fff;border-radius:10px}.cms-article-row b{display:block;font-size:12px;font-weight:650}.cms-article-row small{display:block;margin-top:3px;color:#7a8797;font-size:9px}.cms-article-row i{font-style:normal;color:#d97706}.cms-article-icon{font-size:21px}.cms-empty{padding:18px 10px;text-align:center;color:#7a8797;font-size:11px;line-height:1.5}.cms-empty b,.cms-empty span{display:block}.cms-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.cms-editor .form-group{margin-bottom:9px}.cms-editor textarea{resize:vertical}.cms-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.soft-gradient-card{background:linear-gradient(145deg,#fff,#f8fafc 62%,#fff8ed);box-shadow:0 8px 22px rgba(15,23,42,.045),0 1px 0 rgba(255,255,255,.8) inset}
@media(max-width:700px){
#dashboard-tbody .dash-name-full,#dashboard-tbody .dash-fee-full{display:none}
#dashboard-tbody .dash-name-mobile,#dashboard-tbody .dash-fee-mobile{display:inline}
#dashboard-tbody .student-name-btn{font-size:13px;gap:2px;max-width:100%;white-space:nowrap}
#dashboard-tbody .folder-icon{font-size:11px}
#dashboard-tbody td:nth-child(1){width:25%;max-width:92px}
#dashboard-tbody td:nth-child(2){width:16%}
#dashboard-tbody td:nth-child(3){width:11%}
#dashboard-tbody td:nth-child(5){width:15%}
#dashboard-tbody td:nth-child(6){width:33%}
#dashboard-tbody .dashboard-fee{font-size:11px!important;font-weight:700!important;white-space:nowrap}
.cms-layout{grid-template-columns:1fr}.cms-editor-grid{grid-template-columns:1fr}.cms-section-head{display:block}.cms-section-head .btn{margin-top:8px}}


/* V5.5.3 · Report + share polish aligned with homepage */
.pro-report-modal-head{background:linear-gradient(135deg,#365f8f,#4f79aa)!important;color:#fff;letter-spacing:0;text-transform:none}
.pro-report-modal-head span{font-size:14px;font-weight:700}.pro-report-modal-head em{font-style:normal;font-size:9px;font-weight:700;letter-spacing:.06em;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.22);padding:3px 6px;border-radius:999px;margin-left:4px}
#parentReportModal .modal-large-content{width:min(690px,94vw);border-radius:18px;overflow:hidden;box-shadow:0 22px 60px rgba(15,23,42,.18)}
#parentReportModal .manage-body{background:#f8fafc;padding:16px}
#parentReportModal .report-mode-tabs .btn{border-radius:10px;border-color:#dbe4ee;background:#fff;color:#475569;box-shadow:none}
#parentReportModal .report-mode-tabs .btn.active{background:#eef5ff!important;border-color:#bdd0e7!important;color:#315b88!important}
#parentReportModal .report-period-picker{border:1px solid #dde6ef;background:#fff;box-shadow:none;border-radius:13px}
#parentReportModal .report-period-shortcuts button{background:#fff;border:1px solid #e1e7ee;color:#526171;border-radius:999px;font-weight:600}
.parent-report-card-compact{border:1px solid #dfe6ee!important;border-radius:16px!important;box-shadow:0 8px 24px rgba(15,23,42,.055)}
.parent-report-card-compact .parent-report-head{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#496f9d,#6689b1)!important;padding:10px 13px!important}
.parent-report-title{font-size:12px;font-weight:750;letter-spacing:.015em;line-height:1.2;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.parent-report-period-hidden{display:none!important}
.parent-report-head .parent-report-logo{height:32px!important;min-width:42px!important;max-width:38%!important;border-radius:9px!important;background:rgba(255,255,255,.14)!important;border:1px solid rgba(255,255,255,.18);font-weight:700!important;font-size:11px!important}
.parent-report-compact-body{grid-template-columns:minmax(112px,.55fr) minmax(0,2.45fr)!important}
.parent-report-overview{background:#fbfcfe!important;border-right:1px solid #e1e7ee!important}
.parent-report-card-compact .parent-report-grid.learning-only>div{padding:7px 5px!important}
.parent-report-card-compact .parent-report-grid small{font-size:7px!important;letter-spacing:.035em;color:#7a8797!important}
.parent-report-card-compact .parent-report-grid b{font-size:11px!important;font-weight:700!important}
.parent-report-card-compact .parent-report-note{padding:8px 9px!important;font-size:8.5px!important;line-height:1.35!important}
.parent-report-card-compact .parent-report-note b{font-size:8px!important;font-weight:700!important}
.parent-report-card-compact .parent-report-section-title{background:#f3f7fb!important;color:#365f8f!important;border-bottom:1px solid #e1e7ee;font-size:8.5px!important;letter-spacing:.045em}
.parent-report-journal-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.parent-report-journal-grid .parent-report-session{padding:7px 8px!important;grid-template-columns:18px minmax(0,1fr)!important;gap:6px!important}
.parent-report-card-compact .parent-report-session-no{width:18px!important;height:18px!important;background:#e8f0f9!important;color:#365f8f!important;font-size:8px!important}
.parent-report-card-compact .parent-report-session b{font-size:8.5px!important;color:#27384b!important;font-weight:700!important}
.parent-report-card-compact .parent-report-session small{font-size:7px!important;color:#778597!important}
.parent-report-card-compact .parent-report-session p{font-size:7.3px!important;line-height:1.35!important;-webkit-line-clamp:3!important;color:#445468!important}
.parent-report-card-compact .parent-report-foot{background:#fbfcfe;color:#98a3b1;font-size:7.5px!important}
#parentReportModal #prNoteInput{border:1px solid #dde5ed;border-radius:12px;background:#fff;box-shadow:none;font-size:12px;min-height:58px}
#parentReportModal .pro-modal-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
#parentReportModal .pro-modal-actions .btn{border-radius:10px;box-shadow:none;font-size:11px}
#parentReportModal .pro-modal-actions .btn.active{background:#d97706!important;border-color:#d97706!important;color:#fff!important}

#studentShareModal .modal-large-content{width:min(600px,94vw)!important;border-radius:18px;overflow:hidden;box-shadow:0 22px 60px rgba(15,23,42,.18)}
#studentShareModal .manage-header{background:linear-gradient(135deg,#365f8f,#4f79aa)!important;text-transform:none;letter-spacing:0}
#studentShareModal .manage-header span{font-size:14px;font-weight:700}
#studentShareModal .manage-body{background:#f8fafc;padding:16px}
#studentShareModal #studentShareName{font-size:16px;font-weight:700;color:#27384b;margin-bottom:10px}
#studentShareModal #studentAccessCodes{background:#eef5ff!important;border:1px solid #d7e5f7!important;color:#315b88!important;border-radius:12px!important;font-size:13px!important}
#studentShareModal .form-group{background:#fff;border:1px solid #e2e8f0;border-radius:13px;padding:10px 11px;margin-bottom:9px}
#studentShareModal .form-group label{font-size:11px;color:#475569;font-weight:700;margin-bottom:6px;display:block}
#studentShareModal .form-group input{border:0!important;background:#f8fafc!important;box-shadow:none!important;font-size:11px!important}
#studentShareModal .btn{border-radius:9px;box-shadow:none;font-weight:650}
@media(max-width:520px){.parent-report-compact-body{grid-template-columns:98px minmax(0,1fr)!important}.parent-report-journal-grid{grid-template-columns:1fr!important}.parent-report-journal-grid .parent-report-session{border-right:0!important}.parent-report-journal-grid .parent-report-session:nth-child(2){border-top:1px solid #e2e8f0!important}.parent-report-title{font-size:10.5px}.parent-report-head .parent-report-logo{font-size:9.5px!important;max-width:42%!important}}


/* V5.5.5 · student test code / results / banner no-flicker */
@media(min-width:1180px){.page-wrapper:has(.sidebar.hidden) .main-wrapper{width:100%;max-width:1320px}}
.student-test-code{display:block;margin-top:5px;color:#64748b;font-size:9px;font-weight:700;letter-spacing:.02em}.student-test-code button{border:0;background:transparent;color:#2563eb;cursor:pointer;padding:0 2px;font-size:10px}.student-action-test{color:#1d4ed8;border-color:#bfdbfe!important;background:#eff6ff!important}.student-action-test:hover{background:#dbeafe!important}.test-results-modal{width:min(900px,96vw)!important;border-radius:18px;overflow:hidden}.test-results-head{background:linear-gradient(135deg,#365f8f,#4f79aa)!important}.test-results-table-wrap{overflow:auto}.test-results-table{width:100%;border-collapse:collapse;font-size:12px}.test-results-table th{background:#f5f8fc;color:#475569;text-align:left;padding:10px;border-bottom:1px solid #dfe7f0}.test-results-table td{padding:11px 10px;border-bottom:1px solid #edf1f5;color:#334155}.test-results-table td small{display:block;margin-top:3px;color:#8491a3;font-size:9px}.test-level-pill{display:inline-flex;min-width:38px;justify-content:center;padding:5px 8px;border-radius:999px;background:#eef5ff;color:#294f7d;font-weight:800}.test-results-empty{padding:34px;text-align:center;color:#64748b;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:14px}
@media(max-width:700px){.student-test-code{font-size:8px}.student-action-test span{display:none}.test-results-table{min-width:720px}}

/* V5.5.7 · Desktop dashboard uses the available width; mobile remains compact. */
@media (min-width:901px){
  #view-dashboard table{table-layout:auto;width:100%}
  #view-dashboard .dash-th-nowrap{white-space:nowrap;min-width:105px}
  #view-dashboard th:first-child{width:27%}
  #view-dashboard th:nth-child(2){width:18%}
  #view-dashboard th:last-child{min-width:150px}
}

.desktop-label{display:inline}.mobile-label{display:none}@media(max-width:900px){.desktop-label{display:none}.mobile-label{display:inline}}


/* V5.5.8 · desktop navigation balance */
.public-site-btn{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;border:1px solid #e2e8f0;border-radius:11px;background:#fff;color:#334155;font-size:13px;font-weight:700;text-decoration:none;box-shadow:0 4px 14px rgba(15,23,42,.04)}
.public-site-btn:hover{border-color:#fdba74;color:#b45309;background:#fffaf5}
.teacher-top-summary{display:flex;align-items:center;gap:9px;margin-right:4px;padding-right:12px;border-right:1px solid #e2e8f0;white-space:nowrap}
.teacher-top-summary .app-logo{font-size:13px;font-weight:750;margin:0;color:#1f2937}
.teacher-top-summary #dailyCountDisplay{font-size:11px;color:#64748b;margin:0;font-weight:600}
.teacher-top-summary #dailyCountDisplay b{color:#b45309;font-weight:800}
@media(min-width:901px){.dash-th-nowrap{white-space:nowrap!important}.dash-th-nowrap .desktop-label{display:inline!important}.dash-th-nowrap .mobile-label{display:none!important}}
@media(max-width:900px){.public-site-btn{padding:8px 10px;font-size:12px}.teacher-top-summary{display:none}}


/* V6.0.21 · Attendance clarity + landscape parent report */
.attendance-schedule{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:800;color:#475569;line-height:1.4;white-space:normal}
.attendance-schedule-line{display:block;white-space:nowrap}
.attendance-schedule-empty{font-weight:650;color:#94a3b8}
.attendance-student-link{appearance:none;border:0;background:transparent;padding:3px 0;color:#0f172a;font:inherit;font-size:16px;font-weight:850;cursor:pointer;text-align:left;text-decoration:none}
.attendance-student-link:hover{color:#ea580c;text-decoration:underline;text-underline-offset:3px}
.attendance-legend{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;align-items:center;margin-top:12px;font-size:10px;font-weight:750;color:#64748b}
.attendance-legend span{display:inline-flex;align-items:center;gap:5px}
.attendance-legend i{width:12px;height:12px;border-radius:4px;display:inline-block;border:1px solid #cbd5e1}
.attendance-legend .legend-suggested{background:#f0fdf4;border-color:#86efac}
.attendance-legend .legend-present{background:linear-gradient(135deg,var(--primary),var(--secondary));border-color:transparent}
.attendance-legend .legend-absent{background:#fff1f2;border-color:#fda4af}
.day-btn.suggested:not(.selected){position:relative;background:#f0fdf4;border-color:#86efac;color:#166534}
.day-btn.absent-recorded:not(.selected){position:relative;background:#fff1f2;border-color:#fda4af;color:#be123c}
.day-btn.absent-recorded:not(.selected)::after{content:'';position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-radius:50%;background:#e11d48}
.day-btn.partial-present:not(.selected){position:relative;background:#fff7ed;border-color:#fdba74;color:#c2410c;box-shadow:inset 0 0 0 1px #fed7aa}
.day-btn.partial-present:not(.selected)::after,.day-btn.mixed-recorded:not(.selected)::after{content:'';position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-radius:50%;background:#f97316}
.day-btn.mixed-recorded:not(.selected){background:linear-gradient(135deg,#fff7ed 0 50%,#fff1f2 50% 100%);border-color:#fdba74;color:#9a3412}

#parentReportModal .modal-large-content{width:min(1180px,96vw)!important}
#parentReportModal .manage-body{overflow-x:auto}
.parent-report-card-compact{width:100%;min-width:900px;box-sizing:border-box}
.parent-report-compact-body{grid-template-columns:minmax(118px,.42fr) minmax(0,3.58fr)!important}
.parent-report-journal-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.parent-report-card-compact .parent-report-note b{font-size:8px!important}

/* html2canvas export always uses a landscape layout, even when the browser is in mobile emulation. */
.parent-report-card-compact.report-export-landscape{width:1120px!important;min-width:1120px!important;max-width:none!important}
.parent-report-card-compact.report-export-landscape .parent-report-compact-body{grid-template-columns:120px minmax(0,1fr)!important}
.parent-report-card-compact.report-export-landscape .parent-report-journal-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.parent-report-card-compact.report-export-landscape .parent-report-session{border-right:1px solid #e2e8f0!important}
.parent-report-card-compact.report-export-landscape .parent-report-session:nth-child(even){border-right:0!important}
.parent-report-card-compact.report-export-landscape .parent-report-session:nth-child(-n+2){border-top:0!important}

@media(max-width:700px){
  .attendance-table{min-width:560px}
  .attendance-schedule{font-size:12px;gap:3px}
  #parentReportModal .manage-body{padding:10px}
}

/* V6.0.23 Smart Sync */
.smart-sync-card{margin-top:12px;padding:14px;border:1px solid #99f6e4;background:linear-gradient(135deg,#f0fdfa,#eff6ff);border-radius:14px}.smart-sync-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}.smart-sync-head b{display:block;color:#0f766e;font-size:14px}.smart-sync-head span:not(.beta-chip){display:block;margin-top:3px;color:#64748b;font-size:11px}.beta-chip{font-size:9px;font-weight:900;color:#0f766e;border:1px solid #5eead4;background:white;border-radius:999px;padding:4px 7px}.smart-sync-card small{display:block;color:#64748b;font-size:10px;line-height:1.5;margin:-2px 0 10px}.smart-sync-btn{border-color:#5eead4;color:#0f766e;background:white}.smart-sync-modal{width:min(900px,95vw)}.smart-sync-intro{padding:11px 13px;background:#f0fdfa;border:1px solid #99f6e4;border-radius:12px;color:#115e59;font-size:12px;margin-bottom:10px}.smart-sync-status{padding:10px 12px;border-radius:10px;background:#f8fafc;color:#475569;font-size:12px;margin-bottom:10px}.smart-sync-status[data-type="loading"]{background:#eff6ff;color:#1d4ed8}.smart-sync-status[data-type="error"]{background:#fef2f2;color:#b91c1c}.smart-sync-status[data-type="success"]{background:#ecfdf5;color:#047857}.smart-sync-results{display:grid;gap:8px;max-height:52vh;overflow:auto}.smart-sync-row{display:grid;grid-template-columns:28px 92px 110px 1fr auto;gap:10px;align-items:center;border:1px solid #e2e8f0;border-radius:12px;padding:10px;background:white}.smart-sync-date{font-weight:900;color:#0f172a}.smart-sync-status-pill{font-size:10px;font-weight:900;border-radius:999px;padding:5px 8px;text-align:center}.smart-sync-status-pill.attended{background:#dcfce7;color:#166534}.smart-sync-status-pill.absent{background:#fee2e2;color:#b91c1c}.smart-sync-status-pill.planned{background:#fef3c7;color:#92400e}.smart-sync-status-pill.review{background:#ede9fe;color:#6d28d9}.smart-sync-detail{font-size:11px;color:#475569;line-height:1.45}.smart-sync-detail b{color:#334155}.smart-sync-sources{display:flex;gap:5px;flex-wrap:wrap}.smart-sync-source{font-size:9px;border:1px solid #cbd5e1;border-radius:999px;padding:3px 6px;color:#475569}.smart-sync-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.smart-sync-ai-toggle{display:flex;gap:8px;align-items:center;padding:10px 12px;margin-top:10px;background:#faf5ff;border:1px solid #e9d5ff;border-radius:10px;font-size:11px;color:#6b21a8;font-weight:700}@media(max-width:700px){.smart-sync-fields{grid-template-columns:1fr!important}.smart-sync-row{grid-template-columns:26px 82px 1fr}.smart-sync-row .smart-sync-status-pill{grid-column:3}.smart-sync-detail{grid-column:2/4}.smart-sync-sources{grid-column:2/4}.smart-sync-modal{width:96vw}.smart-sync-results{max-height:55vh}}

/* V6.0.26 · Smart Sync Drive lazy file list */
.journal-drive-files{margin-top:10px;border:1px solid #bae6fd;background:#f8fdff;border-radius:12px;padding:10px}
.journal-drive-head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;margin-bottom:8px}
.journal-drive-head a{color:#0284c7;font-weight:800;text-decoration:none}
.journal-drive-list{display:flex;flex-direction:column;gap:6px;max-height:180px;overflow:auto}
.journal-drive-file{display:flex;align-items:flex-start;gap:7px;padding:7px 8px;border-radius:8px;background:#fff;border:1px solid #e0f2fe;color:#0f172a;text-decoration:none;font-size:12px;word-break:break-word}
.journal-drive-file:hover{border-color:#7dd3fc;background:#f0f9ff}
.journal-drive-loading,.journal-drive-empty{font-size:12px;color:#64748b;line-height:1.5}

/* ===== V6.0.29 · Hồ sơ & Tài liệu dạng card ===== */
.profile-doc-modal{width:min(920px,96vw)!important;max-height:92vh;overflow:hidden}.profile-doc-modal .manage-body{max-height:calc(92vh - 56px);overflow:auto}.profile-doc-summary{background:#e8f5e9;border:1px solid #a5d6a7;padding:14px;border-radius:12px;margin-bottom:14px}.profile-doc-summary-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px}.profile-doc-summary-head h3{margin:0;font-size:18px;color:#166534}.profile-doc-summary-head .btn{background:#fff;border-color:#a5d6a7;color:#166534;padding:5px 10px}.profile-doc-info{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;font-size:12px;color:#166534}.profile-doc-schedule{grid-column:1/-1}.profile-doc-section-head{display:flex;justify-content:space-between;align-items:end;margin:0 0 10px}.profile-doc-section-head h4{margin:0;color:var(--text-dark);font-size:14px}.profile-doc-section-head span{display:block;margin-top:3px;font-size:10px;color:var(--text-light)}.profile-doc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:start}.profile-doc-empty{grid-column:1/-1;padding:28px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px;color:#64748b}.profile-lesson-card{border:1px solid #e2e8f0;border-radius:12px;background:#fff;overflow:hidden;min-width:0}.profile-lesson-card.open{grid-column:span 3;border-color:#86efac;box-shadow:0 8px 22px rgba(15,118,110,.08)}.profile-lesson-card.is-absent{background:#fffafa}.profile-lesson-card-head{width:100%;border:0;background:transparent;display:flex;align-items:center;gap:9px;padding:11px;text-align:left;cursor:pointer}.profile-lesson-card-head:hover{background:#f8fafc}.profile-lesson-date{flex:0 0 auto;min-width:50px;text-align:center;border-radius:9px;background:#fff7ed;color:#c2410c;font-weight:900;font-size:13px;padding:6px 5px}.profile-lesson-date small{display:block;font-size:9px;color:#9a3412;margin-top:1px}.profile-lesson-card-text{min-width:0;flex:1}.profile-lesson-card-text b,.profile-lesson-card-text small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-lesson-card-text b{font-size:11px;color:#334155}.profile-lesson-card-text small{font-size:9px;color:#64748b;margin-top:3px}.profile-lesson-chevron{font-size:16px;color:#94a3b8}.profile-lesson-card.open .profile-lesson-chevron{transform:rotate(180deg)}.profile-lesson-detail{padding:0 12px 12px;border-top:1px solid #f1f5f9}.profile-drive-files{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:10px 0}.profile-drive-file{display:flex;gap:6px;align-items:center;padding:7px 9px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0;text-decoration:none;color:#334155;font-size:10px;min-width:0}.profile-drive-file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-file-note{grid-column:1/-1;font-size:10px;color:#64748b;padding:8px;background:#f8fafc;border-radius:8px}.profile-lesson-actions{display:grid;grid-template-columns:minmax(180px,1fr) auto auto auto;gap:6px;align-items:center}.profile-link-input{margin:0!important;font-size:11px!important;padding:8px!important}.profile-lesson-actions .btn{font-size:10px;padding:7px 9px;white-space:nowrap;text-decoration:none}
@media(max-width:700px){.profile-doc-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.profile-lesson-card.open{grid-column:span 2}.profile-doc-info{grid-template-columns:1fr}.profile-doc-schedule{grid-column:auto}.profile-drive-files{grid-template-columns:1fr}.profile-lesson-actions{grid-template-columns:1fr 1fr}.profile-link-input{grid-column:1/-1}.profile-doc-summary-head{align-items:center}.profile-doc-summary-head .btn{font-size:9px}}
@media(max-width:430px){.profile-doc-grid{grid-template-columns:1fr 1fr}.profile-lesson-card.open{grid-column:span 2}.profile-lesson-card-head{padding:8px;gap:6px}.profile-lesson-date{min-width:42px;font-size:11px}.profile-lesson-card-text b{font-size:10px}.profile-lesson-card-text small{font-size:8px}}

/* V6.0.33 · chọn đúng file trước khi AI tóm tắt */
.journal-ai-picker-overlay{z-index:10050;align-items:center;justify-content:center;padding:18px;}
.journal-ai-picker-modal{width:min(680px,94vw);max-height:min(78vh,760px);overflow:hidden;background:#fff;border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.3);display:flex;flex-direction:column;}
.journal-ai-picker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px 14px;border-bottom:1px solid #e2e8f0;background:linear-gradient(135deg,#f5f3ff,#eff6ff);}
.journal-ai-picker-head b{display:block;font-size:18px;color:#4c1d95;}
.journal-ai-picker-head small{display:block;margin-top:4px;color:#64748b;font-size:12px;font-weight:500;}
.journal-ai-picker-close{border:0;background:transparent;font-size:28px;line-height:1;color:#64748b;cursor:pointer;padding:0 4px;}
.journal-ai-picker-note{margin:14px 16px 4px;padding:10px 12px;border-radius:10px;background:#fffbeb;color:#92400e;font-size:12px;border:1px solid #fde68a;}
.journal-ai-picker-list{padding:10px 16px 4px;overflow:auto;display:grid;gap:8px;}
.journal-ai-picker-file{width:100%;border:1px solid #e2e8f0;background:#fff;border-radius:12px;padding:11px 12px;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;text-align:left;cursor:pointer;color:#0f172a;}
.journal-ai-picker-file:hover{border-color:#8b5cf6;background:#faf5ff;}
.journal-ai-picker-file b{display:block;font-size:13px;overflow-wrap:anywhere;}
.journal-ai-picker-file small{display:block;margin-top:3px;color:#64748b;font-size:11px;}
.journal-ai-picker-icon{font-size:20px;}
.journal-ai-picker-foot{padding:12px 16px 16px;display:flex;justify-content:flex-end;border-top:1px solid #f1f5f9;}
@media(max-width:600px){.journal-ai-picker-modal{width:96vw;max-height:82vh}.journal-ai-picker-head{padding:14px}.journal-ai-picker-note,.journal-ai-picker-list{margin-left:0;margin-right:0}.journal-ai-picker-list{padding:8px 12px}.journal-ai-picker-file{padding:10px}}
/* V6.5 · desktop teacher workspace sidebar */
.teacher-sidebar{width:224px;flex:0 0 224px;position:sticky;top:20px;align-self:flex-start;background:#fff;border:1px solid #e3e8ef;border-radius:18px;padding:14px;box-shadow:0 10px 28px rgba(15,23,42,.05);display:flex;flex-direction:column;gap:4px}.teacher-side-brand{font-size:19px;font-weight:900;color:#1e293b;text-decoration:none;padding:8px 10px 16px}.teacher-side-label{font-size:9px;letter-spacing:.12em;font-weight:900;color:#94a3b8;padding:16px 10px 5px}.teacher-sidebar button,.teacher-sidebar>a:not(.teacher-side-brand){display:flex;align-items:center;gap:10px;width:100%;border:0;background:transparent;border-radius:10px;padding:10px 11px;text-align:left;color:#475569;text-decoration:none;font:inherit;font-size:13px;font-weight:700;cursor:pointer}.teacher-sidebar button:hover,.teacher-sidebar>a:not(.teacher-side-brand):hover{background:#f4f7fb;color:#1d4ed8}.teacher-sidebar .muted{opacity:.55}.teacher-sidebar small{font-size:9px;margin-left:5px;color:#94a3b8}.page-wrapper{justify-content:flex-start}.main-wrapper{max-width:none!important}.main-box>.toolbar{display:none}@media(max-width:1050px){.teacher-sidebar{display:none}.main-box>.toolbar{display:flex}}

/* Invoice QR patch - keep QR visible on mobile */
.receipt-bank { flex-direction: row; }
@media (max-width: 600px) {
  .receipt-bank {
    flex-direction: column;
    align-items: stretch;
  }
  .rb-info {
    width: 100%;
  }
  .rb-qr {
    width: min(70vw, 195px);
    height: min(70vw, 195px);
    align-self: center;
    display: block !important;
  }
}
