/* One foundation for resident, staff, and administrator interfaces. */
:root{--primary:#28634f;--primary-dark:#1d4a3e;--bg:#f7f5ee;--card-bg:#fffefa;--text:#233b31;--text-muted:#68796c;--border:#dde4d6;--radius:14px;--portal-sidebar:260px;--portal-gutter:32px;--bs-primary:#28634f;--bs-primary-rgb:40,99,79;--bs-body-color:#233b31;--bs-body-bg:#f7f5ee;--bs-border-color:#dde4d6}
body{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--text);font-size:14px;line-height:1.6}
body.portal-page{display:flex;min-height:100dvh;margin:0;background:var(--bg)}
.portal-page>.sidebar{width:var(--portal-sidebar);height:100dvh;min-height:0;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;overflow-y:auto;background:linear-gradient(165deg,#183f37,#102e2a);border-right:1px solid #ffffff0c;z-index:100}
.portal-page .sidebar-brand{padding:28px 24px 22px;border-bottom:1px solid #ffffff12}.portal-page .sidebar-brand .brand-icon{width:44px;height:44px;border-radius:12px;margin-bottom:14px;background:#d5b97e;color:#173c31;font-size:20px}
.portal-page .sidebar-brand h2{font-size:17px;font-weight:700;line-height:1.4;color:#fff;margin:0}.portal-page .sidebar-brand p{font-size:11px;color:#b5c8ba;margin:4px 0 0}
.portal-page .sidebar-nav{flex:1;padding:16px 12px}.portal-page .nav-label{padding:0 12px;margin:20px 0 8px;color:#a8bead;font-size:10px;font-weight:650;letter-spacing:1.5px;text-transform:uppercase}.portal-page .nav-label:first-child{margin-top:0}
.portal-page .nav-item{display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 12px;margin:0 0 4px;border-radius:8px;font-size:13px;font-weight:500;line-height:1.4;color:#c7d7cb;text-decoration:none;transition:background .2s,color .2s}.portal-page .nav-item:hover{background:#ffffff0b;color:#fff;transform:none}.portal-page .nav-item.active{background:#ffffff12;color:#fff;box-shadow:inset 3px 0 #d5b97e}
.portal-page .sidebar-footer{padding:16px 12px;border-top:1px solid #ffffff12;margin-top:auto}.portal-page .user-info{display:flex;align-items:center;gap:10px;padding:12px;border-radius:10px;background:#ffffff08;margin-bottom:8px;min-width:0}.portal-page .user-avatar{width:36px;height:36px;border-radius:50%;flex-shrink:0;background:#d5b97e;color:#173c31;font-size:14px;font-weight:700}.portal-page .user-info>div:last-child{min-width:0}.portal-page .user-name{font-size:12px;font-weight:600;color:#fff;overflow-wrap:anywhere}.portal-page .user-role{font-size:10px;color:#b5c8ba}
.portal-page>.main{display:flex;flex-direction:column;flex:1;min-width:0;width:calc(100% - var(--portal-sidebar));margin-left:var(--portal-sidebar)}
.portal-page .topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px var(--portal-gutter);min-height:96px;background:#fffefaee;border-bottom:1px solid var(--border);backdrop-filter:blur(12px)}.portal-page .topbar-left{display:block;min-width:0;flex:1}.portal-page .topbar-left h1{font-size:26px;font-weight:700;line-height:1.25;margin:0;letter-spacing:-.035em;overflow-wrap:anywhere}.portal-page .topbar-left p{font-size:12px;color:var(--text-muted);line-height:1.6;margin:6px 0 0}.portal-page .topbar-left .portal-kicker{font-size:9px;letter-spacing:1.7px;margin-bottom:6px}.portal-page .topbar-left>a{font-size:11px;margin-bottom:6px}.portal-page .topbar-left>.sep{display:none}.portal-page .topbar-right{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;min-width:0}
.portal-page .content{width:100%;max-width:1560px;margin:0 auto;padding:28px var(--portal-gutter)}.portal-page .settings-content{max-width:980px;margin-left:0}
.card{background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 4px 20px #193c3208;margin-bottom:24px;min-width:0}.card-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px;background:var(--card-bg);border-bottom:1px solid var(--border)}.card-header h2{font-size:16px;font-weight:650;line-height:1.4;margin:0;color:var(--text)}.card-header .portal-kicker{margin-bottom:5px}.card-body{padding:24px}
.btn,.btn-login,.btn-register{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:1px solid transparent;border-radius:9px;font-size:13px;font-weight:600;line-height:1.4;text-decoration:none;cursor:pointer;white-space:normal}.btn-primary,.btn-login,.btn-register{background:var(--primary);color:#fff;border-color:var(--primary);box-shadow:none}.btn-primary:hover,.btn-login:hover,.btn-register:hover{background:var(--primary-dark);border-color:var(--primary-dark);color:#fff;transform:none;box-shadow:0 3px 10px #28634f16}.btn-outline,.btn-outline-primary,.btn-secondary{background:var(--card-bg);border:1px solid var(--border);color:var(--text)}.btn-outline:hover,.btn-outline-primary:hover,.btn-secondary:hover{background:#edf3e9;border-color:#b8cbb5;color:var(--primary)}.btn-sm{min-height:36px;padding:7px 12px;font-size:12px}.btn:disabled,.btn-login:disabled,.btn-register:disabled{opacity:.6;cursor:not-allowed;transform:none}
.form-group{margin-bottom:20px}.form-group label,.portal-page label:not(.priority-option){font-size:12px;font-weight:600;color:var(--text)}.form-group label{display:block;margin-bottom:7px}.form-control,.form-select,.form-group input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.form-group select,.form-group textarea{width:100%;min-height:44px;padding:10px 13px;background:#fcfdf8;border:1px solid var(--border);border-radius:9px;color:var(--text);font:inherit;font-size:13px;line-height:1.5}
input[type=checkbox],input[type=radio]{accent-color:var(--primary)}.form-control:focus,.form-select:focus,.form-group input:focus,.form-group select:focus,.form-group textarea:focus{outline:0;border-color:#608568;box-shadow:0 0 0 3px #28634f12}.form-group textarea{min-height:110px;resize:vertical}.form-group small,.field-help{display:block;font-size:11px;line-height:1.6;color:var(--text-muted);margin-top:6px}.input-wrap{position:relative}.input-wrap input{padding-left:38px!important;padding-right:42px!important}.input-wrap .fi,.input-wrap>i:first-child:not(.field-icon){left:13px}.form-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.form-row{gap:18px}
.alert{border-radius:10px;padding:14px 16px;font-size:13px;line-height:1.6;margin-bottom:20px;overflow-wrap:anywhere}.alert-success{background:#edf5e9;border-color:#d3e4cc;color:#326144}.alert-danger,.alert-error{background:#fbede7;border-color:#edd6cb;color:#9b4436}.alert-info{background:#edf3ef;border-color:#d5e2d8;color:#35594a}.alert-warning{background:#fbf4e4;border-color:#e9dfbd;color:#826729}
.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse}thead th{padding:14px 18px;background:#f2f4eb;color:#6d7c67;font-size:10px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;white-space:nowrap}tbody td{padding:15px 18px;font-size:12px;line-height:1.6;border-bottom:1px solid var(--border);vertical-align:middle}tbody tr:hover{background:#f8faf3}.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:20px;font-size:10px;font-weight:600;line-height:1.4;text-transform:capitalize;white-space:nowrap}.badge.filed,.badge.pending{background:#faece6;color:#a34c37}.badge.acknowledged{background:#e9eff4;color:#4c6c82}.badge.processing,.badge.in_progress{background:#f8eed9;color:#8c6927}.badge.resolved{background:#e9f2e6;color:#356b4c}
.portal-language{font-size:11px;margin:0;gap:8px}.portal-language label{margin:0}.portal-language select{min-height:36px;max-width:145px;padding:6px 9px;border-radius:8px;font-size:12px}.auth-page .portal-language{margin-bottom:20px}.auth-page .login-container,.auth-page .login-box,.auth-page .reg-box{border:1px solid var(--border);border-radius:18px;background:var(--card-bg);box-shadow:0 16px 48px #193c3210;padding:36px}
body.auth-page .split-left,body.auth-page.registration-page .split-left{width:42%;min-width:320px;background:linear-gradient(145deg,#153e34,#2b5945);padding:56px clamp(28px,4vw,64px)}body.auth-page .split-right,body.auth-page.registration-page .split-right{padding:40px 32px;background:var(--bg);align-items:center}.auth-page .login-box{max-width:480px}.auth-page .reg-box{max-width:680px}.auth-page h2,.auth-page .login-container h1{font-size:28px;line-height:1.25;color:var(--text);margin-bottom:10px}.auth-page .sub{font-size:13px;color:var(--text-muted);line-height:1.7}.auth-page .login-container{width:min(100%,560px)}.auth-page>.card{max-width:480px;border-radius:18px}.auth-page .links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px}.auth-page .links a{font-size:12px;line-height:1.6;min-height:36px}
.settings-card .card-body>p{margin-bottom:20px}.settings-card .form-group:last-of-type{margin-bottom:24px}.settings-links{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;margin-top:20px}.setup-page .header{background:linear-gradient(145deg,#153e34,#2b5945)}.setup-page .container{border:1px solid var(--border);border-radius:18px;box-shadow:0 16px 48px #193c3210}.setup-page .content{max-width:none}
body.auth-page:has(>.login-container),body.auth-page:has(>.card){display:flex;align-items:center;justify-content:center;padding:32px 20px}
body.auth-page .btn-login,body.auth-page .btn-register{min-height:46px;font-size:13px;border-radius:9px}
.portal-page>.sidebar{overflow:hidden}.portal-page .sidebar-brand,.portal-page .sidebar-footer{flex-shrink:0}.portal-page .sidebar-nav{min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#76958855 transparent}.portal-page .user-avatar{display:flex;align-items:center;justify-content:center}
.card-header:has(>i:first-child){justify-content:flex-start}
.status-buttons input:disabled+span{background:#f0f1eb;color:#8c9588;border-color:var(--border);box-shadow:none;cursor:not-allowed;opacity:.7}.status-buttons label:has(input:disabled){cursor:not-allowed}.status-buttons label:has(input:disabled):hover span{border-color:var(--border)}
.portal-page .stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px;margin-bottom:24px}.portal-page .stat-card{padding:20px;border-radius:14px;background:var(--card-bg);border:1px solid var(--border);box-shadow:0 4px 20px #193c3208}.portal-page .stat-info .number,.portal-page .stat-card>.number{font-size:32px;line-height:1.25}.portal-page .stat-icon{width:42px;height:42px;border-radius:11px;font-size:18px}
@media(max-width:767px){.portal-page .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.portal-page .stat-card{padding:16px}.portal-page .stat-info .number,.portal-page .stat-card>.number{font-size:28px}}
@media(max-width:1100px){:root{--portal-gutter:24px}.portal-page .grid-2,.portal-page .thread-layout,.portal-page .report-layout{grid-template-columns:1fr}}
@media(max-width:820px){body.auth-page .split-left,body.auth-page.registration-page .split-left{width:100%;min-width:0;height:auto;position:static;padding:28px}body.auth-page .split-right,body.auth-page.registration-page .split-right{padding:24px 16px}.auth-page .login-box,.auth-page .reg-box,.auth-page .login-container{padding:26px}}
@media(max-width:767px){:root{--portal-gutter:16px}.portal-page>.sidebar{z-index:1100;transform:translateX(-100%)}.portal-page>.sidebar.is-open{transform:translateX(0)}.portal-page>.main{width:100%;margin-left:0}.portal-page .topbar{padding:16px;min-height:80px;gap:12px;flex-wrap:wrap}.portal-page .topbar-left h1{font-size:22px}.portal-page .topbar-right{width:100%;justify-content:flex-start;padding-left:52px}.portal-page .topbar-right:empty{display:none}.portal-page .content{padding:20px 16px}.card-header,.card-body{padding:18px}.card-header{flex-wrap:wrap}.form-row{grid-template-columns:1fr}.portal-page .settings-content{max-width:100%}.portal-page .mobile-menu{width:40px;height:40px;align-self:flex-start}.portal-language select{max-width:130px}.dashboard-intro{padding:22px}.dashboard-intro h2{font-size:24px}}
/* Feature screens share the same controls and feedback as the portal shell. */
.resident-message-toasts .admin-toast>a{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;padding-right:12px}.resident-message-toasts .admin-toast>strong{padding-right:24px;overflow-wrap:anywhere}.resident-message-toasts{max-width:calc(100vw - 32px)}
.portal-page .content :is(.card,.report-panel,.report-filters,.report-insights,.messages-workspace,.thread-context){scroll-margin-top:116px}
.portal-page :is(.card-header,.inbox-heading,.conversation-header,.report-panel) h2{font-size:16px;font-weight:600;line-height:1.4;color:var(--text)}
.portal-page :is(.directory-search,.activity-filters,.resident-filters,.report-filters) label{display:block;margin-bottom:7px;font-size:12px;font-weight:600}
.portal-page :is(.directory-search,.activity-filters,.resident-filters,.report-filters) :is(input,select){min-height:44px;padding:10px 13px;border:1px solid var(--border);border-radius:9px;background:#fcfdf8;color:var(--text);font:inherit;font-size:13px;min-width:0}
.portal-page :is(.directory-search,.activity-filters,.resident-filters,.report-filters) :is(input,select):focus{outline:0;border-color:#608568;box-shadow:0 0 0 3px #28634f12}
.portal-page :is(.empty-state,.directory-empty,.activity-empty,.inbox-empty,.report-empty){padding:32px 24px;color:var(--text-muted);font-size:13px;line-height:1.7;text-align:center}
.portal-page :is(.empty-state,.inbox-empty) strong{display:block;color:var(--text);font-size:14px;margin-bottom:6px}
.portal-page :is(.directory-pagination,.resident-pagination,.report-pagination){display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;padding:16px 20px;font-size:12px;color:var(--text-muted)}
.portal-page :is(.directory-pagination,.resident-pagination,.report-pagination) a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 12px;border:1px solid var(--border);border-radius:8px;background:var(--card-bg);color:var(--primary);text-decoration:none}
.portal-page :is(.directory-pagination,.resident-pagination,.report-pagination) a:hover{background:#edf3e9}
.portal-page :is(.admin-bell,.notif-btn){display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;border:1px solid var(--border);border-radius:9px;background:var(--card-bg);color:var(--primary);box-shadow:none;font-size:16px}
.portal-page :is(.admin-bell,.notif-btn):hover{background:#edf3e9}
.portal-page :is(.admin-alert-panel,.notif-dropdown){width:360px;max-width:calc(100vw - 32px);border:1px solid var(--border);border-radius:14px;background:var(--card-bg);box-shadow:0 12px 35px #193c3218;color:var(--text)}
.portal-page :is(.admin-alert-heading,.notif-header){padding:16px;border-bottom:1px solid var(--border);font-size:13px}
.portal-page :is(.admin-alert-item,.notif-item){padding:14px 16px;border-bottom:1px solid var(--border);font-size:12px;line-height:1.6}
.portal-page :is(.admin-alert-item,.notif-item).unread{background:#edf3e9}
.portal-page :is(.admin-alert-item,.notif-item) a{color:var(--text);text-decoration:none}
.portal-page :is(.admin-alert-item,.notif-item) a:hover{color:var(--primary);text-decoration:underline}
.portal-page :is(.btn,.report-button):focus-visible{outline:3px solid #c19a45;outline-offset:3px}
.portal-page .topbar-right>.btn{flex-shrink:0}
.portal-page :is(.card-header,.topbar-right,.form-actions)>*{max-width:100%}
.portal-page :is(.form-group,.report-filters label,.activity-filters>div){min-width:0}
@media(max-width:767px){.portal-page .topbar-right{padding-left:0}.portal-page .topbar-right>.btn{min-height:40px;font-size:12px}.portal-page .content :is(.card,.report-panel,.report-filters,.report-insights,.messages-workspace,.thread-context){scroll-margin-top:160px}.portal-page :is(.directory-pagination,.resident-pagination,.report-pagination){padding:14px 16px}}
@media(prefers-reduced-motion:reduce){.btn,.nav-item{transition:none}}
@media print{.portal-page>.sidebar,.portal-page .topbar-right{display:none}.portal-page>.main{margin:0;width:100%}.portal-page .topbar{position:static}.portal-page .content{padding:0}}
