/* ==========================================================================
   SISTEM ANTREAN SPMB SMKN 1 BLITAR
   THEME STYLESHEET: DUAL-THEME MODERN GLASSMORPHISM (DARK & LIGHT)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap");

/* ==========================================================================
   THEME VARIABLE DESIGN SYSTEM (STRUCTURED HSL)
   ========================================================================== */

/* 1. DEFAULT LIGHT THEME
   Light is the baseline so pages never flash/mix dark surfaces before JS loads. */
:root {
  --bg-dark: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);

  /* Brand Accent Colors (Identitas SMKN 1 Blitar) */
  --primary: #1e3a8a;
  --primary-glow: rgba(30, 58, 138, 0.15);
  --secondary: #f1f5f9;
  --accent: #0284c7;
  --accent-glow: rgba(2, 132, 199, 0.2);

  /* State Indicators */
  --success: #059669;
  --success-glow: rgba(16, 185, 129, 0.25);
  --warning: #d97706;
  --danger: #dc2626;

  /* Typography */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dark: #f8fafc;

  /* Glassmorphism Specs */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-focus: rgba(30, 58, 138, 0.35);
  --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.06);
  --card-hover-bg: rgba(255, 255, 255, 0.85);

  /* Borders & Spacing */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Font Families */
  --font-heading: "Outfit", "Poppins", sans-serif;
  --font-body: "Poppins", sans-serif;

  /* Sidebar collapse width */
  --sidebar-width: 260px;
}

/* 2. LIGHT THEME CONFIGURATION (Explicit alias for persisted light mode) */
[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);

  /* Brand Accent Colors */
  --primary: #1e3a8a; /* Royal Navy Blue */
  --primary-glow: rgba(30, 58, 138, 0.15);
  --secondary: #f1f5f9;
  --accent: #0284c7; /* Sky Blue */
  --accent-glow: rgba(2, 132, 199, 0.2);

  /* Typography */
  --text-main: #0f172a; /* Dark Slate (Sangat Kontras & Profesional) */
  --text-muted: #475569; /* Slate Muted */
  --text-dark: #f8fafc;

  /* Glassmorphism Specs (Milky Glass) */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-focus: rgba(30, 58, 138, 0.35);
  --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.06);
  --card-hover-bg: rgba(255, 255, 255, 0.85);

  /* State Indicators (Slightly deeper for better contrast in light mode) */
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
}

/* 3. DARK THEME CONFIGURATION */
[data-theme="dark"] {
  --bg-dark: #050814;
  --bg-gradient: linear-gradient(135deg, #040712 0%, #0c1530 50%, #060b1b 100%);

  --primary: #0284c7;
  --primary-glow: rgba(2, 132, 199, 0.25);
  --secondary: #0f172a;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.35);

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  --warning: #f59e0b;
  --danger: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #1e293b;

  --glass-bg: rgba(13, 20, 44, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(56, 189, 248, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --card-hover-bg: rgba(15, 23, 42, 0.45);
}

/* ==========================================================================
   GLOBAL RESET & DECORATIONS
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

body {
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  line-height: 1.6;
  position: relative;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    background-image 0.3s ease;
}

/* Glowing Decorative Background Bubbles */
body::before,
body::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  pointer-events: none;
  transition: var(--transition);
}
body::before {
  top: 10%;
  left: 5%;
  background: var(--primary-glow);
}
body::after {
  bottom: 10%;
  right: 5%;
  background: var(--accent-glow);
}

[data-theme="light"] body::before {
  background: rgba(30, 58, 138, 0.08);
}
[data-theme="light"] body::after {
  background: rgba(2, 132, 199, 0.06);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* ==========================================================================
   THEME SWITCHER BUTTON (FAB)
   ========================================================================== */
.theme-toggle-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(20deg);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.theme-toggle-btn i {
  font-size: 1.3rem;
}

/* ==========================================================================
   GLASSMORPHISM SPECIFICS
   ========================================================================== */
.glass-container {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.glass-container:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .glass-container:hover {
  border-color: rgba(15, 23, 42, 0.15);
}

.glass-card {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
}

[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-focus);
  background: var(--card-hover-bg);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.08);
}

[data-theme="light"] .glass-card:hover {
  box-shadow: 0 10px 25px rgba(30, 58, 138, 0.05);
}

/* ==========================================================================
   TYPOGRAPHY & UTILS
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-main) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-glow {
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  outline: none;
  font-family: var(--font-heading);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-accent {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.05);
}
.btn-accent:hover {
  background: var(--accent);
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--accent-glow);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--success-glow);
}
.btn-success:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}
.btn-danger:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-warning {
  background: var(--warning);
  color: #ffffff;
}
.btn-warning:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-disabled {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-muted) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none !important;
  opacity: 0.6 !important;
}

[data-theme="light"] .btn-disabled {
  background: rgba(15, 23, 42, 0.06) !important;
}

/* ==========================================================================
   INPUTS & FORMS
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

[data-theme="light"] .form-control {
  background: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
  border-color: var(--glass-border-focus);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Modern login shell */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.92),
      rgba(226, 241, 255, 0.88)
    ),
    radial-gradient(
      circle at top left,
      rgba(30, 58, 138, 0.18),
      transparent 34%
    ),
    var(--bg-main);
}

.auth-shell {
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  overflow: hidden;
  border: 1px solid rgba(30, 58, 138, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.auth-brand-panel {
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(30, 58, 138, 0.92), rgba(14, 116, 144, 0.88)),
    url("../images/logo.png") center / 220px auto no-repeat;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  pointer-events: none;
}

.auth-brand-card {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.auth-school {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-school img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
}

.auth-school span,
.auth-copy span {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
}

.auth-school strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
}

.auth-copy h1 {
  max-width: 520px;
  margin: 14px 0 18px;
  font-size: 2.8rem;
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 470px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.auth-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.auth-steps div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-steps strong,
.auth-steps span {
  display: block;
}

.auth-steps strong {
  font-size: 1.45rem;
  line-height: 1;
}

.auth-steps span {
  margin-top: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  padding: 44px;
  background: rgba(255, 255, 255, 0.96);
}

.auth-form-card {
  width: 100%;
}

.auth-eyebrow {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-form-card h2 {
  margin: 10px 0 10px;
  color: #172033;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 900;
}

.auth-subtitle {
  margin-bottom: 28px;
  color: #64748b;
  line-height: 1.65;
}

.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  text-align: left;
}

.auth-alert-danger {
  color: #b91c1c;
  border: 1px solid #fecaca;
  background: #fef2f2;
}

.auth-alert-info {
  color: #075985;
  border: 1px solid #bae6fd;
  background: #eff6ff;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap > i {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}

.input-icon-wrap .form-control {
  height: 56px;
  padding-left: 48px;
  color: #172033;
  background: #ffffff;
  border: 1px solid #dbe4ef;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.input-icon-wrap .form-control:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.auth-submit {
  width: 100%;
  height: 54px;
  margin-top: 8px;
  border-radius: 8px;
  font-size: 1rem;
}

.auth-footer {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e2e8f0;
  color: #334155;
  text-align: center;
  font-size: 0.82rem;
}

.auth-footer a {
  color: #1e3a8a;
  font-weight: 800;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .auth-page {
    padding: 12px;
  }

  .auth-brand-panel,
  .auth-form-panel {
    padding: 22px;
  }

  .auth-copy h1 {
    font-size: 2.2rem;
  }

  .auth-steps {
    grid-template-columns: 1fr;
  }
}

[data-theme="light"] .form-control:focus {
  background: #ffffff;
}

/* ==========================================================================
   UTILITY CONTAINER & GRID
   ========================================================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo img {
  height: 55px;
  width: auto;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 16px;
  }
}

/* ==========================================================================
   PORTAL PAGE (index.php)
   ========================================================================== */
.portal-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.portal-header {
  text-align: center;
  margin-bottom: 40px;
}

.portal-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 800;
}

.portal-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.portal-card {
  text-align: center;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.portal-card .icon-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(56, 189, 248, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 2.2rem;
  margin-bottom: 24px;
  transition: var(--transition);
  border: 1px solid rgba(56, 189, 248, 0.15);
}

[data-theme="light"] .portal-card .icon-wrapper {
  background: rgba(30, 58, 138, 0.05);
  border-color: rgba(30, 58, 138, 0.1);
}

.portal-card:hover .icon-wrapper {
  background: var(--accent);
  color: var(--text-dark);
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 20px var(--accent-glow);
}

.portal-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.portal-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* Premium portal and auth refinement */
.auth-page,
.portal-future {
  color: #172033;
  background:
    linear-gradient(
      135deg,
      rgba(248, 252, 255, 0.96),
      rgba(226, 241, 255, 0.92)
    ),
    linear-gradient(90deg, rgba(30, 58, 138, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(30, 58, 138, 0.04) 1px, transparent 1px), #edf6ff;
  background-size:
    auto,
    54px 54px,
    54px 54px,
    auto;
}

.auth-page {
  background:
    linear-gradient(135deg, rgba(8, 20, 42, 0.78), rgba(7, 43, 68, 0.68)),
    #0b1628;
  background-size: auto;
}

.auth-shell {
  position: relative;
  border-radius: 18px;
  border-color: rgba(30, 58, 138, 0.18);
  box-shadow:
    0 30px 90px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: panelReveal 520ms ease both;
}

.auth-shell::before,
.portal-command::before,
.portal-future-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-shell::before {
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(14, 165, 233, 0.12) 42%,
    transparent 64%
  );
  transform: translateX(-110%);
  animation: surfaceSweep 4.8s ease-in-out infinite;
}

.auth-brand-panel {
  background:
    linear-gradient(
      140deg,
      rgba(30, 58, 138, 0.96),
      rgba(3, 105, 161, 0.9) 52%,
      rgba(15, 118, 110, 0.88)
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.07) 0 1px,
      transparent 1px 28px
    );
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      115deg,
      transparent 0 35%,
      rgba(255, 255, 255, 0.11) 45%,
      transparent 58%
    ),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size:
    auto,
    100% 34px;
  opacity: 0.55;
}

.auth-scanline {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(125, 211, 252, 0.2),
    transparent
  );
  transform: translateY(-100%);
  animation: scanlineMove 5.5s linear infinite;
  pointer-events: none;
}

.auth-brand-card {
  z-index: 3;
}

.auth-school img {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.auth-copy h1 {
  font-size: 3.15rem;
  letter-spacing: 0;
}

.auth-steps div {
  position: relative;
  overflow: hidden;
  transition:
    transform 220ms ease,
    background 220ms ease,
    border-color 220ms ease;
}

.auth-steps div:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.18);
}

.auth-form-panel {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(248, 251, 255, 0.96)
    ),
    linear-gradient(90deg, rgba(30, 58, 138, 0.05) 1px, transparent 1px);
  background-size:
    auto,
    42px 42px;
}

.auth-system-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 999px;
  color: #075985;
  background: rgba(224, 242, 254, 0.68);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.input-icon-wrap .form-control {
  padding-right: 52px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.input-icon-wrap:focus-within > i {
  color: #1e40af;
}

.input-icon-wrap:focus-within .form-control {
  transform: translateY(-1px);
}

.input-action {
  position: absolute;
  right: 12px;
  top: 50%;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.input-action:hover {
  color: #0f172a;
  background: rgba(30, 58, 138, 0.08);
  transform: translateY(-50%) scale(1.04);
}

.auth-submit {
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(30, 58, 138, 0.24);
}

.auth-submit::after,
.portal-card-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );
  transform: translateX(-120%);
  transition: transform 520ms ease;
}

.auth-submit:hover::after,
.portal-future-card:hover .portal-card-cta::after {
  transform: translateX(120%);
}

.portal-future {
  position: relative;
  justify-content: flex-start;
  gap: 36px;
  isolation: isolate;
}

.portal-future::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(120deg, rgba(14, 165, 233, 0.12), transparent 42%),
    linear-gradient(300deg, rgba(16, 185, 129, 0.1), transparent 44%);
}

.portal-grid-beam {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      transparent 0 48%,
      rgba(14, 165, 233, 0.1) 50%,
      transparent 52%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(30, 58, 138, 0.055) 0 1px,
      transparent 1px 70px
    );
  opacity: 0.7;
  animation: gridDrift 14s linear infinite;
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   PORTAL HEADER — Professional Glassmorphism
   ───────────────────────────────────────────── */
.portal-command {
  position: relative;
  width: min(1280px, calc(100vw - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 0 32px;
  height: 88px;
  border: 1px solid rgba(30, 58, 138, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  animation: panelReveal 480ms ease both;
  overflow: hidden;
}

/* Aurora accent line di atas header */
.portal-command::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #38bdf8 20%,
    #6366f1 50%,
    #10b981 80%,
    transparent 100%
  );
  opacity: 0.7;
  border-radius: 20px 20px 0 0;
  pointer-events: none;
}

/* Subtle ambient glow dari kiri */
.portal-command::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 40% 60% at 10% 50%,
      rgba(56, 189, 248, 0.06) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 30% 50% at 90% 50%,
      rgba(99, 102, 241, 0.04) 0%,
      transparent 70%
    );
  border-radius: 20px;
}

/* Brand: logo + teks */
.portal-command-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
  padding-right: 24px;
  border-right: 1px solid rgba(30, 58, 138, 0.1);
}

.portal-command-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  padding: 6px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.15),
    0 4px 14px rgba(15, 23, 42, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.portal-command-brand img:hover {
  transform: scale(1.06) rotate(-2deg);
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.25),
    0 8px 20px rgba(15, 23, 42, 0.14);
}

.portal-command-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.portal-command-brand span {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  line-height: 1;
}

.portal-command-brand strong {
  display: block;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

/* Status area kanan */
.portal-command-status {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Status pill "Sistem aktif" */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.22);
  font-size: 0.73rem;
  font-weight: 700;
  color: #059669;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.status-pill i {
  font-size: 0.48rem;
  color: #10b981;
  animation: connDotPulse 2s infinite;
}

/* Tombol Keluar — merah profesional */
.portal-logout-btn,
.portal-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.73rem;
  font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.portal-logout-btn {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.22);
  color: #dc2626;
}
.portal-logout-btn:hover {
  transform: translateY(-2px);
  background: rgba(239, 68, 68, 0.16);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.16);
  color: #b91c1c;
}
.portal-logout-btn i {
  font-size: 0.72rem;
}

.portal-login-btn {
  background: rgba(16, 185, 129, 0.09);
  border-color: rgba(16, 185, 129, 0.22);
  color: #059669;
}
.portal-login-btn:hover {
  transform: translateY(-2px);
  background: rgba(16, 185, 129, 0.16);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.16);
  color: #047857;
}
.portal-login-btn i {
  font-size: 0.72rem;
}

[data-theme="dark"] .portal-logout-btn {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.32);
  color: #f87171;
}
[data-theme="dark"] .portal-logout-btn:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.22);
}

[data-theme="dark"] .portal-login-btn {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.32);
  color: #34d399;
}
[data-theme="dark"] .portal-login-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22);
}

.logout-icon-circle {
  display: none;
}

.portal-hero {
  width: min(1280px, calc(100vw - 40px));
  text-align: center;
  animation: floatIn 620ms ease both;
}

.portal-hero-kicker {
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  letter-spacing: 0.12em;
}

.portal-hero-kicker i {
  color: #0ea5e9;
}

.portal-command-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: 1;
}

.portal-command-kicker i {
  color: #0ea5e9;
  font-size: 0.7rem;
}

@media (max-width: 900px) {
  .portal-command-kicker {
    display: none;
  }
}

.portal-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: 3rem;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.portal-hero h1 span {
  color: #0369a1;
}

.portal-hero p {
  max-width: 1280px;
  margin: 18px auto 0;
  color: #475569;
  font-size: 1.02rem;
  line-height: 1.75;
}

.portal-action-zone {
  width: min(1280px, calc(100vw - 40px));
}

.portal-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.portal-utility-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.utility-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(30, 58, 138, 0.12);
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.utility-card:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(30, 58, 138, 0.25);
  transform: translateY(-2px);
}

[data-theme="dark"] .utility-card {
  background: rgba(13, 20, 44, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

[data-theme="dark"] .utility-card:hover {
  background: rgba(13, 20, 44, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}

.util-result-text {
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  min-height: 22px;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.3s ease;
}

.util-result-text.result-ok {
  color: #047857;
  background: rgba(209, 250, 229, 0.6);
}

.util-result-text.result-err {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.6);
}

[data-theme="dark"] .util-result-text.result-ok {
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.5);
}

[data-theme="dark"] .util-result-text.result-err {
  color: #fca5a5;
  background: rgba(69, 10, 10, 0.5);
}

.portal-future-card {
  position: relative;
  min-height: 340px;
  padding: 22px 16px;
  overflow: hidden;
  color: #0f172a;
  text-decoration: none;
  border-color: rgba(30, 58, 138, 0.12);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.88),
      rgba(248, 251, 255, 0.72)
    ),
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), transparent 46%);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
  animation: cardRise 620ms ease both;
}

.portal-future-card::before {
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(var(--accent-rgb), 0.18),
    transparent 35%
  );
  opacity: 0;
  transition: opacity 220ms ease;
}

.portal-future-card:nth-child(2) {
  animation-delay: 70ms;
}
.portal-future-card:nth-child(3) {
  animation-delay: 140ms;
}
.portal-future-card:nth-child(4) {
  animation-delay: 210ms;
}

.portal-future-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--accent-rgb), 0.34);
  box-shadow: 0 26px 70px rgba(var(--accent-rgb), 0.18);
}

.portal-future-card:hover::before {
  opacity: 1;
}

.portal-card-index {
  position: absolute;
  top: 18px;
  right: 18px;
  color: rgba(15, 23, 42, 0.18);
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
}

.portal-future-card .icon-wrapper {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.08);
}

.portal-future-card:hover .icon-wrapper {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 34px rgba(var(--accent-rgb), 0.3);
}

.portal-card-cta {
  position: relative;
  width: 100%;
  overflow: hidden;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(var(--accent-rgb), 0.22);
}

.portal-footer {
  justify-content: center;
  gap: 10px;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  /* Always keep footer at the bottom of the viewport when space allows */
  margin-top: auto;
  padding-top: 18px;
}

/* Auth compact card: keep footer pinned to the bottom of the card */
.auth-shell-compact .auth-form-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.auth-shell-compact .auth-footer {
  margin-top: auto;
}

.auth-shell-compact {
  width: min(500px, calc(100vw - 32px));
  min-height: 0;
  grid-template-columns: 1fr;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.32),
    rgba(255, 255, 255, 0.13)
  );
  background-size: auto;
  box-shadow:
    0 34px 100px rgba(2, 8, 23, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 0 38px rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(28px) saturate(1.38);
  backdrop-filter: blur(28px) saturate(1.38);
}

/* Scoped Theme Overrides for Auth Compact Card */
[data-theme="light"] .auth-shell-compact {
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow:
    0 20px 60px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

[data-theme="light"] .auth-shell-compact .auth-form-panel {
  background: rgba(255, 255, 255, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .auth-shell-compact {
  background: rgba(15, 23, 42, 0.32) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .auth-shell-compact .auth-form-panel {
  background: rgba(15, 23, 42, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04) !important;
}

/* Scoped Typography and Text Colors */
[data-theme="light"] .auth-shell-compact .auth-form-card h2,
[data-theme="light"] .auth-shell-compact .auth-form-card label {
  color: #0f172a !important;
}

[data-theme="light"] .auth-shell-compact .auth-subtitle {
  color: #475569 !important;
}

[data-theme="light"] .auth-shell-compact .auth-footer span {
  color: #334155 !important; /* Slate-700 (High Contrast) */
}

[data-theme="light"] .auth-shell-compact .auth-footer a {
  color: #1e3a8a !important; /* SMKN 1 Blitar Branding Dark Navy */
  font-weight: 700 !important;
}

[data-theme="light"] .auth-shell-compact .auth-credit-initial {
  border: 1px solid rgba(30, 58, 138, 0.35) !important;
  color: #1e3a8a !important;
  background: rgba(255, 255, 255, 0.55) !important;
}

[data-theme="dark"] .auth-shell-compact .auth-form-card h2,
[data-theme="dark"] .auth-shell-compact .auth-form-card label {
  color: #ffffff !important;
}

[data-theme="dark"] .auth-shell-compact .auth-subtitle {
  color: #94a3b8 !important;
}

[data-theme="dark"] .auth-shell-compact .auth-footer span {
  color: #cbd5e1 !important; /* Slate-200 (High Contrast) */
}

[data-theme="dark"] .auth-shell-compact .auth-footer a {
  color: #38bdf8 !important; /* Cyan Glow (High Contrast) */
  font-weight: 700 !important;
}

[data-theme="dark"] .auth-shell-compact .auth-credit-initial {
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  background: rgba(13, 20, 44, 0.48) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Scoped Inputs Styling inside Auth Compact */
[data-theme="light"] .auth-shell-compact .form-control {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .auth-shell-compact .form-control:focus {
  background: #ffffff !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.2) !important;
}

[data-theme="dark"] .auth-shell-compact .form-control {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .auth-shell-compact .form-control:focus {
  background: rgba(15, 23, 42, 0.8) !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.3) !important;
}

/* Scoped Input Icons styling */
[data-theme="light"] .auth-shell-compact .input-icon-wrap i {
  color: #64748b !important;
}
[data-theme="light"] .auth-shell-compact .input-icon-wrap:focus-within i {
  color: #0ea5e9 !important;
}

[data-theme="dark"] .auth-shell-compact .input-icon-wrap i {
  color: #94a3b8 !important;
}
[data-theme="dark"] .auth-shell-compact .input-icon-wrap:focus-within i {
  color: #38bdf8 !important;
}

.auth-shell-compact::before {
  display: none;
}

.auth-shell-compact::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(125, 211, 252, 0.48),
    rgba(30, 58, 138, 0.24),
    rgba(16, 185, 129, 0.24)
  );
  filter: blur(22px);
  opacity: 0.62;
}

.auth-shell-compact .auth-form-panel {
  padding: 32px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.3),
      rgba(219, 234, 254, 0.12)
    ),
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.32),
      transparent 46%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(24px) saturate(1.32);
  backdrop-filter: blur(24px) saturate(1.32);
}

.auth-shell-compact .auth-form-card {
  display: flex;
  flex-direction: column;
}

.auth-compact-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 12px 28px rgba(15, 23, 42, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
}

.auth-brand-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand-main img,
.auth-extra-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  padding: 7px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.auth-extra-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  padding: 4px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.8),
    0 4px 15px rgba(30, 58, 138, 0.15);
}

/* Logo marker for login page */
.auth-logo-marker {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 4px 15px rgba(30, 58, 138, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-logo-marker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Dark mode adjustments for login page */
[data-theme="dark"] .auth-logo-marker,
[data-theme="dark"] .auth-extra-logo {
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 4px 15px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .auth-compact-brand {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .auth-compact-brand span {
  color: #94a3b8;
}

[data-theme="dark"] .auth-compact-brand strong {
  color: #f1f5f9;
}

[data-theme="dark"] .auth-system-pill {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

[data-theme="dark"] .auth-eyebrow {
  color: #94a3b8;
}

/* Header sizes enhancement */
.portal-command {
  padding: 20px 28px;
}

.portal-command-brand img {
  width: 56px;
  height: 56px;
}

.portal-command-brand span {
  font-size: 0.9rem;
  font-weight: 700;
}

.portal-command-brand strong {
  font-size: 1.3rem;
  font-weight: 800;
}

/* Sidebar menu title enhancement */
.sidebar-brand-copy h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

.sidebar-group-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.sidebar-link-text {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Dashboard header enhancement */
.dashboard-header-bar {
  padding: 20px 28px;
}

.header-title-group h1 {
  font-size: 1.5rem;
  font-weight: 800;
}

.header-subtitle {
  font-size: 0.95rem;
  font-weight: 500;
}

.auth-compact-brand span {
  display: block;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-compact-brand strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 1.05rem;
}

.auth-shell-compact .auth-eyebrow,
.auth-shell-compact label {
  color: #1e3a8a;
}

.auth-shell-compact .auth-subtitle {
  color: #26364d;
  font-weight: 600;
}

.auth-shell-compact .auth-form-card h2 {
  color: #0f172a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.26);
}

.auth-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.auth-shell-compact .auth-system-pill {
  margin-bottom: 0;
  padding: 7px 10px;
  font-size: 0.68rem;
}

.auth-shell-compact .auth-form-card h2 {
  margin-top: 6px;
  font-size: 1.85rem;
}

.auth-shell-compact .auth-subtitle {
  margin-bottom: 22px;
  font-size: 0.96rem;
}

.auth-shell-compact .auth-alert {
  margin-bottom: 16px;
}

.auth-shell-compact .auth-form .form-group {
  margin-bottom: 16px;
}

.auth-shell-compact .input-icon-wrap .form-control {
  height: 54px;
}

.auth-shell-compact .auth-footer {
  margin-top: 22px;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-credit-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(30, 58, 138, 0.18);
  border-radius: 999px;
  color: #1e3a8a;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.brand-preview-extra-logo-wrap {
  margin-left: auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(30, 58, 138, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.brand-preview-extra-logo-wrap img {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

.brand-preview-extra-logo-wrap.is-empty {
  display: none;
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes surfaceSweep {
  0%,
  45% {
    transform: translateX(-115%);
  }
  70%,
  100% {
    transform: translateX(115%);
  }
}

@keyframes scanlineMove {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes gridDrift {
  from {
    background-position:
      0 0,
      0 0;
  }
  to {
    background-position:
      160px 0,
      70px 0;
  }
}

@media (max-width: 1200px) {
  .portal-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .portal-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .portal-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .auth-copy h1 {
    font-size: 2.65rem;
  }

  .portal-command {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    min-height: 88px;
    padding: 16px 24px;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .portal-future {
    padding: 18px 12px;
  }

  .portal-command,
  .portal-hero,
  .portal-action-zone {
    width: 100%;
  }

  .portal-card-grid {
    grid-template-columns: 1fr;
  }

  .portal-hero h1 {
    font-size: 2.25rem;
  }

  .portal-command-status {
    flex-wrap: wrap;
  }

  .auth-copy h1 {
    font-size: 2.25rem;
  }

  .auth-shell-compact .auth-form-panel {
    padding: 22px;
  }

  .auth-compact-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ==========================================================================
   TICKET GENERATOR (ambil.php)
   ========================================================================== */
.kiosk-wrapper {
  max-width: 900px;
  margin: 40px auto;
  text-align: center;
}

.kiosk-header {
  margin-bottom: 30px;
}

.kiosk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

@media (max-width: 600px) {
  .kiosk-grid {
    grid-template-columns: 1fr;
  }
}

.kiosk-btn {
  padding: 40px 30px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  transition: var(--transition);
  box-shadow: var(--glass-shadow);
}

.kiosk-btn:hover {
  transform: translateY(-8px);
  border-color: var(--active-color, var(--accent));
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.3),
    0 0 20px var(--accent-glow);
}

[data-theme="light"] .kiosk-btn:hover {
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.kiosk-btn .icon {
  font-size: 3rem;
  color: var(--active-color, var(--accent));
  margin-bottom: 20px;
  transition: var(--transition);
}

.kiosk-btn:hover .icon {
  transform: scale(1.15);
}

.kiosk-btn h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.kiosk-btn p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.kiosk-btn .badge {
  margin-top: 15px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .kiosk-btn .badge {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
}

/* Thermal Struk Simulator Overlay */
.receipt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 20, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

[data-theme="light"] .receipt-overlay {
  background: rgba(15, 23, 42, 0.6);
}

.receipt-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.thermal-printer-slot {
  width: 320px;
  background: #111827;
  padding: 10px;
  border-radius: 12px 12px 0 0;
  border: 2px solid #374151;
  border-bottom: 6px solid #1f2937;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Struk Animating out */
.receipt-ticket {
  width: 290px;
  margin: 0 auto;
  background: #ffffff;
  color: #111827;
  padding: 24px 20px;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.82rem;
  text-align: center;
  transform: translateY(-80%);
  opacity: 0;
  transition:
    transform 1.2s cubic-bezier(0.19, 1, 0.22, 1),
    opacity 0.5s ease;
  border-bottom: 6px dashed #ffffff;
}

.receipt-overlay.active .receipt-ticket {
  transform: translateY(0);
  opacity: 1;
}

.receipt-ticket .logo-school {
  width: 50px;
  height: auto;
  margin-bottom: 8px;
}

.receipt-ticket h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1f2937;
}

.receipt-ticket h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.receipt-ticket .divider {
  border-top: 1px dashed #4b5563;
  margin: 12px 0;
}

.receipt-ticket .number-display {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: "Outfit", sans-serif;
  color: #111827;
  margin: 10px 0;
}

.receipt-ticket .date-info {
  font-size: 0.75rem;
  color: #4b5563;
}

/* ==========================================================================
   PUBLIC DISPLAY MONITOR (layar.php)
   ========================================================================== */
.monitor-container {
  width: 100vw;
  height: 100vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.monitor-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  flex-grow: 1;
  overflow: hidden;
  margin-bottom: 16px;
  min-height: 0; /* Prevents viewport expansion and crushing the running text */
}

@media (max-width: 900px) {
  .monitor-grid {
    grid-template-columns: 1fr;
  }
}

/* Media/Slideshow Panel */
.monitor-media-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 20px;
}

.monitor-video-placeholder {
  flex-grow: 1;
  background: rgba(13, 20, 44, 0.7);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

[data-theme="light"] .monitor-video-placeholder {
  background: rgba(255, 255, 255, 0.5);
}

.monitor-video-placeholder iframe,
.monitor-video-placeholder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.monitor-media-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.monitor-media-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.monitor-media-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
}

.monitor-media-empty i {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-glow);
  font-size: 1.45rem;
}

.screen-manager-grid {
  display: grid;
  grid-template-columns: minmax(460px, 1fr) minmax(340px, 0.42fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

.screen-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.screen-form-grid.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.screen-save-button {
  width: 100%;
  margin-top: 20px;
  min-height: 50px;
}

.screen-form-panel,
.screen-preview-panel,
.running-text-panel {
  position: relative;
  overflow: hidden;
}

.screen-form-panel::before,
.screen-preview-panel::before,
.running-text-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.08),
    transparent 45%
  );
  pointer-events: none;
}

.screen-form-panel > *,
.screen-preview-panel > *,
.running-text-panel > * {
  position: relative;
  z-index: 1;
}

.screen-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--glass-border);
}

.screen-form-actions .btn {
  min-height: 48px;
  border-radius: 14px;
  padding-inline: 22px;
}

.btn-soft-rounded {
  border-radius: 14px;
  min-height: 42px;
  padding: 9px 16px;
}

.screen-textarea {
  min-height: 112px;
  height: auto !important;
  resize: vertical;
  line-height: 1.65;
}

.field-full {
  grid-column: 1 / -1;
}

.running-text-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(360px, 1.1fr);
  gap: 22px;
  align-items: start;
}

.running-text-form {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .running-text-form {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(30, 58, 138, 0.08);
}

.running-text-list {
  display: grid;
  gap: 12px;
}

.running-text-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.045);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

[data-theme="light"] .running-text-item {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(30, 58, 138, 0.08);
}

.running-text-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.24);
}

.running-text-copy {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.55;
}

.running-text-meta,
.running-text-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.running-text-meta {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.running-text-actions {
  justify-content: flex-end;
}

.screen-empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--glass-border);
  border-radius: 16px;
}

.screen-empty-state i {
  color: var(--accent);
  font-size: 1.6rem;
}

.screen-preview-frame {
  min-height: 300px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(30, 58, 138, 0.92), rgba(14, 116, 144, 0.62)),
    rgba(15, 23, 42, 0.55);
  display: grid;
  grid-template-rows: 0.8fr 1fr;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.screen-preview-call {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.screen-preview-media {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.screen-preview-media i {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
}

.media-type-pill,
.table-action-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 800;
}

.media-type-pill {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.table-action-link {
  border: 0;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--accent);
  cursor: pointer;
  margin-left: 8px;
  font-family: inherit;
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.table-action-link:hover {
  transform: translateY(-1px);
  background: rgba(56, 189, 248, 0.14);
}

.table-action-link.danger {
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.16);
}

@media (max-width: 1080px) {
  .screen-manager-grid,
  .screen-form-grid,
  .screen-form-grid.compact-grid,
  .running-text-layout {
    grid-template-columns: 1fr;
  }
}

/* Big Calling Banner */
.calling-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 132, 199, 0.95);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.calling-banner.active {
  opacity: 1;
  animation: flashCalling 2.5s infinite alternate;
}

.calling-banner h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.calling-banner .calling-number {
  font-size: 7rem;
  font-weight: 800;
  font-family: var(--font-heading);
  margin: 10px 0;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
}

.calling-banner p {
  font-size: 1.5rem;
  font-weight: 600;
}

@keyframes flashCalling {
  0% {
    background-color: rgba(2, 132, 199, 0.98);
  }
  100% {
    background-color: rgba(16, 185, 129, 0.98);
  }
}

/* Giant Last Call Display Box (col-sm-4 style from reference) */
.monitor-last-call-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  transition: var(--transition);
}

.monitor-last-call-box.active-glow {
  animation: pulseLastCall 1.5s infinite;
}

@keyframes pulseLastCall {
  0% {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
  }
  50% {
    border-color: var(--success);
    box-shadow: 0 0 30px var(--success-glow);
    transform: scale(1.01);
  }
  100% {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
  }
}

.monitor-last-call-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.monitor-last-call-number {
  font-size: 5.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--accent);
  line-height: 1.1;
  margin: 10px 0;
  text-shadow: 0 0 20px var(--accent-glow);
}

.monitor-last-call-tujuan {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Right side loket grids */
.monitor-loket-panel {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(110px, auto);
  gap: 16px;
  overflow-y: auto;
  height: 100%;
}

.monitor-loket-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
}

.monitor-loket-card.active-panggil {
  animation: pulseLoket 1.5s infinite;
}

@keyframes pulseLoket {
  0% {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
  }
  50% {
    border-color: var(--success);
    box-shadow: 0 0 30px var(--success-glow);
    transform: scale(1.02);
  }
  100% {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
  }
}

.monitor-loket-card h3 {
  font-size: 1.8rem;
  color: var(--text-main);
}

.monitor-loket-card .number-active {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--accent);
}

/* Running Text Panel */
.monitor-footer-ticker {
  height: 48px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

[data-theme="light"] .monitor-footer-ticker {
  background: rgba(255, 255, 255, 0.7);
}

.ticker-title {
  background: var(--primary);
  color: white;
  font-weight: 700;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  white-space: nowrap;
  z-index: 2;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.25);
}

.ticker-content {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

.ticker-content marquee {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ==========================================================================
   COLLAPSIBLE SIDEBAR & HEADER DASHBOARD LAYOUT
   ========================================================================== */
.dashboard-wrapper {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  width: 100vw;
  overflow: visible;
}

/* Collapsible Sidebar styles */
.dashboard-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  height: 100vh;
  background: transparent;
  border-right: 0;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s ease,
    opacity 0.3s ease;
  z-index: 100;
  /* Allow tooltips to float outside the sidebar surface */
  overflow: visible;
}

[data-theme="light"] .dashboard-sidebar {
  background: transparent;
}

/* Sidebar Collapsed State */
.dashboard-wrapper.sidebar-collapsed .dashboard-sidebar {
  width: 0;
  padding: 20px 0;
  border-right-width: 0;
  opacity: 0;
  pointer-events: none;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 15px;
  min-height: 92px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: rgba(13, 20, 44, 0.82);
  box-shadow: var(--glass-shadow);
  white-space: nowrap;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

[data-theme="light"] .sidebar-logo {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(30, 58, 138, 0.1);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.sidebar-logo:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

.sidebar-logo img {
  width: 58px;
  height: 58px;
  min-width: 58px;
  object-fit: contain;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: transform 0.3s ease;
}

.sidebar-logo:hover img {
  transform: scale(1.05);
}

.sidebar-brand-copy {
  min-width: 0;
}

.sidebar-logo h2 {
  max-width: 165px;
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
}

.sidebar-role-chip {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 999px;
  padding: 3px 8px;
}

[data-theme="light"] .sidebar-role-chip {
  color: #1e3a8a;
  background: rgba(30, 58, 138, 0.08);
  border-color: rgba(30, 58, 138, 0.18);
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 6px;
  min-height: 0;
  margin: 0;
  padding: 15px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: rgba(13, 20, 44, 0.82);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

/* Fallback scrollbar for Safari/Chrome <121 */
.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 4px;
}

[data-theme="light"] .sidebar-menu {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(30, 58, 138, 0.1);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.sidebar-menu-item,
.sidebar-label-item {
  list-style: none;
}

.sidebar-group-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.3);
  padding: 18px 16px 7px;
  display: block;
}

[data-theme="light"] .sidebar-group-label {
  color: rgba(15, 23, 42, 0.4);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 15px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.25;
  font-weight: 650;
  text-decoration: none;
  transition:
    transform 0.24s ease,
    background 0.24s ease,
    color 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  position: relative;
}

.sidebar-link i,
.sidebar-group-toggle i {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  transition: transform 0.22s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.1);
  transform: translateX(3px);
}

[data-theme="light"] .sidebar-link:hover,
[data-theme="light"] .sidebar-link.active {
  background: rgba(30, 58, 138, 0.055);
  color: var(--primary);
  border-color: rgba(30, 58, 138, 0.1);
}

.sidebar-link.active {
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.08);
}

[data-theme="light"] .sidebar-link.active {
  box-shadow:
    inset 0 0 0 1px rgba(30, 58, 138, 0.06),
    0 8px 22px rgba(30, 58, 138, 0.08);
}

.sidebar-link:hover::after,
.sidebar-link.active::after {
  transform: translateY(-50%) scaleY(1);
}

.sidebar-submenu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.sidebar-submenu.open {
  max-height: 400px;
  opacity: 1;
  transform: translateY(0);
  padding: 4px 0 6px;
}

.sidebar-submenu .sidebar-link {
  min-height: 40px;
  margin-left: 16px;
  padding-left: 28px;
  font-size: 0.84rem;
  border-radius: 9px;
}

.sidebar-submenu .sidebar-link::before {
  display: none !important;
}

.sidebar-group-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 46px;
  padding: 11px 15px;
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition:
    transform 0.24s ease,
    background 0.24s ease,
    color 0.24s ease,
    border-color 0.24s ease;
  position: relative;
  font-family: inherit;
  text-align: left;
}

.sidebar-group-toggle:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.1);
  transform: translateX(3px);
}

[data-theme="light"] .sidebar-group-toggle:hover {
  background: rgba(30, 58, 138, 0.05);
  color: var(--primary);
  border-color: rgba(30, 58, 138, 0.1);
}

.sidebar-group-toggle:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

[data-theme="light"] .sidebar-group-toggle:focus-visible {
  border-color: rgba(30, 58, 138, 0.35);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.sidebar-group-toggle .sidebar-toggle-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-group-toggle .toggle-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  opacity: 0.6;
  transition: transform 0.28s ease;
}

.sidebar-group-toggle.open .toggle-arrow {
  transform: rotate(180deg);
}

.sidebar-group-toggle.has-active {
  color: var(--accent);
}

.sidebar-link-danger {
  color: #fb7185 !important;
}

.sidebar-link-danger:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
  color: #ef4444 !important;
}

.sidebar-logout-item {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="light"] .sidebar-logout-item {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.page-breadcrumb {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.stat-mini-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .stat-mini-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Professional settings and branding surface */
.settings-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
}

.settings-hero-copy {
  max-width: 780px;
}

.settings-hero h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 6px;
  font-family: var(--font-heading);
  font-size: 2.1rem;
  line-height: 1.08;
  color: var(--text-main);
  letter-spacing: 0;
}

.settings-hero h1 i {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 32px var(--primary-glow);
  font-size: 1.05rem;
}

.settings-hero p:not(.page-breadcrumb) {
  color: var(--text-muted);
  max-width: 680px;
  font-size: 0.95rem;
}

.settings-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.settings-hero-actions .btn {
  min-height: 44px;
  padding-inline: 18px;
  border-radius: 12px;
}

.page-breadcrumb .fa-chevron-right {
  font-size: 0.6rem;
  opacity: 0.7;
}

.branding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(340px, 0.82fr);
  gap: 24px;
  align-items: start;
}

.branding-panel {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 120px),
    var(--glass-bg);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

[data-theme="light"] .branding-panel {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.92),
      rgba(248, 250, 252, 0.82)
    ),
    var(--glass-bg);
  box-shadow: 0 22px 70px rgba(30, 58, 138, 0.09);
}

.branding-form-panel {
  padding: 28px;
}

.branding-preview-panel {
  padding: 24px;
  position: sticky;
  top: 96px;
  overflow: hidden;
}

.branding-preview-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(2, 132, 199, 0.12), transparent 42%),
    linear-gradient(300deg, rgba(16, 185, 129, 0.08), transparent 48%);
}

.branding-preview-panel > * {
  position: relative;
  z-index: 1;
}

.panel-heading {
  margin-bottom: 22px;
}

.panel-heading-compact {
  margin-bottom: 16px;
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-heading h2 {
  margin: 0;
  font-family: var(--font-heading);
  color: var(--text-main);
  font-size: 1.15rem;
  letter-spacing: 0;
}

.panel-heading p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.branding-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.floating-field {
  display: grid;
  gap: 8px;
}

.floating-field span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.floating-field .form-control {
  height: 50px;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.48);
  transition: var(--transition);
}

[data-theme="light"] .floating-field .form-control {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(30, 58, 138, 0.1);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.floating-field .form-control:focus {
  transform: translateY(-1px);
}

.asset-section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.upload-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(56, 189, 248, 0.45);
  background: rgba(2, 132, 199, 0.07);
  cursor: pointer;
  transition: var(--transition);
}

[data-theme="light"] .upload-card {
  background: rgba(2, 132, 199, 0.045);
  border-color: rgba(30, 58, 138, 0.22);
}

.upload-card:hover,
.upload-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.12);
}

.upload-card input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  font-size: 1.05rem;
}

.upload-title {
  color: var(--text-main);
  font-weight: 800;
}

.upload-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.upload-current {
  margin-top: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.upload-current img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  padding: 5px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.upload-current span {
  color: var(--text-muted);
  font-size: 0.74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branding-save-btn {
  width: 100%;
  height: 52px;
  margin-top: 24px;
  border-radius: 14px;
  font-weight: 800;
}

.brand-preview-device {
  min-height: 480px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(30, 58, 138, 0.48)),
    radial-gradient(
      circle at 22% 18%,
      rgba(56, 189, 248, 0.4),
      transparent 28%
    ),
    linear-gradient(135deg, #102241, #0f766e);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.brand-preview-card,
.brand-preview-login {
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.brand-preview-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
}

.brand-preview-logo-wrap {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.brand-preview-logo-wrap img {
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
}

.brand-preview-kicker {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-preview-card h3 {
  margin: 2px 0;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0;
}

.brand-preview-card p,
.brand-preview-login small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

.brand-preview-login {
  padding: 16px;
  display: grid;
  gap: 3px;
  color: #ffffff;
}

.brand-preview-login span {
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-preview-login strong {
  font-family: var(--font-heading);
  font-size: 1.28rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.branding-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.branding-meta-grid div {
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
}

[data-theme="light"] .branding-meta-grid div {
  background: rgba(255, 255, 255, 0.72);
}

.branding-meta-grid span {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.branding-meta-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text-main);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .branding-layout {
    grid-template-columns: 1fr;
  }

  .branding-preview-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 820px) {
  .settings-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-hero-actions,
  .branding-field-grid,
  .asset-grid,
  .branding-meta-grid {
    grid-template-columns: 1fr;
  }

  .settings-hero-actions {
    display: grid;
  }

  .branding-form-panel,
  .branding-preview-panel {
    padding: 20px;
  }
}

/* Dashboard Body Container */
.dashboard-body-container {
  flex-grow: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Prevents flex items from overflowing */
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* ==========================================================================
   HEADER SYSTEM (WITH DROPDOWN PROFILE)
   ========================================================================== */
.dashboard-header-bar {
  height: 72px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  background: rgba(9, 14, 35, 0.82);
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  z-index: 90;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .dashboard-header-bar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(30, 58, 138, 0.1);
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
}

@media (max-width: 768px) {
  .dashboard-header-bar {
    padding: 0 16px;
  }
}

/* Hamburger */
.hamburger-toggle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  font-size: 1rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.hamburger-toggle:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.15);
  color: var(--accent);
}
[data-theme="light"] .hamburger-toggle:hover {
  background: rgba(30, 58, 138, 0.06);
  border-color: rgba(30, 58, 138, 0.12);
  color: var(--primary);
}

/* LEFT DECK */
.header-left-deck {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

/* Page Identity Block (ikon + title + sub) */
.header-page-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.header-page-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--transition);
}
[data-theme="light"] .header-page-icon {
  background: rgba(30, 58, 138, 0.07);
  border-color: rgba(30, 58, 138, 0.14);
  color: var(--primary);
}

.header-title-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-page-title {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="light"] .header-page-title {
  color: #0f172a;
}

.header-page-sub {
  font-size: 0.71rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

/* CENTER DECK - Clock */
.header-center-deck {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-clock-widget {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.1);
  white-space: nowrap;
}
[data-theme="light"] .header-clock-widget {
  background: rgba(30, 58, 138, 0.05);
  border-color: rgba(30, 58, 138, 0.1);
}

/* REAL-TIME LIVE SYNC BADGE */
.header-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--success);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.05);
  white-space: nowrap;
}

[data-theme="light"] .header-sync-badge {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #059669;
}

.header-sync-dot {
  width: 7px;
  height: 7px;
  background-color: var(--success);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

[data-theme="light"] .header-sync-dot {
  background-color: #059669;
}

.header-sync-dot::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: inherit;
  animation: sync-pulse 1.8s infinite ease-in-out;
}

@keyframes sync-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .header-center-deck {
    display: none;
  }
  .header-page-sub {
    display: none;
  }
}

/* RIGHT DECK */
.header-right-deck {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.profile-avatar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.profile-avatar-wrapper:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--glass-border);
}

[data-theme="light"] .profile-avatar-wrapper:hover {
  background: rgba(0, 0, 0, 0.03);
}

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-family: var(--font-heading);
  box-shadow: 0 0 10px var(--accent-glow);
}

.profile-info {
  text-align: left;
  line-height: 1.2;
}

.profile-info .name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.profile-info .role {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Interactive Dropdown Card */
.profile-dropdown-card {
  position: absolute;
  top: 55px;
  right: 0;
  width: 240px;
  background: #0d142c;
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: var(--radius-md);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.4);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 999;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
}

[data-theme="light"] .profile-dropdown-card {
  background: #ffffff;
  border-color: rgba(30, 58, 138, 0.12);
  box-shadow:
    0 8px 32px rgba(30, 58, 138, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Hover trigger dropdown */
.profile-avatar-wrapper:hover .profile-dropdown-card {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.dropdown-item:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.1);
}

[data-theme="light"] .dropdown-item:hover {
  background: rgba(30, 58, 138, 0.05);
  color: var(--primary);
}

/* Theme toggle inside dropdown list */
.theme-switch-dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

.theme-switch-pill {
  padding: 2px 6px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.theme-switch-pill.dark {
  background: #1e293b;
  color: #38bdf8;
}
.theme-switch-pill.light {
  background: #e2e8f0;
  color: #1e3a8a;
}

.dashboard-main {
  padding: 92px 32px 32px 32px !important;
  overflow-y: auto;
  flex-grow: 1;
  height: 100% !important;
  width: 100% !important;
  /* Make footer stick to bottom without breaking page content structure */
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   FOOTER SYSTEM IN DASHBOARD
   ========================================================================== */
.dashboard-footer-bar {
  height: 50px;
  background: rgba(5, 8, 20, 0.4);
  border-top: 1px solid var(--glass-border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 60;
}

[data-theme="light"] .dashboard-footer-bar {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .dashboard-footer-bar {
    padding: 0 20px;
    flex-direction: column;
    justify-content: center;
    height: auto;
    padding: 15px 20px;
    gap: 8px;
  }
}

/* ==========================================================================
   UNIVERSAL TOOLTIP SYSTEM (data-tooltip)
   ========================================================================== */
.ui-tooltip-floating {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, 6px, 0) scale(0.98);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
  padding: 10px 12px;
  border-radius: 12px;
  max-width: 320px;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: rgba(248, 250, 252, 0.92);
  background: rgba(9, 14, 35, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  white-space: normal;
}

.ui-tooltip-floating.show {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

[data-theme="light"] .ui-tooltip-floating {
  color: rgba(15, 23, 42, 0.92);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(30, 58, 138, 0.16);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
}

/* Tables in Glass */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.glass-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  text-align: left;
}

.glass-table th {
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--glass-border);
}

[data-theme="light"] .glass-table th {
  background: rgba(255, 255, 255, 0.7);
}

.glass-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  color: var(--text-main);
}

[data-theme="light"] .glass-table td {
  border-bottom-color: rgba(15, 23, 42, 0.05);
}

.glass-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .glass-table tr:hover td {
  background: rgba(15, 23, 42, 0.01);
}

/* Badges */
.badge-status {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-status.menunggu {
  background: rgba(2, 132, 199, 0.15);
  color: var(--accent);
  border: 1px solid rgba(2, 132, 199, 0.3);
}
.badge-status.dipanggil {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-status.selesai {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-status.lewat {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Access badges (Peran & Hak Akses) */
.badge-access {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-main);
  white-space: nowrap;
}

.badge-access-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  line-height: 1.2;
}

/* SweetAlert CSS overrides for Glassmorphism alignment */
.swal2-popup {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  color: var(--text-main) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--glass-shadow) !important;
}
.swal2-title,
.swal2-html-container {
  color: var(--text-main) !important;
}
/* Memperbaiki background putih pekat di belakang ikon animasi sukses SweetAlert2 (Glassmorphism Fix) */
.swal2-popup .swal2-success-circular-line-left,
.swal2-popup .swal2-success-circular-line-right,
.swal2-popup .swal2-success-fix {
  background: transparent !important;
}

/* ==========================================================================
   ADMIN UI/UX POLISH SYSTEM - CENTRALIZED DASHBOARD COMPONENTS
   ========================================================================== */
body::before,
body::after {
  display: none;
}

[data-theme="light"] body {
  background:
    linear-gradient(135deg, rgba(30, 58, 138, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(14, 165, 233, 0.08), transparent 36%), #edf3fa;
}

.dashboard-wrapper {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    var(--bg-gradient);
}

[data-theme="light"] .dashboard-wrapper {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.72),
      rgba(219, 234, 254, 0.4)
    ),
    #e8f0f8;
}

.dashboard-sidebar {
  width: 292px;
  padding: 20px 10px 20px 14px;
}

.sidebar-logo,
.sidebar-menu {
  border-radius: 18px;
}

[data-theme="light"] .sidebar-logo,
[data-theme="light"] .sidebar-menu {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(30, 58, 138, 0.08);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.sidebar-logo {
  min-height: 96px;
  padding: 16px;
}

.sidebar-logo img {
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.08);
}

.sidebar-menu {
  padding: 16px 10px;
  gap: 7px;
}

.sidebar-link,
.sidebar-group-toggle {
  min-height: 48px;
  border-radius: 12px;
  letter-spacing: 0;
}

.sidebar-link i,
.sidebar-group-toggle i {
  font-size: 0.95rem;
}

.sidebar-link-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-link:hover,
.sidebar-link.active,
.sidebar-group-toggle:hover,
.sidebar-group-toggle.has-active {
  transform: translateX(4px);
}

[data-theme="light"] .sidebar-link.active,
[data-theme="light"] .sidebar-group-toggle.has-active {
  background: linear-gradient(
    135deg,
    rgba(30, 58, 138, 0.095),
    rgba(14, 165, 233, 0.065)
  );
  color: #12347b;
  border-color: rgba(30, 58, 138, 0.13);
}

.sidebar-submenu.open {
  margin-left: 10px;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.sidebar-submenu .sidebar-link {
  margin-left: 12px;
}

.dashboard-wrapper.sidebar-collapsed .dashboard-sidebar {
  width: 92px;
  padding: 20px 9px;
  opacity: 1;
  pointer-events: auto;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-logo {
  justify-content: center !important;
  align-items: center !important;
  width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 !important;
  margin: 0 auto 16px auto !important;
  border-radius: 14px !important;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-logo img {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-brand-copy,
.dashboard-wrapper.sidebar-collapsed .sidebar-group-label,
.dashboard-wrapper.sidebar-collapsed .sidebar-link-text {
  display: none !important;
}

.dashboard-wrapper.sidebar-collapsed .toggle-arrow {
  display: none !important;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-menu {
  align-items: center;
  padding: 14px 8px;
  overflow: visible !important;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-menu-item {
  width: 100%;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-link,
.dashboard-wrapper.sidebar-collapsed .sidebar-group-toggle {
  justify-content: center;
  padding: 12px;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-link:hover,
.dashboard-wrapper.sidebar-collapsed .sidebar-link.active,
.dashboard-wrapper.sidebar-collapsed .sidebar-group-toggle:hover,
.dashboard-wrapper.sidebar-collapsed .sidebar-group-toggle.has-active {
  transform: translateY(-2px);
}

/* Collapsed Logout Card - Centered Square Button */
.dashboard-wrapper.sidebar-collapsed .sidebar-logo.sidebar-logout-card {
  justify-content: center !important;
  align-items: center !important;
  width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 !important;
  margin: 16px auto 0 auto !important;
  border-radius: 14px !important;
  gap: 0 !important;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-logout-card .logout-icon-wrapper {
  width: 100% !important;
  height: 100% !important;
  border-radius: 14px !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-logout-card .sidebar-brand-copy {
  display: none !important;
}

/* Collapsed sidebar submenu flyout */
.dashboard-wrapper.sidebar-collapsed .sidebar-menu-item {
  position: relative;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-submenu {
  display: none !important;
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  width: 220px;
  max-height: none !important;
  opacity: 1 !important;
  transform: none !important;
  padding: 10px !important;
  margin: 0 !important;
  border-left: 0 !important;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 200;
}

.dashboard-wrapper.sidebar-collapsed .sidebar-menu-item:hover .sidebar-submenu,
.dashboard-wrapper.sidebar-collapsed .sidebar-menu-item:focus-within .sidebar-submenu {
  display: block !important;
}

/* Tampilkan teks submenu di flyout collapsed */
.dashboard-wrapper.sidebar-collapsed .sidebar-submenu .sidebar-link-text {
  display: inline !important;
}

/* Styling link submenu di flyout collapsed */
.dashboard-wrapper.sidebar-collapsed .sidebar-submenu .sidebar-link {
  margin-left: 0 !important;
  padding-left: 12px !important;
  justify-content: flex-start !important;
  min-height: 40px;
}

/* Sidebar menu refinement: glass identity with cleaner hierarchy */
.dashboard-sidebar {
  width: 286px;
}

.sidebar-logo {
  min-height: 98px;
  border-radius: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo:hover {
  transform: translateY(-2px);
  background: rgba(13, 20, 44, 0.86) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.15) !important;
}

[data-theme="light"] .sidebar-logo:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(30, 58, 138, 0.2) !important;
  box-shadow: 0 12px 30px rgba(30, 58, 138, 0.08) !important;
}

/* Blend the logo image white background on light theme */
[data-theme="light"] .sidebar-logo img {
  mix-blend-mode: multiply;
}

/* Sidebar Logout Card Specific hover glow styles */
.sidebar-logout-card:hover {
  border-color: rgba(239, 68, 68, 0.35) !important;
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.12) !important;
}
.sidebar-logout-card:hover .logout-icon-wrapper {
  background: rgba(239, 68, 68, 0.2) !important;
  transform: scale(1.05);
}
.sidebar-logout-card:hover h2 {
  color: #ef4444 !important;
}

.sidebar-logo.sidebar-logout-card {
  min-height: 50px !important;
  height: 50px;
  padding: 10px 14px;
}

.sidebar-logo.sidebar-logout-card .logout-icon-wrapper {
  width: 36px;
  height: 36px;
}

.sidebar-logo.sidebar-logout-card .sidebar-brand-copy {
  display: flex;
  align-items: center;
}

.sidebar-logo.sidebar-logout-card h2 {
  font-size: 0.9rem;
  margin: 0;
}

[data-theme="light"] .sidebar-logout-card:hover {
  border-color: rgba(220, 38, 38, 0.22) !important;
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.06) !important;
}

.sidebar-logo:hover h2 {
  color: var(--accent) !important;
}

.sidebar-logo:hover img {
  transform: scale(1.06);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25) !important;
}

.sidebar-logo h2 {
  font-size: 1rem;
  line-height: 1.18;
}

.sidebar-menu {
  gap: 2px;
  padding: 12px 10px 14px;
}

.sidebar-label-item {
  margin-top: 6px;
}

.sidebar-label-item:first-child {
  margin-top: 0;
}

.sidebar-group-label {
  padding: 8px 14px 3px;
  font-size: 0.61rem;
  color: rgba(148, 163, 184, 0.86);
}

[data-theme="light"] .sidebar-group-label {
  color: rgba(71, 85, 105, 0.62);
}

.sidebar-link,
.sidebar-group-toggle {
  min-height: 40px;
  border-radius: 12px;
  padding: 8px 13px;
  color: #c7d2e4;
}

[data-theme="light"] .sidebar-link,
[data-theme="light"] .sidebar-group-toggle {
  color: #526178;
}

.sidebar-link i,
.sidebar-group-toggle i {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: inherit;
  background: transparent;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.sidebar-group-toggle .toggle-arrow {
  margin-left: auto;
  opacity: 0.72;
  background: rgba(148, 163, 184, 0.08);
}

.sidebar-group-toggle .sidebar-toggle-main i,
.sidebar-link > i {
  flex-shrink: 0;
}

.sidebar-link:hover i,
.sidebar-link.active i,
.sidebar-group-toggle:hover .sidebar-toggle-main i,
.sidebar-group-toggle.has-active .sidebar-toggle-main i {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
}

[data-theme="light"] .sidebar-link:hover i,
[data-theme="light"] .sidebar-link.active i,
[data-theme="light"] .sidebar-group-toggle:hover .sidebar-toggle-main i,
[data-theme="light"] .sidebar-group-toggle.has-active .sidebar-toggle-main i {
  color: #1d4ed8;
  background: rgba(30, 58, 138, 0.08);
}

.sidebar-link.active,
.sidebar-group-toggle.has-active {
  color: #ffffff;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.16),
    rgba(37, 99, 235, 0.08)
  );
  border-color: rgba(56, 189, 248, 0.22);
}

[data-theme="light"] .sidebar-link.active,
[data-theme="light"] .sidebar-group-toggle.has-active {
  color: #172033;
  background:
    linear-gradient(135deg, rgba(30, 58, 138, 0.09), rgba(14, 165, 233, 0.06)),
    rgba(255, 255, 255, 0.72);
}

.sidebar-group-toggle.open {
  margin-bottom: 4px;
}

.sidebar-submenu { 
  margin: 0 3px 0 4px;
  border-left: 0;
}

.sidebar-submenu.open {
  margin-left: 4px;
  padding: 5px 0 7px 4px;
  border-left: 0;
  overflow: visible !important;
}

.sidebar-submenu .sidebar-link {
  min-height: 34px;
  margin-left: 12px;
  padding: 6px 8px 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 10px;
  gap: 6px;
}

.sidebar-submenu .sidebar-link::before {
  display: none !important;
}

.sidebar-submenu .sidebar-link.active {
  background: rgba(56, 189, 248, 0.1);
}

[data-theme="light"] .sidebar-submenu .sidebar-link.active {
  background: rgba(30, 58, 138, 0.07);
}

/* Submenu link text: allow full width, no truncation */
.sidebar-submenu .sidebar-link-text {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 0.78rem;
}

.sidebar-group-toggle.open .toggle-arrow {
  background: rgba(148, 163, 184, 0.1);
}

.sidebar-logout-item {
  margin-top: auto;
}

.sidebar-link-danger i {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.1);
}

.dashboard-header-bar {
  height: 98px;
  position: absolute !important;
  top: 20px !important;
  left: 40px !important;
  right: 40px !important;
  margin: 0 !important;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.08), transparent 45%),
    rgba(13, 20, 44, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.14) !important;
  z-index: 90 !important;
}

[data-theme="light"] .dashboard-header-bar {
  background:
    linear-gradient(135deg, rgba(30, 58, 138, 0.055), transparent 50%),
    rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(30, 58, 138, 0.08) !important;
  border-bottom-color: rgba(30, 58, 138, 0.08) !important;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.07) !important;
}

.hamburger-toggle {
  border-radius: 14px;
}

[data-theme="light"] .hamburger-toggle {
  background: rgba(30, 58, 138, 0.04);
  border-color: rgba(30, 58, 138, 0.08);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.header-title-stack {
  min-width: 0;
  display: grid;
  line-height: 1.16;
}

.header-title-stack strong {
  max-width: 310px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.06rem;
  color: var(--text-main);
}

.header-title-stack small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.header-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 800;
  transition: var(--transition);
}

[data-theme="light"] .header-quick-link {
  background: rgba(30, 58, 138, 0.045);
  border-color: rgba(30, 58, 138, 0.08);
}

.header-quick-link:hover {
  transform: translateY(-2px);
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.26);
}

.profile-avatar-wrapper {
  border-radius: 999px;
  padding: 7px 12px 7px 7px;
}

[data-theme="light"] .profile-avatar-wrapper {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(30, 58, 138, 0.08);
}

.profile-chevron {
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: transform 0.24s ease;
}

.profile-avatar-wrapper:hover .profile-chevron {
  transform: rotate(180deg);
}

.profile-dropdown-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border);
  text-align: left;
  line-height: 1.35;
}

.profile-dropdown-head span {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-dropdown-head strong {
  color: var(--text-main);
  font-size: 0.9rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 5px 4px;
}

.dropdown-danger {
  color: #fb7185 !important;
}

.dashboard-main {
  padding: 34px 40px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.dashboard-header h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.95rem !important;
  line-height: 1.08;
  color: var(--text-main);
  letter-spacing: 0;
}

.dashboard-header h1 i {
  width: 42px;
  height: 42px;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 15px 32px var(--primary-glow);
  font-size: 1rem !important;
}

.dashboard-header p {
  color: var(--text-muted) !important;
  font-size: 0.94rem !important;
  max-width: 720px;
}

.dashboard-hero {
  padding: 0;
  align-items: center;
}

.dashboard-hero-copy h1 {
  font-size: 2.1rem !important;
}

.dashboard-danger-action,
.dashboard-header .btn {
  border-radius: 14px !important;
  min-height: 44px;
  padding: 10px 18px !important;
  font-weight: 800;
}

.app-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 15px;
  margin-bottom: 22px;
  font-size: 0.9rem;
  font-weight: 650;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.app-alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--success);
}

.app-alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--danger);
}

.stat-mini-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.09);
  overflow: hidden;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
}

[data-theme="light"] .stat-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(30, 58, 138, 0.08);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--stat-color, rgba(56, 189, 248, 0.18)),
    transparent 46%
  );
  opacity: 0.52;
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.13);
}

.stat-card > * {
  position: relative;
  z-index: 1;
}

.stat-card h4 {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.stat-card h2 {
  margin-top: 6px;
  color: var(--stat-text, var(--text-main));
  font-family: var(--font-heading);
  font-size: 2.28rem;
  line-height: 1;
}

.stat-card p {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.stat-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stat-text, var(--text-main));
  background: var(--stat-bubble, rgba(255, 255, 255, 0.08));
  font-size: 1.2rem;
}

.stat-card-info {
  --stat-color: rgba(14, 165, 233, 0.18);
  --stat-text: var(--accent);
  --stat-bubble: var(--accent-glow);
}

.stat-card-success {
  --stat-color: rgba(16, 185, 129, 0.16);
  --stat-text: var(--success);
  --stat-bubble: var(--success-glow);
}

.stat-card-danger {
  --stat-color: rgba(239, 68, 68, 0.14);
  --stat-text: var(--danger);
  --stat-bubble: rgba(239, 68, 68, 0.11);
}

.feature-panel,
.dashboard-main > .glass-container {
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.09);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

[data-theme="light"] .feature-panel,
[data-theme="light"] .dashboard-main > .glass-container {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(30, 58, 138, 0.08);
}

.feature-panel {
  padding: 26px;
  margin-bottom: 28px;
}

.feature-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.feature-panel-head.compact {
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.feature-panel-head h3 {
  margin: 0;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.12rem;
  letter-spacing: 0;
}

.feature-panel-head p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 850;
}

.printer-status {
  white-space: nowrap;
  font-size: 0.74rem;
}

.ticket-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.ticket-action-btn {
  position: relative;
  min-height: 112px;
  padding: 20px 22px;
  border: 1px solid var(--ticket-accent); /* fallback for Chrome < 111 */
  border: 1px solid color-mix(in srgb, var(--ticket-accent) 70%, transparent);
  border-radius: 18px;
  background:
    linear-gradient(135deg, var(--ticket-accent-glow), transparent 58%),
    rgba(255, 255, 255, 0.03);
  color: var(--ticket-accent);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "code name arrow"
    "code helper arrow";
  align-items: center;
  gap: 5px 16px;
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    background 0.24s ease;
  font-family: inherit;
}

[data-theme="light"] .ticket-action-btn {
  background:
    linear-gradient(135deg, var(--ticket-accent-glow), transparent 58%),
    rgba(255, 255, 255, 0.78);
}

.ticket-action-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px var(--ticket-accent-glow);
}

.ticket-code {
  grid-area: code;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--ticket-accent);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
}

.ticket-name {
  grid-area: name;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.13rem;
}

.ticket-helper {
  grid-area: helper;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.ticket-action-btn > i {
  grid-area: arrow;
  color: var(--ticket-accent);
  opacity: 0.75;
}

.glass-table {
  margin-top: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.glass-table th {
  background: rgba(15, 23, 42, 0.5);
}

[data-theme="light"] .glass-table th {
  background: rgba(30, 58, 138, 0.045);
  color: #45546b;
}

.glass-table tr {
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.glass-table tr:hover td {
  background: rgba(56, 189, 248, 0.055);
}

[data-theme="light"] .glass-table tr:hover td {
  background: rgba(30, 58, 138, 0.035);
}

.dashboard-footer-bar {
  min-height: 56px;
  height: auto;
  background: rgba(10, 16, 36, 0.72) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 16px !important;
  padding: 10px 30px !important;
  margin-top: auto !important; /* Pushes the footer to the bottom of the container */
  margin-bottom: 24px !important;
  position: static !important; /* Disables sticky/floating behavior to flow naturally with content */
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: var(--transition);
}

[data-theme="light"] .dashboard-footer-bar {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(30, 58, 138, 0.08) !important;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.04) !important;
}

.footer-brandline,
.footer-meta-deck {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.15);
  font-weight: 300;
}

[data-theme="light"] .footer-separator {
  color: rgba(15, 23, 42, 0.1);
}

/* Breathing Pulse Dot */
.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.18);
  padding: 4px 10px;
  border-radius: 99px;
  cursor: help;
  transition: var(--transition);
}

.system-status-indicator:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.footer-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
  display: inline-block;
}

.footer-dot-pulse::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-breathing 1.8s infinite ease-in-out;
  left: 0;
  top: 0;
}

@keyframes pulse-breathing {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

.status-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Interactive Copyright */
.interactive-copyright {
  color: var(--text-main);
  cursor: help;
  transition: var(--transition);
}

.interactive-copyright:hover {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* Render speed meter */
.render-speed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 550;
  cursor: help;
}

[data-theme="light"] .render-speed {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.04);
}

/* Interactive school web link */
.footer-interactive-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent) !important;
  font-weight: 750;
  transition: var(--transition);
  position: relative;
  padding: 2px 0;
}

.footer-interactive-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-interactive-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.footer-interactive-link:hover {
  transform: translateY(-1px);
  text-shadow: 0 0 8px var(--accent-glow);
}

.meta-arrow {
  font-size: 0.65rem;
  transition: transform 0.25s ease;
}

.footer-interactive-link:hover .meta-arrow {
  transform: translate(2px, -2px);
}

/* Footer Back to Top scroll button */
.btn-footer-scroll {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 0;
  line-height: 1;
}

.btn-footer-scroll:hover {
  color: var(--accent);
  transform: translateY(-2px);
  filter: drop-shadow(0 0 5px var(--accent-glow));
}

.theme-toggle-btn {
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

@media (max-width: 1280px) {
  .stat-mini-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    transform: translateX(0);
    box-shadow: 24px 0 70px rgba(15, 23, 42, 0.18);
  }

  .dashboard-wrapper.sidebar-collapsed .dashboard-sidebar {
    width: 0;
    padding-inline: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
  }

  .dashboard-body-container {
    width: 100%;
  }

  .dashboard-main {
    padding: 110px 20px 26px 20px !important;
  }

  .dashboard-header-bar {
    padding: 0 18px !important;
    position: absolute !important;
    top: 15px !important;
    left: 20px !important;
    right: 20px !important;
    margin: 0 !important;
    height: 80px !important;
  }

  .header-title-stack small,
  .header-quick-link,
  .profile-info {
    display: none;
  }
}

@media (max-width: 680px) {
  .dashboard-header,
  .feature-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stat-mini-row,
  .ticket-action-grid {
    grid-template-columns: 1fr;
  }

  .ticket-action-btn {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "code name"
      "code helper";
  }

  .ticket-action-btn > i {
    display: none;
  }
}

/* ==========================================================================
   PRINT LAYOUT - 58mm POS THERMAL RECEIPT
   ========================================================================== */
@media print {
  /* Hide everything on the page */
  body * {
    visibility: hidden;
  }

  /* Set page margins for print roll */
  @page {
    size: 58mm auto;
    margin: 0;
  }

  /* Only display the receipt ticket and place it at the very top left */
  #print-receipt,
  #print-receipt * {
    visibility: visible;
  }

  #print-receipt {
    position: absolute;
    top: 0;
    left: 0;
    width: 48mm; /* Standard printable width for 58mm printer */
    padding: 5px;
    margin: 0;
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    font-family: "Courier New", Courier, monospace !important;
    font-size: 9pt !important;
    text-align: center !important;
    display: block !important;
  }

  #print-receipt .logo-school {
    width: 40mm !important;
    height: auto !important;
    max-width: 40mm !important;
    margin-bottom: 2mm !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    filter: none !important;
  }

  #print-receipt h3 {
    font-size: 11pt !important;
    font-weight: bold !important;
    margin-bottom: 1mm !important;
    color: #000000 !important;
    font-family: Arial, sans-serif !important;
  }

  #print-receipt h4 {
    font-size: 9pt !important;
    font-weight: bold !important;
    margin-bottom: 2mm !important;
    color: #000000 !important;
    font-family: Arial, sans-serif !important;
  }

  #print-receipt .number-display {
    font-size: 32pt !important;
    font-weight: bold !important;
    margin: 3mm 0 !important;
    color: #000000 !important;
    font-family: Arial, sans-serif !important;
  }

  #print-receipt .date-info {
    font-size: 7pt !important;
    color: #000000 !important;
  }

  #print-receipt .divider {
    border-top: 1px dashed #000000 !important;
    margin: 3mm 0 !important;
  }
}

/* ==========================================================================
   CUSTOM FLOATING TOOLTIPS (LINUX & MULTI-OS COMPATIBLE)
   ========================================================================== */
.custom-tooltip {
  position: fixed;
  z-index: 99999;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-10px) translateY(-50%);
  transition:
    opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: "Poppins", sans-serif;
}

[data-theme="light"] .custom-tooltip {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.custom-tooltip.visible {
  opacity: 1;
  transform: translateX(0) translateY(-50%);
}

/* Tooltip Left Arrow Pointer */
.custom-tooltip::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent rgba(15, 23, 42, 0.95) transparent transparent;
}

[data-theme="light"] .custom-tooltip::before {
  border-color: transparent rgba(255, 255, 255, 0.96) transparent transparent;
}

/* Optional left-oriented tooltip style if it overflows right margin */
.custom-tooltip.tooltip-left::before {
  left: auto;
  right: -5px;
  border-color: transparent transparent transparent rgba(15, 23, 42, 0.95);
}
[data-theme="light"] .custom-tooltip.tooltip-left::before {
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.96);
}

/* ==========================================================================
   DASHBOARD ANALYTICS & LIVE MONITOR STYLING
   ========================================================================== */
.live-loket-card {
  transition: var(--transition) !important;
}

.live-loket-card:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--accent-glow) !important;
}

[data-theme="light"] .live-loket-card {
  background: rgba(0, 0, 0, 0.012) !important;
  border-color: rgba(30, 58, 138, 0.06) !important;
}

[data-theme="light"] .live-loket-card:hover {
  background: rgba(30, 58, 138, 0.02) !important;
  border-color: rgba(30, 58, 138, 0.15) !important;
}

[data-theme="light"] .progress-track {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.03) !important;
}

/* Responsive grid for analytics */
@media (max-width: 900px) {
  .dashboard-analytics-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ==========================================================================
   CONSOLIDATED SIDEBAR CARD STYLE HARMONIZATION (ELIMINATE BACKGROUND MISMATCH)
   ========================================================================== */
.sidebar-logo,
.sidebar-menu {
  background: rgba(13, 20, 44, 0.82) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
}

[data-theme="light"] .sidebar-logo,
[data-theme="light"] .sidebar-menu {
  background: rgba(255, 255, 255, 0.86) !important;
  border-color: rgba(30, 58, 138, 0.08) !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08) !important;
}

/* ==========================================================================
   LOGO IMAGE: REMOVE WHITE BACKGROUND (PNG TRANSPARENCY FIX)
   Menggunakan mix-blend-mode agar pixel putih pada logo PNG menjadi transparan
   - Dark mode: 'screen' membuat warna putih/terang hilang di atas background gelap
   - Light mode: 'multiply' membuat warna putih hilang di atas background terang
   ========================================================================== */
.sidebar-logo img {
  mix-blend-mode: screen;
  background: transparent !important;
}

[data-theme="light"] .sidebar-logo img {
  mix-blend-mode: multiply;
  background: transparent !important;
}

/* ==========================================================================
   DASHBOARD MAIN SCROLL BACKGROUND FIX
   Pastikan area scroll .dashboard-main memiliki background yang konsisten
   agar tidak ada "warna kosong" saat scroll ke bawah
   ========================================================================== */
.dashboard-body-container {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 50%),
    var(--bg-gradient);
}

[data-theme="light"] .dashboard-body-container {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(219, 234, 254, 0.3)),
    #e8f0f8;
}

/* Sidebar logout card hover — override warna ke merah bukan putih */
.sidebar-logout-card:hover {
  background: rgba(239, 68, 68, 0.07) !important;
  border-color: rgba(239, 68, 68, 0.28) !important;
}

[data-theme="light"] .sidebar-logout-card:hover {
  background: rgba(220, 38, 38, 0.05) !important;
  border-color: rgba(220, 38, 38, 0.18) !important;
}

/* ==========================================================================
   LAYOUT GUARANTEES (FOOTER ALWAYS AT BOTTOM)
   - Applies to all dashboard pages (those using dashboard-body-container)
   ========================================================================== */
.dashboard-body-container {
  display: flex;
  flex-direction: column;
}

.dashboard-body-container > .dashboard-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.dashboard-body-container > .dashboard-footer-bar {
  flex-shrink: 0;
}

/* ==========================================================================
   THEME NORMALIZATION LAYER
   Single final pass so repeated legacy blocks do not leave mixed surfaces.
   ========================================================================== */
:root,
[data-theme="light"] {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="light"] body {
  background: #f8fafc !important;
  background-image: linear-gradient(
    135deg,
    #f8fafc 0%,
    #e8f0f8 58%,
    #dbeafe 100%
  ) !important;
  color: #0f172a !important;
}

[data-theme="dark"] body {
  background: #050814 !important;
  background-image: linear-gradient(
    135deg,
    #040712 0%,
    #0c1530 58%,
    #060b1b 100%
  ) !important;
  color: #f8fafc !important;
}

[data-theme="light"] .dashboard-body-container {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.62),
      rgba(219, 234, 254, 0.36)
    ),
    #e8f0f8 !important;
}

[data-theme="dark"] .dashboard-body-container {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 48%),
    var(--bg-gradient) !important;
}

[data-theme="light"] .dashboard-header-bar,
[data-theme="light"] .sidebar-logo,
[data-theme="light"] .sidebar-menu,
[data-theme="light"] .dashboard-footer-bar,
[data-theme="light"] .glass-container,
[data-theme="light"] .glass-card,
[data-theme="light"] .feature-panel,
[data-theme="light"] .stat-card,
[data-theme="light"] .kiosk-btn,
[data-theme="light"] .branding-panel,
[data-theme="light"] .running-text-form,
[data-theme="light"] .running-text-item {
  background: rgba(255, 255, 255, 0.86) !important;
  border-color: rgba(30, 58, 138, 0.1) !important;
  color: #0f172a !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="dark"] .dashboard-header-bar,
[data-theme="dark"] .sidebar-logo,
[data-theme="dark"] .sidebar-menu,
[data-theme="dark"] .dashboard-footer-bar,
[data-theme="dark"] .glass-container,
[data-theme="dark"] .glass-card,
[data-theme="dark"] .feature-panel,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .kiosk-btn,
[data-theme="dark"] .branding-panel,
[data-theme="dark"] .running-text-form,
[data-theme="dark"] .running-text-item {
  background: rgba(13, 20, 44, 0.82) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28) !important;
}

[data-theme="light"] .form-control,
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="url"] {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(30, 58, 138, 0.14) !important;
  color: #0f172a !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="url"] {
  background: rgba(15, 23, 42, 0.72) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

[data-theme="light"] .glass-table th {
  background: rgba(241, 245, 249, 0.9) !important;
  color: #475569 !important;
}

[data-theme="dark"] .glass-table th {
  background: rgba(15, 23, 42, 0.78) !important;
  color: #94a3b8 !important;
}

[data-theme="light"] .glass-table td,
[data-theme="light"] .sidebar-link,
[data-theme="light"] .sidebar-group-toggle,
[data-theme="light"] .header-page-title,
[data-theme="light"] .profile-dropdown-head strong {
  color: #0f172a !important;
}

[data-theme="dark"] .glass-table td,
[data-theme="dark"] .sidebar-link,
[data-theme="dark"] .sidebar-group-toggle,
[data-theme="dark"] .header-page-title,
[data-theme="dark"] .profile-dropdown-head strong {
  color: #f8fafc !important;
}

[data-theme="light"] .header-page-sub,
[data-theme="light"] .dashboard-header p,
[data-theme="light"] .footer-brandline,
[data-theme="light"] .footer-meta-deck,
[data-theme="light"] .sidebar-group-label {
  color: #475569 !important;
}

[data-theme="dark"] .header-page-sub,
[data-theme="dark"] .dashboard-header p,
[data-theme="dark"] .footer-brandline,
[data-theme="dark"] .footer-meta-deck,
[data-theme="dark"] .sidebar-group-label {
  color: #94a3b8 !important;
}

[data-theme="light"] .sidebar-link:hover,
[data-theme="light"] .sidebar-link.active,
[data-theme="light"] .sidebar-group-toggle:hover,
[data-theme="light"] .sidebar-group-toggle.has-active {
  background: rgba(30, 58, 138, 0.08) !important;
  border-color: rgba(30, 58, 138, 0.14) !important;
  color: #1e3a8a !important;
}

[data-theme="dark"] .sidebar-link:hover,
[data-theme="dark"] .sidebar-link.active,
[data-theme="dark"] .sidebar-group-toggle:hover,
[data-theme="dark"] .sidebar-group-toggle.has-active {
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.18) !important;
  color: #38bdf8 !important;
}

/* Portal page theme parity */
[data-theme="light"] .portal-future {
  color: #0f172a !important;
  background:
    linear-gradient(
      135deg,
      rgba(248, 252, 255, 0.96),
      rgba(226, 241, 255, 0.92)
    ),
    linear-gradient(90deg, rgba(30, 58, 138, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(30, 58, 138, 0.04) 1px, transparent 1px), #edf6ff !important;
  background-size:
    auto,
    54px 54px,
    54px 54px,
    auto !important;
}

[data-theme="dark"] .portal-future {
  color: #f8fafc !important;
  background:
    linear-gradient(135deg, rgba(3, 7, 18, 0.98), rgba(8, 20, 39, 0.96)),
    linear-gradient(90deg, rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    #050814 !important;
  background-size:
    auto,
    54px 54px,
    54px 54px,
    auto !important;
}

[data-theme="dark"] .portal-future::before {
  background:
    linear-gradient(120deg, rgba(56, 189, 248, 0.12), transparent 42%),
    linear-gradient(300deg, rgba(16, 185, 129, 0.08), transparent 44%) !important;
}

[data-theme="dark"] .portal-command,
[data-theme="dark"] .portal-future-card {
  background: rgba(13, 20, 44, 0.78) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .portal-command-brand strong,
[data-theme="dark"] .portal-hero h1,
[data-theme="dark"] .portal-future-card h3 {
  color: #f8fafc !important;
}

[data-theme="dark"] .portal-command-brand span,
[data-theme="dark"] .portal-command-status,
[data-theme="dark"] .portal-hero p,
[data-theme="dark"] .portal-hero-kicker,
[data-theme="dark"] .portal-future-card p,
[data-theme="dark"] .portal-footer {
  color: #94a3b8 !important;
}

[data-theme="dark"] .portal-hero h1 span {
  color: #38bdf8 !important;
}

[data-theme="dark"] .portal-command-status > .status-pill {
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.32) !important;
}

[data-theme="dark"] .portal-command-status > .status-pill i {
  color: #10b981 !important;
}

[data-theme="dark"] .portal-command-status .portal-logout-btn {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(239, 68, 68, 0.32) !important;
}

[data-theme="dark"] .portal-command-status .portal-logout-btn:hover {
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
}

[data-theme="dark"] .portal-command-status .portal-login-btn {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.32) !important;
}

[data-theme="dark"] .portal-command-status .portal-login-btn:hover {
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
}

[data-theme="dark"] .portal-card-index {
  color: rgba(248, 250, 252, 0.14) !important;
}

[data-theme="dark"] .portal-command-brand img,
[data-theme="dark"] .auth-brand-main img,
[data-theme="dark"] .auth-extra-logo {
  background: rgba(255, 255, 255, 0.88) !important;
}

/* ==========================================================================
   RUNNING TEXT LAYOUT & FORMS REFINEMENT (MANAJEMEN LAYAR)
   ========================================================================== */
.screen-texts-grid {
  display: grid !important;
  grid-template-columns: 1.2fr 1fr !important;
  gap: 30px !important;
  margin-top: 20px !important;
  align-items: stretch !important;
}

.running-text-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  margin-top: 15px !important;
}

.running-text-form-inline {
  background: rgba(255, 255, 255, 0.01) !important;
  border: 1px solid rgba(255, 255, 255, 0.03) !important;
  border-radius: var(--radius-md) !important;
  padding: 15px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

[data-theme="light"] .running-text-form-inline {
  background: rgba(255, 255, 255, 0.4) !important;
  border-color: rgba(15, 23, 42, 0.04) !important;
}

.running-text-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  max-height: 295px !important;
  overflow-y: auto !important;
  padding-right: 6px !important;
}

.teks-info-form-wrapper {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  margin-top: 15px !important;
}

.teks-info-textarea-wrapper {
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

.teks-info-textarea-wrapper textarea {
  flex-grow: 1 !important;
  resize: none !important;
  min-height: 150px !important;
}

.screen-playlist-panel {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.playlist-setting-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 14px 16px !important;
  margin: 6px 0 18px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(14, 165, 233, 0.16) !important;
  background: rgba(14, 165, 233, 0.045) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

[data-theme="light"] .playlist-setting-card {
  background: rgba(255, 255, 255, 0.66) !important;
  border-color: rgba(30, 58, 138, 0.12) !important;
}

.playlist-loop-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  cursor: pointer !important;
}

.playlist-loop-toggle input {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.playlist-toggle-ui {
  width: 46px !important;
  height: 26px !important;
  border-radius: 999px !important;
  flex: 0 0 auto !important;
  position: relative !important;
  background: rgba(100, 116, 139, 0.22) !important;
  border: 1px solid rgba(100, 116, 139, 0.24) !important;
  transition: var(--transition) !important;
}

.playlist-toggle-ui::after {
  content: "" !important;
  position: absolute !important;
  width: 18px !important;
  height: 18px !important;
  left: 4px !important;
  top: 3px !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18) !important;
  transition: var(--transition) !important;
}

.playlist-loop-toggle input:checked + .playlist-toggle-ui {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  border-color: rgba(14, 165, 233, 0.42) !important;
}

.playlist-loop-toggle input:checked + .playlist-toggle-ui::after {
  transform: translateX(20px) !important;
}

.playlist-loop-toggle strong {
  display: block !important;
  color: var(--text-main) !important;
  font-size: 0.9rem !important;
  line-height: 1.2 !important;
}

.playlist-loop-toggle small {
  display: block !important;
  color: var(--text-muted) !important;
  font-size: 0.74rem !important;
  line-height: 1.35 !important;
  margin-top: 3px !important;
}

.running-text-item {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: var(--radius-md) !important;
  padding: 14px 18px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 15px !important;
  transition: var(--transition) !important;
}
[data-theme="light"] .running-text-item {
  background: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.running-text-item:hover {
  border-color: var(--accent) !important;
  background: var(--card-hover-bg) !important;
}

.running-text-copy {
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  line-height: 1.5 !important;
  word-break: break-word !important;
}

.running-text-meta {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 8px !important;
  font-size: 0.72rem !important;
  color: var(--text-muted) !important;
}

.running-text-actions {
  display: flex !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

/* Screen Manager layout fix */
.screen-manager-grid {
  display: grid !important;
  grid-template-columns: 1fr 1.2fr !important;
  gap: 30px !important;
  margin-top: 30px !important;
  align-items: stretch !important;
}

.screen-form-panel {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 24px !important;
  box-shadow: var(--glass-shadow) !important;
}

.screen-form-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 15px !important;
  margin-top: 15px !important;
}

.screen-form-grid .floating-field.field-full,
.screen-form-grid .floating-field:nth-child(1) {
  grid-column: span 2 !important;
}

.screen-form-panel,
.screen-playlist-panel {
  height: 100% !important;
  min-height: 560px !important;
  display: flex !important;
  flex-direction: column !important;
}

.screen-form-panel .screen-form-grid {
  flex: 1 1 auto !important;
  align-content: start !important;
}

.screen-form-actions {
  margin-top: auto !important;
  padding-top: 18px !important;
}

.screen-playlist-panel .table-responsive {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}

.screen-playlist-panel .glass-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}

.media-folder-select-field {
  grid-column: span 2 !important;
}

.media-file-upload-field,
.media-folder-select-field {
  background: rgba(14, 165, 233, 0.035) !important;
  border: 1px dashed rgba(14, 165, 233, 0.22) !important;
  border-radius: 16px !important;
  padding: 14px !important;
}

[data-theme="light"] .media-file-upload-field,
[data-theme="light"] .media-folder-select-field {
  background: rgba(255, 255, 255, 0.58) !important;
  border-color: rgba(30, 58, 138, 0.14) !important;
}

.media-folder-select-field select {
  min-height: 46px !important;
}

.screen-preview-panel {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.screen-preview-frame {
  aspect-ratio: 4 / 3 !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  position: relative !important;
  background: #000 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1024px) {
  .screen-texts-grid,
  .screen-manager-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   FINAL DASHBOARD LAYOUT CONTRACT
   Header and sidebar stay available; footer stays in normal document flow.
   ========================================================================== */
html,
body {
  min-height: 100%;
}

body {
  overflow: hidden;
}

.dashboard-wrapper {
  height: 100vh !important;
  max-height: none !important;
  overflow: hidden !important;
}

.dashboard-body-container {
  height: 100vh !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  scroll-behavior: smooth;
}

.dashboard-header-bar {
  position: sticky !important;
  top: 20px !important;
  left: auto !important;
  right: auto !important;
  width: calc(100% - 80px) !important;
  margin: 20px 40px 0 !important;
  flex: 0 0 auto !important;
}

.dashboard-main {
  flex: 1 0 auto !important;
  height: auto !important;
  min-height: 0 !important; /* Firefox fallback */
  min-height: auto !important;
  overflow: visible !important;
  padding-top: 34px !important;
  padding-bottom: 24px !important;
}

.dashboard-body-container > .dashboard-footer-bar {
  position: static !important;
  inset: auto !important;
  bottom: auto !important;
  z-index: 1 !important;
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 40px 24px !important;
}

@media (max-width: 768px) {
  .dashboard-header-bar {
    top: 12px !important;
    width: calc(100% - 32px) !important;
    margin: 12px 16px 0 !important;
  }

  .dashboard-main {
    padding-inline: 16px !important;
  }

  .dashboard-body-container > .dashboard-footer-bar {
    margin: 0 16px 16px !important;
  }
}

/* ==========================================================================
   PROFILE DROPDOWN HOVER FIX
   ========================================================================== */
/* Perbaiki hover issue di header dropdown - hilangkan gap antara trigger dan dropdown */
.profile-avatar-wrapper {
  position: relative;
  cursor: pointer;
  padding: 8px 12px;
  margin: -8px -12px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.profile-avatar-wrapper:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .profile-avatar-wrapper:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* Dropdown card styling */
.profile-dropdown-card {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 240px;
  background: #0d142c;
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: var(--radius-md);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.4);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 9999;
}

[data-theme="light"] .profile-dropdown-card {
  background: #ffffff;
  border-color: rgba(30, 58, 138, 0.12);
  box-shadow:
    0 8px 32px rgba(30, 58, 138, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Show dropdown saat hover pada wrapper */
.profile-avatar-wrapper:hover .profile-dropdown-card,
.profile-dropdown-card:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Bridge untuk menghilangkan gap antara wrapper dan dropdown */
.profile-avatar-wrapper::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
  z-index: 9998;
}

/* Dropdown head styling */
.profile-dropdown-head {
  padding: 12px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 8px;
}

.profile-dropdown-head span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.profile-dropdown-head strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 600;
}

/* Dropdown items */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.dropdown-item i {
  width: 20px;
  text-align: center;
  color: var(--text-muted);
}

.dropdown-danger {
  color: var(--danger);
}

.dropdown-danger:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

.dropdown-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 8px 0;
}

/* ==========================================================================
   LOGO MARKER GLOW
   ========================================================================== */
/* White glow marker for logo in index portal and sidebar */
.logo-marker-glow {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.8),
    0 4px 15px rgba(30, 58, 138, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.logo-marker-glow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

/* Sidebar specific - show glow on hover */
.logo-marker-sidebar {
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-logo:hover .logo-marker-sidebar {
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 4px 20px rgba(56, 189, 248, 0.25),
    0 0 30px rgba(56, 189, 248, 0.15);
  transform: scale(1.05);
}

/* Portal header specific */
.portal-command-brand .logo-marker-glow {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

/* ==========================================================================
   PORTAL GLASS FROSTED INFO CARDS
   ========================================================================== */
.portal-info-glass {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.info-glass-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    0 4px 15px rgba(30, 58, 138, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.info-glass-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(30, 58, 138, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.info-glass-item i {
  font-size: 1rem;
  color: #1e3a8a;
}

.info-glass-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e3a8a;
  white-space: nowrap;
}

/* Status pill for portal header */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
}

.status-pill i {
  font-size: 0.6rem;
  color: #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Logout button style — clean solid red */
.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #ef4444;
  border: none;
  border-radius: 50px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.logout-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.3);
}

/* Header utility buttons + tooltip */
.header-utils {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.util-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(30, 58, 138, 0.15);
  background: rgba(255, 255, 255, 0.6);
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  position: relative;
  overflow: visible;
}

.util-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(30, 58, 138, 0.3);
  color: #0f172a;
}

[data-theme="dark"] .util-btn {
  background: rgba(13, 20, 44, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

[data-theme="dark"] .util-btn:hover {
  background: rgba(13, 20, 44, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f8fafc;
}

/* ==========================================================================
   SUCCESS MODAL COMPONENTS (Kiosk Ambil Antrean)
   ========================================================================== */
.modal-ticket-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 10px 6px 4px;
}

.modal-ticket-success .ticket-success-icon {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  border: 2px solid rgba(5, 150, 105, 0.35);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.25);
}

.modal-ticket-success .ticket-number-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-ticket-success .ticket-number-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.modal-ticket-success .ticket-number {
  font-size: 2.8rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 6px 20px rgba(2, 132, 199, 0.25);
}

.modal-ticket-success .ticket-meta {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.modal-ticket-success .info-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.modal-qz-progress {
  width: 100%;
  margin-top: 8px;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

[data-theme="light"] .modal-qz-progress {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

.modal-progress-status {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-progress-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  flex-shrink: 0;
}

.modal-progress-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.modal-progress-copy strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-progress-copy span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-progress-chip {
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
}

.modal-progress-chip.is-online {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

/* --------------------------------------------------------------------------
   DAFTAR ULANG — Metric & Header Styles
   -------------------------------------------------------------------------- */
.metric-glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.metric-glass-card:hover {
  border-color: rgba(56, 189, 248, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .metric-glass-card {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(226, 232, 240, 0.8);
}

[data-theme="light"] .metric-glass-card:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

.dashboard-header {
  padding: 20px 28px;
  margin-bottom: 20px;
}

.header-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.header-desc {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   BADGE ACCESS COLORS (Hak Akses Role)
   ========================================================================== */
.badge-access {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-access.kiosk {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #0ea5e9;
}

.badge-access.operator {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.badge-access.monitor {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #6366f1;
}

.badge-access.admin {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.badge-access.dashboard {
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #ec4899;
}

.badge-access.daftar-ulang {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #8b5cf6;
}

.badge-access.tandai-du {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.badge-access.cetak-saja {
  background: rgba(14, 165, 233, 0.08);
  border: 1px dashed rgba(14, 165, 233, 0.35);
  color: #0ea5e9;
  opacity: 0.92;
}

.badge-access.log-antrean {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #0ea5e9;
}

.badge-access.edit-log {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.badge-access.reset {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.badge-access.settings {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #06b6d4;
}

.badge-access.users {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #a855f7;
}

.badge-access.system {
  background: rgba(100, 116, 139, 0.12);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #64748b;
}

.badge-access.data-penerimaan {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #8b5cf6;
}

.badge-access.laporan-penerimaan {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.badge-access.cetak-presensi {
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: #14b8a6;
}

.badge-access.input-dapodik {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

/* ==========================================================================
   GLOBAL LAYOUT ALIGNMENT FIX (ALL PAGES)
   Ensure the main content container perfectly aligns with the header width
   ========================================================================== */
.dashboard-main,
.dashboard-content {
  padding-left: 40px !important;
  padding-right: 40px !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .dashboard-main,
  .dashboard-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ==========================================================================
   GLOBAL DASHBOARD TABS (PREMIUM PILL NAVIGATION)
   ========================================================================== */
.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px;
  background: rgba(241, 245, 249, 0.85) !important;
  border-radius: 16px !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .dashboard-tabs {
  background: rgba(15, 23, 42, 0.65) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
}

.dashboard-tab-btn {
  flex: 1;
  padding: 14px 24px !important;
  border-radius: 12px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  text-decoration: none;
}

.dashboard-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6) !important;
  color: var(--primary) !important;
  border-color: rgba(30, 58, 138, 0.15) !important;
  transform: translateY(-1px);
}

[data-theme="dark"] .dashboard-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.2) !important;
}

.dashboard-tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35) !important;
  border-color: transparent !important;
  transform: translateY(-1px);
}

[data-theme="dark"] .dashboard-tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.45) !important;
}

.dashboard-tab-content {
  animation: tabFadeIn 0.35s ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

