/* ==========================================================================
   ModuleCrafter Cloud - Premium SaaS Design System & Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand & Accents */
  --mcs-cloud-accent: #6366f1;
  --mcs-cloud-sidebar: #0f172a;
  --accent: var(--mcs-cloud-accent, #6366f1);
  --accent-hover: #4f46e5;
  --accent-active: #4338ca;
  --accent-soft: rgba(99, 102, 241, 0.08);
  --accent-soft-hover: rgba(99, 102, 241, 0.14);
  --accent-glow: rgba(99, 102, 241, 0.25);

  /* Neutrals & Surfaces */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-surface-hover: #f8fafc;
  --bg-sidebar: var(--mcs-cloud-sidebar, #0f172a);
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active: #1e293b;

  /* Typography Colors */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;
  --text-sidebar: #cbd5e1;
  --text-sidebar-muted: #64748b;

  /* Borders & Dividers */
  --border-light: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: var(--accent);

  /* Status Tokens */
  --status-success-bg: #ecfdf5;
  --status-success-text: #059669;
  --status-success-border: #a7f3d0;
  
  --status-danger-bg: #fef2f2;
  --status-danger-text: #dc2626;
  --status-danger-border: #fecaca;
  
  --status-warning-bg: #fffbeb;
  --status-warning-text: #d97706;
  --status-warning-border: #fde68a;
  
  --status-info-bg: #eff6ff;
  --status-info-text: #2563eb;
  --status-info-border: #bfdbfe;

  /* Elevation & Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-main);
  background-color: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-color: var(--bg-app);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

code, kbd, samp, pre {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   Typography & Kickers
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.00rem; }

p {
  color: var(--text-muted);
  line-height: 1.6;
}

.kicker, .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.text-muted { color: var(--text-muted) !important; }
.text-subtle { color: var(--text-subtle) !important; }
.text-accent { color: var(--accent) !important; }
.text-success { color: var(--status-success-text) !important; }
.text-danger { color: var(--status-danger-text) !important; }

/* ==========================================================================
   Layout Architecture
   ========================================================================== */

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg-app);
}

/* Sidebar */
aside.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  padding: 24px 16px 20px;
  color: var(--text-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 40;
  user-select: none;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

aside.sidebar::-webkit-scrollbar {
  width: 4px;
}
aside.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  height: 44px;
  text-decoration: none;
  margin-bottom: 24px;
}

.brand-logo, .sidebar-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.brand-word, .sidebar-word {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-sidebar-muted);
  text-transform: uppercase;
  padding: 16px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.sidebar-link:hover {
  background: var(--bg-sidebar-hover);
  color: #ffffff;
}

.sidebar-link.active {
  background: var(--bg-sidebar-active);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-link .ui-icon {
  width: 20px;
  height: 20px;
  color: inherit;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-link.active .ui-icon {
  color: var(--accent);
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-link.logout {
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #ef4444;
  justify-content: flex-start;
}

.sidebar-link.logout:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

/* Support PIN Widget in Sidebar */
.support-pin-widget {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: background var(--transition-fast);
}

.support-pin-widget:hover {
  background: rgba(255, 255, 255, 0.07);
}

.support-pin-one-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.support-pin-reveal {
  background: transparent;
  border: 0;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.support-pin-eye {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.support-pin-eye svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-pin-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.support-pin-inline code {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.support-pin-icon-btn {
  background: transparent;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-pin-icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.support-pin-icon-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Main Content Area */
main.main-content {
  padding: 0 40px 60px;
  min-width: 0;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Top Header Bar */
header.top {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
}

header.top h1 {
  margin: 2px 0 0;
  font-size: 1.75rem;
}

/* Account Dropdown Menu */
.account-menu-wrap {
  position: relative;
}

.account-menu-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.account-menu-trigger:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.account-menu-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.account-menu-avatar svg {
  width: 18px;
  height: 18px;
}

.account-menu-trigger-copy {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.account-menu-trigger-copy b {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.account-menu-trigger-copy small {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.account-menu-chevron {
  color: var(--text-subtle);
  font-size: 0.75rem;
  margin-left: 2px;
  transition: transform var(--transition-fast);
}

.account-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 12px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: popoverFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.account-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 4px;
}

.account-menu-avatar.large {
  width: 38px;
  height: 38px;
}

.account-menu-head div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.account-menu-head b {
  font-size: 0.92rem;
  color: var(--text-main);
}

.account-menu-head small {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu-popover nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-menu-popover nav a,
.account-menu-popover form button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  transition: background var(--transition-fast);
  text-decoration: none;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.account-menu-popover nav a:hover,
.account-menu-popover form button:hover {
  background: var(--bg-surface-subtle);
}

.account-menu-popover form {
  border-top: 1px solid var(--border-light);
  padding-top: 4px;
  margin-top: 2px;
}

.account-menu-popover form button {
  color: #dc2626;
}

.account-menu-popover form button:hover {
  background: #fef2f2;
}

/* ==========================================================================
   UI Components: Cards, Stats, Badges, Buttons
   ========================================================================== */

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 24px;
  margin-top: 20px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-sm);
}

.card h2, .card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.sectionhead h2, .sectionhead h3 {
  margin: 0 0 2px;
}

.sectionhead p {
  margin: 0;
  font-size: 0.9rem;
}

/* Stats Grid */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat div {
  min-width: 0;
}

.stat b {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.stat span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat.actionstat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}

.stat.actionstat .btn {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  line-height: 1.3;
}

.btn:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-sm);
  color: #ffffff;
}

.btn:active {
  background: var(--accent-active);
  transform: translateY(1px);
}

.btn.primary, .btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn.secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

.btn.secondary:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn.ghost {
  background: transparent;
  color: var(--text-main);
  border-color: transparent;
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--bg-surface-subtle);
}

.btn.danger {
  background: #dc2626;
  color: #ffffff;
}

.btn.danger:hover {
  background: #b91c1c;
}

.btn.full {
  width: 100%;
}

.btn.small {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.textbtn {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.textbtn:hover {
  background: var(--accent-soft);
}

.textbtn.danger {
  color: #dc2626;
}

.textbtn.danger:hover {
  background: #fef2f2;
}

.iconbtn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.iconbtn:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-strong);
  color: var(--text-main);
}

/* Status Badges */
.badge, .status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  line-height: 1.2;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.active, .badge.paid, .badge.answered, .badge.success {
  background: var(--status-success-bg);
  color: var(--status-success-text);
  border: 1px solid var(--status-success-border);
}

.badge.unpaid, .badge.overdue, .badge.suspended, .badge.fraud, .badge.danger {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  border: 1px solid var(--status-danger-border);
}

.badge.pending, .badge.open, .badge.customerreply, .badge.warning {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  border: 1px solid var(--status-warning-border);
}

.badge.cancelled, .badge.terminated, .badge.closed, .badge.inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Form Controls */
label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-top: 14px;
  margin-bottom: 6px;
}

label small {
  display: block;
  font-weight: 400;
  font-size: 0.80rem;
  color: var(--text-muted);
  margin-top: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.92rem;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder, textarea::placeholder {
  color: var(--text-subtle);
}

.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.formgrid label {
  margin: 0;
}

.span2 {
  grid-column: span 2;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert.success {
  background: var(--status-success-bg);
  color: var(--status-success-text);
  border: 1px solid var(--status-success-border);
}

.alert.error, .alert.danger {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  border: 1px solid var(--status-danger-border);
}

.alert.warn, .alert.warning {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  border: 1px solid var(--status-warning-border);
}

/* Tables */
.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-main);
  font-size: 0.92rem;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background-color var(--transition-fast);
}

tbody tr:hover {
  background-color: var(--bg-surface-hover);
}

/* Details list (<dl>) */
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.details div {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

dt {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

dd {
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-word;
}

/* Search bar */
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 14px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
}

.searchbar .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.searchbar input {
  border: 0 !important;
  box-shadow: none !important;
  padding: 8px 0 !important;
}

.search-submit {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-weight: 700;
  cursor: pointer;
}

.search-clear {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
}

.list-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}

/* Pagination */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.pager-btn, .pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pager-btn:hover, .pager-num:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-strong);
}

.pager-num.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.pager-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pager-dots {
  color: var(--text-subtle);
  padding: 0 4px;
}

/* ==========================================================================
   Views: Dashboard, Services, Hosting Console
   ========================================================================== */

/* Welcome / Dashboard Hero */
.welcome, .servicehero, .invoicehead {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  padding: 32px 36px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.welcome h2, .servicehero h2, .invoicehead h2 {
  color: #ffffff;
  font-size: 1.85rem;
  margin: 4px 0 6px;
}

.welcome p, .servicehero p, .invoicehead p {
  color: #94a3b8;
  font-size: 1rem;
}

.welcome .kicker, .servicehero .kicker, .invoicehead .kicker {
  color: #818cf8;
}

/* Row links (Recent activity, invoices, services) */
.rowlink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.rowlink:last-child {
  border-bottom: 0;
}

.rowlink:hover {
  transform: translateX(4px);
}

.rowlink b {
  font-size: 0.95rem;
  color: var(--text-main);
}

.rowlink small {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hosting Console & Service Details */
.service-console-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.hosting-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.hosting-btn {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 16px 18px !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle) !important;
  box-shadow: var(--shadow-xs);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hosting-btn:hover {
  border-color: var(--accent) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hosting-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
}

.hosting-btn b {
  display: block;
  font-size: 0.92rem;
  color: var(--text-main);
}

.hosting-btn small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Usage Meters (Disk & Bandwidth) */
.usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0;
}

.usage-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}

.usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.usage-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.usage-head span {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent);
}

.usage-track {
  height: 10px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 14px 0 10px;
}

.usage-track i {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ==========================================================================
   Views: Billing & Invoices
   ========================================================================== */

.invoice-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.5fr) 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition-fast);
}

.invoice-row:last-child {
  border-bottom: 0;
}

.invoice-row:hover {
  background: var(--bg-surface-hover);
}

.invoice-row-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.invoice-row-main b {
  display: block;
  font-size: 0.96rem;
  color: var(--text-main);
}

.invoice-row-main small {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.invoice-row-amount {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.invoice-row-amount b {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.invoice-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Invoice Document View */
.invoice-document {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 38px 42px;
  box-shadow: var(--shadow-sm);
  max-width: 900px;
  margin: 20px auto 40px;
}

.invoice-doc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
}

.invoice-doc-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.invoice-doc-brand b {
  display: block;
  font-size: 1.25rem;
  color: var(--text-main);
}

.invoice-doc-brand span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.invoice-doc-payment {
  text-align: right;
}

.invoice-doc-payment small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.invoice-doc-payment strong {
  display: block;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin: 4px 0 10px;
}

.invoice-doc-payment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.invoice-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
}

.invoice-parties > div {
  display: flex;
  gap: 14px;
}

.invoice-party-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.invoice-parties small {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.invoice-parties b {
  display: block;
  font-size: 0.95rem;
  margin: 2px 0 4px;
}

.invoice-parties p {
  font-size: 0.88rem;
  line-height: 1.5;
}

.invoice-date-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.invoice-date-strip > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-date-strip b {
  font-size: 0.88rem;
}

.invoice-date-strip span {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-left: auto;
}

.invoice-items-title {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 24px 0 12px;
}

.invoice-doc-table {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.invoice-doc-th {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-surface-subtle);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.invoice-doc-tr {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border-light);
  font-size: 0.92rem;
}

.invoice-doc-totals {
  max-width: 340px;
  margin: 20px 0 28px auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.invoice-doc-totals > div {
  display: flex;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.92rem;
}

.invoice-doc-totals .grand {
  border-bottom: 0;
  background: var(--bg-surface-subtle);
  font-weight: 800;
  font-size: 1.1rem;
}

.invoice-doc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}

/* Pay Page */
.pay-page-pro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
  max-width: 1100px;
  margin: 20px auto;
}

.pay-panel, .pay-summary-pro {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.pay-panel-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 22px;
}

.pay-invoice-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.pay-amount {
  margin-left: auto;
  text-align: right;
}

.pay-amount strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-main);
}

.pay-method-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.pay-method-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pay-method-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.pay-method-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.pay-method-card input {
  width: auto;
  margin: 0;
}

.pay-method-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: #1e293b;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.85rem;
}

.pay-method-copy b {
  display: block;
  font-size: 0.95rem;
}

.pay-method-copy small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pay-method-check {
  margin-left: auto;
  font-weight: 800;
  color: var(--accent);
  opacity: 0;
}

.pay-method-card:has(input:checked) .pay-method-check {
  opacity: 1;
}

/* ==========================================================================
   Views: Support Tickets & Live Conversation Thread
   ========================================================================== */

.support-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
}

.support-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.support-stats > div {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}

.support-stats b {
  font-size: 1.6rem;
  line-height: 1.1;
}

.support-stats small {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ticketcard {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.ticketcard:last-child {
  border-bottom: 0;
}

.ticketcard:hover {
  background: var(--bg-surface-hover);
}

.ticket-symbol {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.ticket-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-title h3 {
  font-size: 0.96rem;
  margin: 0;
}

.ticket-copy p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.ticket-open {
  color: var(--text-subtle);
}

/* Conversation Thread */
.ticket-workspace-pro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
  margin-top: 20px;
}

.ticket-overview-pro {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
}

.ticket-overview-title {
  margin-bottom: 16px;
}

.back-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 8px;
}

.ticket-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ticket-overview-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.ticket-overview-meta > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-overview-meta small {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.ticket-overview-meta b {
  display: block;
  font-size: 0.88rem;
}

.ticket-conversation-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.ticket-conversation-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 18px;
}

.conversation {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.chat-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.chat-message.customer {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: #0f172a;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.chat-message.customer .chat-avatar {
  background: var(--accent);
}

.chat-bubble {
  max-width: 82%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.chat-message.customer .chat-bubble {
  background: #f5f4ff;
  border-color: #ddd6fe;
}

.chat-bubble header {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface-subtle);
  font-size: 0.80rem;
  font-weight: 700;
}

.chat-bubble > div {
  padding: 14px 16px;
  color: var(--text-main);
  line-height: 1.6;
}

.ticket-reply-composer {
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
}

.reply-input-wrap textarea {
  min-height: 100px;
  margin-bottom: 12px;
}

.reply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ==========================================================================
   Views: Storefront, Marketplace, Cart & Checkout
   ========================================================================== */

.storefront {
  min-height: 100vh;
  background: var(--bg-app);
}

.storetop {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}

.store-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.storenav a {
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.storenav a:hover {
  background: var(--bg-surface-subtle);
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: 6px;
}

.storemain {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 32px 60px;
}

.storehero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  color: #ffffff;
  padding: 48px 52px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 36px;
}

.storehero h1 {
  font-size: 2.4rem;
  color: #ffffff;
  margin: 8px 0 12px;
  letter-spacing: -0.035em;
}

.storehero p {
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 600px;
}

/* Product Card Grid */
.productgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.productcard {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-normal);
}

.productcard:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-xl);
}

.producticon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 12px;
}

.productcard h3 {
  font-size: 1.25rem;
  margin: 4px 0 10px;
}

.productdesc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  flex: 1;
}

.productfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  margin-top: 20px;
}

.productfoot strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.productfoot small {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Cart & Checkout */
.cart-premium {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}

.cart-main-panel, .cart-summary-pro {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xs);
}

.cart-line-pro {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
}

.cart-line-pro:last-child {
  border-bottom: 0;
}

.cart-product-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.cart-product-info h3 {
  font-size: 1rem;
  margin: 0 0 2px;
}

.cart-product-info p {
  font-size: 0.82rem;
  margin: 0;
}

.cart-product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.cart-remove {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.cart-remove:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-light);
}

.cart-summary-row.total {
  font-size: 1.35rem;
  font-weight: 800;
  padding: 16px 0;
  border-bottom: 0;
}

.checkout-clean {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.checkout-auth-column, .checkout-basket {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-xs);
}

.checkout-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}

.checkout-tab {
  padding: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.checkout-tab.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

/* Auth Pages (Sign In / Forgot / Reset) */
.authwrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg-app);
}

.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100vw;
  background: var(--bg-surface);
}

.login-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 64px;
}

.login-inner {
  width: min(100%, 420px);
}

.login-side {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-side-card {
  max-width: 440px;
}

.login-side-card h2 {
  font-size: 2.2rem;
  color: #ffffff;
  margin: 12px 0 16px;
}

.login-side-card p {
  color: #cbd5e1;
  font-size: 1.05rem;
}

.login-side-card ul {
  margin-top: 24px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-side-card li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #e2e8f0;
}

.login-side-card li::before {
  content: '✓';
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.login-title h1 {
  font-size: 2rem;
  margin: 4px 0 8px;
}

.login-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
}

.login-links a {
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================================
   Responsive & Mobile Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cart-premium, .checkout-clean, .pay-page-pro, .ticket-workspace-pro {
    grid-template-columns: 1fr;
  }
  .login-split {
    grid-template-columns: 1fr;
  }
  .login-side {
    display: none;
  }
}

@media (max-width: 768px) {
  .shell {
    display: flex;
    flex-direction: column;
  }

  aside.sidebar {
    height: auto;
    position: sticky;
    top: 0;
    padding: 12px 16px;
    z-index: 50;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .sidebar-brand {
    margin-bottom: 8px;
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }

  .sidebar-section-label {
    display: none;
  }

  .sidebar-link {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.84rem;
  }

  .sidebar-bottom {
    display: none;
  }

  main.main-content {
    padding: 0 16px 40px;
  }

  header.top {
    height: 72px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .grid2, .formgrid, .details, .usage-grid, .invoice-parties, .invoice-date-strip {
    grid-template-columns: 1fr;
  }

  .span2 {
    grid-column: auto;
  }

  .welcome, .servicehero, .invoicehead, .storehero {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  .invoice-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .invoice-row-amount, .invoice-row-actions {
    grid-column: 2;
    text-align: left;
    align-items: flex-start;
    margin-top: 4px;
  }

  .storetop {
    padding: 0 16px;
  }
}
