:root { color-scheme: light; }
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #091918;
  --card: #102523;
  --ink: #f4eee2;
  --muted: #9eb2ad;
  --line: #29413f;
  --teal: #62baa9;
  --teal-dark: #153e3b;
  --gold: #e0b34c;
  --cream: #172c2a;
}
html[data-theme="dark"] body { background: var(--paper); }
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select { background: #0b1d1c; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .license-chip,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .check { background: #193330; color: var(--ink); }
html[data-theme="dark"] .sidebar { box-shadow: 10px 0 35px rgba(0,0,0,.18); }
html[data-theme="dark"] .button.subtle { color: var(--ink); border-color: var(--line); background: #17302e; }
html[data-theme="dark"] table tbody tr:hover { background: #142b29; }
.theme-toggle { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 19px; cursor: pointer; box-shadow: 0 8px 24px rgba(18, 48, 48, .1); }
.app-theme-toggle { position: fixed; z-index: 50; top: 18px; right: 18px; }
html[data-theme="light"] .shell.guest { background: radial-gradient(circle at 20% 18%, #fff8d9 0, transparent 28%), radial-gradient(circle at 85% 75%, #d9e9e4 0, transparent 35%), #f5f1e8; }
html[data-theme="dark"] .shell.guest { background: radial-gradient(circle at 22% 18%, #214b46 0, transparent 29%), radial-gradient(circle at 83% 76%, #173634 0, transparent 35%), #081918; }
.shell.guest { min-height: 100svh; padding: 38px; transition: background .25s ease; }
body .shell.guest > main { width: calc(100vw - 76px); max-width: 1040px; padding: 0; }
.login-home { display: inline-block; margin-bottom: 22px; color: var(--muted); font-size: 13px; font-weight: 700; }
.login-logo { width: 48px; height: 65px; margin: 0 auto 4px; object-fit: contain; }
.login-hint { margin: 17px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.login-card.auth-card { width: 100%; max-width: none; min-height: 620px; padding: 0; display: grid; grid-template-columns: 42% 58%; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; }
.auth-card > * { min-width: 0; }
.auth-brand-panel { padding: 42px 46px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg, #0a2d2c, #154f4b); color: white; }
.auth-brand-panel .login-home { color: #cae0dc; }
.auth-brand-copy .login-logo { width: 62px; height: 84px; margin: 0 0 18px; }
.auth-brand-copy h1 { margin: 4px 0 16px; color: white; font-size: clamp(40px,4vw,58px); }
.auth-brand-copy > p:last-child { max-width: 330px; color: #c4d8d5; font-size: 16px; }
.auth-brand-panel ul { margin: 34px 0 0; padding: 0; display: grid; gap: 11px; color: #d7e7e4; list-style: none; font-size: 13px; }
.auth-brand-panel li::before { content: "✓"; margin-right: 9px; color: #e6b94f; font-weight: 800; }
.auth-form-panel { padding: 68px clamp(42px,6vw,78px); display: flex; flex-direction: column; justify-content: center; background: var(--card); }
.auth-form-panel h2 { margin: 2px 0 8px; font: 500 clamp(34px,4vw,48px) Georgia,serif; }
.auth-form-panel > div > p:last-child { margin-bottom: 8px; }
.auth-form-panel .stack { gap: 20px; }
.auth-form-panel input { min-height: 54px; padding-inline: 16px; }
.auth-form-panel .button { min-height: 54px; margin-top: 3px; }
.auth-form-links { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: -3px; color: var(--muted); font-size: 12px; }
.auth-form-links a { color: var(--teal); font-weight: 800; white-space: nowrap; }
.reset-card { width: min(600px,100%); padding: 46px 54px; border: 1px solid var(--line); }
.reset-card .login-brand h1 { margin-top: 7px; font-size: 43px; }
.reset-card .login-brand p:last-child { margin-bottom: 25px; }
.reset-success { margin: 22px 0; padding: 18px; border: 1px solid color-mix(in srgb, var(--teal) 36%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--teal) 10%, var(--card)); }
.reset-success strong { display: block; margin-bottom: 5px; color: var(--teal); }
.reset-back { margin-top: 12px; }
.password-note { margin-top: -12px; color: var(--muted); }
.inquiry-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.inquiry-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.inquiry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.inquiry-head h3 { margin: 11px 0 2px; font-size: 19px; }
.inquiry-head time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.inquiry-contact { margin: 17px 0 10px; display: flex; flex-wrap: wrap; gap: 8px 17px; }
.inquiry-contact a { color: var(--teal); font-size: 12px; font-weight: 750; }
.inquiry-services { padding: 10px 12px; border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 11px; font-weight: 700; }
.inquiry-message { margin: 16px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.inquiry-status { padding-top: 14px; display: flex; align-items: end; gap: 10px; border-top: 1px solid var(--line); }
.inquiry-status label { flex: 1; }
@media (max-width: 850px) {
  .app-theme-toggle { top: 12px; right: 12px; }
  .shell.guest { padding: 24px; }
  body .shell.guest > main { width: calc(100vw - 48px); }
  .login-card.auth-card { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 285px; padding: 32px; }
  .auth-brand-panel ul { display: none; }
  .auth-brand-copy .login-logo { width: 45px; height: 60px; margin-bottom: 8px; }
  .auth-brand-copy h1 { font-size: 38px; }
  .auth-form-panel { padding: 42px 34px; }
  .inquiry-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .shell.guest { padding: 12px; align-items: start; }
  body .shell.guest > main { width: calc(100vw - 24px); }
  .login-card.auth-card { border-radius: 20px; }
  .auth-brand-panel { min-height: 250px; padding: 26px 22px; }
  .auth-form-panel { padding: 34px 22px; }
  .auth-form-links { align-items: flex-start; flex-direction: column; gap: 6px; }
  .reset-card { padding: 32px 22px; }
}

/* Auth layout: keep every authentication view centered and inside the viewport. */
.shell.guest {
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  padding: 38px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow-x: hidden;
}
body .shell.guest > main {
  width: min(1040px, 100%) !important;
  max-width: 1040px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  min-width: 0;
}
.login-card.auth-card {
  width: 100% !important;
  max-width: 1040px !important;
  margin: 0 auto !important;
}
.login-card.reset-card {
  width: min(560px, 100%) !important;
  max-width: 560px !important;
  margin: 0 auto !important;
  padding: 42px 48px;
  overflow: hidden;
  border-radius: 24px;
}
.reset-card .login-home { margin-bottom: 18px; }
.reset-card .login-logo { width: 42px; height: 57px; }
.reset-card .login-brand h1 { margin: 8px 0 9px; font-size: clamp(34px, 4vw, 43px); line-height: 1.05; }
.reset-card .stack { margin-top: 24px; }
.reset-card input { min-height: 52px; }
.reset-card .button { min-height: 52px; }
@media (max-width: 850px) {
  .shell.guest { padding: 24px; }
  body .shell.guest > main { width: 100% !important; }
}
@media (max-width: 520px) {
  .shell.guest { padding: 68px 14px 20px; align-items: flex-start !important; }
  .login-card.reset-card { width: 100% !important; padding: 30px 22px; border-radius: 19px; }
  .reset-card .login-brand h1 { font-size: 34px; }
}
