.invoices-page{padding:20px}.invoices-page .page-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}.invoices-page h1{margin:0;font-size:24px;color:#1e293b}.page-subtitle{margin:4px 0 0;color:#64748b;font-size:14px}.stats-row.compact{display:flex;gap:12px;margin-bottom:16px}.stats-row.compact .stat-card{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:12px 16px;display:flex;flex-direction:column;align-items:center;flex:1}.stat-value{font-size:20px;font-weight:700;color:#1e293b}.stat-label{font-size:11px;text-transform:uppercase;color:#64748b;letter-spacing:.5px}.filters-row{margin-bottom:16px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.filters-row select{padding:8px 12px;border:1px solid #e2e8f0;border-radius:6px;font-size:13px}.invoice-search{padding:8px 12px;border:1px solid #e2e8f0;border-radius:6px;font-size:13px;width:260px;outline:none;transition:border-color .15s}.invoice-search:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb14}.invoice-list .data-table{width:100%;border-collapse:collapse;background:#fff;border-radius:8px;border:1px solid #e2e8f0}.invoice-list .data-table th{background:#f8fafc;text-align:left;padding:10px 14px;font-size:11px;text-transform:uppercase;color:#64748b;font-weight:600}.invoice-list .data-table td{padding:10px 14px;font-size:13px;border-top:1px solid #f1f5f9}.invoice-number{font-family:monospace;font-weight:600;color:#3b82f6}.amount{font-weight:600;color:#1e293b}.actions{display:flex;gap:4px}.btn-icon{background:none;border:none;cursor:pointer;padding:4px;font-size:16px;border-radius:4px}.btn-icon:hover{background:#f1f5f9}.btn-icon.btn-danger:hover{background:#fef2f2}.status-badge{padding:3px 8px;border-radius:12px;font-size:11px;font-weight:600;text-transform:capitalize}.status-draft{background:#f1f5f9;color:#64748b}.status-sent{background:#dbeafe;color:#2563eb}.status-partial{background:#fef3c7;color:#d97706}.status-paid{background:#dcfce7;color:#16a34a}.status-overdue{background:#fee2e2;color:#dc2626}.status-cancelled{background:#fef2f2;color:#dc2626}.paid-col{color:#16a34a}.balance-col{color:#dc2626}.no-data{text-align:center;color:#94a3b8;padding:40px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;z-index:1000;display:flex;align-items:center;justify-content:center}.invoice-builder{background:#fff;border-radius:16px;width:860px;max-width:95vw;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 20px 60px #0003}.builder-header{display:flex;justify-content:space-between;align-items:center;padding:20px 28px;border-bottom:1px solid #e2e8f0}.builder-header h2{margin:0;font-size:18px}.close-btn{background:none;border:none;font-size:24px;cursor:pointer;color:#94a3b8}.builder-body{padding:28px;overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:20px}.builder-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 28px;border-top:1px solid #e2e8f0}.builder-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.builder-row.triple{grid-template-columns:1fr 1fr 1fr}.field label{display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;text-transform:uppercase;letter-spacing:.02em}.field input,.field select,.field textarea{width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;transition:border-color .15s,box-shadow .15s}.field input:focus,.field select:focus,.field textarea:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f614;outline:none}.field textarea{resize:vertical}.custom-items-section{background:#f8fafc;border-radius:10px;padding:16px 18px;border:1px solid #e2e8f0}.custom-items-section>label{font-size:13px;font-weight:700;color:#334155;margin-bottom:10px;display:block}.custom-item-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-bottom:1px solid #e2e8f0;border-radius:6px;transition:background .1s}.custom-item-row:hover{background:#fff}.custom-item-row:last-of-type{border-bottom:none}.custom-item-row span:first-child{flex:1;font-size:13px;color:#334155}.custom-item-row span:nth-child(2){font-weight:600;font-size:13px}.item-amount{font-weight:600;font-size:13px;color:#1e293b}.item-amount small{color:#94a3b8;font-weight:400;margin-left:3px}.items-subgroup{margin-bottom:12px;padding:8px 0}.subgroup-label{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:#64748b;font-weight:700;margin-bottom:6px;padding-bottom:4px;border-bottom:1px solid #e2e8f0}.btn-remove{background:none;border:none;color:#ef4444;cursor:pointer;font-size:18px;border-radius:4px;padding:2px 6px;transition:background .1s}.btn-remove:hover{background:#fef2f2}.add-item-row-multi{display:flex;gap:8px;margin-top:12px;align-items:center;flex-wrap:wrap;padding-top:12px;border-top:1px solid #e2e8f0}.add-item-row-multi input{flex:1;padding:8px 10px;border:1px solid #e2e8f0;border-radius:6px;font-size:12px;min-width:80px}.add-item-row-multi .item-amount-input{width:90px;flex:none}.item-type-select{padding:8px 10px;border:1px solid #e2e8f0;border-radius:6px;font-size:11px;font-weight:600;background:#fff}.item-currency-select{padding:8px 10px;border:1px solid #e2e8f0;border-radius:6px;font-size:11px;width:65px}.btn-add{background:#2563eb;color:#fff;border:none;border-radius:6px;padding:8px 14px;cursor:pointer;font-weight:600;font-size:12px;transition:background .15s}.btn-add:hover{background:#1d4ed8}.total-preview{display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,#f0fdf4,#dcfce7);border:1px solid #bbf7d0;border-radius:10px;padding:16px 20px;margin-top:8px}.total-preview span:first-child{font-size:14px;font-weight:600;color:#166534}.total-value{font-size:22px;font-weight:700;color:#16a34a}.total-preview-multi{border-radius:10px;overflow:hidden;margin-top:8px;border:1px solid #e2e8f0;box-shadow:0 2px 8px #0000000a}.total-line{display:flex;justify-content:space-between;align-items:center;padding:14px 20px}.total-line.main{background:linear-gradient(135deg,#f0fdf4,#dcfce7);border-bottom:1px solid #bbf7d0}.total-line.main span:first-child{font-size:13px;font-weight:700;color:#166534;text-transform:uppercase;letter-spacing:.3px}.total-line.main .total-value{font-size:20px;font-weight:700;color:#16a34a}.total-line.secondary{background:linear-gradient(135deg,#fffbeb,#fef9c3)}.total-line.secondary span:first-child{font-size:13px;font-weight:700;color:#92400e;text-transform:uppercase;letter-spacing:.3px}.total-value-secondary{font-size:18px;font-weight:700;color:#d97706}.payment-modal{background:#fff;border-radius:16px;width:480px;max-width:95vw;display:flex;flex-direction:column;box-shadow:0 20px 60px #0003}.payment-summary{background:#f8fafc;border-radius:8px;padding:14px;margin-bottom:16px}.pay-section{padding:8px 0}.pay-section.con{border-top:1px solid #e2e8f0;margin-top:6px;padding-top:10px}.pay-section-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#1e40af;margin-bottom:4px}.pay-section.con .pay-section-title{color:#92400e}.pay-row{display:flex;justify-content:space-between;padding:4px 0;font-size:13px;color:#475569}.pay-row.sub{border-top:1px dashed #e2e8f0;margin-top:2px;padding-top:4px}.pay-row .paid-text{color:#16a34a;font-weight:600}.pay-row .due-text{color:#dc2626;font-weight:600}.pay-row.highlight{border-top:1px solid #e2e8f0;margin-top:6px;padding-top:10px}.pay-row.highlight strong{color:#dc2626;font-size:15px}.uni-cell{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.payment-split{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.split-card{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden}.split-header{padding:8px 12px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px}.uni-header{background:#dbeafe;color:#1e40af}.con-header{background:#fef3c7;color:#92400e}.split-body{padding:12px}.split-body label{display:block;font-size:11px;font-weight:600;color:#475569;margin-bottom:4px}.split-body input{width:100%;padding:8px 10px;border:1px solid #e2e8f0;border-radius:6px;font-size:14px;font-weight:600}.split-hint{font-size:10px;color:#94a3b8;margin-top:4px;display:block}.converter-widget{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:14px 18px;margin-bottom:16px;box-shadow:0 2px 8px #0000000a}.converter-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.conv-input{width:110px;padding:8px 10px;border:1px solid #e2e8f0;border-radius:6px;font-size:14px;font-weight:600}.conv-select{padding:8px 10px;border:1px solid #e2e8f0;border-radius:6px;font-size:13px;font-weight:600;background:#f8fafc}.conv-arrow{font-size:18px;color:#94a3b8}.conv-result{font-size:16px;font-weight:700;color:#16a34a;background:#f0fdf4;padding:6px 14px;border-radius:6px}.conv-note{margin:6px 0 0;font-size:10px;color:#94a3b8}.converter-rate-row{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid #f1f5f9}.rate-label{font-size:12px;font-weight:600;color:#475569}.rate-input{width:90px;padding:5px 8px;border:1px solid #e2e8f0;border-radius:5px;font-size:13px;font-weight:600}.rate-input:focus{border-color:#2563eb;outline:none}.rate-hint{font-size:11px;color:#64748b}.rate-reset{background:none;border:1px solid #e2e8f0;border-radius:4px;padding:3px 8px;font-size:10px;color:#64748b;cursor:pointer}.rate-reset:hover{background:#f1f5f9}.reminder-dropdown{position:relative;display:inline-block}.reminder-dropdown .reminder-menu{display:none;position:absolute;bottom:100%;right:0;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 12px #0000001f;z-index:50;min-width:100px}.reminder-dropdown:hover .reminder-menu{display:block}.invoice-number a{color:#2563eb;text-decoration:none;font-weight:600;cursor:pointer}.invoice-number a:hover{text-decoration:underline;color:#1d4ed8}.inv-type-badge{display:inline-block;font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;margin-left:6px;vertical-align:middle;letter-spacing:.3px;text-transform:uppercase}.inv-type-badge.type-uni{background:#eff6ff;color:#2563eb;border:1px solid #bfdbfe}.inv-type-badge.type-ielts{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0}.inv-type-badge.type-combined{background:#fef3c7;color:#d97706;border:1px solid #fde68a}.actions-cell{text-align:center}.action-btn{border-radius:6px;border:1px solid transparent;cursor:pointer;transition:all .15s;white-space:nowrap}.action-more{background:transparent;color:#64748b;font-size:20px;padding:6px 10px;line-height:1;border-radius:8px;transition:all .15s}.action-more:hover{background:#e2e8f0;color:#1e293b}.action-more[aria-expanded=true]{background:#dbeafe;color:#2563eb}.action-dropdown-wrapper{position:relative}.action-dropdown{background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 10px 30px #00000026;z-index:9999;min-width:200px;padding:6px 0;overflow:hidden}.action-dropdown-portal{position:fixed;z-index:99999;min-width:200px;max-width:240px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 12px 40px #0000001f,0 4px 12px #0000000f;padding:4px 0;animation:dropdownFadeIn .15s ease-out;max-height:70vh;overflow-y:auto;overscroll-behavior:contain}@keyframes dropdownFadeIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.action-dropdown-portal button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:8px 14px;border:none;background:none;font-size:12.5px;color:#334155;cursor:pointer;transition:background .12s,color .12s;line-height:1.3;white-space:nowrap}.action-dropdown-portal button:hover{background:#f1f5f9;color:#1e293b}.action-dropdown-portal button:focus-visible{outline:2px solid #2563eb;outline-offset:-2px;background:#eff6ff}.action-dropdown-portal button.action-danger{color:#dc2626}.action-dropdown-portal button.action-danger:hover{background:#fef2f2;color:#b91c1c}.action-dropdown-portal .action-dropdown-divider{height:1px;background:#f1f5f9;margin:4px 0}.action-dropdown button{display:block;width:100%;text-align:left;padding:9px 14px;border:none;background:none;font-size:13px;color:#334155;cursor:pointer;transition:background .1s}.action-dropdown button:hover{background:#f1f5f9}.action-dropdown button.action-danger{color:#dc2626}.action-dropdown button.action-danger:hover{background:#fef2f2}.action-dropdown-divider{height:1px;background:#f1f5f9;margin:4px 0}.invoice-view-modal{background:#fff;border-radius:16px;width:560px;max-width:95vw;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 20px 60px #0003;animation:modalSlideIn .2s ease-out}@keyframes modalSlideIn{0%{opacity:0;transform:translateY(20px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}.invoice-view-body{padding:24px;overflow-y:auto;flex:1}.inv-view-status-row{display:flex;align-items:center;gap:8px;margin-bottom:20px}.inv-view-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:24px;padding:16px;background:#f8fafc;border-radius:10px}.inv-view-field{display:flex;flex-direction:column;gap:3px}.inv-view-label{font-size:11px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.03em}.inv-view-value{font-size:14px;font-weight:600;color:#1e293b}.inv-view-section{margin-bottom:20px}.inv-view-section h4{font-size:13px;font-weight:700;color:#475569;margin-bottom:10px;text-transform:uppercase;letter-spacing:.03em}.inv-view-breakdown{display:flex;flex-direction:column;gap:0}.inv-breakdown-row{display:flex;justify-content:space-between;padding:8px 12px;font-size:13px;color:#475569;border-bottom:1px solid #f8fafc}.inv-breakdown-row span:last-child,.inv-breakdown-row strong{font-weight:600;color:#1e293b}.inv-breakdown-row.discount span:last-child{color:#dc2626}.inv-breakdown-row.total{background:#f8fafc;border-radius:6px;margin-top:4px}.inv-breakdown-row.total strong{color:#1e293b;font-size:14px}.inv-breakdown-row.paid span:last-child{color:#16a34a;font-weight:600}.inv-breakdown-row.balance{background:#eff6ff;border-radius:6px;margin-top:4px}.inv-breakdown-row.balance strong{color:#2563eb;font-size:14px}.inv-view-notes{font-size:13px;color:#64748b;line-height:1.6;white-space:pre-wrap;background:#f8fafc;padding:12px;border-radius:8px}@media (max-width: 768px){.inv-view-grid{grid-template-columns:1fr}.invoice-view-modal{width:100%;border-radius:12px 12px 0 0}}.reminder-menu button{display:block;width:100%;padding:8px 14px;border:none;background:none;text-align:left;font-size:13px;cursor:pointer}.reminder-menu button:hover{background:#f1f5f9}.analytics-modal{background:#fff;border-radius:16px;width:95%;max-width:900px;max-height:90vh;overflow-y:auto}.analytics-header-actions{display:flex;align-items:center;gap:10px}.ceo-btn{padding:6px 14px;border:none;background:linear-gradient(135deg,#16a34a,#15803d);color:#fff;font-size:12px;font-weight:700;border-radius:6px;cursor:pointer;white-space:nowrap}.ceo-btn:hover{transform:scale(1.03)}.analytics-tabs{display:flex;border-bottom:2px solid #e2e8f0;padding:0 24px}.analytics-tabs button{padding:10px 18px;border:none;background:none;font-size:13px;font-weight:600;color:#64748b;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;transition:all .2s}.analytics-tabs button.active{color:#2563eb;border-bottom-color:#2563eb}.analytics-tabs button:hover{color:#1e40af}.analytics-body{padding:24px}.analytics-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px}.analytics-card{padding:16px;border-radius:12px;text-align:center;border:1px solid #e2e8f0}.analytics-card.total{background:linear-gradient(135deg,#eff6ff,#dbeafe);border-color:#93c5fd}.analytics-card.revenue{background:linear-gradient(135deg,#f0fdf4,#dcfce7);border-color:#86efac}.analytics-card.outstanding{background:linear-gradient(135deg,#fefce8,#fef9c3);border-color:#fde047}.analytics-card.overdue-card{background:linear-gradient(135deg,#fef2f2,#fecaca);border-color:#fca5a5}.analytics-label{display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}.analytics-value{display:block;font-size:22px;font-weight:800;color:#1e293b}.analytics-split{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:24px}.analytics-section{background:#f8fafc;border-radius:12px;padding:20px;text-align:center;border:1px solid #e2e8f0}.analytics-section h4{margin:0 0 8px;font-size:13px;color:#64748b;font-weight:600}.big-number{font-size:28px;font-weight:800;color:#1e293b}.analytics-status{margin-bottom:24px}.analytics-status h4{margin:0 0 12px;font-size:14px;font-weight:700;color:#334155}.status-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.status-item{display:flex;flex-direction:column;align-items:center;padding:12px 8px;border-radius:10px;background:#f8fafc;border:1px solid #e2e8f0}.status-item.paid{background:#f0fdf4;border-color:#86efac}.status-item.overdue{background:#fef2f2;border-color:#fca5a5}.status-item.partial{background:#fefce8;border-color:#fde047}.status-item.sent{background:#eff6ff;border-color:#93c5fd}.status-count{font-size:20px;font-weight:800;color:#1e293b}.status-name{font-size:11px;font-weight:600;color:#64748b;text-transform:capitalize;margin-top:4px}.analytics-chart h4{margin:0 0 14px;font-size:14px;font-weight:700;color:#334155}.chart-bars{display:flex;align-items:flex-end;gap:12px;height:160px;padding:10px 0;border-bottom:2px solid #e2e8f0}.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;justify-content:flex-end}.bar{background:linear-gradient(180deg,#3b82f6,#2563eb);border-radius:6px 6px 0 0;width:100%;min-height:4px;position:relative;transition:height .3s ease}.bar-value{position:absolute;top:-18px;left:50%;transform:translate(-50%);font-size:9px;font-weight:700;color:#2563eb;white-space:nowrap}.bar-label{font-size:10px;color:#64748b;margin-top:6px;font-weight:600}.uni-revenue-chart h4,.success-chart h4,.monthly-chart h4{margin:0 0 16px;font-size:15px;font-weight:700;color:#1e293b}.horizontal-bars{display:flex;flex-direction:column;gap:10px}.h-bar-row{display:flex;align-items:center;gap:10px}.h-bar-label{width:160px;font-size:12px;font-weight:600;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h-bar-track{flex:1;height:28px;background:#f1f5f9;border-radius:6px;overflow:hidden}.h-bar-fill{height:100%;background:linear-gradient(90deg,#3b82f6,#6366f1);border-radius:6px;display:flex;align-items:center;justify-content:flex-end;padding-right:8px;min-width:30px;transition:width .4s ease}.h-bar-value{font-size:11px;font-weight:700;color:#fff;white-space:nowrap}.h-bar-count{font-size:11px;color:#94a3b8;font-weight:600;min-width:40px}.success-table{display:flex;flex-direction:column;gap:6px}.success-header{display:grid;grid-template-columns:2fr 60px 60px 60px 1fr;gap:10px;padding:8px 12px;background:#f1f5f9;border-radius:8px;font-size:11px;font-weight:700;color:#475569;text-transform:uppercase}.success-row{display:grid;grid-template-columns:2fr 60px 60px 60px 1fr;gap:10px;padding:8px 12px;align-items:center;border-bottom:1px solid #f1f5f9;font-size:13px}.success-uni{font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.success-paid{font-weight:700;color:#16a34a}.rate-badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:700}.rate-badge.good{background:#dcfce7;color:#15803d}.rate-badge.mid{background:#fef9c3;color:#a16207}.rate-badge.low{background:#fecaca;color:#dc2626}.rate-bar-track{height:8px;background:#f1f5f9;border-radius:4px;overflow:hidden}.rate-bar-fill{height:100%;border-radius:4px;transition:width .4s ease}.rate-bar-fill.good{background:#22c55e}.rate-bar-fill.mid{background:#eab308}.rate-bar-fill.low{background:#ef4444}.chart-bars.stacked{height:200px}.stacked-col{position:relative}.stacked-bar{display:flex;flex-direction:column;width:100%;border-radius:6px 6px 0 0;overflow:hidden}.bar-segment{width:100%;transition:height .3s ease}.uni-seg{background:linear-gradient(180deg,#3b82f6,#2563eb)}.con-seg{background:linear-gradient(180deg,#f59e0b,#d97706)}.bar-total{font-size:9px;color:#475569;margin-top:2px;font-weight:700}.chart-legend{display:flex;justify-content:center;gap:20px;margin-top:12px}.legend-item{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#475569}.legend-dot{width:12px;height:12px;border-radius:3px}.legend-dot.uni{background:#3b82f6}.legend-dot.con{background:#f59e0b}.monthly-table{margin-top:16px;border-top:1px solid #e2e8f0;padding-top:12px}.monthly-row{display:flex;justify-content:space-between;align-items:center;padding:6px 0;font-size:12px;color:#475569;border-bottom:1px solid #f8fafc}.month-name{font-weight:700;color:#1e293b;min-width:80px}.month-total{font-weight:700;color:#2563eb}.month-invoices{font-size:11px;color:#94a3b8}.due-cell{font-size:12px;color:#475569;white-space:nowrap}.reminder-tag{display:inline-block;margin-left:6px;padding:2px 6px;background:#eff6ff;color:#2563eb;font-size:10px;font-weight:600;border-radius:4px;text-transform:capitalize}.reminder-modal{background:#fff;border-radius:16px;width:90%;max-width:720px;max-height:90vh;overflow-y:auto}.ai-draft-section{background:linear-gradient(135deg,#f8fafc,#eff6ff);border:1px solid #dbeafe;border-radius:12px;padding:16px;margin-bottom:18px}.ai-draft-section h4{margin:0 0 10px;font-size:14px;font-weight:700;color:#1e40af}.ai-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.ai-controls select{padding:8px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;background:#fff}.ai-controls input{flex:1;min-width:150px;padding:8px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px}.ai-draft-btn{padding:8px 16px;border:none;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-weight:700;font-size:13px;border-radius:8px;cursor:pointer;white-space:nowrap;transition:transform .1s}.ai-draft-btn:hover{transform:scale(1.03)}.ai-draft-btn:disabled{opacity:.6;cursor:not-allowed;transform:none}.reminder-textarea{width:100%;padding:12px;border:1px solid #e2e8f0;border-radius:10px;font-family:inherit;font-size:13px;line-height:1.6;resize:vertical;min-height:140px}.reminder-textarea:focus{border-color:#6366f1;outline:none;box-shadow:0 0 0 3px #6366f11a}.reminder-info{display:flex;justify-content:space-between;padding:10px 14px;background:#f8fafc;border-radius:8px;margin-top:12px;font-size:13px;color:#475569;font-weight:600}@media (max-width: 768px){.invoices-page{padding:12px}.invoices-page .page-header{flex-direction:column;gap:.75rem;align-items:stretch}.invoices-page h1{font-size:20px}.stats-row.compact{flex-wrap:wrap;gap:8px}.stats-row.compact .stat-card{flex:0 0 calc(50% - 4px);padding:10px 12px}.stat-value{font-size:16px}.filters-row{flex-direction:column;gap:8px}.invoice-search{width:100%}.invoice-list{overflow-x:auto;-webkit-overflow-scrolling:touch}.invoice-list .data-table{min-width:700px}.invoice-builder{width:100%;max-width:100vw;border-radius:12px 12px 0 0;max-height:92vh}.builder-header{padding:14px 16px}.builder-header h2{font-size:16px}.builder-body{padding:16px}.builder-footer{padding:12px 16px}.builder-row,.builder-row.triple{grid-template-columns:1fr}.add-item-row-multi{flex-direction:column;align-items:stretch}.add-item-row-multi input{min-width:auto;width:100%}.add-item-row-multi .item-amount-input{width:100%}.payment-modal{width:100%;border-radius:12px 12px 0 0}.payment-split{grid-template-columns:1fr}.converter-row{flex-direction:column;align-items:stretch}.conv-input{width:100%}.analytics-modal{width:100%;max-width:100%;border-radius:12px 12px 0 0}.analytics-tabs{overflow-x:auto;-webkit-overflow-scrolling:touch;padding:0 12px}.analytics-tabs button{padding:10px 12px;white-space:nowrap;font-size:12px}.analytics-cards{grid-template-columns:repeat(2,1fr);gap:10px}.analytics-split{grid-template-columns:1fr}.status-grid{grid-template-columns:repeat(3,1fr);gap:6px}.analytics-body{padding:16px}.reminder-modal{width:100%;border-radius:12px 12px 0 0}.ai-controls{flex-direction:column;align-items:stretch}.ai-controls input{min-width:auto}.invoice-view-modal{width:100%;border-radius:12px 12px 0 0}.invoice-view-body{padding:16px}.commission-panel-modal{width:100%}.commission-form-grid{grid-template-columns:1fr}.commission-item-row{flex-wrap:wrap}.comm-panel{width:100%;max-width:100%;border-radius:12px 12px 0 0}.comm-panel-body{padding:16px}.comm-emp-breakdown{flex-direction:column;gap:8px}.comm-emp-paid-row{flex-wrap:wrap;gap:6px}.comm-grand-summary{flex-direction:column;gap:8px}.invoice-type-toggle .type-btn{padding:8px 10px;font-size:.75rem}.create-student-prompt .prompt-form{flex-direction:column}.create-student-prompt .prompt-field{min-width:auto}.action-dropdown-portal{min-width:180px}.action-dropdown-portal button{padding:12px 14px;min-height:44px}.revenue-analytics{grid-template-columns:1fr}.h-bar-label{width:100px;font-size:11px}.success-header,.success-row{grid-template-columns:1.5fr 50px 50px 50px 1fr;gap:6px;font-size:11px}.preset-chips{gap:4px}.preset-editor-row{flex-wrap:wrap}.template-save-row{flex-direction:column}}@media (max-width: 480px){.invoices-page{padding:8px}.stats-row.compact .stat-card{flex:0 0 100%}.analytics-cards{grid-template-columns:1fr}.status-grid{grid-template-columns:repeat(2,1fr)}.chart-bars{gap:6px;height:120px}.total-preview{flex-direction:column;gap:8px;text-align:center}.total-preview-multi .total-line{flex-direction:column;gap:4px;text-align:center;padding:10px}}.btn-template{background:#f0f4ff;border:1px solid #c7d2fe;color:#4338ca;font-size:12px;font-weight:600;padding:6px 12px;border-radius:6px;cursor:pointer;transition:all .15s}.btn-template:hover{background:#e0e7ff}.template-panel{background:#f8fafc;border-bottom:1px solid #e2e8f0;padding:14px 20px}.template-panel-header{font-size:13px;margin-bottom:10px;color:#334155}.template-list{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.template-item{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.template-name{flex:1;text-align:left;background:none;border:none;cursor:pointer;font-size:13px;font-weight:600;color:#2563eb;padding:0}.template-name:hover{text-decoration:underline}.template-meta{font-size:11px;color:#94a3b8}.template-empty{font-size:12px;color:#94a3b8;margin-bottom:10px}.template-save-row{display:flex;gap:8px}.template-save-row input{flex:1;padding:7px 10px;border:1px solid #e2e8f0;border-radius:6px;font-size:12px}.preset-chips{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px;align-items:center}.preset-chips-label{font-size:11px;color:#64748b;font-weight:600;margin-right:2px;text-transform:uppercase;letter-spacing:.3px}.preset-chip{background:#fff;border:1px solid #d1fae5;color:#166534;font-size:11px;font-weight:600;padding:5px 12px;border-radius:20px;cursor:pointer;transition:all .15s;box-shadow:0 1px 2px #0000000a}.preset-chip:hover{background:#dcfce7;border-color:#86efac;transform:translateY(-1px);box-shadow:0 2px 4px #00000014}.preset-edit-btn{background:#f8fafc;border:1px solid #e2e8f0;color:#64748b;font-size:12px;padding:3px 8px;border-radius:4px;cursor:pointer;margin-left:4px}.preset-edit-btn:hover{background:#e2e8f0;color:#334155}.preset-editor{background:#fafbfc;border:1px solid #e2e8f0;border-radius:8px;padding:10px;margin-bottom:12px}.preset-editor-row{display:flex;align-items:center;gap:8px;padding:5px 0;border-bottom:1px solid #f1f5f9}.preset-editor-row:last-of-type{border-bottom:none}.preset-editor-label{flex:1;font-size:12px;font-weight:500;color:#334155}.preset-editor-amount{width:90px;padding:4px 8px;border:1px solid #e2e8f0;border-radius:4px;font-size:12px;text-align:right}.preset-editor-cur{font-size:11px;color:#94a3b8;width:30px}.preset-add-row{display:flex;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid #e2e8f0}.preset-add-row input{flex:1;padding:5px 8px;border:1px solid #e2e8f0;border-radius:4px;font-size:12px}.preset-reset-btn{margin-top:8px;background:none;border:none;color:#94a3b8;font-size:11px;cursor:pointer;text-decoration:underline}.preset-reset-btn:hover{color:#64748b}.access-denied{text-align:center;padding:80px 20px}.access-denied h2{color:#dc2626;margin-bottom:12px}.access-denied p{color:#64748b;font-size:16px}.commission-section{background:linear-gradient(135deg,#fffbeb,#fef9c3);border:1px solid #fde68a;border-radius:10px;padding:16px 18px;margin:4px 0}.commission-section>label{font-weight:700;font-size:13px;color:#92400e;margin-bottom:12px;display:block}.commission-item-row{display:flex;align-items:center;gap:10px;margin-bottom:10px;padding:8px 10px;background:#fff9;border-radius:8px;border:1px solid #fde68a}.commission-label-input{flex:2;padding:8px 10px;border:1px solid #fcd34d;border-radius:6px;font-size:13px;background:#fff}.commission-pct-input{width:70px;padding:8px 10px;border:1px solid #fcd34d;border-radius:6px;font-size:13px;text-align:right;background:#fff}.commission-pct-sign{color:#92400e;font-weight:600;font-size:13px}.commission-amount-preview{color:#15803d;font-weight:700;font-size:13px;min-width:100px;background:#f0fdf4;padding:4px 8px;border-radius:4px}.btn-add-commission{background:#fff;border:1px dashed #f59e0b;color:#92400e;font-size:12px;font-weight:600;padding:7px 14px;border-radius:6px;cursor:pointer;margin-top:6px;transition:all .15s}.btn-add-commission:hover{background:#fef3c7;border-color:#d97706}.closer-cell{font-size:12px;color:#6366f1;font-weight:500}.commission-col{color:#65a30d;font-weight:600}.total-line.commission{border-top:1px dashed #f59e0b;padding-top:6px;margin-top:6px}.total-value-commission{color:#65a30d;font-weight:700}.total-line.counselor{font-size:13px}.total-value-counselor{color:#6366f1;font-weight:600}.country-cell{font-size:12px;color:#0891b2;font-weight:500}.invoice-type-toggle{display:flex;gap:0;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;box-shadow:0 1px 3px #0000000a}.invoice-type-toggle .type-btn{padding:10px 18px;border:none;background:#fff;cursor:pointer;font-size:.85rem;font-weight:600;color:#64748b;transition:all .2s}.invoice-type-toggle .type-btn:first-child{border-right:1px solid #e2e8f0}.invoice-type-toggle .type-btn.active{background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;box-shadow:inset 0 1px 2px #0000001a}.invoice-type-toggle .type-btn:hover:not(.active){background:#f1f5f9;color:#334155}.combined-section-label{font-size:.85rem;font-weight:700;color:#334155;margin:16px 0 6px;padding:8px 12px;background:linear-gradient(90deg,#f0f7ff,transparent);border-left:3px solid #3b82f6;border-radius:0 8px 8px 0}.create-student-prompt{background:#fffbeb;border:1px solid #fbbf24;border-radius:10px;padding:12px 16px;margin:8px 0}.create-student-prompt .prompt-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:.82rem;font-weight:500;color:#92400e}.create-student-prompt .prompt-close{background:none;border:none;font-size:1.2rem;cursor:pointer;color:#92400e;padding:2px 6px}.create-student-prompt .prompt-form{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}.create-student-prompt .prompt-field{display:flex;flex-direction:column;gap:3px;flex:1;min-width:120px}.create-student-prompt .prompt-field label{font-size:.72rem;font-weight:600;color:#78716c;text-transform:uppercase}.create-student-prompt .prompt-field input{padding:6px 10px;border:1px solid #e5e7eb;border-radius:6px;font-size:.85rem}.btn-create-student{padding:8px 14px;background:#16a34a;color:#fff;border:none;border-radius:6px;font-size:.8rem;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s}.btn-create-student:hover{background:#15803d}.mismatch-warning{margin-top:6px;padding:6px 10px;background:#fef2f2;border:1px solid #fca5a5;border-radius:6px;font-size:.78rem;color:#dc2626;line-height:1.4}.comm-panel{background:#fff;border-radius:16px;width:680px;max-width:94vw;max-height:85vh;display:flex;flex-direction:column;box-shadow:0 24px 48px #00000026;overflow:hidden}.comm-panel-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #f1f5f9}.comm-panel-header h3{margin:0;font-size:17px;font-weight:600;color:#1e293b}.comm-panel-header button{background:none;border:none;font-size:22px;cursor:pointer;color:#94a3b8;width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:all .15s}.comm-panel-header button:hover{background:#f1f5f9;color:#475569}.comm-panel-body{padding:20px 24px;overflow-y:auto;flex:1}.comm-empty{text-align:center;color:#94a3b8;padding:32px 16px;font-size:14px}.comm-cards{display:flex;flex-direction:column;gap:12px}.comm-card{border:1px solid #e2e8f0;border-radius:12px;padding:16px;transition:box-shadow .15s}.comm-card:hover{box-shadow:0 4px 12px #0000000f}.comm-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.comm-card-country{font-weight:600;font-size:15px;color:#1e293b}.comm-card-amount{font-weight:700;font-size:16px;color:#059669}.comm-card-row{display:flex;gap:16px;font-size:12px;color:#64748b;margin-bottom:10px}.comm-card-unis{border-top:1px solid #f1f5f9;padding-top:10px;display:flex;flex-direction:column;gap:6px}.comm-uni-item{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#475569;padding:4px 8px;border-radius:6px;background:#f8fafc}.comm-uni-item small{color:#94a3b8;margin-left:4px}.comm-grand-total{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#f8fafc;border-radius:12px;margin-bottom:16px}.comm-grand-total span:first-child{font-size:13px;font-weight:500;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.comm-grand-amount{font-size:20px;font-weight:700;color:#1e293b}.comm-emp-list{display:flex;flex-direction:column;gap:10px}.comm-emp-card{border:1px solid #e2e8f0;border-radius:12px;padding:14px 16px;transition:box-shadow .15s}.comm-emp-card:hover{box-shadow:0 4px 12px #0000000f}.comm-emp-top{display:flex;align-items:center;gap:12px}.comm-emp-avatar{width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:14px;flex-shrink:0}.comm-emp-info{flex:1;display:flex;flex-direction:column}.comm-emp-name{font-weight:600;font-size:14px;color:#1e293b}.comm-emp-invoices{font-size:12px;color:#94a3b8}.comm-emp-amount{font-weight:700;font-size:16px;color:#1e293b}.comm-emp-breakdown{display:flex;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid #f1f5f9}.comm-emp-stat{flex:1;padding:8px 12px;border-radius:8px;display:flex;flex-direction:column;gap:2px}.comm-emp-stat.paid{background:#f0fdf4}.comm-emp-stat.pending{background:#fffbeb}.comm-emp-stat-label{font-size:11px;font-weight:500;color:#64748b;text-transform:uppercase;letter-spacing:.3px}.comm-emp-stat.paid .comm-emp-stat-value{font-size:13px;font-weight:600;color:#16a34a}.comm-emp-stat.pending .comm-emp-stat-value{font-size:13px;font-weight:600;color:#d97706}.comm-grand-summary{display:flex;gap:10px;margin-top:8px;margin-bottom:12px}.comm-grand-stat{flex:1;padding:10px 14px;border-radius:10px;display:flex;flex-direction:column;gap:2px}.comm-grand-stat.paid{background:#f0fdf4;border:1px solid #bbf7d0}.comm-grand-stat.balance{background:#fef3c7;border:1px solid #fde68a}.comm-grand-stat-label{font-size:11px;font-weight:500;color:#64748b;text-transform:uppercase;letter-spacing:.3px}.comm-grand-stat.paid .comm-grand-stat-value{font-size:15px;font-weight:700;color:#16a34a}.comm-grand-stat.balance .comm-grand-stat-value{font-size:15px;font-weight:700;color:#d97706}.comm-emp-paid-row{display:flex;gap:8px;margin-top:8px;padding-top:8px;border-top:1px dashed #e2e8f0;align-items:center}.comm-emp-stat.comm-paid{background:#ecfdf5;border:1px solid #a7f3d0}.comm-emp-stat.comm-paid .comm-emp-stat-value{font-size:13px;font-weight:600;color:#059669}.comm-emp-stat.comm-balance{background:#fffbeb;border:1px solid #fde68a}.comm-emp-stat.comm-balance .comm-emp-stat-value{font-size:13px;font-weight:600;color:#b45309}.comm-record-payment-btn{margin-left:auto;padding:6px 14px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;border:none;border-radius:8px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;transition:transform .1s,box-shadow .15s}.comm-record-payment-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px #6366f14d}.commission-panel-modal{max-width:1000px;width:95vw}.commission-form-section{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:1.5rem}.commission-form-section h3{margin:0 0 1rem;font-size:1rem;font-weight:700;color:#1e293b}.commission-form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}.commission-form-grid .field label{font-size:.75rem;font-weight:600;color:#475569;display:block;margin-bottom:5px;text-transform:uppercase;letter-spacing:.02em}.commission-form-grid .field input,.commission-form-grid .field select{width:100%;padding:.55rem .75rem;border:1px solid #cbd5e1;border-radius:8px;font-size:.85rem;transition:border-color .15s,box-shadow .15s}.commission-form-grid .field input:focus,.commission-form-grid .field select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f614;outline:none}.commission-payments-list h3,.commission-rates-list h3{font-size:1rem;font-weight:700;color:#1e293b;margin-bottom:.75rem}.empty-text{color:#94a3b8;font-style:italic;padding:1.5rem;text-align:center;background:#f8fafc;border-radius:8px;border:1px dashed #e2e8f0}table.data-table.compact{font-size:.8rem}table.data-table.compact th,table.data-table.compact td{padding:.5rem .7rem}.action-btn{background:none;border:none;color:#3b82f6;cursor:pointer;font-size:.75rem;font-weight:600;padding:2px 6px;border-radius:4px}.action-btn:hover{background:#eff6ff}.action-btn.danger{color:#ef4444}.action-btn.danger:hover{background:#fef2f2}.split-header.ielts-header{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff}.split-header.coaching-header{background:linear-gradient(135deg,#059669,#10b981);color:#fff}.pay-section.coaching .pay-section-title{color:#059669}.builder-body>.builder-row+.builder-row,.builder-body>.builder-row+.custom-items-section,.builder-body>.custom-items-section+.builder-row,.builder-body>.builder-row+.commission-section,.builder-body>.custom-items-section+.commission-section{padding-top:16px;border-top:1px solid #f1f5f9}.builder-body>.field{padding-top:12px}.builder-body>.total-preview-multi{margin-top:12px}.commission-form-grid .field[style*="grid-column: span 2"]{min-width:300px}
