.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(1240px, calc(100vw - 40px)); margin: 0 auto; padding: 64px 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 #d3d8de; border-top: 4px solid var(--navy); background: white; padding: clamp(24px, 4vw, 38px); box-shadow: 0 18px 48px rgba(17, 28, 45, .08); }
.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%; display: flex; align-items: center; justify-content: center; gap: 11px; margin-top: 18px; border: 1px solid #aeb5bd; background: white; padding: 12px; color: var(--navy); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.google-auth-button:hover { background: #f7f8fa; border-color: #8d96a1; }
.google-auth-button:disabled { cursor: wait; opacity: .65; }
.google-auth-button span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #d5d9de; border-radius: 50%; color: #3158a6; font: 800 13px Arial, sans-serif; }
.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-title-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.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-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; }
.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; }
.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: 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) { .portal-header-label { display: none; } .portal-form-grid { grid-template-columns: 1fr; } .portal-card { padding: 22px; } }
