:root{--sms-primary:#0f766e;--sms-primary-dark:#0b5f59;--sms-blue:#2563eb;--sms-danger:#dc2626;--sms-ink:#172033;--sms-muted:#64748b;--sms-line:#dce4ed;--sms-soft:#f4f7fb;--sms-white:#fff}
.sms-module,.portal-shell,.invoice-sheet{color:var(--sms-ink);font-family:Inter,Arial,sans-serif}.sms-module *,.portal-shell *,.invoice-sheet *,.auth-card *{box-sizing:border-box}
.sms-module .page-header,.portal-shell .page-header,.invoice-sheet .page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 18px;padding:0 0 14px;border-bottom:1px solid var(--sms-line)}
.sms-module h1,.portal-shell h1,.invoice-sheet h1{margin:0 0 5px;font-size:25px;line-height:1.2;color:#0f172a}.sms-module h2,.portal-shell h2,.invoice-sheet h2{margin:0 0 17px;font-size:18px;color:#0f172a}.sms-module p,.portal-shell p,.invoice-sheet p{color:var(--sms-muted)}
.sms-module .card,.portal-shell .card,.invoice-sheet .card{margin:0 0 18px;padding:20px;border:1px solid var(--sms-line);border-radius:11px;background:var(--sms-white);box-shadow:0 3px 12px rgba(15,23,42,.055)}
.sms-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:8px;border:1px solid var(--sms-line);border-radius:10px;background:#fff}.sms-tabs a{display:inline-flex;align-items:center;min-height:38px;padding:8px 14px;border-radius:7px;color:#334155;text-decoration:none;font-size:13px;font-weight:700}.sms-tabs a:hover{background:#ecfdf5;color:var(--sms-primary)}.sms-tabs a.active{background:var(--sms-primary);color:#fff;box-shadow:0 3px 8px rgba(15,118,110,.2)}
.sms-module .form-grid,.portal-shell .form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:end}.sms-module label,.portal-shell label,.payment-card label{display:flex;flex-direction:column;gap:6px;color:#334155;font-size:12px;font-weight:700}.sms-module input,.sms-module select,.sms-module textarea,.portal-shell input,.portal-shell select,.portal-shell textarea,.payment-card input,.payment-card select{width:100%;min-height:40px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#0f172a;font:13px Inter,Arial,sans-serif;outline:none}.sms-module textarea,.portal-shell textarea{min-height:84px;resize:vertical}.sms-module input:focus,.sms-module select:focus,.sms-module textarea:focus,.portal-shell input:focus,.portal-shell select:focus,.portal-shell textarea:focus,.payment-card input:focus,.payment-card select:focus{border-color:var(--sms-primary);box-shadow:0 0 0 3px rgba(15,118,110,.12)}.sms-module .full-width,.portal-shell .full-width{grid-column:1/-1}
.sms-module .btn,.portal-shell .btn,.invoice-sheet .btn,.auth-card .btn{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 13px;border:1px solid #cbd5e1;border-radius:7px;background:#eef2f7;color:#243044;text-decoration:none;font-size:12px;font-weight:800;cursor:pointer}.sms-module .btn:hover,.portal-shell .btn:hover,.invoice-sheet .btn:hover,.auth-card .btn:hover{filter:brightness(.97)}.sms-module .btn-primary,.portal-shell .btn-primary,.invoice-sheet .btn-primary,.auth-card .btn-primary{border-color:var(--sms-primary);background:var(--sms-primary);color:#fff}.sms-module .btn-danger,.portal-shell .btn-danger{border-color:var(--sms-danger);background:var(--sms-danger);color:#fff}.sms-module .btn-sm,.portal-shell .btn-sm{min-height:30px;padding:5px 9px;font-size:11px}
.sms-module .table-responsive,.portal-shell .table-responsive{width:100%;overflow-x:auto}.sms-module .data-table,.portal-shell .data-table,.invoice-sheet .data-table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--sms-line);border-radius:8px;overflow:hidden;background:#fff}.sms-module .data-table th,.portal-shell .data-table th,.invoice-sheet .data-table th{padding:10px 9px;background:#20282e;color:#fff;text-align:left;font-size:11px;white-space:nowrap}.sms-module .data-table td,.portal-shell .data-table td,.invoice-sheet .data-table td{padding:10px 9px;border-top:1px solid #e5eaf0;color:#334155;font-size:11px;vertical-align:middle}.sms-module .data-table tbody tr:hover,.portal-shell .data-table tbody tr:hover{background:#f8fafc}.sms-module .actions,.portal-shell .actions{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-width:235px}.sms-module .actions form,.portal-shell .actions form{display:inline-flex;margin:0}.sms-module .actions select{min-width:135px;min-height:30px;padding:4px 7px}
.alert{margin:0 0 16px;padding:11px 13px;border:1px solid transparent;border-radius:8px;font-size:12px}.alert-success{border-color:#a7f3d0;background:#ecfdf5;color:#047857}.alert-danger{border-color:#fecaca;background:#fef2f2;color:#b91c1c}.alert-info{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
.detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid var(--sms-line);border-radius:8px;overflow:hidden}.detail-grid>div{padding:13px;border-right:1px solid var(--sms-line);border-bottom:1px solid var(--sms-line)}.detail-grid dt{margin-bottom:5px;color:var(--sms-muted);font-size:11px}.detail-grid dd{margin:0;color:#172033;font-size:13px;font-weight:700;overflow-wrap:anywhere}.report-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.report-cards .card{border-top:3px solid var(--sms-primary)}.report-cards strong{font-size:30px;color:var(--sms-primary)}
.portal-shell,.invoice-sheet{max-width:1120px;margin:25px auto;padding:20px;border-radius:12px;background:var(--sms-soft)}.auth-card{width:calc(100% - 30px);max-width:520px;margin:45px auto;padding:28px;border:1px solid var(--sms-line);border-radius:13px;background:#fff;box-shadow:0 18px 45px rgba(2,8,23,.24)}.auth-card h1{margin:0 0 7px;color:#0f172a}.auth-card p{color:var(--sms-muted)}.auth-card label{display:flex;flex-direction:column;gap:6px;margin:14px 0;color:#334155;font-size:12px;font-weight:700}.payment-card{max-width:620px}.payment-qr{display:block;width:260px;max-width:100%;height:260px;margin:18px auto;padding:8px;border:1px solid var(--sms-line);border-radius:10px;background:#fff;object-fit:contain}.invoice-sheet{background:#fff}.invoice-note{text-align:center;color:var(--sms-muted);font-size:12px}
@media(max-width:980px){.sms-module .form-grid,.portal-shell .form-grid,.detail-grid,.report-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.sms-module .page-header,.portal-shell .page-header,.invoice-sheet .page-header{flex-direction:column}.sms-module .form-grid,.portal-shell .form-grid,.detail-grid,.report-cards{grid-template-columns:1fr}.sms-module .full-width,.portal-shell .full-width{grid-column:auto}.sms-tabs{display:grid;grid-template-columns:1fr 1fr}.portal-shell,.invoice-sheet{margin:0;padding:12px;border-radius:0}}
@media print{@page{size:A4 portrait;margin:12mm}.sidebar,.top-header,.sidebar-overlay,.no-print{display:none!important}.app-shell,.app-main{display:block!important;margin:0!important}.app-content{padding:0!important}.invoice-sheet{max-width:none;margin:0;padding:0;border:0;box-shadow:none}.invoice-sheet .card{border:1px solid #333;box-shadow:none}.invoice-sheet .data-table th{background:#eee!important;color:#000!important}}

/* Administrator pages use the shared app-content container. These aliases
   ensure the SMS screens remain styled even when deployed over an older
   shared.css/master.css file. */
.app-content>.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 18px;padding:0 0 14px;border-bottom:1px solid var(--sms-line)}
.app-content>.page-header h1{margin:0 0 5px;color:#0f172a;font-size:25px}.app-content>.page-header p{margin:0;color:var(--sms-muted)}
.app-content>.card,.app-content>.report-cards>.card{margin:0 0 18px;padding:20px;border:1px solid var(--sms-line);border-radius:11px;background:#fff;box-shadow:0 3px 12px rgba(15,23,42,.055)}
.app-content .form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:end}.app-content .form-grid label{display:flex;flex-direction:column;gap:6px;color:#334155;font-size:12px;font-weight:700}.app-content .form-grid input,.app-content .form-grid select,.app-content .form-grid textarea{box-sizing:border-box;width:100%;min-height:40px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#0f172a;outline:none}.app-content .form-grid textarea{min-height:84px}.app-content .form-grid .full-width{grid-column:1/-1}
.app-content .data-table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--sms-line);border-radius:8px;overflow:hidden;background:#fff}.app-content .data-table th{padding:10px 9px;background:#20282e;color:#fff;text-align:left;font-size:11px;white-space:nowrap}.app-content .data-table td{padding:10px 9px;border-top:1px solid #e5eaf0;color:#334155;font-size:11px;vertical-align:middle}.app-content .data-table tbody tr:hover{background:#f8fafc}
.app-content .btn{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 13px;border:1px solid #cbd5e1;border-radius:7px;background:#eef2f7;color:#243044;text-decoration:none;font-size:12px;font-weight:800;cursor:pointer}.app-content .btn-primary{border-color:var(--sms-primary);background:var(--sms-primary);color:#fff}.app-content .btn-danger{border-color:var(--sms-danger);background:var(--sms-danger);color:#fff}.app-content .btn-sm{min-height:30px;padding:5px 9px;font-size:11px}
@media(max-width:980px){.app-content .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:680px){.app-content>.page-header{flex-direction:column}.app-content .form-grid{grid-template-columns:1fr}.app-content .form-grid .full-width{grid-column:auto}}

.app-content .checkbox-control{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-start;gap:9px;min-height:40px}.app-content .checkbox-control input[type=checkbox]{width:17px!important;min-height:17px!important;margin:0}.communication-template-card{margin-top:20px!important}.communication-template-card>p{padding:9px 11px;border-radius:7px;background:#eff6ff;color:#1d4ed8;font-family:monospace;font-size:11px}
.sms-document-page{max-width:1000px;margin:0 auto}.document-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-bottom:14px}.document-toolbar form{display:inline-flex;margin:0}.sms-document{min-height:900px;padding:34px;border:1px solid #cbd5e1;background:#fff;box-shadow:0 5px 18px rgba(15,23,42,.08)}.sms-document header{display:flex;justify-content:space-between;gap:30px;padding-bottom:20px;border-bottom:3px solid #0f766e}.sms-document header h1,.sms-document header h2{margin:0 0 7px;color:#0f172a}.sms-document header>div:last-child{text-align:right}.document-company p{margin:0;color:#475569;line-height:1.5}.document-meta{display:grid;grid-template-columns:2fr 1fr;gap:25px;padding:22px 0}.document-meta>div{display:flex;flex-direction:column;gap:5px}.document-meta small{margin-top:5px;color:#64748b;text-transform:uppercase}.document-meta span{color:#475569}.document-table{width:100%;border-collapse:collapse}.document-table th{padding:10px;border:1px solid #94a3b8;background:#e2e8f0;color:#0f172a;text-align:left}.document-table td{padding:11px;border:1px solid #94a3b8}.document-table .number{text-align:right}.document-total{display:grid;grid-template-columns:1fr 160px;gap:0;width:360px;max-width:100%;margin:18px 0 18px auto;border:1px solid #94a3b8}.document-total span,.document-total strong{padding:9px;border-bottom:1px solid #cbd5e1}.document-total strong{text-align:right}.sms-document footer{margin-top:70px;padding-top:15px;border-top:1px solid #cbd5e1;color:#64748b;text-align:center;font-size:11px}
@media(max-width:680px){.sms-document{min-height:0;padding:16px}.sms-document header,.document-meta{grid-template-columns:1fr;display:grid}.sms-document header>div:last-child{text-align:left}.document-table{display:block;overflow-x:auto}}
@media print{@page{size:A4 portrait;margin:10mm}.sms-document-page{max-width:none}.sms-document{min-height:0;padding:0;border:0;box-shadow:none}.sms-document footer{margin-top:45px}}
