/* ==========================================================================
   BulkWhatsApp Pro by ADYCORE — design system
   Palette taken from the ADYCORE logo: deep navy, royal blue and sky-cyan.
   (Variable names keep the original --wa-* prefix so views need no changes.)
   ========================================================================== */

:root {
  --wa-dark: #022855;
  --wa-primary: #0071eb;
  --wa-primary-dark: #0058c4;
  --wa-primary-darker: #011536;
  --wa-primary-light: #e8f2fe;
  --wa-accent: #02b4fc;
  --wa-accent-dark: #0094d6;

  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-100: #f1f5f9;

  --surface: #ffffff;
  --bg: #f4f7fb;
  --border: #e3e9f2;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 24px -8px rgba(1, 21, 54, 0.16);
  --shadow-lg: 0 20px 40px -12px rgba(1, 21, 54, 0.22);

  --sidebar-w: 236px;
  --sidebar-w-collapsed: 84px;
  --topbar-h: 58px;
}

* { box-sizing: border-box; }

html { font-size: 13px; }
@media (min-width: 768px) { html { font-size: 13.5px; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-700);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--wa-primary); text-decoration: none; }
a:hover { color: var(--wa-primary-dark); }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(0, 113, 235, 0.35);
}

h1, h2, h3, h4, h5, h6 { color: var(--ink-900); font-weight: 600; }

code { color: var(--wa-primary-dark); background: var(--wa-primary-light); padding: 0.1rem 0.4rem; border-radius: 6px; }

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn { border-radius: var(--radius-sm); font-weight: 500; padding: 0.45rem 0.9rem; font-size: 0.95rem; }
.btn-sm { font-size: 0.85rem; }
.btn-sm { border-radius: 7px; }

/* The vendored Bootstrap is 5.1 (pre-dates the --bs-btn-* variable API), so
   buttons are re-themed with direct property overrides on the same
   selectors/states Bootstrap itself defines, rather than CSS variables. */
.btn-primary,
.btn-primary:disabled,
.btn-primary.disabled {
  color: #fff;
  background-color: var(--wa-primary);
  border-color: var(--wa-primary);
  box-shadow: 0 2px 8px -2px rgba(0, 113, 235, 0.5);
}
.btn-primary:hover {
  color: #fff;
  background-color: var(--wa-primary-dark);
  border-color: var(--wa-primary-dark);
}
.btn-check:focus + .btn-primary,
.btn-primary:focus {
  color: #fff;
  background-color: var(--wa-primary-dark);
  border-color: var(--wa-primary-dark);
  box-shadow: 0 0 0 0.25rem rgba(0, 113, 235, 0.4);
}
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  color: #fff;
  background-color: var(--wa-primary-darker);
  border-color: var(--wa-primary-darker);
}

.btn-outline-primary {
  color: var(--wa-primary);
  border-color: var(--wa-primary);
}
.btn-outline-primary:hover {
  color: #fff;
  background-color: var(--wa-primary);
  border-color: var(--wa-primary);
}
.btn-check:focus + .btn-outline-primary,
.btn-outline-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 113, 235, 0.4);
}
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary.dropdown-toggle.show {
  color: #fff;
  background-color: var(--wa-primary);
  border-color: var(--wa-primary);
}
.btn-outline-primary:disabled,
.btn-outline-primary.disabled {
  color: var(--wa-primary);
  background-color: transparent;
}

.btn-outline-secondary {
  color: var(--ink-600);
  border-color: var(--ink-300);
}
.btn-outline-secondary:hover {
  color: #fff;
  background-color: var(--ink-700);
  border-color: var(--ink-700);
}
.btn-check:focus + .btn-outline-secondary,
.btn-outline-secondary:focus {
  box-shadow: 0 0 0 0.25rem rgba(100, 116, 139, 0.35);
}
.btn-check:checked + .btn-outline-secondary,
.btn-check:active + .btn-outline-secondary,
.btn-outline-secondary:active,
.btn-outline-secondary.active,
.btn-outline-secondary.dropdown-toggle.show {
  color: #fff;
  background-color: var(--ink-700);
  border-color: var(--ink-700);
}

.btn-icon { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ---------------------------------------------------------------------- */
/* App shell: sidebar + topbar                                            */
/* ---------------------------------------------------------------------- */
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--wa-primary-darker) 0%, #022855 55%, var(--wa-primary-darker) 100%);
  color: #eaf2ff;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 1.25rem 1rem;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--wa-accent), var(--wa-primary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.sidebar-brand-mark.logo-tile {
  background: #fff;
  padding: 4px;
}
.sidebar-brand-mark.logo-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }

.sidebar-brand-text { line-height: 1.15; }
.sidebar-brand-text .name { font-weight: 700; font-size: 1.05rem; color: #fff; }
.sidebar-brand-text .tag { font-size: 0.7rem; color: rgba(234, 242, 255, 0.6); letter-spacing: 0.03em; text-transform: uppercase; }

.sidebar-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.5rem 0.9rem;
}

.sidebar-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(234, 242, 255, 0.45);
  padding: 1rem 0.6rem 0.4rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(234, 242, 255, 0.78);
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; color: rgba(234, 242, 255, 0.6); }

.sidebar-nav .nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-nav .nav-link:hover i { color: var(--wa-accent); }

.sidebar-nav .nav-link.active {
  background: rgba(2, 180, 252, 0.16);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--wa-accent);
}
.sidebar-nav .nav-link.active i { color: var(--wa-accent); }

.sidebar-footer {
  padding: 0.9rem 1.25rem 1.1rem;
  font-size: 0.72rem;
  color: rgba(234, 242, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-footer .powered { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.35rem; }
.sidebar-footer .powered img { height: 13px; width: auto; opacity: 0.9; }

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(1, 21, 54, 0.45);
  z-index: 1035;
}

.main-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell.with-sidebar .main-wrap {
  margin-left: var(--sidebar-w);
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.sidebar-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  color: var(--ink-700);
  font-size: 1.1rem;
}

.topbar-title { font-weight: 600; color: var(--ink-900); font-size: 1rem; }

.content-area {
  flex: 1 1 auto;
  padding: 1.75rem 1.75rem 3rem;
  width: 100%;
  max-width: 1360px;
}

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-backdrop.open { display: block; }
  .app-shell.with-sidebar .main-wrap { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .content-area { padding: 1.25rem 1rem 2.5rem; }
}

/* ---------------------------------------------------------------------- */
/* User menu (topbar)                                                     */
/* ---------------------------------------------------------------------- */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
}
.user-menu-btn:hover { background: var(--ink-100); border-color: var(--border); }

.avatar-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wa-primary), var(--wa-primary-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.85rem;
  flex-shrink: 0;
}

.user-menu-btn .user-meta { text-align: left; line-height: 1.15; }
.user-menu-btn .user-meta .u-name { font-size: 0.85rem; font-weight: 600; color: var(--ink-900); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-btn .user-meta .u-role { font-size: 0.72rem; color: var(--ink-500); }

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--wa-primary-light);
  color: var(--wa-primary-dark);
}

/* ---------------------------------------------------------------------- */
/* Page header                                                            */
/* ---------------------------------------------------------------------- */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.35rem; margin-bottom: 0.2rem; }
.page-header .page-subtitle { color: var(--ink-500); font-size: 0.9rem; margin: 0; }
.page-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------------- */
/* Cards                                                                   */
/* ---------------------------------------------------------------------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header { background: transparent; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--ink-900); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border);
}
.panel-header h2, .panel-header h5 { margin: 0; font-size: 1.02rem; }
.panel-body { padding: 1.35rem; }
.panel-body.p-0 { padding: 0; }

/* Stat cards */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 100%;
}
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: var(--wa-primary-light);
  color: var(--wa-primary-dark);
}
.stat-icon.blue { background: #e4f7fe; color: #0089c4; }
.stat-icon.amber { background: #fff4e0; color: #b7791f; }
.stat-icon.rose { background: #ffe9ec; color: #d6336c; }
.stat-icon.violet { background: #f1ebff; color: #6f42c1; }

.stat-value { font-size: 1.3rem; font-weight: 700; color: var(--ink-900); line-height: 1.1; }
.stat-label { font-size: 0.8rem; color: var(--ink-500); margin-top: 0.15rem; }

/* ---------------------------------------------------------------------- */
/* Tables                                                                  */
/* ---------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { margin-bottom: 0; border-color: var(--border); }
.table > :not(:first-child) { border-top: 1px solid var(--border); }
.table > :not(caption) > * > * { padding: 0.7rem 0.9rem; }
.table thead th {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-500);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: #f8fafd;
}
.table tbody tr { border-bottom: 1px solid var(--border); }
.table tbody tr:last-child { border-bottom: none; }
.table-hover tbody tr:hover { background-color: var(--wa-primary-light); }
.table td, .table th { vertical-align: middle; }

/* ---------------------------------------------------------------------- */
/* Badges / status pills                                                  */
/* ---------------------------------------------------------------------- */
.badge { font-weight: 600; letter-spacing: 0.01em; border-radius: 999px; padding: 0.4em 0.75em; }
.bg-primary { background-color: var(--wa-primary) !important; }
.text-primary { color: var(--wa-primary) !important; }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; font-weight: 600;
  padding: 0.32rem 0.7rem 0.32rem 0.55rem;
  border-radius: 999px;
  background: var(--ink-100); color: var(--ink-600);
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.status-pill.pill-draft { background: var(--ink-100); color: var(--ink-600); }
.status-pill.pill-scheduled { background: #e4f7fe; color: #0089c4; }
.status-pill.pill-queued { background: #eef2ff; color: #4f46e5; }
.status-pill.pill-sending { background: #fff4e0; color: #b7791f; }
.status-pill.pill-completed { background: var(--wa-primary-light); color: var(--wa-primary-dark); }
.status-pill.pill-failed { background: #ffe9ec; color: #d6336c; }
.status-pill.pill-active { background: var(--wa-primary-light); color: var(--wa-primary-dark); }
.status-pill.pill-disabled { background: var(--ink-100); color: var(--ink-500); }

/* ---------------------------------------------------------------------- */
/* Forms                                                                   */
/* ---------------------------------------------------------------------- */
.form-label { font-weight: 600; font-size: 0.85rem; color: var(--ink-700); }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--ink-300);
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
}
.form-control:disabled { background-color: var(--ink-100); }
.form-text { font-size: 0.8rem; }
.form-check-input:checked { background-color: var(--wa-primary); border-color: var(--wa-primary); }

/* jQuery Unobtrusive Validation toggles these classes; keep empty/valid summaries invisible. */
.validation-summary-valid { display: none; }
.field-validation-valid { display: none; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  max-width: 720px;
}

/* ---------------------------------------------------------------------- */
/* Empty states                                                            */
/* ---------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--ink-500);
}
.empty-state .empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--wa-primary-light);
  color: var(--wa-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 1rem;
}
.empty-state h5 { color: var(--ink-800); margin-bottom: 0.35rem; }
.empty-state p { max-width: 420px; margin: 0 auto 1rem; }

/* ---------------------------------------------------------------------- */
/* Alerts                                                                  */
/* ---------------------------------------------------------------------- */
.alert { border-radius: var(--radius-md); border: 1px solid transparent; }
.alert-success { background: var(--wa-primary-light); color: var(--wa-primary-darker); border-color: #c5dcfb; }

/* ---------------------------------------------------------------------- */
/* WhatsApp preview bubble (Campaigns > Create)                            */
/* ---------------------------------------------------------------------- */
.wa-chat {
  background: #e5ded4;
  background-image: linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.35));
  border-radius: var(--radius-md);
  padding: 1rem;
  min-height: 90px;
}
.wa-bubble {
  display: inline-block;
  max-width: 85%;
  background: #d9fdd3;
  border-radius: .6rem;
  padding: .55rem .8rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------- */
/* Progress                                                                 */
/* ---------------------------------------------------------------------- */
.progress { border-radius: 999px; background-color: var(--ink-100); }
.progress-bar { background-color: var(--wa-primary); }

/* ---------------------------------------------------------------------- */
/* Auth pages (login / access denied / error, when using _AuthLayout)      */
/* ---------------------------------------------------------------------- */
.auth-body { background: radial-gradient(circle at 20% 10%, #eef4ff 0%, #f4f7fb 50%, #eaf1fb 100%); }
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem 1rem;
}
.auth-card {
  width: 100%; max-width: 820px;
  display: flex;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 24px 60px -20px rgba(1, 21, 54, 0.28);
  overflow: hidden;
}

/* Left blue panel */
.auth-aside {
  flex: 0 0 48%;
  position: relative; overflow: hidden;
  padding: 1.9rem 1.9rem 1.5rem;
  color: #eaf2ff;
  background: linear-gradient(135deg, #0b2a6b 0%, #1d4ed8 55%, #0ea5e9 115%);
  display: flex; flex-direction: column;
}
.auth-aside::before, .auth-aside::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}
.auth-aside::before { width: 260px; height: 260px; top: -110px; right: -90px; }
.auth-aside::after  { width: 180px; height: 180px; bottom: -80px; left: -60px; }
.auth-aside > * { position: relative; z-index: 1; }

.auth-brand, .auth-mobile-brand { display: flex; align-items: center; gap: 0.7rem; }
.auth-brand-tile {
  width: 46px; height: 46px; flex-shrink: 0;
  background: #fff; border-radius: 12px; padding: 7px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.35);
}
.auth-brand-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.auth-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.auth-brand-text .name { font-size: 1.2rem; font-weight: 700; color: #fff; }
.auth-brand-text .sub { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(234, 242, 255, 0.75); margin-top: 2px; }

.auth-chip {
  align-self: flex-start;
  margin-top: 0.75rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem; font-weight: 600; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}
.auth-headline {
  color: #fff; font-size: 1.9rem; font-weight: 800;
  line-height: 1.15; letter-spacing: -0.02em;
  margin: 1.4rem 0 0.7rem;
}
.auth-lead { color: rgba(234, 242, 255, 0.85); font-size: 0.9rem; line-height: 1.55; margin: 0; }

.auth-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.3rem; }
.auth-pills span {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem; font-weight: 500; color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}
.auth-foot { margin-top: auto; padding-top: 1.5rem; font-size: 0.72rem; color: rgba(234, 242, 255, 0.6); }

/* Right form panel */
.auth-main {
  flex: 1 1 52%;
  padding: 2.2rem 2.4rem;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-mobile-brand { display: none; margin-bottom: 1.3rem; }
.auth-mobile-brand .auth-brand-tile { background: var(--wa-primary-light); box-shadow: none; }
.auth-mobile-brand .name { color: var(--ink-900); }
.auth-mobile-brand .sub { color: var(--ink-500); }

.auth-title { font-size: 1.75rem; font-weight: 800; color: var(--ink-900); letter-spacing: -0.02em; margin: 0 0 0.25rem; }
.auth-subtitle { color: var(--ink-500); font-size: 0.92rem; margin: 0 0 1.4rem; }
.auth-main .form-label { font-weight: 600; color: var(--ink-900); font-size: 0.88rem; margin-bottom: 0.3rem; }

.auth-input-group { position: relative; }
.auth-input-group > .bi { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--ink-400); pointer-events: none; }
.auth-input-group .form-control {
  padding: 0.6rem 0.9rem 0.6rem 2.4rem;
  background: #eef3fd; border: 1px solid #dbe4f3; border-radius: 10px;
}
.auth-input-group .form-control:focus { background: #fff; border-color: var(--wa-primary); box-shadow: 0 0 0 3px rgba(0, 113, 235, 0.15); }
.auth-input-group .form-control.has-toggle { padding-right: 2.6rem; }
.auth-pw-toggle {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--ink-400);
  padding: 0.25rem 0.4rem; line-height: 1;
}
.auth-pw-toggle:hover { color: var(--ink-700); }

.auth-submit {
  padding: 0.65rem 1rem;
  font-weight: 600; color: #fff; border: 0; border-radius: 10px;
  background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
  box-shadow: 0 10px 20px -10px rgba(29, 78, 216, 0.7);
  transition: filter .15s, transform .15s;
}
.auth-submit:hover, .auth-submit:focus { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }
.auth-secure { text-align: center; color: var(--ink-500); font-size: 0.78rem; margin: 1rem 0 0; }
.auth-secure .bi { color: #16a34a; margin-right: 0.25rem; }

@media (max-width: 767.98px) {
  .auth-aside { display: none; }
  .auth-card { max-width: 420px; }
  .auth-main { padding: 1.8rem 1.5rem; }
  .auth-mobile-brand { display: flex; }
}

/* Simple error / access-denied state reused inside the app shell */
.state-card {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2.5rem 2rem;
}
.state-card .state-icon {
  width: 68px; height: 68px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin: 0 auto 1.25rem;
}
.state-card .state-icon.warn { background: #fff4e0; color: #b7791f; }
.state-card .state-icon.danger { background: #ffe9ec; color: #d6336c; }
