.hidden { display: none !important; }
.portal-page { min-height: 100vh; background: #eef1f4; }
.portal-header { position: static; }
.portal-header-label { margin-right: auto; color: #c8d0da; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.portal-shell { width: min(1380px, calc(100vw - 40px)); margin: 0 auto; padding: 50px 0 80px; }
.auth-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(42px, 8vw, 110px); align-items: center; min-height: calc(100vh - 210px); }
.auth-intro h1, .portal-title-row h1 { margin: 0; color: var(--navy); font: 500 clamp(44px, 5vw, 70px)/1 Georgia, serif; letter-spacing: -.04em; }
.auth-intro > p:not(.section-label) { max-width: 630px; color: var(--muted); font-size: 17px; }
.auth-intro ul { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid #aeb5bd; }
.auth-intro li { padding: 14px 0; border-bottom: 1px solid #c7ccd1; color: var(--navy); font-size: 14px; font-weight: 700; }
.portal-card { border: 1px solid #dce1e7; border-radius: var(--radius-md); background: white; padding: clamp(24px, 4vw, 38px); box-shadow: var(--shadow-sm); }
.portal-card h2 { margin: 0 0 22px; color: var(--navy); font: 500 30px Georgia, serif; }
.portal-card label { display: block; margin-top: 17px; color: #39414c; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.portal-card input, .portal-card select, .portal-card textarea { width: 100%; margin-top: 7px; border: 1px solid #bfc5cc; background: white; padding: 12px; color: var(--ink); font: inherit; font-size: 14px; text-transform: none; }
.portal-card input:focus, .portal-card select:focus, .portal-card textarea:focus { outline: 2px solid rgba(141, 32, 50, .16); border-color: var(--wine); }
.portal-primary { width: 100%; margin-top: 24px; }
.google-auth-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; margin-top: 18px; color: var(--navy); font-size: 13px; font-weight: 700; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; color: #7b8490; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #d9dde1; }
.portal-secondary, .portal-text-button { width: 100%; margin-top: 10px; border: 1px solid #b8bec6; background: white; padding: 12px; color: var(--navy); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.portal-text-button { border: 0; color: var(--wine); }
.portal-help, .portal-muted { color: var(--muted); font-size: 12px; line-height: 1.6; }
.portal-status { display: none; margin: 14px 0; padding: 11px 12px; font-size: 13px; }
.portal-status.error { display: block; background: #fff0ed; color: #8d2e1d; }
.portal-status.success { display: block; background: #eaf7f1; color: #175b43; }
.portal-security-check { display: grid; gap: 12px; margin: 18px 0; padding: 14px; border: 1px solid #dce1e7; border-radius: 8px; background: #f8fafc; }
.portal-security-check > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.portal-security-check strong { color: var(--navy); font-size: 12px; }
.portal-security-check span { color: var(--muted); font-size: 10px; }
#portal-turnstile { width: 100%; min-height: 65px; }
.auth-control-locked { pointer-events: none; opacity: .55; }
.portal-card button:disabled { cursor: not-allowed; opacity: .55; }
.portal-title-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.client-dashboard { display: grid; gap: 22px; margin-bottom: 26px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dashboard-metrics article { min-height: 138px; border: 1px solid #dde2e8; border-radius: var(--radius-md); background: white; padding: 22px; box-shadow: var(--shadow-sm); }
.dashboard-metrics span, .dashboard-metrics small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.dashboard-metrics strong { display: block; margin: 12px 0 8px; color: var(--navy); font: 600 34px Georgia, serif; }
.dashboard-metrics .director-name { overflow: hidden; font: 700 17px/1.3 "Helvetica Neue", Arial, sans-serif; text-overflow: ellipsis; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dashboard-panel { padding: 0; }
.panel-heading { padding: 24px 26px 18px; border-bottom: 1px solid #e4e7eb; }
.panel-heading .section-label { margin-bottom: 7px; }
.panel-heading h2 { margin: 0; }
.action-list button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 0; border-bottom: 1px solid #e8eaed; background: white; padding: 17px 26px; text-align: left; cursor: pointer; }
.action-list button:hover { background: #f6f8fa; }
.action-list button span { color: var(--navy); font-weight: 700; }
.action-list button small { color: var(--wine); }
.dashboard-empty { display: flex; flex-direction: column; gap: 6px; padding: 28px 26px; color: var(--muted); }
.dashboard-empty strong { color: var(--navy); }
.service-status-list article { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 18px 26px; border-bottom: 1px solid #e8eaed; }
.service-dot { width: 10px; height: 10px; border-radius: 50%; background: #2f8b68; box-shadow: 0 0 0 4px #e4f4ed; }
.service-status-list strong, .service-status-list small { display: block; }
.service-status-list small { margin-top: 4px; color: var(--muted); }
.client-operations { display: grid; gap: 22px; margin: 24px 0; }
.account-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; }
.account-banner h2 { margin-bottom: 6px; }
.account-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.account-badges span { border-radius: 999px; background: #f1f5f9; padding: 7px 11px; color: #334155; font-size: 12px; font-weight: 800; }
.operations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.operations-panel { padding: 0; overflow: hidden; }
.operations-list > article { padding: 17px 24px; border-top: 1px solid #e8eaed; }
.operations-list strong, .operations-list small { display: block; }
.operations-list small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.operations-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 12px; }
.approval-actions { display: grid; gap: 8px; margin-top: 12px; }
.approval-actions textarea { min-height: 70px; }
.approval-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.approval-buttons button { border: 1px solid #cbd5e1; border-radius: 6px; background: white; padding: 8px 10px; color: var(--navy); font-weight: 800; cursor: pointer; }
.approval-buttons button:first-child { border-color: var(--wine); background: var(--wine); color: white; }
.service-status { border-radius: 999px; background: #e8f5ef; padding: 5px 9px; color: #246b51; font-size: 10px; font-weight: 800; }
.ticket-workspace { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr); gap: 22px; align-items: start; }
.ticket-sidebar, .ticket-detail { padding: 0; overflow: hidden; }
.ticket-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px; border-bottom: 1px solid #dde1e5; }
.ticket-sidebar-head h2 { margin: 0; font-size: 24px; }
.ticket-count { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.ticket-sidebar-head select { width: auto; margin: 0; padding: 8px; }
.ticket-list { max-height: 710px; overflow: auto; }
.ticket-list button { width: 100%; display: block; border: 0; border-bottom: 1px solid #e0e4e8; background: white; padding: 17px 20px; text-align: left; cursor: pointer; }
.ticket-list button:hover, .ticket-list button.active { background: #f3f6f9; box-shadow: inset 4px 0 var(--wine); }
.ticket-list strong { display: block; color: var(--navy); font-size: 14px; }
.unread-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--wine); }
.ticket-list span, .ticket-list small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.ticket-detail { min-height: 520px; }
.ticket-detail-head { padding: 24px 28px; border-bottom: 1px solid #dde1e5; }
.ticket-detail-head h2 { margin-bottom: 8px; }
.ticket-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.ticket-badge { border-radius: 999px; background: #edf1f5; padding: 5px 9px; color: #4f5966; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ticket-thread { display: flex; flex-direction: column; gap: 12px; max-height: 500px; overflow: auto; padding: 24px 28px; }
.ticket-message { max-width: 84%; border-radius: 10px; background: #eef1f4; padding: 13px 15px; }
.ticket-message.mine { align-self: flex-end; background: var(--navy); color: white; }
.ticket-message p { margin: 0; white-space: pre-wrap; }
.ticket-message small { display: block; margin-top: 7px; opacity: .68; }
.ticket-initial { border-left: 3px solid var(--wine); background: #fbf8f6; }
.ticket-reply { padding: 20px 28px 28px; border-top: 1px solid #dde1e5; }
.ticket-reply textarea { margin: 0; }
.ticket-reply .button { width: auto; margin-top: 10px; }
.ticket-rating { margin: 0 28px 28px; border-radius: var(--radius-md); background: #f6f2ed; padding: 18px; }
.rating-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rating-options input { position: absolute; opacity: 0; }
.rating-options span { display: inline-flex; border: 1px solid #c8cdd4; border-radius: 999px; background: white; padding: 7px 10px; cursor: pointer; }
.rating-options input:checked + span { border-color: var(--wine); background: var(--wine); color: white; }
.ticket-file-label { display: block; margin-top: 12px; color: var(--muted); font-size: 13px; font-weight: 700; }
.ticket-file-label input { margin-top: 6px; }
.ticket-attachments { display: flex; flex-direction: column; gap: 8px; margin: 18px 28px 0; padding: 14px 16px; border: 1px solid #dbe3ef; border-radius: 10px; background: #f8fafc; }
.ticket-attachments a { color: var(--navy); font-weight: 700; text-decoration: none; }
.ticket-attachments a:hover { text-decoration: underline; }
.empty-panel { padding: 54px 30px; text-align: center; }
.empty-panel p { color: var(--muted); }
.ticket-dialog { width: min(680px, calc(100vw - 28px)); max-height: 92vh; border: 0; background: transparent; padding: 0; }
.ticket-dialog::backdrop { background: rgba(8, 18, 31, .72); }
.ticket-dialog .portal-card { max-height: 90vh; overflow: auto; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-close { border: 0; background: transparent; color: var(--muted); font-size: 34px; cursor: pointer; }
.portal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 980px) { .dashboard-metrics { grid-template-columns: repeat(2, 1fr); } .dashboard-grid, .operations-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .auth-layout, .ticket-workspace { grid-template-columns: 1fr; } .portal-shell { width: min(100% - 24px, 680px); padding-top: 34px; } .portal-title-row { align-items: start; flex-direction: column; } .portal-title-row .button { width: 100%; } }
@media (max-width: 540px) { .dashboard-metrics { grid-template-columns: 1fr; } .account-banner { align-items: flex-start; flex-direction: column; } .account-badges { justify-content: flex-start; } }
@media (max-width: 540px) { .portal-header-label { display: none; } .portal-form-grid { grid-template-columns: 1fr; } .portal-card { padding: 22px; } }
