/* Shires AI — Design System
   Minimal, neutral, professional. No gradients, no glassmorphism, no clutter. */

:root {
  --color-bg: #ffffff;
  --color-bg-subtle: #f7f7f8;
  --color-border: #e5e5e7;
  --color-text: #1a1a1e;
  --color-text-muted: #6b6b76;
  --color-primary: #17171a;
  --color-primary-hover: #000000;
  --color-accent: #2563eb;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sidebar-width: 280px;
  --topbar-height: 56px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* The [hidden] attribute must always win over any other display rule in this
   file, regardless of selector specificity or source order. Without this,
   any element using both a utility class (e.g. .btn) and the hidden attribute
   can end up permanently visible, because an author rule like ".btn { display:
   flex }" has equal-or-higher specificity than the browser's built-in
   "[hidden] { display: none }" rule and can silently win the cascade. */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1.2; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { background: var(--color-bg-subtle); }
.btn-ghost { background: transparent; color: var(--color-text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  background: transparent; border: none; font-size: 20px; padding: 6px 10px;
  border-radius: var(--radius-sm); color: var(--color-text);
}
.icon-btn:hover { background: var(--color-bg-subtle); }

/* Header (public site) */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; background: var(--color-bg); z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.header-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; }
.header-nav a { color: var(--color-text-muted); }
.header-nav a:hover { color: var(--color-text); }

/* Hero / landing */
.hero { padding: 88px 0 56px; text-align: center; }
.hero-eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-accent); background: #eef2ff; padding: 5px 14px; border-radius: 100px; margin-bottom: 20px;
}
.hero h1 { font-size: 42px; line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; max-width: 680px; margin-left: auto; margin-right: auto; }
.hero-desc { font-size: 16.5px; color: var(--color-text-muted); max-width: 560px; margin: 0 auto 28px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.hero-note { font-size: 13px; color: var(--color-text-muted); margin: 0; }

.features-section { padding: 56px 0; border-top: 1px solid var(--color-border); background: var(--color-bg-subtle); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; }
.feature-icon { color: var(--color-accent); font-size: 18px; margin-bottom: 12px; }
.feature-card h3 { font-size: 15.5px; margin: 0 0 8px; }
.feature-card p { font-size: 13.5px; color: var(--color-text-muted); margin: 0; line-height: 1.55; }

.models-section { padding: 56px 0; text-align: center; }
.models-section h2 { font-size: 24px; margin: 0 0 8px; }
.section-sub { color: var(--color-text-muted); margin: 0 0 32px; }
.section-footnote { color: var(--color-text-muted); font-size: 13px; margin: 24px 0 0; }
.model-grid { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.model-card {
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 20px 26px; min-width: 200px; max-width: 240px; text-align: left; background: var(--color-bg-subtle);
}
.model-card-name { font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.model-card-desc { color: var(--color-text-muted); font-size: 12.5px; line-height: 1.5; }

.how-section { padding: 56px 0; border-top: 1px solid var(--color-border); background: var(--color-bg-subtle); }
.how-section h2 { font-size: 24px; text-align: center; margin: 0 0 36px; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.step-card { text-align: center; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin: 0 auto 14px;
}
.step-card h3 { font-size: 15px; margin: 0 0 8px; }
.step-card p { font-size: 13.5px; color: var(--color-text-muted); margin: 0; line-height: 1.55; }

.cta-strip { padding: 56px 0 72px; text-align: center; border-top: 1px solid var(--color-border); }
.cta-strip-inner { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.site-footer {
  border-top: 1px solid var(--color-border); padding: 24px 0; color: var(--color-text-muted); font-size: 13px;
}
.site-footer .container { display: flex; justify-content: space-between; }
.footer-links { display: flex; gap: 16px; }

/* Auth pages */
.auth-body { background: var(--color-bg-subtle); min-height: 100%; }
.auth-main { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 65px); padding: 24px; }
.auth-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 36px; width: 100%; max-width: 380px; box-shadow: var(--shadow-sm);
}
.auth-card h1 { font-size: 22px; margin: 0 0 4px; }
.auth-sub { color: var(--color-text-muted); font-size: 14px; margin: 0 0 24px; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.auth-card input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
}
.auth-card input:focus, textarea:focus, select:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.auth-card .btn { margin-top: 22px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--color-text-muted); margin-top: 20px; }
.auth-switch a { color: var(--color-accent); font-weight: 600; }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 6px; }
.alert-error { background: var(--color-danger-bg); color: var(--color-danger); }
.account-card { max-width: 440px; }
.account-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.account-label { color: var(--color-text-muted); }
.account-value { font-weight: 600; }

/* Chat shell */
.chat-body { height: 100vh; overflow: hidden; }
.chat-shell { display: flex; height: 100vh; }

.mobile-topbar { display: none; }

.sidebar {
  width: var(--sidebar-width); flex-shrink: 0; background: var(--color-bg-subtle);
  border-right: 1px solid var(--color-border); display: flex; flex-direction: column; height: 100vh;
}
.sidebar-top { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.sidebar-brand { font-weight: 700; font-size: 16px; padding: 4px 0 0; }
.chat-history { flex: 1; overflow-y: auto; padding: 4px 10px; }
.chat-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  border-radius: var(--radius-sm); padding: 2px 4px 2px 2px; margin-bottom: 2px;
}
.chat-item:hover, .chat-item.active { background: #ececee; }
.chat-item-link {
  flex: 1; padding: 9px 8px; font-size: 13.5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; color: var(--color-text);
}
.chat-item-delete {
  background: transparent; border: none; color: var(--color-text-muted); font-size: 13px;
  padding: 6px 8px; border-radius: var(--radius-sm); visibility: hidden; flex-shrink: 0;
}
.chat-item:hover .chat-item-delete,
.chat-item.active .chat-item-delete { visibility: visible; }
/* Touch devices have no hover, so always show the delete control there. */
@media (hover: none) {
  .chat-item-delete { visibility: visible; }
}
.chat-item-delete:hover { color: var(--color-danger); background: var(--color-danger-bg); }
.empty-hint { color: var(--color-text-muted); font-size: 13px; padding: 16px 10px; line-height: 1.5; }

.sidebar-admin-link {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 10px 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; color: var(--color-accent); border: 1px solid var(--color-border);
  background: #fff; text-align: center;
}
.sidebar-admin-link:hover { background: #eef2ff; }
.sidebar-bottom { border-top: 1px solid var(--color-border); padding: 10px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-account { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius-sm); flex: 1; min-width: 0; }
.sidebar-account:hover { background: #ececee; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.sidebar-account-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--color-text-muted); padding: 6px 8px; border-radius: var(--radius-sm); flex-shrink: 0; }
.sidebar-logout:hover { background: #ececee; color: var(--color-text); }

.chat-main { flex: 1; display: flex; flex-direction: column; height: 100vh; min-width: 0; }
.chat-topbar {
  height: var(--topbar-height); border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px; flex-shrink: 0;
}
.chat-topbar-brand { font-size: 14px; font-weight: 700; color: var(--color-text); }

.messages { flex: 1; overflow-y: auto; padding: 24px 0 8px; }
.messages > .message, .empty-state { max-width: 720px; margin: 0 auto; padding: 0 20px; }

.empty-state { text-align: center; padding-top: 16vh; }
.empty-state h2 { font-size: 22px; margin: 0 0 8px; }
.empty-state p { color: var(--color-text-muted); font-size: 14px; margin: 0 0 20px; }
.starter-prompts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 480px; margin: 0 auto; }
.starter-chip {
  background: #fff; border: 1px solid var(--color-border); border-radius: 100px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 500; color: var(--color-text);
}
.starter-chip:hover { background: var(--color-bg-subtle); border-color: #d4d4d8; }

.message-actions { display: flex; gap: 6px; margin-top: 6px; padding: 0 4px; }
.msg-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: 1px solid transparent; color: var(--color-text-muted);
  font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: var(--radius-sm);
}
.msg-action-btn:hover { background: var(--color-bg-subtle); color: var(--color-text); border-color: var(--color-border); }

.message-bubble { position: relative; }
.code-copy-btn {
  display: inline-flex; align-items: center; gap: 4px;
  position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.1); color: #e5e5e7;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 5px; font-size: 11px; font-weight: 600;
  padding: 3px 8px; opacity: 0; transition: opacity .15s;
}
.message-bubble .code-block { position: relative; }
.message-bubble .code-block:hover .code-copy-btn,
.code-copy-btn:focus { opacity: 1; }

#stopBtn { border-color: var(--color-danger); color: var(--color-danger); }
#stopBtn:hover { background: var(--color-danger-bg); }

.message { margin-bottom: 22px; display: flex; flex-direction: column; }
.message-user { align-items: flex-end; }
.message-assistant { align-items: flex-start; }
.message-bubble {
  max-width: 85%; padding: 12px 16px; border-radius: var(--radius-md); font-size: 15px; line-height: 1.6;
  word-wrap: break-word; overflow-wrap: break-word;
}
.message-user .message-bubble { background: var(--color-primary); color: #fff; border-bottom-right-radius: 4px; }
.message-assistant .message-bubble { background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-bottom-left-radius: 4px; }
.message-meta { font-size: 11.5px; color: var(--color-text-muted); margin-top: 4px; padding: 0 4px; }
.message-bubble p { margin: 0 0 10px; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-bubble ul { margin: 6px 0; padding-left: 20px; }
.message-bubble .inline-code {
  background: rgba(0,0,0,0.06); padding: 2px 5px; border-radius: 4px; font-family: var(--font-mono); font-size: 13px;
}
.message-user .inline-code { background: rgba(255,255,255,0.15); }
.message-bubble .code-block {
  background: #17171a; color: #e5e5e7; padding: 14px; border-radius: var(--radius-sm);
  overflow-x: auto; font-family: var(--font-mono); font-size: 13px; margin: 10px 0; max-width: 100%;
}
.message-bubble a { color: var(--color-accent); text-decoration: underline; }
.message-user .message-bubble a { color: #cfe0ff; }

.typing-indicator { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing-indicator span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--color-text-muted);
  animation: blink 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.composer { border-top: 1px solid var(--color-border); padding: 10px 20px 10px; flex-shrink: 0; }
#composerForm {
  max-width: 720px; margin: 0 auto; display: flex; gap: 6px; align-items: flex-end;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 8px 8px 8px 10px;
}
#composerForm:focus-within { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.composer-icon-btn {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 15px;
  color: var(--color-text-muted); display: flex; align-items: center; justify-content: center;
}
.composer-icon-btn:hover { background: var(--color-bg-subtle); color: var(--color-text); }
#micBtn.recording { color: var(--color-danger); background: var(--color-danger-bg); animation: mic-pulse 1.4s infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.25); } 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } }
#messageInput {
  flex: 1; border: none; resize: none; font-family: inherit; font-size: 15px; line-height: 1.5;
  max-height: 160px; padding: 6px 0; background: transparent;
}
#messageInput:focus { outline: none; }
.composer-hint { text-align: center; font-size: 11.5px; color: var(--color-text-muted); max-width: 720px; margin: 8px auto 0; }

.attach-chip-row { max-width: 720px; margin: 0 auto 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--color-bg-subtle);
  border: 1px solid var(--color-border); border-radius: 100px; padding: 5px 8px 5px 12px; font-size: 12.5px;
}
.attach-chip-remove {
  background: transparent; border: none; color: var(--color-text-muted); font-size: 16px; line-height: 1;
  padding: 0 4px; cursor: pointer;
}
.attach-chip-remove:hover { color: var(--color-danger); }
.attach-error { max-width: 720px; margin: 0 auto 8px; font-size: 12.5px; color: var(--color-danger); text-align: center; }
.sent-attach-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; justify-content: flex-end; }
.sent-attach-chip {
  display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.15);
  border-radius: 100px; padding: 4px 10px; font-size: 12px;
}
.message-user .sent-attach-row { justify-content: flex-end; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100;
}
/* The [hidden] attribute must beat the display:flex above, or the modal is stuck open. */
.modal-overlay[hidden] { display: none !important; }
.modal-overlay[style*="display:none"], .modal-overlay[style*="display: none"] { display: none !important; }
.modal {
  background: #fff; border-radius: var(--radius-md); padding: 22px; max-width: 320px; width: 90%; box-shadow: var(--shadow-md);
}
.modal p { margin: 0 0 18px; font-size: 15px; font-weight: 500; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Error / maintenance pages */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; text-align: center; padding: 24px; }
.error-page h1 { font-size: 64px; margin: 0; color: var(--color-text-muted); }
.error-page p { font-size: 16px; margin: 8px 0 24px; }

/* Admin */
.admin-body { background: var(--color-bg-subtle); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--color-border);
  padding: 20px 0; display: flex; flex-direction: column;
}
.admin-sidebar .brand { padding: 0 20px 20px; display: block; border-bottom: 1px solid var(--color-border); margin-bottom: 12px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; flex: 1; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; color: var(--color-text-muted); }
.admin-nav a i { width: 16px; text-align: center; }
.admin-nav a:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.admin-nav a.active { background: var(--color-primary); color: #fff; }
.admin-sidebar-footer { padding: 10px 20px 0; border-top: 1px solid var(--color-border); margin-top: 12px; }
.admin-main { flex: 1; padding: 32px 40px; max-width: 1200px; }
.admin-main h1 { font-size: 22px; margin: 0 0 24px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px 20px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; }
.stat-card .stat-label { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }
.admin-table-wrap { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 600px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
table.admin-table th { background: var(--color-bg-subtle); font-weight: 600; color: var(--color-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
table.admin-table tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 100px; font-size: 11.5px; font-weight: 600; }
.badge-active, .badge-success { background: #dcfce7; color: #166534; }
.badge-disabled, .badge-error { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-admin { background: #dbeafe; color: #1e40af; }
.admin-form { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; max-width: 560px; }
.admin-form label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.admin-form label:first-child { margin-top: 0; }
.admin-form input[type=text], .admin-form input[type=email], .admin-form input[type=password], .admin-form input[type=number], .admin-form select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
}
.admin-form .checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.admin-form .checkbox-row input { width: auto; }
.admin-form .form-actions { margin-top: 22px; display: flex; gap: 10px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.admin-toolbar input[type=search] { padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 13.5px; min-width: 220px; }
.action-link { font-size: 12.5px; font-weight: 600; color: var(--color-accent); margin-right: 10px; }
.action-link.danger { color: var(--color-danger); }
.masked-key { font-family: var(--font-mono); font-size: 13px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .admin-main { padding: 20px; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 10px; }
  .admin-sidebar .brand, .admin-sidebar-footer { display: none; }
  .admin-nav { flex-direction: row; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 34px; }
  .hero-sub { font-size: 17px; }
  .site-footer .container { flex-direction: column; gap: 6px; text-align: center; }

  .mobile-topbar {
    display: flex; align-items: center; justify-content: space-between; height: 52px;
    padding: 0 8px; border-bottom: 1px solid var(--color-border); flex-shrink: 0;
  }
  .mobile-topbar-spacer { width: 36px; }
  .chat-shell { flex-direction: column; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--shadow-md);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 50;
  }
  .sidebar-overlay.show { display: block; }
  .chat-main { height: calc(100vh - 52px); }
  .chat-topbar { padding: 0 12px; }
  .messages { padding: 16px 0; }
  .message-bubble { max-width: 90%; }
  .composer { padding: 10px 12px 8px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 56px 0 40px; }
  .auth-card { padding: 26px 22px; }
}
