:root {
  --bg: #f1f5f9;
  --panel: #fff;
  --text: #102033;
  --muted: #617084;
  --line: #dce4ed;
  --accent: #1367d1;
  --danger: #b42318;
}
body { font-family: 'Segoe UI', Arial, sans-serif; font-size: 15px; }
h1, h2, h3, .brand strong { font-family: 'Segoe UI', Arial, sans-serif; letter-spacing: -.035em; }
main { max-width: 1240px; padding: 32px 24px 60px; }
.topbar { padding: 12px max(24px, calc((100vw - 1240px) / 2)); box-shadow: 0 1px 8px rgba(15,32,52,.05); }
.brand-logo { width: 142px; height: 46px; }
.topbar .brand strong { font-size: 15px; }
.panel { border-radius: 16px; padding: 24px; box-shadow: 0 10px 30px rgba(16,32,51,.035); }
h1 { font-size: clamp(25px, 3vw, 34px); margin-bottom: 14px; }
h2 { font-size: 19px; }
input, select, textarea { min-height: 44px; border-radius: 9px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(19,103,209,.15); border-color: var(--accent); }
button, .button { min-height: 42px; padding: 9px 15px; border-radius: 9px; font: 700 14px 'Segoe UI', Arial, sans-serif; }
button:hover, .button:hover { filter: brightness(.95); }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: 3px solid #83b7ff; outline-offset: 3px; }
.notice, .error { border-radius: 10px; padding: 12px 14px; line-height: 1.5; }
.stat-card { border-radius: 12px; padding: 16px; background: #f8fbff; }
.portal-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 8px 0 24px; }
.portal-heading h1 { margin: 0 0 6px; }
.portal-heading p { margin: 0; color: var(--muted); }
.portal-heading .auth-eyebrow { margin-bottom: 8px; color: #1769cf; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.tenant-badge { padding: 9px 14px; border-radius: 999px; background: #e1efff; color: #115aaa; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.portal-links { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 22px; padding-bottom: 3px; }
.portal-links a { white-space: nowrap; color: #30445e; text-decoration: none; padding: 10px 15px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.portal-links a:hover { border-color: #85bafb; color: #145eb6; }
.portal-intro { background: linear-gradient(105deg, #fff 55%, #f4f9ff); }
.knowledge-pack-head { display: flex; align-items: center; gap: 15px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.knowledge-pack-head h2 { margin: 0 0 4px; }
.knowledge-pack-head p, .portal-intro .grid p { margin: 4px 0 0; }
.knowledge-pack-logo { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #1367d1, #0e9aa8); font-size: 24px; font-weight: 800; }
.portal-intro .grid strong { font-size: 15px; }
.stat-card .stat-head strong { font-size: 16px; }
.stat-meta { font-size: 13px; }
.chart { border-top: 1px solid #eef2f6; }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table { border: 0; }
section[id] { scroll-margin-top: 90px; }
.stat-bar span, .chart-fill { background: linear-gradient(90deg, #1367d1, #4b9bfa); }
th { background: #eef4fb; }

body:has(.login-shell) { background: #eaf0f7; }
body:has(.login-shell) main { max-width: none; padding: 0; }
.login-shell { min-height: 100vh; grid-template-columns: minmax(400px, 49%) minmax(380px, 1fr); padding: 20px; max-width: 1440px; margin: auto; }
.login.panel { border: 1px solid #dfe7f0; border-radius: 22px 0 0 22px; padding: clamp(30px, 6vw, 88px); margin: 0; box-shadow: 0 24px 70px rgba(18,43,70,.08); }
.login .brand { margin-bottom: clamp(44px, 8vh, 90px) !important; }
.login .brand-logo { width: 176px; height: 58px; }
.login .brand strong { font-size: 16px; }
.login .brand small { font-size: 12px; }
.login h1 { font-size: clamp(30px, 3vw, 43px); line-height: 1.16; margin-bottom: 12px; }
.login > .muted { max-width: 420px; line-height: 1.65; margin: 0 0 30px; }
.login form { width: 100%; max-width: 420px; }
.login .field { margin-bottom: 18px; }
.login label { color: #33465b; font-weight: 700; margin-bottom: 8px; }
.login input { min-height: 52px; padding: 12px 15px; }
.login button[type=submit] { width: 100%; min-height: 52px; margin-top: 6px; font-size: 15px; background: #1468cf; border-color: #1468cf; }
.login a { color: #145eb6; font-weight: 700; }
.login .auth-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 22px; font-size: 13px; }
.login .auth-eyebrow { margin: 0 0 14px; color: #1769cf; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }
.login .auth-help { color: var(--muted); max-width: 420px; line-height: 1.55; font-size: 13px; margin-top: 24px; }
.login-visual { min-height: 620px; border: 0; border-radius: 0 22px 22px 0; padding: clamp(30px, 5vw, 70px); flex-direction: column; align-items: flex-start; justify-content: space-between; background: radial-gradient(circle at 72% 20%, rgba(66,151,253,.45), transparent 34%), linear-gradient(135deg, #071b36 0%, #0b396a 54%, #07597e 100%); color: #fff; box-shadow: 0 24px 70px rgba(18,43,70,.08); }
.login-visual::before { content: ''; position: absolute; width: 430px; height: 430px; right: -90px; bottom: -130px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.login-visual-image { display: none; }
.login-visual::after {
  content: 'MCP';
  inset: auto;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: min(28vw, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(188, 228, 255, .24);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(98, 181, 255, .2), rgba(19, 100, 165, .07) 58%, transparent 60%);
  box-shadow: 0 0 0 28px rgba(175, 222, 255, .035), 0 0 0 58px rgba(175, 222, 255, .025), inset 0 0 55px rgba(94, 181, 255, .16);
  color: rgba(225, 244, 255, .75);
  font: 800 clamp(58px, 7vw, 100px)/1 'Segoe UI', Arial, sans-serif;
  letter-spacing: -.08em;
}
.login-copy { display: block; position: relative; z-index: 1; max-width: 500px; }
.login-copy strong { font: 800 clamp(27px, 3vw, 44px)/1.18 'Segoe UI', Arial, sans-serif; letter-spacing: -.045em; }
.login-copy span { color: #d4e8f7; font-size: 16px; line-height: 1.65; }
.login-visual .visual-kicker { position: relative; z-index: 1; font-weight: 800; letter-spacing: .14em; font-size: 11px; color: #a8d8ff; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; max-width: 640px; padding: 16px; min-height: 100vh; }
  .login.panel { border-radius: 20px; padding: clamp(28px, 7vw, 48px); }
  .login .brand { margin-bottom: 46px !important; }
  .login-visual { display: none; }
  main { padding: 18px 14px 44px; }
}
@media (max-width: 560px) {
  .portal-heading { align-items: flex-start; }
  .portal-heading h1 { font-size: 25px; }
  .tenant-badge { font-size: 10px; }
  .login-shell { padding: 0; }
  .login.panel { min-height: 100vh; border: 0; border-radius: 0; padding: 30px 24px 48px; justify-content: flex-start; }
  .login .brand { margin-bottom: 54px !important; }
  .topbar { padding: 10px 14px; }
  .brand-logo { width: 112px; }
  .topbar .brand small { font-size: 11px; }
  .panel { padding: 18px; }
}

/* OAuth customer area */
body:has(.oauth-app) { background: #f3f6fb; }
body:has(.oauth-app) > main { max-width: none; min-height: 100vh; padding: 0; }
.oauth-app { min-height: 100vh; display: flex; flex-direction: column; color: #152944; }
.oauth-wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.oauth-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.97); border-bottom: 1px solid #dfe7f1; box-shadow: 0 4px 22px rgba(24,58,102,.045); }
.oauth-header-inner { min-height: 78px; display: flex; align-items: center; gap: 38px; }
.oauth-brand { display: inline-flex; align-items: center; gap: 12px; flex: none; color: #15365d; text-decoration: none; font-weight: 800; }
.oauth-brand img { width: 114px; height: 46px; display: block; object-fit: contain; object-position: left center; }
.oauth-brand span { padding-left: 12px; border-left: 1px solid #d8e3ef; font-size: 13px; line-height: 1.15; max-width: 80px; }
.oauth-nav { display: flex; align-items: center; align-self: stretch; gap: 7px; }
.oauth-nav a { display: inline-flex; align-items: center; padding: 0 15px; border-bottom: 3px solid transparent; text-decoration: none; color: #566b83; font-weight: 700; font-size: 14px; }
.oauth-nav a:hover, .oauth-nav a[aria-current="page"] { color: #1763c6; }
.oauth-nav a[aria-current="page"] { border-bottom-color: #1763c6; }
.oauth-header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.oauth-header-actions form { margin: 0; }
.oauth-account { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: #415672; font-size: 12px; font-weight: 700; }
.oauth-account > span:last-child { max-width: 175px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oauth-avatar { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; color: #1763c6; background: #eaf3ff; font-size: 14px; }
.oauth-signout, .oauth-outline-action { border: 1px solid #cfdbeb; background: #fff; color: #22456d; font-weight: 800; }
.oauth-signout { min-height: 37px; padding: 7px 15px; }
.oauth-signout:hover, .oauth-outline-action:hover { border-color: #7fb1ef; background: #f4f9ff; }
.oauth-content { flex: 1; padding-top: 48px; padding-bottom: 78px; }
.oauth-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.oauth-eyebrow, .oauth-card-kicker { margin: 0 0 9px; color: #1763c6; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; }
.oauth-hero h1 { margin: 0 0 8px; font-size: clamp(31px, 4vw, 48px); line-height: 1.12; letter-spacing: -.045em; }
.oauth-hero p:last-child { margin: 0; color: #61738c; font-size: 15px; }
.oauth-count { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #c9dff9; border-radius: 999px; color: #1b60b4; background: #eaf4ff; font-size: 12px; font-weight: 800; }
.oauth-count::before, .oauth-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #2fa577; }
.oauth-tenant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.oauth-tenant-card, .oauth-info-card, .oauth-empty { background: #fff; border: 1px solid #dfe7f1; border-radius: 18px; box-shadow: 0 12px 30px rgba(23,53,93,.045); }
.oauth-tenant-card { position: relative; overflow: hidden; padding: 26px 28px 22px; }
.oauth-tenant-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg,#1763c6,#48a7da); }
.oauth-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.oauth-card-index { color: #9cb3cf; font-size: 12px; letter-spacing: .12em; font-weight: 800; }
.oauth-status { display: inline-flex; align-items: center; gap: 7px; color: #167450; background: #eaf8f1; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 800; }
.oauth-tenant-card h2 { margin: 0 0 3px; font-size: 23px; letter-spacing: -.035em; }
.oauth-tenant-code { margin: 0 0 23px; color: #667991; font-size: 13px; }
.oauth-tenant-card dl { margin: 0; }
.oauth-tenant-card dl > div { padding: 12px 0; border-top: 1px solid #edf2f7; }
.oauth-tenant-card dt { color: #687c93; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.oauth-tenant-card dd { margin: 0; color: #1a3453; overflow-wrap: anywhere; }
.oauth-tenant-card dd code { font: 700 13px/1.5 Consolas,monospace; }
.oauth-tenant-card .oauth-client-id { padding: 14px 0 14px 14px; border-left: 4px solid #1763c6; background: #f3f8fd; }
.oauth-tenant-card .oauth-client-id dt { color: #174f91; font-size: 13px; }
.oauth-tenant-card .oauth-client-id dd code { color: #102f53; font-size: 16px; overflow-wrap: anywhere; }
.oauth-tenant-card dd span { color: #73869b; font-size: 12px; }
.oauth-card-note { margin: 17px 0 0; color: #61738c; font-size: 12px; line-height: 1.55; }
.oauth-info-grid, .oauth-profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 20px; }
.oauth-info-card { padding: 26px 28px; }
.oauth-info-card h2 { margin: 0 0 8px; font-size: 19px; }
.oauth-info-card p { color: #63768e; line-height: 1.6; margin: 0 0 16px; }
.oauth-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 10px; color: #1763c6; background: #eaf3ff; font-size: 20px; font-weight: 700; }
.oauth-text-link { color: #1763c6; font-weight: 800; text-decoration: none; }
.oauth-text-link:hover { text-decoration: underline; }
.oauth-profile-grid { margin-top: 0; }
.oauth-profile-email { color: #173a63 !important; font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.oauth-primary-action { display: inline-flex; gap: 12px; align-items: center; justify-content: center; min-height: 44px; padding: 10px 17px; background: #1763c6; border-radius: 9px; color: #fff; text-decoration: none; font-weight: 800; }
.oauth-primary-action:hover { background: #0e53b1; color: #fff; }
.oauth-info-card .oauth-small-note { font-size: 12px; margin: 13px 0 0; }
.oauth-signout-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; }
.oauth-signout-card p:last-child { margin-bottom: 0; }
.oauth-signout-card form { flex: none; }
.oauth-empty { padding: 34px; grid-column: 1 / -1; }
.oauth-empty h2 { margin: 0 0 8px; }
.oauth-empty p { color: #63768e; margin: 0; }
.oauth-footer { border-top: 1px solid #dfe7f1; background: #fff; }
.oauth-footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #71849b; font-size: 12px; }
.oauth-footer a { color: #426a9b; text-decoration: none; font-weight: 700; }
.oauth-footer a:hover { text-decoration: underline; }
.oauth-app a:focus-visible, .oauth-app button:focus-visible { outline: 3px solid #83b7ff; outline-offset: 3px; }

@media (max-width: 1050px) {
  .oauth-header-inner { flex-wrap: wrap; gap: 0 18px; padding: 10px 0 0; }
  .oauth-nav { order: 3; width: 100%; height: 43px; }
  .oauth-header-actions { margin-left: auto; }
}
@media (max-width: 700px) {
  .oauth-wrap { width: min(100% - 28px, 540px); }
  .oauth-header-inner { min-height: 0; }
  .oauth-brand img { width: 98px; height: 41px; }
  .oauth-brand span { font-size: 12px; }
  .oauth-account > span:last-child { display: none; }
  .oauth-header-actions { gap: 8px; }
  .oauth-nav { gap: 0; justify-content: space-between; }
  .oauth-nav a { padding: 0 8px; font-size: 13px; }
  .oauth-content { padding-top: 30px; padding-bottom: 50px; }
  .oauth-hero { display: block; }
  .oauth-count { margin-top: 19px; }
  .oauth-tenant-grid, .oauth-info-grid, .oauth-profile-grid { grid-template-columns: 1fr; }
  .oauth-tenant-card, .oauth-info-card { padding: 22px; }
  .oauth-signout-card { display: block; }
  .oauth-signout-card form { margin-top: 18px; }
  .oauth-footer-inner { min-height: 80px; }
}

/* Current customer area and login */
:root {
  --bg: #f4f6f8;
  --panel: #fff;
  --text: #1c2b37;
  --muted: #5e6f7c;
  --line: #d6dfe5;
  --accent: #087d73;
}
body { color: var(--text); }
h1, h2, h3, .brand strong { letter-spacing: 0; }
.login h1 { font-size: 34px; }
body:has(.login-shell) { background: #f3f6f8; }
.login-shell { max-width: 1400px; grid-template-columns: minmax(360px, 44%) minmax(400px, 1fr); padding: 20px; }
.login.panel { border-radius: 6px 0 0 6px; box-shadow: none; padding: 44px 52px; }
.login-visual {
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: #f9fbfc;
  box-shadow: none;
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: var(--text);
}
.login-visual::before, .login-visual::after { content: none; display: none; }
.login-visual-image { display: block; width: min(82%, 620px); max-height: 260px; object-fit: contain; }
.login-visual .visual-kicker { color: #487378; align-self: flex-start; letter-spacing: 0; }
.login-copy { display: block; position: static; max-width: 620px; text-align: center; }
.login-copy strong { color: var(--text); font-size: 21px; letter-spacing: 0; }
.login-copy span { color: var(--muted); font-size: 14px; }
.login button[type=submit], .login a.button { background: var(--accent); border-color: var(--accent); }
.login input:focus, .login select:focus { outline-color: #9bd5d0; border-color: var(--accent); }
.login .auth-eyebrow { color: var(--accent); letter-spacing: 0; }

body:has(.oauth-app) { background: #f4f6f8; }
.oauth-app { color: var(--text); }
.oauth-wrap { width: min(1200px, calc(100% - 48px)); }
.oauth-header { box-shadow: none; border-bottom-color: var(--line); }
.oauth-header-inner { min-height: 66px; gap: 28px; }
.oauth-brand { color: var(--text); }
.oauth-brand img { width: 100px; height: 42px; }
.oauth-brand span { border-left-color: var(--line); font-size: 12px; }
.oauth-nav a { padding: 0 13px; font-size: 13px; color: var(--muted); }
.oauth-nav a:hover, .oauth-nav a[aria-current="page"] { color: var(--accent); }
.oauth-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.oauth-avatar { color: var(--accent); background: #e1f2ee; }
.oauth-signout, .oauth-outline-action { border-radius: 4px; color: #24505a; }
.oauth-content { padding-top: 32px; padding-bottom: 48px; }
.oauth-hero { align-items: center; margin-bottom: 20px; }
.oauth-eyebrow, .oauth-card-kicker { color: #477579; letter-spacing: 0; }
.oauth-hero h1 { font-size: 30px; line-height: 1.2; letter-spacing: 0; }
.oauth-hero p:last-child { font-size: 14px; }
.oauth-count { border-radius: 4px; color: #0d6e59; border-color: #bcded1; background: #eaf6ef; }
.oauth-tenant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.oauth-tenant-card, .oauth-empty {
  border-color: var(--line);
  border-radius: 6px;
  box-shadow: none;
}
.oauth-tenant-card { padding: 20px 22px 15px; }
.oauth-tenant-card::before { height: 3px; background: var(--accent); }
.oauth-card-top { margin-bottom: 12px; }
.oauth-card-index { letter-spacing: 0; }
.oauth-status { border-radius: 4px; }
.oauth-tenant-card h2 { font-size: 19px; letter-spacing: 0; }
.oauth-tenant-code { margin-bottom: 14px; }
.oauth-tenant-card dl > div { padding: 9px 0; }
.oauth-info-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; padding: 18px 0; }
.oauth-info-card[aria-label="Collegamento MCP personale"] {
  padding: 20px 22px;
  margin-bottom: 18px;
  border: 1px solid #bad7d0;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: #fff;
}
.oauth-info-card[aria-label="Collegamento MCP personale"] h2 { margin-bottom: 8px; }
.oauth-info-card[aria-label="Collegamento MCP personale"] p { margin-bottom: 8px; }
.oauth-info-card[aria-label="Collegamento MCP personale"] code { color: #064f55; font-weight: 700; }
.oauth-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }
.oauth-info-grid .oauth-info-card { min-width: 0; }
.oauth-info-card h2 { font-size: 17px; }
.oauth-info-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.oauth-icon { display: none; }
.oauth-text-link, .oauth-footer a { color: var(--accent); }
.oauth-primary-action { background: var(--accent); border-radius: 4px; }
.oauth-primary-action:hover { background: #066e66; }
.oauth-profile-email { color: #164e52 !important; }
.oauth-signout-card { border-bottom: 1px solid var(--line); }
.oauth-footer { border-top-color: var(--line); }
.oauth-app a:focus-visible, .oauth-app button:focus-visible { outline-color: #44a9a1; }
.oauth-token-meter { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; margin-left: 8px; border: 1px solid #cbd9dd; border-radius: 4px; color: #314d57; background: #f1f6f7; font-size: 11px; line-height: 1.2; white-space: nowrap; }
.oauth-token-meter strong { font-size: 13px; color: #173c42; }
.oauth-token-meter small { color: #61777b; font-size: 10px; }
.oauth-nav .oauth-token-meter { align-self: center; height: auto; padding: 6px 9px; border: 1px solid #cbd9dd; border-radius: 4px; background: #f1f6f7; color: #314d57; text-decoration: none; font-size: 11px; }
.oauth-nav .oauth-token-meter:hover { border-color: var(--accent); }
.oauth-usage-section { border-top: 1px solid var(--line); padding: 24px 0; }
.oauth-usage-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.oauth-usage-heading h2 { margin: 0 0 4px; font-size: 20px; }
.oauth-usage-heading p { margin: 0; color: var(--muted); }
.oauth-usage-balance { display: grid; gap: 2px; text-align: right; white-space: nowrap; }
.oauth-usage-balance span { color: var(--muted); font-size: 12px; }
.oauth-usage-balance strong { font-size: 20px; }
.oauth-usage-totals { display: flex; flex-wrap: wrap; gap: 16px 28px; margin: 17px 0 12px; }
.oauth-usage-section h3 { margin: 20px 0 10px; font-size: 15px; }
.oauth-usage-table-wrap { max-width: 100%; overflow-x: auto; }
.oauth-usage-table { width: 100%; border-collapse: collapse; }
.oauth-usage-table th, .oauth-usage-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.oauth-usage-table th { color: var(--muted); font-size: 12px; }
.oauth-usage-table td:nth-child(n+2), .oauth-usage-table th:nth-child(n+2) { text-align: right; }
.oauth-usage-section button:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; padding: 16px; max-width: 620px; }
  .login.panel { border-radius: 6px; padding: 30px; }
  .login-visual { display: none; }
  .oauth-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .oauth-wrap { width: calc(100% - 28px); }
  .oauth-header-inner { min-height: 0; }
  .oauth-content { padding-top: 24px; }
  .oauth-hero h1 { font-size: 26px; }
  .oauth-tenant-grid, .oauth-info-grid, .oauth-profile-grid { grid-template-columns: 1fr; }
  .oauth-tenant-card { padding: 18px; }
  .oauth-info-card[aria-label="Collegamento MCP personale"] { padding: 16px; }
  .oauth-info-card[aria-label="Collegamento MCP personale"] .oauth-outline-action { margin-top: 8px; }
  .oauth-nav { flex-wrap: wrap; height: auto; min-height: 43px; }
  .oauth-token-meter { margin-left: auto; }
}
@media (max-width: 560px) {
  .login-shell { padding: 0; }
  .login.panel { min-height: 100vh; border: 0; border-radius: 0; padding: 28px 22px; }
  .oauth-token-meter { flex-basis: 100%; justify-content: center; margin: 0 0 8px; }
  .oauth-usage-heading { display: block; }
  .oauth-usage-balance { margin-top: 12px; text-align: left; }
}
