.portal { min-height: 100vh; background: #11110f; }
.portal-header { height: 88px; padding: 0 clamp(20px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.portal-back { color: #c9c6bb; font-size: 12px; font-weight: 700; }
.portal-back:hover { color: var(--accent); }
.portal-status { max-width: 1300px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); color: #c9c6bb; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.portal-status:not(:empty) { padding-top: 20px; }
.portal-noscript { padding: 20px; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); align-items: center; gap: clamp(45px, 8vw, 120px); max-width: 1300px; min-height: calc(100vh - 130px); margin: 0 auto; padding: 70px clamp(20px, 4vw, 56px) 100px; }
.login-intro h1 { margin: 0 0 24px; font-size: clamp(56px, 6vw, 86px); }
.login-intro > p:not(.section-kicker) { max-width: 370px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.login-index { display: flex; gap: 45px; margin-top: 75px; padding-top: 20px; border-top: 1px solid var(--line); color: #aaa99f; font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.login-card { padding: clamp(28px, 4vw, 48px); background: #1b1b17; border: 1px solid #484539; }
.login-card-top { display: flex; justify-content: space-between; gap: 20px; color: #aaa99f; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.login-icon { display: block; width: 58px; height: 58px; object-fit: contain; margin: 52px 0 30px; }
.login-card h2 { font-size: 36px; letter-spacing: -1.5px; }
.login-card > p:not(.login-note) { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 16px 0 28px; }
.login-button { width: 100%; }
.login-card .login-note { margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: #aaa99f; font-size: 12px; line-height: 1.6; }
.dashboard-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 88px); }
.dashboard-sidebar { position: sticky; top: 0; align-self: start; min-height: 100vh; display: flex; flex-direction: column; padding: 48px 24px; border-right: 1px solid var(--line); background: #181815; }
.sidebar-label { color: #aaa99f; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.dashboard-nav { display: grid; gap: 6px; margin-top: 20px; }
.dashboard-nav a { display: flex; align-items: center; gap: 14px; padding: 14px 12px; color: #dedbd1; font-size: 13px; font-weight: 700; border: 1px solid transparent; }
.dashboard-nav a:hover, .dashboard-nav a:focus-visible { background: #28251c; border-color: #514322; }
.dashboard-nav a span:first-child { color: var(--accent); font-size: 10px; }
.sidebar-bottom { margin-top: auto; padding-top: 50px; }
.sidebar-bottom p { color: #d3d0c4; font-size: 9px; font-weight: 700; letter-spacing: 1px; line-height: 1.8; }
.sidebar-bottom p span { color: #aaa99f; }
.sidebar-signout { display: flex; justify-content: space-between; width: 100%; margin-top: 20px; padding: 13px 12px; background: transparent; border: 1px solid #4d4a3e; color: var(--text); font: 700 12px var(--body); cursor: pointer; }
.sidebar-signout:hover { border-color: var(--accent); }
.sidebar-signout:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dashboard-content { width: 100%; max-width: 1200px; padding: 55px clamp(24px, 5vw, 70px) 100px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 38px; border-bottom: 1px solid var(--line); }
.dashboard-heading h1 { margin: 0 0 15px; font-size: clamp(46px, 5vw, 66px); }
.dashboard-heading h1 .period { display: inline; color: var(--accent); }
.dashboard-heading p:not(.section-kicker), .dashboard-section-heading p:not(.section-kicker) { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 0; }
.dashboard-badge { flex-shrink: 0; display: flex; gap: 9px; align-items: center; padding: 11px 12px; border: 1px solid #514322; color: #dfc997; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.dashboard-section { padding-top: 48px; scroll-margin-top: 24px; }
.dashboard-section + .dashboard-section { margin-top: 55px; border-top: 1px solid var(--line); }
.dashboard-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.dashboard-section-heading .section-kicker { margin-bottom: 12px; }
.dashboard-section-heading h2 { font-size: clamp(34px, 4vw, 46px); letter-spacing: -2px; }
.dashboard-section-heading p:not(.section-kicker) { margin-top: 10px; }
.section-source { color: #aaa99f; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.analytics-panel { margin-top: 25px; padding: 28px; border: 1px solid #484539; background: #1b1b17; }
.analytics-panel .manager-status:first-child { margin-top: 0; }
.analytics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-card { background: #23231e; }
.analytics-link { width: fit-content; }
.message-list { margin-top: 20px; }
.message-contacts { display: grid; gap: 8px; margin: 18px 0; }
.message-contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.message-contact-value { color: #e6e2d7; font-size: 13px; overflow-wrap: anywhere; user-select: text; }
.message-action { padding: 8px 10px; border: 1px solid #625a47; background: transparent; color: #f0c46d; font: 700 12px var(--body); cursor: pointer; }
.message-action:hover { border-color: var(--accent); }
.message-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.message-delete { margin-top: 20px; color: #f0b5a9; border-color: #825a51; }
.delete-dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button-danger { background: #a63d30; color: #fff; }
.button-danger:hover { background: #c14939; }
.confirmation-dialog .delete-message-name { color: var(--text); overflow-wrap: anywhere; }
.confirmation-dialog .manager-status:empty { display: none; }
@media (max-width: 800px) {
  .login-layout { grid-template-columns: 1fr; gap: 45px; max-width: 650px; min-height: 0; }
  .login-index { margin-top: 35px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { position: static; min-height: 0; padding: 18px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-label, .sidebar-bottom p { display: none; }
  .dashboard-nav { display: flex; flex-wrap: wrap; margin-top: 0; }
  .dashboard-nav a { padding: 12px; }
  .sidebar-bottom { margin: 12px 0 0; padding: 0; }
  .sidebar-signout { width: auto; gap: 24px; margin-top: 0; }
  .dashboard-content { padding-top: 40px; }
}
@media (max-width: 650px) {
  .portal-header { height: 80px; }
  .login-layout { padding-top: 50px; }
  .login-intro h1 { font-size: clamp(50px, 11vw, 68px); letter-spacing: -3px; }
  .login-icon { margin-top: 35px; }
  .dashboard-heading, .dashboard-section-heading { flex-direction: column; align-items: flex-start; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-panel { padding: 22px; }
}
