/* =========================================================
   ManpowerOS Premium CSS
   Clean rewrite: dashboard, sidebar, login, tables, staff/client detail
   File: style.css
========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #eef2f7;
  --bg-soft: #f8fafc;
  --sidebar: #0f172a;
  --sidebar-2: #111827;
  --card: #ffffff;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e2e8f0;
  --border-soft: #eef2f7;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #16a34a;
  --green-dark: #047857;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --orange-dark: #c2410c;
  --cyan: #0369a1;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius-lg: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.09), transparent 32%),
    linear-gradient(180deg, #f8fafc, var(--bg));
  color: var(--text);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  border: none;
}

/* =========================================================
   LOGIN
========================================================= */

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.28), transparent 36%),
    linear-gradient(135deg, #0f172a, #111827);
}

.login-card {
  width: min(430px, 100%);
  padding: 32px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.26);
}

.login-logo {
  margin-bottom: 18px;
}

.login-card h1 {
  margin-bottom: 8px;
  font-size: 34px;
  letter-spacing: -1px;
}

.login-card p {
  color: var(--muted);
  line-height: 1.55;
}

.login-card input,
.login-card select,
.login-card button {
  margin-top: 12px;
}

.login-action-row {
  margin-top: 12px;
}

.workflow-summary {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  background: #f8fbff;
}

.workflow-summary p {
  margin: 0 0 8px;
}

.workflow-summary p:last-child {
  margin-bottom: 0;
}

.signup-inline-status {
  min-height: 20px;
  margin: 2px 0 0;
}

.signup-inline-status[data-tone="success"] {
  color: #15803d;
}

.signup-inline-status[data-tone="warning"] {
  color: #b45309;
}

.signup-inline-status[data-tone="error"] {
  color: #b91c1c;
}

.login-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--red);
  font-weight: 900;
}

body.locked #appLayout,
body.locked .bottom-nav {
  display: none !important;
}

body.locked #loginScreen {
  display: flex !important;
}

body:not(.locked) #loginScreen {
  display: none !important;
}

body:not(.locked) #appLayout {
  display: flex !important;
}

body.staff-login #loginScreen,
body.staff-login #appLayout,
body.staff-login .bottom-nav,
body.staff-login #staffSelfDashboard {
  display: none !important;
}

body.staff-login #staffLoginScreen {
  display: flex !important;
}

body.pin-reset #loginScreen,
body.pin-reset #staffLoginScreen,
body.pin-reset #appLayout,
body.pin-reset .bottom-nav,
body.pin-reset #staffSelfDashboard {
  display: none !important;
}

body.pin-reset #pinResetScreen {
  display: flex !important;
}

body.staff-dashboard #loginScreen,
body.staff-dashboard #staffLoginScreen,
body.staff-dashboard #appLayout,
body.staff-dashboard .bottom-nav {
  display: none !important;
}

body.staff-dashboard #staffSelfDashboard {
  display: block !important;
}

/* =========================================================
   APP LAYOUT
========================================================= */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  width: 270px;
  height: 100vh;
  padding: 26px 20px;
  overflow-y: auto;
  color: #ffffff;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.brand h2 {
  font-size: 23px;
  letter-spacing: -0.7px;
}

.brand p {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.workspace-shell-card {
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.workspace-shell-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workspace-shell-card strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.3;
}

.workspace-shell-card p {
  margin-top: 6px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

.workspace-shell-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.workspace-shell-meta span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-nav {
  display: grid;
  gap: 18px;
}

.sidebar-group {
  display: grid;
  gap: 10px;
}

.sidebar-group-label {
  display: inline-flex;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  margin-bottom: 10px;
}

.sidebar ul li a {
  position: relative;
  display: block;
  padding: 12px 14px;
  border-radius: 13px;
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: 0.2s ease;
}

.sidebar ul li a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar ul li a.active-nav,
.bottom-nav a.active-nav {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark)) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.main {
  flex: 1;
  max-width: 1600px;
  padding: 30px;
  overflow: hidden;
}

/* Show only selected page section */
.main > section {
  display: none !important;
}

.main > section.active-section {
  display: block !important;
  animation: fadeUp 0.22s ease;
}

.main > section#dashboard.active-section,
.main > section.dashboard-workspace.active-section {
  display: grid !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.15), transparent 35%),
    linear-gradient(135deg, #ffffff, #eef4ff);
  box-shadow: var(--shadow);
}

.eyebrow,
.section-label {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.topbar h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -1px;
}

.topbar p {
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.topbar-info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.topbar-info-strip span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

/* =========================================================
   CARDS / PANELS
========================================================= */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -28px;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.stat-card h3,
.stat-card p {
  position: relative;
  z-index: 1;
}

.stat-card h3 {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.stat-card p {
  color: var(--text);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.8px;
}

.highlight-card {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.highlight-card h3 {
  color: #cbd5e1;
}

.highlight-card p {
  color: #ffffff;
}

.panel {
  margin-bottom: 26px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.panel:hover {
  box-shadow: var(--shadow-lg);
}

.panel h2 {
  font-size: 23px;
  letter-spacing: -0.4px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.export-panel,
.duty-panel {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.utility-panel {
  border-style: dashed;
}

.v6-panel {
  border: 1px solid rgba(37, 99, 235, 0.16);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 32%),
    #ffffff;
}

.helper-text {
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.section-brief {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 36%),
    linear-gradient(135deg, #ffffff, #f8fbff);
}

.section-brief-copy {
  display: grid;
  gap: 6px;
}

.section-brief-copy strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.4;
}

.section-brief-copy span {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.section-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.section-brief-card {
  padding: 15px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.section-brief-card span,
.section-brief-card strong {
  display: block;
}

.section-brief-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-brief-card strong {
  margin-top: 10px;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.45;
}

.section-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

/* =========================================================
   FORMS / BUTTONS
========================================================= */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-soft);
}

.compact-form {
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(160px, 0.7fr));
  align-items: center;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  transition: 0.2s ease;
}

textarea.message-box,
textarea {
  resize: vertical;
}

textarea.message-box {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 14px;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button,
.mini-link {
  cursor: pointer;
  transition: 0.2s ease;
}

button {
  padding: 11px 15px;
  border-radius: 12px;
  background: var(--blue);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.button-row,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.secondary-btn {
  background: #475569;
  box-shadow: 0 8px 18px rgba(71, 85, 105, 0.16);
}

.secondary-btn:hover {
  background: #334155;
}

.edit-btn {
  padding: 8px 11px;
  background: var(--blue);
}

.delete-btn {
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.18);
}

.delete-btn:hover {
  background: var(--red-dark);
}

.back-dashboard-btn {
  border: 1px solid var(--border);
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: none;
}

.back-dashboard-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* =========================================================
   FILTERS / TABLES
========================================================= */

.filter-bar {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(10px);
}

.staff-filter-bar {
  grid-template-columns: 1.5fr repeat(2, minmax(150px, 1fr));
}

.single-filter {
  grid-template-columns: 1fr;
}

.table-wrap {
  width: 100%;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
}

table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 11px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th,
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

td {
  color: #1f2937;
}

tbody tr {
  transition: 0.15s ease;
}

tbody tr:hover {
  background: #eff6ff;
}

small {
  color: var(--muted);
}

.empty-row,
.dashboard-empty {
  padding: 18px;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.dashboard-empty {
  border: 1px dashed #cbd5e1;
}

.action-row button,
.action-row .mini-link {
  padding: 7px 10px;
  font-size: 12px;
}

/* Special table widths */
#staffSection table {
  min-width: 1250px;
}

#clientSection table {
  min-width: 1250px;
}

.client-summary-grid {
  margin-bottom: 20px;
}

.staff-summary-grid {
  margin-bottom: 20px;
}

.client-filter-bar {
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
}

#staffLedgerSection table {
  min-width: 1100px;
}

#clientLedgerSection table {
  min-width: 1400px;
}

#clientEventHistoryTable,
.client-event-history table {
  min-width: 1300px;
}

#voucherTable,
.voucher-card table {
  min-width: 600px;
}

#staffSection td small,
#clientSection td small {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
}

#staffSection .action-row button,
#clientSection .action-row button {
  padding: 8px 10px;
  font-size: 12px;
}

.client-quick-actions,
.client-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.client-detail-actions {
  margin-top: 12px;
}

.client-profile-card {
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.client-profile-highlights {
  margin-bottom: 16px;
}

.staff-profile-highlights {
  margin-bottom: 16px;
}

.client-upcoming-strip {
  margin-top: 18px;
}

.client-event-spotlight {
  margin-top: 12px;
}

.client-inline-payment {
  margin-top: 18px;
  border-style: dashed;
}

.client-profile-events-table {
  min-width: 980px;
}

@media (max-width: 900px) {
  .client-filter-bar {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   BADGES / LINKS
========================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge-new {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-follow,
.badge-warm {
  background: #ffedd5;
  color: #c2410c;
}

.badge-confirmed,
.badge-present {
  background: #dcfce7;
  color: #15803d;
}

.badge-cancelled,
.badge-absent,
.badge-hot {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-cold {
  background: #e0f2fe;
  color: #0369a1;
}

#staffSection .badge {
  margin-bottom: 4px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: #334155;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.mini-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.call-link {
  background: var(--blue);
}

.whatsapp-link {
  background: var(--green);
}

.payment-link {
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: var(--green-dark);
}

/* Clickable names */
.staff-name-btn,
.client-name-btn {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.staff-name-btn:hover,
.client-name-btn:hover {
  background: transparent;
  color: var(--blue-dark);
  text-decoration: underline;
  transform: none;
}

/* =========================================================
   DASHBOARD
========================================================= */

.dashboard-actions {
  margin-top: 0;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.quick-action-grid button {
  min-height: 56px;
  border-radius: 16px;
  background: #0f172a;
}

.quick-action-grid button:hover {
  background: var(--blue);
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.dashboard-hero-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 22px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 28%),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.08), transparent 20%),
    linear-gradient(135deg, #ffffff, #f7fbff);
}

.dashboard-hero-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -1px;
}

.dashboard-hero-copy .helper-text {
  max-width: 700px;
  margin: 0 0 20px;
  font-size: 15px;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-overview-grid .stat-card {
  min-height: 146px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.dashboard-overview-grid .stat-card p {
  font-size: 24px;
}

.dashboard-stage-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-stage-card {
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
}

.dashboard-stage-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-stage-card strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 16px;
}

.dashboard-stage-card p {
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-panel {
  margin-bottom: 0;
}

.dashboard-list {
  display: grid;
  gap: 12px;
}

.dashboard-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
}

.dashboard-item:hover {
  background: #eff6ff;
}

.dashboard-item strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
}

.dashboard-item small {
  color: var(--muted);
  line-height: 1.4;
}

.dashboard-pill {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-pill.red {
  background: #fee2e2;
  color: #b91c1c;
}

.dashboard-pill.green {
  background: #dcfce7;
  color: #15803d;
}

.dashboard-pill.orange {
  background: #ffedd5;
  color: #c2410c;
}

/* =========================================================
   REPORTS / METRICS
========================================================= */

.report-grid,
.mini-metrics {
  display: grid;
  gap: 16px;
}

.report-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.report-card,
.mini-metrics div {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
}

.report-card {
  padding: 20px;
}

.report-card h3 {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.report-card p {
  font-size: 28px;
  font-weight: 900;
}

.mini-metrics {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mini-metrics div {
  padding: 12px;
  background: #ffffff;
}

.mini-metrics span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.mini-metrics strong {
  font-size: 18px;
}

/* =========================================================
   DUTY SHEET
========================================================= */

.duty-preview {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #ffffff;
}

.duty-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.duty-summary h3 {
  margin-bottom: 5px;
  font-size: 22px;
}

.duty-summary p {
  margin-top: 4px;
  color: var(--muted);
}

.duty-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.duty-totals span {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-soft);
  font-size: 13px;
}

/* =========================================================
   PROFIT / FOLLOWUP / BUSINESS MODULES
========================================================= */

.profit-grid,
.followup-list {
  display: grid;
  gap: 14px;
}

.profit-card,
.followup-card,
.voucher-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
}

.profit-card,
.followup-card {
  padding: 16px;
}

.profit-head,
.followup-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.profit-head h3 {
  margin-bottom: 4px;
}

.profit-head p,
.followup-card p {
  margin-top: 4px;
  color: var(--muted);
}

.voucher-card {
  padding: 18px;
  background: #ffffff;
  text-align: left;
}

.voucher-card h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.voucher-card p {
  margin: 8px 0;
  color: var(--muted);
}

.totals-lite {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
  font-size: 18px;
  text-align: right;
}

#quotationTerms {
  min-width: 280px;
}

#voucherWhatsAppLink {
  padding: 11px 15px;
  border-radius: 12px;
}

#clientPaymentPreview .button-row {
  margin-top: 16px;
}

.client-payment-inline {
  display: flex;
  gap: 8px;
  min-width: 230px;
  margin-top: 8px;
}

.client-payment-inline input {
  max-width: 110px;
  padding: 8px 9px;
  font-size: 12px;
}

.client-payment-inline button {
  padding: 8px 10px;
  font-size: 12px;
}

/* =========================================================
   STAFF / CLIENT FULL DETAIL
========================================================= */

.staff-full-detail-box,
.client-full-detail-box {
  margin-bottom: 18px;
}

.staff-detail-head,
.client-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.staff-detail-head h2,
.client-detail-head h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.staff-detail-head p,
.client-detail-head p {
  margin-top: 5px;
  color: var(--muted);
}

.staff-detail-grid,
.client-detail-grid {
  margin-bottom: 20px;
}

.staff-duty-history,
.client-event-history {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
}

/* =========================================================
   ROLE / PIPELINE / CALENDAR / DB CARDS
========================================================= */

.role-grid,
.pipeline-board,
.calendar-grid {
  display: grid;
  gap: 14px;
}

.role-grid,
.pipeline-board {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.calendar-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.role-card,
.pipeline-column,
.calendar-card,
.db-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
}

.notification-unread {
  border-left: 4px solid var(--blue);
  background: #eef4ff;
}

.role-card h3,
.pipeline-column h3,
.calendar-card h3,
.db-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.role-card p,
.calendar-card p,
.db-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.role-lock {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.4);
}

.pipeline-column {
  min-height: 180px;
}

.pipeline-column h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pipeline-count {
  padding: 4px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: var(--cyan);
  font-size: 12px;
}

.pipeline-card {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.pipeline-card strong {
  display: block;
  margin-bottom: 5px;
}

.pipeline-card small {
  display: block;
  margin-bottom: 8px;
  line-height: 1.45;
}

.pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pipeline-actions button {
  padding: 7px 9px;
  font-size: 12px;
}

.calendar-list {
  margin-top: 14px;
}

.calendar-card.booked {
  border-color: #fed7aa;
  background: #fff7ed;
}

.calendar-card.available {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.calendar-card.leave {
  border-color: #fecaca;
  background: #fef2f2;
}

.pdf-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eff6ff;
  color: var(--blue-dark);
  font-weight: 900;
}

/* =========================================================
   BOTTOM NAV
========================================================= */

.bottom-nav {
  display: none;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {
  .dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-panel,
  .dashboard-stage-list,
  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body {
    padding-bottom: 72px;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    height: auto;
    padding: 20px;
    border-radius: 0 0 22px 22px;
  }

  .sidebar ul {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .sidebar ul li {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .sidebar ul li a {
    white-space: nowrap;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .panel-head,
  .duty-summary,
  .profit-head,
  .followup-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    padding: 20px;
  }

  .dashboard-hero-panel {
    padding: 20px;
  }

  .panel {
    padding: 18px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .compact-form,
  .filter-bar,
  .staff-filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    position: static;
  }

  .duty-totals {
    justify-content: flex-start;
  }

  .pipeline-board {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: #0f172a;
  }

  .bottom-nav a {
    padding: 12px 4px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
  }

  .bottom-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .voucher-card table {
    min-width: 720px;
  }

  .dashboard-hero-actions {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .staff-detail-head,
  .client-detail-head {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .cards,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 12px;
  }

  .panel,
  .topbar,
  .stat-card {
    border-radius: 16px;
  }

  .dashboard-hero-actions,
  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .button-row,
  .action-row,
  .client-payment-inline {
    flex-direction: column;
  }

  .button-row button,
  .action-row button,
  .action-row a,
  .client-payment-inline input,
  .client-payment-inline button {
    width: 100%;
    max-width: none;
  }

  .brand h2 {
    font-size: 20px;
  }
}




/* STAFF LOGIN + STAFF SELF DASHBOARD */

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f7fb;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  padding: 28px;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.login-card h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.login-card p {
  color: #64748b;
  margin-bottom: 16px;
}

.login-card input {
  width: 100%;
  padding: 13px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  margin-bottom: 14px;
}

.login-card button {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.error-text {
  color: #dc2626 !important;
  margin-top: 12px;
}

.staff-self-dashboard {
  padding: 24px;
  background: #f4f7fb;
  min-height: 100vh;
}

.staff-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 18px 0;
}

.staff-mini-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.staff-mini-card span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 8px;
}

.staff-mini-card strong {
  font-size: 24px;
  color: #0f172a;
}

.staff-section-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px;
  margin-top: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.staff-section-card h3 {
  margin-bottom: 16px;
}

.staff-profile-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.staff-profile-card h3 {
  font-size: 26px;
  margin-bottom: 6px;
}

.staff-profile-card p {
  color: #64748b;
}

.staff-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.staff-profile-item {
  background: #f8fafc;
  padding: 14px;
  border-radius: 14px;
}

.staff-profile-item span {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.staff-profile-item strong {
  color: #0f172a;
}

.danger-btn {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 900px) {
  .staff-dashboard-grid,
  .staff-profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .staff-dashboard-grid,
  .staff-profile-grid {
    grid-template-columns: 1fr;
  }
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #94a3b8;
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.staff-login-switch-btn {
  width: 100%;
  padding: 13px;
  border: 1px solid #111827;
  border-radius: 12px;
  background: #ffffff !important;
  color: #111827 !important;
  font-weight: 700;
  cursor: pointer;
}

.staff-login-switch-btn:hover {
  background: #f8fafc !important;
}

.staff-back-btn {
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff !important;
  color: #475569 !important;
  font-weight: 700;
  cursor: pointer;
}

.staff-back-btn:hover {
  background: #f8fafc !important;
}

.detail-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  margin: 18px 0;
}

.detail-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

/* =========================================================
   SIGNUP FLOW POLISH
========================================================= */

.signup-card {
  max-width: 600px;
}

.signup-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.signup-service-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.signup-service-pill[data-tone="success"] {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.signup-service-pill[data-tone="warning"] {
  background: rgba(249, 115, 22, 0.14);
  color: #9a3412;
}

.signup-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.signup-meta-strip span {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.signup-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.signup-section {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.98));
}

.signup-section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.signup-section-head strong {
  color: #0f172a;
  font-size: 17px;
}

.signup-section-head span {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.signup-progress-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.signup-progress-pill.is-active {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.signup-progress-pill.is-complete {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.signup-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.signup-field {
  display: grid;
  gap: 6px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.signup-field span {
  color: #0f172a;
}

.signup-field small {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.signup-form-grid input {
  margin-top: 0;
}

.signup-trust-row {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.signup-trust-row span {
  display: block;
  padding: 11px 13px;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.signup-verify-note {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  background: #f8fbff;
}

.signup-verify-note strong {
  color: #0f172a;
}

.signup-verify-note span {
  color: #64748b;
  line-height: 1.5;
}

.signup-verify-summary {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #ffffff;
}

.signup-verify-summary strong {
  color: #0f172a;
}

.signup-verify-summary span {
  color: #1e293b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.signup-verify-summary small {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.signup-aside .signup-step-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.signup-step-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.signup-step-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.signup-step-card strong {
  display: block;
  color: #ffffff;
  font-size: 16px;
}

.signup-step-card p {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.signup-points {
  margin-top: 18px;
}

.verify-card,
.setup-card {
  max-width: 600px;
}

.verify-context-grid,
.setup-summary-grid,
.setup-next-grid {
  display: grid;
  gap: 12px;
}

.verify-context-grid,
.setup-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.verify-context-card,
.setup-summary-item,
.setup-next-card,
.setup-link-card {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.98));
}

.verify-context-card span,
.setup-summary-item span,
.setup-next-card strong,
.setup-link-card strong {
  display: block;
}

.verify-context-card span,
.setup-summary-item span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.verify-context-card strong,
.setup-summary-item strong {
  display: block;
  margin-top: 10px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

.verify-handoff-card {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  background: #f8fbff;
}

.verify-handoff-card strong {
  color: #0f172a;
  font-size: 16px;
}

.verify-handoff-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.verify-handoff-list span {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.setup-link-card {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.setup-link-card strong {
  color: #0f172a;
  font-size: 16px;
}

.setup-link-card span {
  color: #1e293b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.setup-link-card small,
.setup-next-card span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.setup-next-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.setup-next-card strong {
  color: #0f172a;
  font-size: 15px;
  margin-bottom: 8px;
}

.signup-status-banner,
.signup-error-banner {
  display: none;
  margin: 14px 0 0;
  padding: 13px 15px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.signup-status-banner:not(:empty),
.signup-error-banner:not(:empty) {
  display: block;
}

.signup-status-banner {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  color: #475569;
}

.signup-status-banner[data-tone="success"] {
  border-color: rgba(22, 163, 74, 0.2);
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}

.signup-status-banner[data-tone="warning"] {
  border-color: rgba(249, 115, 22, 0.22);
  background: rgba(249, 115, 22, 0.1);
  color: #9a3412;
}

.signup-error-banner {
  min-height: 0;
  color: #991b1b;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.16);
}

/* =========================================================
   APP POLISH OVERRIDES
========================================================= */

body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.1), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.1), transparent 24%),
    linear-gradient(180deg, #f8fafc, #edf3fb);
}

h1,
h2,
h3,
.brand h2,
.login-card h1,
.topbar h1,
.panel h2,
.status-badge,
.brand-icon,
.auth-aside h2,
.proof-value {
  font-family: "Space Grotesk", "Source Sans 3", sans-serif;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 2px;
}

.login-screen {
  position: relative;
  min-height: 100dvh;
  padding: 28px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(15, 118, 110, 0.18), transparent 24%),
    linear-gradient(135deg, #0f172a, #111827 56%, #1d4ed8 150%);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.94fr) minmax(340px, 0.82fr);
  gap: 22px;
  width: min(1040px, 100%);
  margin: auto;
  align-items: stretch;
}

.auth-aside,
.login-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
}

.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
}

.auth-aside::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  bottom: -90px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22), transparent 70%);
}

.auth-aside > * {
  position: relative;
  z-index: 1;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-aside h2 {
  margin-top: 18px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.02;
  letter-spacing: -1.2px;
}

.auth-aside p {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.75;
}

.auth-points {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.auth-points div {
  padding: 16px 16px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-points strong {
  display: block;
  color: #ffffff;
  font-size: 16px;
}

.auth-points span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
}

.login-card {
  width: 100%;
  max-width: none;
  padding: 34px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.login-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -70px;
  right: -70px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 72%);
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.18);
}

.login-card h1 {
  font-size: 36px;
}

.login-card input,
.login-card select {
  min-height: 50px;
  border-radius: 14px;
}

.login-card button {
  min-height: 48px;
  border-radius: 14px;
}

.sidebar {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 24%),
    linear-gradient(180deg, #0f172a, #111827 60%, #172554);
}

.sidebar ul li a {
  border: 1px solid transparent;
}

.sidebar ul li a:hover {
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.sidebar-meta {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-meta-label {
  display: inline-flex;
  margin-bottom: 12px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sidebar-meta-list span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-meta p {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
}

.main {
  padding: 34px;
}

.topbar {
  padding: 30px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.08), transparent 22%),
    linear-gradient(135deg, #ffffff, #eff5ff);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-session-card {
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.topbar-session-card span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-session-card strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
}

.topbar-session-card small {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.status-badge {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.panel,
.stat-card {
  border-radius: 22px;
}

.panel-head {
  margin-bottom: 20px;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .auth-aside {
    order: 2;
    padding: 24px;
  }

  .login-card {
    order: 1;
  }

  .sidebar-meta {
    display: none;
  }

  .signup-form-grid {
    grid-template-columns: 1fr;
  }

  .verify-context-grid,
  .setup-summary-grid,
  .setup-next-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-session-card {
    width: 100%;
  }

  .section-brief-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-screen {
    padding: 12px;
  }

  .signup-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-card,
  .auth-aside {
    padding: 20px;
    border-radius: 20px;
  }

  .auth-aside h2,
  .login-card h1 {
    font-size: clamp(26px, 8vw, 32px);
  }

  .signup-meta-strip,
  .signup-progress {
    display: grid;
    grid-template-columns: 1fr;
  }

  .signup-meta-strip span,
  .signup-progress-pill,
  .signup-service-pill {
    width: 100%;
    justify-content: flex-start;
  }

  .signup-section,
  .verify-context-card,
  .setup-summary-item,
  .setup-next-card,
  .setup-link-card {
    padding: 14px;
    border-radius: 16px;
  }

  .signup-step-card {
    grid-template-columns: 36px 1fr;
    padding: 14px;
  }

  .signup-step-card span {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 12px;
  }

  .sidebar {
    position: static;
    padding: 16px 14px;
  }

  .workspace-shell-card,
  .sidebar-meta {
    display: none;
  }

  .sidebar-nav {
    gap: 12px;
  }

  .sidebar-group {
    gap: 8px;
  }

  .sidebar ul {
    gap: 6px;
    padding-bottom: 2px;
  }

  .sidebar ul li a {
    padding: 10px 12px;
    font-size: 14px;
  }

  .main {
    padding: 10px;
  }

  .topbar {
    padding: 16px;
  }

  .topbar h1 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-info-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions button,
  .topbar-actions .status-badge,
  .topbar-session-card {
    width: 100%;
    justify-content: center;
  }
}
