.auth-screen { min-height: 100vh; }
.auth-card { position: relative; z-index: 1; }
.auth-card h1 { margin: 19px 0 7px; font-size: 27px; }
.auth-card .lead { margin: 0 0 18px; }
.auth-card .gate-form { display: grid; gap: 13px; }
.auth-card .gate-form label { display: block; color: var(--muted, #657285); font-size: 12px; font-weight: 600; }
.auth-card .gate-form input { display: block; width: 100%; min-height: 39px; margin-top: 5px; padding: 8px 10px; border: 1px solid var(--line, #dbe2ea); border-radius: 6px; font: inherit; }
.auth-card .gate-button { width: 100%; margin-top: 5px; }
.auth-card .auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auth-card .auth-links button { padding: 0; border: 0; background: none; color: #1f5fbf; font: inherit; cursor: pointer; }
.auth-card .auth-links a { color: #1f5fbf; text-decoration: none; }
.auth-card .gate-error, .auth-card .gate-success { padding: 10px 12px; margin: 0 0 14px; border-radius: 6px; font-size: 13px; }
.auth-card .gate-error { background: #fdecea; color: #8e2724; }
.auth-card .gate-success { background: #e6f4ec; color: #185f38; }
.auth-card .org-choice { display: block; width: 100%; padding: 12px; margin-top: 8px; border: 1px solid #e2e6ec; border-radius: 6px; background: #fff; text-align: left; cursor: pointer; }
.auth-card .org-choice small { display: block; color: #657285; }
.auth-card .kicker { margin-top: 16px; color: #1f5fbf; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.auth-card .intro { color: #657285; }
.auth-card .loading-error { text-align: center; }
.auth-screen .hero-feature-mark { display: grid; place-items: center; flex: 0 0 24px; height: 24px; border: 1px solid #5f81aa; border-radius: 50%; color: #9ec5fb; }
.agat-loading { min-width: min(390px, 70vw); padding: 28px 12px; text-align: center; }
.loading-mark { display: flex; justify-content: center; align-items: center; gap: 10px; color: #1f5fbf; font-size: 16px; font-weight: 700; }
.loading-mark svg { width: 36px; height: 36px; }
.agat-loading h2 { margin: 24px 0 12px; }
.agat-loading p { margin: 12px 0 0; color: #657285; font-size: 13px; }
.loading-track { height: 3px; overflow: hidden; border-radius: 3px; background: #e6ebf1; }
.loading-track span { display: block; width: 36%; height: 100%; border-radius: inherit; background: #1f5fbf; animation: loading-slide 1.25s ease-in-out infinite; }
.loading-dots i { color: #1f5fbf; font-style: normal; animation: loading-dot 1s infinite; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }.loading-dots i:nth-child(3) { animation-delay: .3s; }
.button-spinner { display: inline-block; width: 13px; height: 13px; margin-right: 7px; vertical-align: -2px; border: 2px solid #ffffff88; border-top-color: white; border-radius: 50%; animation: loading-spin .7s linear infinite; }
@keyframes loading-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
@keyframes loading-dot { 0%, 50%, 100% { opacity: .25; } 25% { opacity: 1; } }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.web-gate { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); align-items: center; gap: 6vw; padding: 7vw; background: radial-gradient(circle at 20% 20%, #203958, transparent 36%), linear-gradient(135deg, #0b1523, #172b45); color: #fff; font: 14px/1.5 "Segoe UI", Inter, system-ui, sans-serif; }
.write-disabled { opacity: .48 !important; filter: grayscale(.45); cursor: not-allowed !important; box-shadow: none !important; }
.write-disabled:hover { background-color: inherit; border-color: inherit; }
.modal-connection-warning { margin: 0 0 13px; padding: 10px 12px; border: 1px solid #ecd27c; border-radius: 6px; background: #fff4cf; color: #70550a; font-size: 13px; }
.web-gate * { box-sizing: border-box; }
.web-gate .gate-brand .mark { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 38px; border: 1px solid #5e96de; border-radius: 14px; color: #8cbdff; font-size: 40px; }
.web-gate .eyebrow, .web-gate .kicker { color: #8bb6ee; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.web-gate .gate-brand h1 { margin: 12px 0 8px; font-size: clamp(29px, 3.2vw, 48px); line-height: 1.12; }
.web-gate .gate-brand h1 span { font-weight: 400; }
.web-gate .gate-brand p { margin: 0; color: #c1cede; font-size: 17px; }
.web-gate .gate-card { width: 100%; max-width: 450px; justify-self: center; padding: 32px; border-radius: 12px; background: #fff; color: #17202c; box-shadow: 0 25px 70px #0005; }
.web-gate .kicker { color: #1f5fbf; }
.web-gate .gate-card h2 { margin: 7px 0 3px; font-size: 25px; }
.web-gate .intro { margin: 0 0 23px; color: #657285; }
.web-gate form { display: grid; gap: 15px; }
.web-gate label { display: block; color: #455468; font-size: 12px; font-weight: 600; }
.web-gate input { display: block; width: 100%; min-height: 37px; margin-top: 5px; padding: 7px 10px; border: 1px solid #cfd6df; border-radius: 6px; font: inherit; }
.web-gate .gate-button { width: 100%; min-height: 38px; padding: 7px 14px; border: 1px solid #1f5fbf; border-radius: 6px; background: #1f5fbf; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.web-gate .gate-button:disabled { opacity: .6; cursor: default; }
.web-gate .gate-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 19px; }
.web-gate .gate-links button { border: 0; background: none; color: #1f5fbf; font: inherit; cursor: pointer; }
.web-gate .gate-error, .web-gate .gate-success { padding: 10px 13px; margin: 0 0 16px; border-radius: 6px; }
.web-gate .gate-error { background: #fdecea; color: #8e2724; }
.web-gate .gate-success { background: #e6f4ec; color: #185f38; }
.offline-copy-note { padding: 10px 13px; margin: -4px 0 16px; border-radius: 6px; background: #fff4d6; color: #684f0a; font-size: 13px; line-height: 1.45; }
.offline-copy-note[hidden] { display: none; }
.web-gate .org-choice { display: block; width: 100%; padding: 12px; margin-top: 8px; border: 1px solid #e2e6ec; border-radius: 6px; background: #fff; color: #17202c; text-align: left; cursor: pointer; }
.web-gate .org-choice:hover { border-color: #1f5fbf; background: #f5f8fd; }
.web-gate .org-choice small { display: block; color: #657285; }
.agat-connection-popup { position: fixed; z-index: 100000; top: 18px; right: 18px; display: flex; align-items: flex-start; gap: 18px; max-width: min(560px, calc(100vw - 36px)); padding: 13px 15px; border-radius: 9px; background: #183454; color: white; box-shadow: 0 8px 28px #00152e44; font: 500 14px/1.45 "Segoe UI", Inter, sans-serif; }
.agat-connection-popup[hidden] { display: none; }
.agat-connection-popup button { border: 0; background: transparent; color: white; font-size: 21px; line-height: 1; cursor: pointer; }
.agat-org-banner { position: fixed; z-index: 8000; top: 12px; left: 50%; transform: translateX(-50%); padding: 10px 16px; border-radius: 8px; background: #fff1cb; color: #765000; box-shadow: 0 3px 14px #00152e22; font: 600 13px "Segoe UI", Inter, sans-serif; }
body[data-connection="offline"] #shell .btn.primary, body[data-connection="offline"] #shell [data-submit], body[data-org-status="read_only"] #shell .btn.primary, body[data-org-status="read_only"] #shell [data-submit] { opacity: .48; filter: grayscale(.45); cursor: not-allowed; }
@media (max-width: 850px) { .web-gate { grid-template-columns: 1fr; gap: 35px; padding: 40px 24px; } .web-gate .gate-brand, .web-gate .gate-card { width: 100%; max-width: 510px; margin: auto; } }

.agat-status-date { font-size: 11px; line-height: 1.6; }
.connection-dot { color: #249653; }
.agat-status-date[data-state="unstable"] .connection-dot, .agat-status-date[data-state="read_only"] .connection-dot { color: #df9b21; }
.agat-status-date[data-state="offline"] .connection-dot { color: #db4c4c; }
.not-you { border: 0; background: none; color: #1f5fbf; padding: 0; cursor: pointer; justify-self: start; font: inherit; font-size: 12px; }
.shell.console-shell { grid-template-columns:206px minmax(0,1fr); }
#main.platform-console { min-width:0; max-width:100%; overflow-x:hidden; }
.platform-console .page-head { align-items:flex-end; }
.platform-console .console-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; align-items:end; }
.platform-console .console-grid label, .platform-console details form label { display:grid; min-width:0; gap:5px; color:var(--ink-2); font-size:12px; font-weight:600; }
.platform-console .console-grid input, .platform-console details input, .platform-console #org-search, .platform-console select { min-width:0; box-sizing:border-box; width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--ink); font:inherit; }
.platform-console .console-table-wrap { width:100%; max-width:100%; overflow:auto; overscroll-behavior-x:contain; }
.platform-console .console-table { min-width:1120px; white-space:nowrap; }
.platform-console .console-table th,.platform-console .console-table td { vertical-align:top; }
.platform-console .console-actions { min-width:160px; white-space:normal; }
.platform-console .console-actions details { margin-top:6px; }
.platform-console .console-actions summary { color:var(--accent); cursor:pointer; font-size:18px; font-weight:700; line-height:1; }
.platform-console .console-actions form { display:grid; gap:8px; min-width:220px; padding:10px 0; border-bottom:1px solid var(--line); }
.console-org-role { display:block; color:#8fa3bd; font-size:10px; }
#console-message .toast { margin-bottom:14px; }
@media(max-width:900px) { .platform-console .console-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) { .shell.console-shell { grid-template-columns:160px minmax(0,1fr); } #main.platform-console { padding:14px 12px 28px; } .platform-console .console-grid { grid-template-columns:minmax(0,1fr); } .platform-console .panel-head { align-items:flex-start; flex-direction:column; } }
.agat-org-banner.due-soon { background: #fff6e0; }
.agat-org-banner-btn { margin-left: 10px; border: 1px solid #c79a2b; background: #fff; color: #765000; border-radius: 6px; padding: 3px 10px; font: inherit; font-weight: 600; cursor: pointer; }
.gate-bank { background: #f4f6f9; border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.gate-bank pre { white-space: pre-wrap; margin: 6px 0 0; font: 13px/1.45 ui-monospace, Consolas, monospace; }
#suspended-pay-form h3 { margin: 14px 0 6px; font-size: 15px; }
.billing-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.billing-pay-grid .wide { grid-column: 1 / -1; }
.console-stack { display: grid; gap: 8px; min-width: 240px; padding: 8px 0; }
.console-stack label { display: grid; gap: 3px; font-size: 12px; }
#console-billing details { display: inline-block; margin: 2px 4px 2px 0; vertical-align: top; }
#console-billing details > summary { list-style: none; }
#console-billing details > summary::-webkit-details-marker { display: none; }
.billing-settings textarea { width: 100%; font: 13px/1.45 ui-monospace, Consolas, monospace; }
body[data-org-status="read_only"] #shell .btn.primary.always-on { opacity: 1; filter: none; cursor: pointer; }
.billing-settings > button { justify-self: start; }
.grace-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.grace-custom { display: flex; gap: 8px; align-items: end; }
.grace-custom input { width: 80px; }
#console-billing details > summary.btn { display: inline-flex; width: auto; }
#console-billing details[open] { display: block; max-width: 340px; }
#console-billing details .console-stack { max-width: 340px; white-space: normal; }
