/* ==========================================================================
   Xozen Cloud - Glassmorphism UI Design System (CasaOS Inspired)
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* CasaOS-Inspired Glass Surfaces (Translucent, Wallpaper Fluid Lines Visible) */
  --bg-canvas: #060B18;
  --bg-canvas-subtle: rgba(10, 16, 32, 0.35);
  --surface-header: rgba(10, 18, 36, 0.45);
  --surface-sidebar: rgba(9, 16, 32, 0.50);
  --surface-card: rgba(14, 24, 46, 0.40);
  --surface-card-hover: rgba(20, 34, 64, 0.55);
  --surface-input: rgba(7, 13, 26, 0.48);
  --surface-modal: rgba(10, 18, 36, 0.72);
  --surface-dropdown: rgba(12, 20, 38, 0.85);
  --surface-table: rgba(10, 17, 34, 0.42);

  /* Crisp Light Specular Borders (CasaOS Accentuated Edge) */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(56, 189, 248, 0.40);
  --border-focus: #38BDF8;
  --glass-inner-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.18), 0 4px 20px rgba(0, 0, 0, 0.25);

  /* Moderate Glass Blur (Not Over-Blurred, Wallpaper Retains Beauty & Depth) */
  --glass-blur-std: blur(8px) saturate(125%);
  --glass-blur-heavy: blur(10px) saturate(135%);
  --glass-blur-subtle: blur(4px);

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px -2px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px -4px rgba(0, 0, 0, 0.55);

  /* High Contrast Typographic Palette */
  --text-bright: #FFFFFF;
  --text-main: #E2E8F0;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;

  /* Vibrant Accents */
  --accent-primary: #2563EB;
  --accent-primary-hover: #1D4ED8;
  --accent-primary-active: #1E40AF;
  --accent-secondary: rgba(30, 44, 70, 0.55);
  --accent-secondary-hover: rgba(42, 60, 96, 0.75);
  --accent-cyan: #0284C7;
  --accent-cyan-light: #38BDF8;
  --accent-emerald: #10B981;
  --accent-emerald-subtle: rgba(6, 78, 59, 0.6);
  --accent-amber: #F59E0B;
  --accent-amber-subtle: rgba(120, 53, 15, 0.6);
  --accent-rose: #EF4444;
  --accent-rose-hover: #DC2626;
  --accent-rose-active: #B91C1C;
  --accent-rose-subtle: rgba(127, 29, 29, 0.6);

  /* Native controls (select list, number spinner, dialog) follow dark theme */
  color-scheme: dark;

  /* Radius System */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Snappy Transitions */
  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Custom Global Controls (Browser Defaults Replacement)
   ========================================================================== */

/* Custom Scrollbars (Standard & WebKit) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) rgba(8, 12, 22, 0.45);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(8, 12, 22, 0.5);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.32);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background-color var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.75);
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Custom Text Highlight Selection */
::selection {
  background: rgba(56, 189, 248, 0.38);
  color: #FFFFFF;
}

::-moz-selection {
  background: rgba(56, 189, 248, 0.38);
  color: #FFFFFF;
}

/* Custom Form Select Elements (Native Arrow Replacement) */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2338BDF8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px !important;
  cursor: pointer;
}

/* Custom DateTime & Date Picker Calendar Indicator */
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(1) saturate(5) hue-rotate(165deg);
  cursor: pointer;
  opacity: 0.85;
  border-radius: 4px;
  padding: 2px;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Custom Search Cancel Clear Button */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E") no-repeat center;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

input[type="search"]::-webkit-search-cancel-button:hover {
  opacity: 1;
}

/* Custom File Selector Button */
input[type="file"]::file-selector-button {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 14px;
  margin-right: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

input[type="file"]::file-selector-button:hover {
  background: var(--accent-secondary-hover);
  border-color: var(--accent-cyan-light);
  color: var(--accent-cyan-light);
}

/* Custom Checkbox & Radio Accents */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent-cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Custom Placeholder */
::placeholder {
  color: var(--text-subtle);
  opacity: 0.85;
}

/* Base Reset & Mobile Native Foundations */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

/* Glass UI Body Background with Custom Image */
body {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
}

/* Fixed Background Image Overlay Layer for Butter-Smooth Performance across Mobile & Desktop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: 
    linear-gradient(rgba(4, 9, 20, 0.10), rgba(6, 12, 26, 0.25)),
    url('/assets/wallpaper.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

/* Hide all obsolete ambient glow blobs completely */
.ambient-glow {
  display: none !important;
}

/* Accessible Interactive Targets */
button,
a[href],
select,
input[type="checkbox"],
input[type="radio"],
label[for] {
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* Visible Keyboard Focus Ring */
:focus-visible {
  outline: 2px solid var(--accent-cyan-light);
  outline-offset: 2px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

/* Prevent iOS Safari Automatic Zoom on Inputs */
input,
textarea,
select {
  font-family: inherit;
  font-size: 16px;
}

/* ==========================================================================
   Auth Gateway Overlay (Initial Landing & Login Screen)
   ========================================================================== */
.auth-gateway-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow-y: auto;
}

.auth-morph-container {
  position: relative;
  transition: width 380ms cubic-bezier(0.16, 1, 0.3, 1),
              height 380ms cubic-bezier(0.16, 1, 0.3, 1),
              max-width 380ms cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 380ms cubic-bezier(0.16, 1, 0.3, 1),
              padding 340ms ease,
              background 340ms ease,
              box-shadow 340ms ease;
  will-change: width, height, max-width, border-radius;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* State 1: Collapsed State - Logo Ber-Radius dengan Outline Biru yang Rapi */
.auth-morph-container.state-button {
  width: 140px;
  height: 140px;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.4);
  border: 2.5px solid #38BDF8 !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35), 0 14px 34px -4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  user-select: none;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-morph-container.state-button:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: #60A5FA !important;
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.55), 0 18px 42px -4px rgba(0, 0, 0, 0.55);
}

.auth-morph-container.state-button:active {
  transform: scale(0.975);
}

.gateway-logo-btn {
  background: transparent;
  border: none;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 26px;
  overflow: hidden;
  outline: none;
}

.gateway-logo-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 26px;
  filter: none;
  display: block;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gateway-logo-btn:hover .gateway-logo-image {
  transform: scale(1.04);
}

/* State 2: Expanding Animation (Strictly no form visible yet) */
.auth-morph-container.is-expanding {
  width: 100%;
  max-width: 440px;
  height: 480px;
  border-radius: var(--radius-lg);
  background: rgba(12, 20, 38, 0.65);
  backdrop-filter: blur(8px) saturate(125%);
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
  cursor: default;
}

.auth-morph-container.is-expanding .gateway-logo-btn,
.auth-morph-container.state-expanded .gateway-logo-btn {
  display: none !important;
}

/* State 3: Fully Expanded Card with Login Form (Glass dengan Blur Ringan) */
.auth-morph-container.state-expanded {
  width: 100%;
  max-width: 440px;
  height: auto;
  min-height: 440px;
  border-radius: var(--radius-lg);
  background: rgba(12, 20, 38, 0.65);
  backdrop-filter: blur(8px) saturate(125%);
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
  cursor: default;
  padding: 30px 24px 22px;
  display: flex;
  flex-direction: column;
}

/* Legacy fallback support */
.auth-card {
  width: 100%;
  max-width: 430px;
  background: rgba(12, 20, 38, 0.65);
  backdrop-filter: blur(8px) saturate(125%);
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

/* Auth Card Inner Content */
.auth-card-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  animation: gatewayFormReveal 260ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes gatewayFormReveal {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card-mini-logo {
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}

.brand-icon-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.btn-collapse-gateway {
  position: absolute;
  top: -12px;
  right: -6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 160ms ease;
  z-index: 10;
}

.btn-collapse-gateway:hover {
  background: var(--surface-panel);
  color: var(--text-bright);
  border-color: var(--border-default);
  transform: scale(1.05);
}

/* Wizard Stepper Styles */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 16px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  transition: color 200ms ease;
}

.wizard-step .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-input);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 200ms ease;
}

.wizard-step.active {
  color: var(--accent-cyan-light);
}

.wizard-step.active .step-num {
  background: var(--accent-primary);
  border-color: var(--accent-cyan-light);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.wizard-step.completed {
  color: var(--text-bright);
}

.wizard-step.completed .step-num {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #FFFFFF;
}

.wizard-connector {
  height: 2px;
  width: 32px;
  background: var(--border-subtle);
  border-radius: 2px;
  transition: background 250ms ease, box-shadow 250ms ease;
}

.wizard-connector.active {
  background: var(--accent-cyan-light);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* Wizard Panes */
.wizard-pane {
  display: flex;
  flex-direction: column;
}

.wizard-pane.active {
  display: flex;
  animation: wizardSlideIn 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wizardSlideIn {
  0% {
    opacity: 0;
    transform: translateX(12px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Student Live Preview Badge */
.student-preview-badge {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-bright);
  animation: fadeIn 180ms ease;
}

.preview-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
}

.preview-name {
  font-weight: 600;
  color: var(--text-bright);
}

/* Student Summary Strip in Step 2 */
.student-summary-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.summary-absen-pill {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.summary-name-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-bright);
}

.auth-brand-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.auth-icon-lg {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  background: var(--accent-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.auth-brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.auth-brand-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Hold Button Wrapper & Micro-Interaction */
.auth-action-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.hold-btn-wrapper {
  position: relative;
  width: 100%;
}

.auth-continue-btn {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  min-height: 50px;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), background 160ms ease;
}

.auth-continue-btn:active {
  transform: scale(0.98);
}

.auth-continue-btn.is-holding {
  transform: scale(0.985);
  background: var(--accent-primary-hover);
}

.btn-text-label {
  position: relative;
  z-index: 2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hold-progress-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 0%;
  background: #38BDF8;
  z-index: 1;
  transition: width 40ms linear;
  pointer-events: none;
}

/* Screen Vibration & Shake Animation on 3s Hold Trigger */
@keyframes screenVibrate {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-3px, -1px); }
  80% { transform: translate(2px, 2px); }
  100% { transform: translate(0, 0); }
}

.auth-gateway-overlay.screen-vibrating .auth-card,
.auth-gateway-overlay.screen-vibrating .auth-morph-container {
  animation: screenVibrate 80ms linear infinite;
  border-color: var(--accent-cyan-light);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.45), var(--shadow-lg);
}

.auth-gateway-overlay.screen-vibrating .hold-progress-fill {
  background: #F43F5E;
}

.teacher-unlocked-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #241A08;
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-md);
  color: #FEF3C7;
  font-size: 0.875rem;
}

.teacher-unlocked-banner strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 2px;
  color: #FDE68A;
}

.teacher-unlocked-banner p {
  font-size: 0.8125rem;
  margin: 0;
  color: #F1F5F9;
}

/* ==========================================================================
   Main App Shell
   ========================================================================== */
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Header */
.glass-header {
  position: sticky;
  top: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface-header);
  backdrop-filter: var(--glass-blur-std);
  -webkit-backdrop-filter: var(--glass-blur-std);
  border-bottom: 1px solid var(--border-default);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), var(--glass-inner-shadow);
  gap: 12px;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-input);
  border: 1px solid rgba(56, 189, 248, 0.25);
  overflow: hidden;
  color: #FFFFFF;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-secondary);
  border: 1px solid var(--border-default);
  color: var(--accent-cyan-light);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hide header action controls completely on PC screen (Buttons moved to Sidebar) */
@media (min-width: 841px) {
  .header-actions {
    display: none !important;
  }
}

/* Mobile Drawer Menu Toggle Button */
.mobile-menu-toggle-btn {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
}

.mobile-menu-toggle-btn.active {
  background: var(--accent-secondary-hover);
  border-color: var(--accent-cyan-light);
  color: var(--accent-cyan-light);
}

.mobile-toggle-text {
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Sidebar User Profile Card */
.sidebar-profile-section {
  padding-bottom: 4px;
}

.sidebar-user-card,
.user-role-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  width: 100%;
}

.user-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* User Profile Avatar with Student Image Support */
.user-avatar-wrapper {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.role-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.role-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: block;
}

.avatar-edit-trigger {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 1.5px solid #060B18;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.avatar-edit-trigger:hover {
  background: var(--accent-cyan-light);
  transform: scale(1.15);
}

/* Student Submit Profile Row */
.student-submit-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.submit-student-avatar-box {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  position: relative;
}

.submit-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan-light);
  display: block;
}

.submit-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-secondary);
  border: 1px solid var(--border-hover);
  color: var(--accent-cyan-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.role-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-type {
  font-size: 0.75rem;
  color: var(--accent-cyan-light);
  font-weight: 500;
}

.btn-role-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  min-height: 36px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-role-switch:hover {
  background: var(--accent-rose-subtle);
  border-color: var(--accent-rose);
  color: #F87171;
}

/* Button System (Touch Target minimum 44px, Friendly 48px standard) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), background 160ms ease, border-color 160ms ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent-primary);
  color: #FFFFFF;
  border: 1px solid var(--accent-primary-hover);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-primary:active {
  background: var(--accent-primary-active);
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--surface-card);
  color: var(--text-main);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-hover);
  color: var(--text-bright);
}

.btn-secondary:active {
  background: var(--accent-secondary);
  transform: scale(0.98);
}

.btn-danger {
  background: var(--accent-rose);
  color: #FFFFFF;
  border: 1px solid var(--accent-rose-hover);
}

.btn-danger:hover {
  background: #B91C1C;
}

.btn-large {
  min-height: 48px;
  padding: 0 20px;
  font-size: 0.9375rem;
}

.btn-sm {
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.8125rem;
}

/* App Layout */
.app-layout {
  display: flex;
  flex: 1;
  position: relative;
  z-index: 10;
}

/* Mobile Drawer Backdrop */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 20, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms cubic-bezier(0.32, 0.72, 0, 1);
  display: block;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Glass Sidebar (Desktop Navigation & Mobile Slide-In Drawer) */
.glass-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--surface-sidebar);
  backdrop-filter: var(--glass-blur-std);
  -webkit-backdrop-filter: var(--glass-blur-std);
  border-right: 1px solid var(--border-default);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3), var(--glass-inner-shadow);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Mobile Drawer Header */
.sidebar-mobile-header {
  display: none;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-default);
}

.sidebar-mobile-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-cyan-light);
  letter-spacing: -0.01em;
}

/* Sidebar Page Navigation Tabs */
.sidebar-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.sidebar-tab-btn:hover {
  background: var(--surface-card-hover);
  color: var(--text-bright);
  border-color: var(--border-default);
}

.sidebar-tab-btn.active {
  background: var(--accent-secondary);
  border-color: var(--border-hover);
  color: var(--accent-cyan-light);
  font-weight: 700;
}

.sidebar-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  margin-bottom: 10px;
}

.stats-card {
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.stats-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.stats-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-bright);
  word-break: break-all;
}

/* System Summary Text-Only Toggle (No Button Background) */
.system-summary-toggle-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.text-toggle-link {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--accent-cyan-light) !important;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  align-self: flex-start;
  transition: color var(--transition-fast);
}

.text-toggle-link:hover {
  color: #7DD3FC !important;
}

.toggle-arrow-icon {
  transition: transform 200ms ease;
}

.text-toggle-link[aria-expanded="true"] .toggle-arrow-icon {
  transform: rotate(180deg);
}

.system-summary-panel {
  animation: fadeIn 200ms ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.cat-btn:hover {
  background: var(--surface-card);
  color: var(--text-bright);
}

.cat-btn.active {
  background: var(--accent-secondary);
  border-color: var(--border-hover);
  color: var(--accent-cyan-light);
  font-weight: 600;
}

.cat-count {
  margin-left: auto;
  font-size: 0.75rem;
  background: var(--surface-input);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.cat-btn.active .cat-count {
  background: var(--border-default);
  color: var(--text-bright);
}

/* Main Content Area */
.glass-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
  gap: 20px;
  min-width: 0;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-bright);
}

/* ==========================================================================
   System Health & Diagnostics Dashboard (Glassmorphism, No-Wrap Fluid Sizing)
   ========================================================================== */
.diagnostics-dashboard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface-card);
  backdrop-filter: var(--glass-blur-std);
  -webkit-backdrop-filter: var(--glass-blur-std);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), var(--glass-inner-shadow);
  padding: clamp(14px, 1.6vw, 20px);
}

.dashboard-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.dashboard-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dashboard-header-title h3 {
  font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#btnRefreshDiagnostics {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.8125rem;
  min-height: 38px;
  padding: 0 12px;
}

.workspace-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.workspace-page.hidden {
  display: none !important;
}

/* Glassmorphism Backdrop untuk Halaman Daftar Tugas */
#tasksViewPage {
  background: rgba(8, 14, 28, 0.45);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 1.8vw, 24px);
  box-shadow: var(--shadow-md), var(--glass-inner-shadow);
}

/* ==========================================================================
   MagicBento Component (React Bits Interactive Bento Grid for Dashboard)
   ========================================================================== */
.magic-bento {
  --mb-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --mb-surface: rgba(14, 23, 44, 0.78);
  --mb-edge: rgba(255, 255, 255, 0.08);
  --mb-highlight: rgba(255, 255, 255, 0.12);
  --mb-shadow: 0 16px 36px -16px rgba(0, 0, 0, 0.7), 0 4px 12px -4px rgba(0, 0, 0, 0.4);
  --mb-glow-rgb: 56, 189, 248;
  --mb-accent-rgb: 56, 189, 248;
  --mb-ink: #f8fafc;
  --mb-muted: #94a3b8;
  --mb-radius: 20px;
  --mb-pad: 18px;
  --mb-spot-size: 300px;
  --mb-border-size: 220px;
  --mb-glow-alpha: 0.85;
  --mb-spot-alpha: 0.08;
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  color: var(--mb-ink);
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1080px) {
  .magic-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bento-span-1 {
  grid-column: span 1;
}

.bento-span-2 {
  grid-column: span 2;
}

.bento-span-4 {
  grid-column: span 4;
}

.bento-row-2 {
  grid-row: span 2;
}

@media (max-width: 1080px) {
  .bento-span-4,
  .bento-span-tablet-2 {
    grid-column: span 2;
  }
  .bento-row-2 {
    grid-row: span 1;
  }
}

.magic-bento__cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  --mb-delay: 0ms;
}

.magic-bento[data-intro] .magic-bento__cell {
  opacity: 0;
  transform: translate3d(0, 16px, 0) scale(0.97);
}

.magic-bento[data-intro] .magic-bento__cell[data-state='in'] {
  opacity: 1;
  transform: none;
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1) var(--mb-delay),
    transform 760ms var(--mb-spring) var(--mb-delay);
}

.magic-bento__card {
  position: relative;
  box-sizing: border-box;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 170px;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--mb-radius);
  background: var(--mb-surface);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--mb-shadow);
  color: var(--mb-ink);
  isolation: isolate;
  outline: none;
  cursor: pointer;
  transform: perspective(900px) translate3d(var(--mb-tx, 0px), var(--mb-ty, 0px), 0) rotateX(var(--mb-rx, 0deg))
    rotateY(var(--mb-ry, 0deg)) scale(var(--mb-press, 1));
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.magic-bento__card:hover {
  background: rgba(18, 30, 58, 0.88);
}

.magic-bento__light {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(
    var(--mb-spot-size) circle at var(--mb-x, -999px) var(--mb-y, -999px),
    rgba(var(--mb-glow-rgb), calc(var(--mb-spot-alpha) * var(--mb-hot, 0) * 1)) 0%,
    rgba(var(--mb-glow-rgb), calc(var(--mb-spot-alpha) * var(--mb-hot, 0) * 0.84)) 30%,
    rgba(var(--mb-glow-rgb), calc(var(--mb-spot-alpha) * var(--mb-hot, 0) * 0.45)) 60%,
    rgba(var(--mb-glow-rgb), 0) 100%
  );
  pointer-events: none;
}

.magic-bento__rim {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--mb-edge),
    inset 0 1px 0 var(--mb-highlight);
  pointer-events: none;
}

.magic-bento__border {
  position: absolute;
  inset: 0;
  z-index: 4;
  box-sizing: border-box;
  padding: 1px;
  border-radius: inherit;
  background:
    radial-gradient(
      var(--mb-border-size) circle at var(--mb-x, -999px) var(--mb-y, -999px),
      rgba(var(--mb-glow-rgb), calc(var(--mb-glow-alpha) * var(--mb-near, 0) * 1)) 0%,
      rgba(var(--mb-glow-rgb), calc(var(--mb-glow-alpha) * var(--mb-near, 0) * 0.6)) 40%,
      rgba(var(--mb-glow-rgb), 0) 100%
    ),
    radial-gradient(
      circle at var(--mb-wx, -999px) var(--mb-wy, -999px),
      rgba(var(--mb-glow-rgb), 0) calc(var(--mb-wr, 0px) - 90px),
      rgba(var(--mb-glow-rgb), calc(var(--mb-glow-alpha) * var(--mb-wa, 0) * 0.8)) calc(var(--mb-wr, 0px) - 20px),
      rgba(var(--mb-glow-rgb), 0) var(--mb-wr, 0px)
    );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
  pointer-events: none;
}

.magic-bento__content {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: var(--mb-pad);
}

.magic-bento__header {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.magic-bento__icon-badge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.magic-bento__label {
  font-size: 0.8125rem;
  color: var(--text-bright);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.magic-bento__metric-block {
  margin: 4px 0;
}

.magic-bento__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

/* Jika ukuran laptop tidak muat 4 box dalam 1 baris, buat 2 atas 2 bawah */
@media (max-width: 1140px) {
  .diagnostics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* ==========================================================================
   MOBILE HP (<= 640px): REVERTED 4-BARIS OBLONG PILL DASHBOARD
   PC (> 640px): MAGIC BENTO INTERACTIVE GRID DASHBOARD
   ========================================================================== */
@media (max-width: 640px) {
  .magic-bento,
  .diagnostics-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .magic-bento__cell {
    width: 100% !important;
    margin: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  /* Susunan 4 baris lonjong sesuai versi reverted (Cell 5 & 6 disembunyikan di HP) */
  .magic-bento__cell:nth-child(1) { order: 1 !important; } /* Server */
  .magic-bento__cell:nth-child(2) { order: 2 !important; } /* Network */
  .magic-bento__cell:nth-child(4) { order: 3 !important; } /* Developer */
  .magic-bento__cell:nth-child(3) { order: 4 !important; } /* Ketepatan Waktu */
  .magic-bento__cell:nth-child(n+5) { display: none !important; } /* Sembunyikan cell tambahan di HP */

  .magic-bento__card,
  .diag-card {
    min-height: unset !important;
    height: auto !important;
    border-radius: var(--radius-full) !important;
    padding: 10px 16px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    transform: none !important;
    background: var(--surface-input) !important;
    backdrop-filter: var(--glass-blur-std) !important;
    -webkit-backdrop-filter: var(--glass-blur-std) !important;
    box-shadow: var(--shadow-sm), var(--glass-inner-shadow) !important;
  }

  .magic-bento__content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0 !important;
    gap: 10px !important;
  }

  .magic-bento__header,
  .diag-card-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .diag-icon-badge,
  .magic-bento__icon-badge {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .diag-icon-badge svg,
  .magic-bento__icon-badge svg {
    width: 16px !important;
    height: 16px !important;
  }

  .diag-card-meta {
    align-items: flex-start !important;
    gap: 0 !important;
  }

  .diag-card-meta .diag-status-pill,
  .magic-bento__header .diag-status-pill {
    display: none !important;
  }

  .diag-label,
  .magic-bento__label {
    font-size: 0.8125rem !important;
    color: var(--text-bright) !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .diag-metric-main,
  .magic-bento__metric-block {
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  .diag-metric-value {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: var(--accent-emerald) !important;
  }

  #serverMetricValue {
    color: #34D399 !important;
  }

  #networkTypeValue {
    color: #38BDF8 !important;
  }

  #publicIpValue {
    color: #A78BFA !important;
    font-size: 0.8125rem !important;
  }

  /* Sembunyikan rincian teknis sekunder di handphone */
  .diag-data-row,
  .diag-subtext,
  .magic-bento__text,
  .magic-bento__rim,
  .magic-bento__border,
  .magic-bento__light,
  .battery-meter-track {
    display: none !important;
  }

  /* Card 4 (Ketertiban / Ketepatan Waktu) simpel lonjong di handphone */
  .diag-card-circle,
  .magic-bento__card.diag-card-circle {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .diag-card-circle .circle-progress-wrapper {
    margin: 0 !important;
  }

  .diag-card-circle .circle-chart {
    display: none !important;
  }

  .diag-card-circle .circle-chart-center {
    position: static !important;
  }

  .diag-card-circle .circle-percent-number {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #34D399 !important;
    background: var(--accent-emerald-subtle) !important;
    border: 1px solid var(--accent-emerald) !important;
    padding: 3px 12px !important;
    border-radius: var(--radius-full) !important;
  }

  .diag-card-circle .circle-details-breakdown {
    display: none !important;
  }
}

.diag-card {
  background: var(--surface-input);
  backdrop-filter: var(--glass-blur-std);
  -webkit-backdrop-filter: var(--glass-blur-std);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm), var(--glass-inner-shadow);
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.diag-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-card);
}

.diag-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.diag-icon-badge {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-secondary);
  border: 1px solid var(--border-hover);
  color: var(--accent-cyan-light);
  flex-shrink: 0;
}

.diag-icon-badge svg {
  width: 18px;
  height: 18px;
}

.badge-server {
  color: var(--accent-cyan-light);
}

.badge-battery {
  color: var(--accent-emerald);
}

.badge-network {
  color: var(--accent-cyan-light);
}

.badge-ip {
  color: #A78BFA;
}

.badge-circle {
  color: #FBBF24;
}

.diag-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.diag-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.diag-status-pill {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-secondary);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-online {
  background: var(--accent-emerald-subtle);
  border: 1px solid var(--accent-emerald);
  color: #34D399;
}

.pill-offline {
  background: var(--accent-rose-subtle);
  border: 1px solid var(--accent-rose);
  color: #F87171;
}

.pill-charging {
  background: var(--accent-emerald-subtle);
  color: #34D399;
}

.diag-metric-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  margin: 6px 0 2px 0;
}

.diag-metric-value {
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diag-ip-text {
  font-size: clamp(0.95rem, 1.3vw, 1.25rem);
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Battery Meter Bar */
.battery-meter-track {
  width: 100%;
  height: 6px;
  background: var(--accent-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 4px 0;
}

.battery-meter-fill {
  height: 100%;
  background: var(--accent-emerald);
  border-radius: var(--radius-full);
  transition: width 300ms ease, background 300ms ease;
}

.battery-meter-fill.low {
  background: var(--accent-rose);
}

.battery-meter-fill.medium {
  background: var(--accent-amber);
}

.diag-data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.diag-row-label {
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.diag-row-value {
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.diag-subtext {
  font-size: 0.75rem;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Circle Progress Bar (Donut Chart - Enlarged & Percentage Only) */
.circle-progress-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
}

.circle-chart {
  transform: rotate(-90deg);
  width: 104px;
  height: 104px;
}

.circle-chart-bg {
  stroke: var(--accent-secondary);
}

.circle-chart-fill {
  stroke: var(--accent-emerald);
  stroke-linecap: round;
  transition: stroke-dashoffset 600ms cubic-bezier(0.16, 1, 0.3, 1), stroke 300ms ease;
}

.circle-chart-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.circle-percent-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1;
  white-space: nowrap;
}

.circle-details-breakdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.dot-legend {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-timely {
  background: var(--accent-emerald);
}

.dot-late {
  background: var(--accent-rose);
}

/* Toolbar */
.explorer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  background: rgba(14, 24, 46, 0.55);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm), var(--glass-inner-shadow);
  padding: 10px 16px;
  min-width: 0;
}

.toolbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 240px;
  min-width: 140px;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
  width: 15px;
  height: 15px;
}

.search-box input {
  font-family: inherit;
  font-size: 0.8125rem;
  min-height: 40px;
  padding: 0 10px 0 32px;
  width: 100% !important;
  min-width: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface-input);
  color: var(--text-bright);
  transition: border-color var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--accent-cyan-light);
}

.select-wrapper {
  position: relative;
  flex: 0 0 auto;
  min-width: 150px;
}

.select-wrapper select {
  font-family: inherit;
  font-size: 0.8125rem;
  min-height: 40px;
  padding: 0 10px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface-input);
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-wrapper select option {
  background-color: #0F172A;
  color: var(--text-main);
}

/* ==========================================================================
   REACT BITS: COUNTER COMPONENT (ROLLING DIGIT COUNTDOWN ENGINE)
   ========================================================================== */
.counter-box {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.counter-digit-wrap {
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 1.25em;
  width: 0.65em;
  text-align: center;
  vertical-align: middle;
}

.counter-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1);
  will-change: transform;
}

.counter-numeral {
  height: 1.25em;
  line-height: 1.25em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.counter-sep {
  display: inline-block;
  opacity: 0.85;
  margin: 0 1px;
  font-weight: 700;
}

/* ==========================================================================
   REACT BITS: CARD SWAP COMPONENT (DAFTAR TUGAS 3D STACK)
   ========================================================================== */
.tasks-cardswap-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 480px;
  margin: 8px auto 24px auto;
}

.card-swap {
  position: relative;
  width: 100%;
  max-width: 680px;
  min-height: 420px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-swap-stage {
  position: relative;
  width: 100%;
  height: 400px;
  perspective: 1000px;
  margin: 0 auto;
}

.card-swap-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 460px);
  min-height: 320px;
  margin: -160px 0 0 -230px;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.8), 0 10px 24px -12px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: opacity 0.25s ease;
}

@media (max-width: 520px) {
  .card-swap-slot {
    width: calc(100% - 24px);
    margin-left: calc((100% - 24px) / -2);
    min-height: 300px;
    margin-top: -150px;
  }
}

.card-swap:focus-visible .card-swap-slot[data-front] {
  outline: 2px solid var(--accent-cyan-light);
  outline-offset: 3px;
}

.card-swap-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: #000000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
}

/* Card Outer Shell (Matches User Screenshot) */
.assignment-card,
.card-swap-card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  background: rgba(11, 19, 43, 0.95);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 10px 30px -10px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Top Outline Status Indicators (matches screenshot) */
.assignment-card.card-outline-red,
.card-swap-card.card-outline-red {
  border-top: 3.5px solid #EF4444 !important;
  box-shadow: 0 -3px 14px rgba(239, 68, 68, 0.25), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.assignment-card.card-outline-yellow,
.card-swap-card.card-outline-yellow {
  border-top: 3.5px solid #F59E0B !important;
  box-shadow: 0 -3px 14px rgba(245, 158, 11, 0.25), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.assignment-card.card-outline-green,
.card-swap-card.card-outline-green {
  border-top: 3.5px solid #10B981 !important;
  box-shadow: 0 -3px 14px rgba(16, 185, 129, 0.28), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.assignment-card .card-top-row,
.card-swap-card .card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assignment-card .subject-badge,
.card-swap-card .subject-badge {
  font-size: 0.71875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 12px;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.65);
  color: #38bdf8;
  white-space: nowrap;
}

.assignment-card .status-badge,
.card-swap-card .status-badge {
  font-size: 0.71875rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.assignment-card .badge-active,
.card-swap-card .badge-active {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.7);
  color: #34D399;
}

.assignment-card .badge-closed,
.card-swap-card .badge-closed {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.7);
  color: #F87171;
}

.assignment-card .badge-late-allowed,
.card-swap-card .badge-late-allowed {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.7);
  color: #FBBF24;
}

.assignment-card .assignment-title,
.card-swap-card .assignment-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin: 2px 0 0 0;
  letter-spacing: -0.01em;
}

.assignment-card .assignment-desc,
.card-swap-card .assignment-desc {
  font-size: 0.84375rem;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0;
}

/* Deadline Status Box (Matches Screenshot) */
.assignment-card .deadline-row,
.card-swap-card .deadline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: #FFFFFF;
  background: rgba(15, 23, 42, 0.75);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.assignment-card .deadline-row.deadline-past,
.card-swap-card .deadline-row.deadline-past {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.08);
}

.assignment-card .deadline-icon,
.card-swap-card .deadline-icon {
  color: #E2E8F0;
  flex-shrink: 0;
}

.assignment-card .deadline-row.deadline-past .deadline-icon,
.card-swap-card .deadline-row.deadline-past .deadline-icon {
  color: #F87171;
}

.assignment-card .deadline-label,
.card-swap-card .deadline-label {
  font-weight: 700;
  color: #FFFFFF;
}

.assignment-card .deadline-countdown-text,
.card-swap-card .deadline-countdown-text {
  font-weight: 700;
  color: #FFFFFF;
}

.assignment-card .deadline-countdown-text.deadline-expired,
.card-swap-card .deadline-countdown-text.deadline-expired {
  color: #F87171;
}

/* Policy Note */
.assignment-card .policy-note,
.card-swap-card .policy-note {
  font-size: 0.78125rem;
  color: #64748B;
  margin: 0;
  line-height: 1.4;
}

/* Card Footer Actions (Matches Screenshot) */
.assignment-card .card-footer-actions,
.card-swap-card .card-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.assignment-card .submission-count-tag,
.card-swap-card .submission-count-tag {
  font-size: 0.84375rem;
  font-weight: 500;
  color: #94A3B8;
}

.assignment-card .btn-submit-task,
.card-swap-card .btn-submit-task {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 8px 22px !important;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.assignment-card .btn-submit-task:hover,
.card-swap-card .btn-submit-task:hover {
  background: #1D4ED8 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.assignment-card .btn-submit-task:active,
.card-swap-card .btn-submit-task:active {
  transform: translateY(0);
}

.assignment-card .btn-view-submissions,
.card-swap-card .btn-view-submissions {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  padding: 7px 16px !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.assignment-card .btn-delete-assignment,
.card-swap-card .btn-delete-assignment {
  border-radius: 12px !important;
  padding: 7px 12px !important;
}

/* CardSwap Navigation Bar */
.card-swap-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 6px 14px;
  background: rgba(16, 28, 60, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-swap-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-bright);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.card-swap-nav-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  transform: scale(1.05);
}

.card-swap-counter-indicator {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: center;
}

/* Assignments Grid */
.assignments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .assignment-card:hover {
    background: rgba(15, 25, 55, 0.98);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }

  .assignment-card.card-outline-red:hover {
    border-top-color: #EF4444 !important;
  }

  .assignment-card.card-outline-yellow:hover {
    border-top-color: #F59E0B !important;
  }

  .assignment-card.card-outline-green:hover {
    border-top-color: #10B981 !important;
  }
}

/* Avatar 1:1 Cropper Modal */
.avatar-crop-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.avatar-crop-viewport {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0B1120;
  border: 1px solid var(--border-default);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.avatar-crop-viewport:active {
  cursor: grabbing;
}

#avatarCropCanvas {
  display: block;
  width: 280px;
  height: 280px;
}

.avatar-crop-circle-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(11, 17, 32, 0.65);
  border: 2px dashed rgba(56, 189, 248, 0.8);
}

.avatar-crop-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crop-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crop-control-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.crop-zoom-slider {
  flex: 1;
  accent-color: var(--accent-cyan-light);
  cursor: pointer;
}

.crop-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* Modal Bottom Timestamp */
.submit-modal-bottom-timestamp {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 8px 12px;
  background: var(--surface-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-top: 14px;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.subject-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: var(--accent-secondary);
  border: 1px solid var(--border-hover);
  color: var(--accent-cyan-light);
  white-space: nowrap;
  flex-shrink: 0;
}

.assignment-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.35;
}

.assignment-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deadline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-main);
  background: var(--surface-input);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.deadline-icon {
  color: var(--accent-amber);
  flex-shrink: 0;
}

.deadline-row.deadline-past {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.05);
}

.deadline-row.deadline-past .deadline-icon {
  color: var(--accent-red);
}

.deadline-countdown-text {
  font-family: var(--font-mono, monospace);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-amber);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.deadline-countdown-text.deadline-expired {
  color: var(--accent-red);
}

.status-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-active {
  background: var(--accent-emerald-subtle);
  border: 1px solid var(--accent-emerald);
  color: #34D399;
}

.badge-closed {
  background: var(--accent-rose-subtle);
  border: 1px solid var(--accent-rose);
  color: #F87171;
}

.badge-late-allowed {
  background: var(--accent-amber-subtle);
  border: 1px solid var(--accent-amber);
  color: #FBBF24;
}

/* Grade & Score Badges */
.badge-grade-scored {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34D399;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.badge-grade-pending {
  background: rgba(148, 163, 184, 0.1);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.badge-task-grade {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.5);
  color: #38BDF8;
  white-space: nowrap;
}

.badge-task-grade.badge-task-grade-pending {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.3);
  color: #94A3B8;
}

.submission-grade-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.submission-grade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.submission-grade-title {
  font-size: 0.84375rem;
  font-weight: 600;
  color: #94A3B8;
}

.submission-grade-val {
  font-size: 1.125rem;
  font-weight: 700;
  color: #34D399;
  font-family: var(--font-mono);
}

.policy-note {
  font-size: 0.75rem;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: nowrap;
}

.submission-count-tag {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Modals & Forms (Popups Centered on Screen, Zero White Corner Artifacts) */
dialog,
dialog.glass-modal {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: auto;
  color: inherit;
  overflow: visible !important;
}

dialog:focus,
dialog:focus-visible,
dialog.glass-modal:focus,
dialog.glass-modal:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.glass-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  border: none !important;
  background: transparent !important;
  padding: 16px;
  max-width: 560px;
  width: 92%;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-modal:not([open]) {
  display: none !important;
}

.glass-modal::backdrop {
  background: rgba(3, 6, 14, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.glass-modal.modal-large {
  max-width: 880px;
}

/* Glass Confirm & Alert Dialog (Mild Blur Glass UI) */
.glass-confirm-dialog {
  max-width: 440px !important;
  width: 92% !important;
  z-index: 1000 !important;
}

.glass-confirm-dialog::backdrop {
  background: rgba(3, 7, 18, 0.45) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
}

.confirm-dialog-content {
  background: rgba(13, 22, 42, 0.92) !important;
  backdrop-filter: blur(8px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(125%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px !important;
  padding: 22px 20px 18px !important;
  box-shadow:
    0 24px 48px -12px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  gap: 16px !important;
  max-height: 90vh !important;
  animation: confirmDialogEnter 180ms cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes confirmDialogEnter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-dialog-body {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.confirm-dialog-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.confirm-dialog-icon-wrap.type-danger {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #F87171;
}

.confirm-dialog-icon-wrap.type-warning {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FBBF24;
}

.confirm-dialog-icon-wrap.type-info {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38BDF8;
}

.confirm-dialog-texts {
  flex: 1;
  min-width: 0;
}

.confirm-dialog-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.confirm-dialog-message {
  font-size: 0.84375rem;
  color: #94A3B8;
  margin: 0;
  line-height: 1.5;
  word-break: break-word;
}

.confirm-dialog-input-group {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.confirm-dialog-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px !important;
  color: #FFFFFF !important;
  font-size: 0.9375rem !important;
  font-family: inherit !important;
  outline: none !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.confirm-dialog-input:focus {
  border-color: #38BDF8 !important;
  background: rgba(15, 23, 42, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.35) !important;
}

.confirm-dialog-input::placeholder {
  color: #64748B !important;
}

.confirm-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.confirm-btn-cancel {
  border-radius: 10px !important;
  font-size: 0.84375rem !important;
  font-weight: 500 !important;
  padding: 8px 16px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.confirm-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
}

.confirm-btn-ok {
  border-radius: 10px !important;
  font-size: 0.84375rem !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.confirm-btn-ok.btn-danger {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border: none !important;
}

.confirm-btn-ok.btn-danger:hover {
  background: #B91C1C !important;
}

.confirm-btn-ok.btn-primary {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border: none !important;
}

.confirm-btn-ok.btn-primary:hover {
  background: #1D4ED8 !important;
}

.confirm-btn-ok.btn-warning {
  background: #D97706 !important;
  color: #FFFFFF !important;
  border: none !important;
}

.confirm-btn-ok.btn-warning:hover {
  background: #B45309 !important;
}

.glass-modal[open] .modal-content {
  animation: modalEnter 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.modal-content {
  background: var(--surface-modal);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg), var(--glass-inner-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 88vh;
  max-height: 88dvh;
  width: 100%;
  overflow-y: auto;
  background-clip: padding-box;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-bright);
}

.modal-subtitle {
  font-size: 0.8125rem;
  color: var(--accent-cyan-light);
  margin-top: 2px;
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: var(--border-hover);
  color: var(--text-bright);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group select,
.modal-select,
.modal-textarea {
  font-family: inherit;
  font-size: 16px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--surface-input);
  backdrop-filter: var(--glass-blur-subtle);
  -webkit-backdrop-filter: var(--glass-blur-subtle);
  color: var(--text-bright);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.modal-select:focus,
.modal-textarea:focus {
  border-color: var(--accent-cyan-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  outline: none;
}

.form-group select option {
  background: #0F172A;
  color: var(--text-main);
}

.modal-textarea {
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
  min-height: 88px;
}

/* ==========================================================================
   Generic Themed Form Controls (usable outside .form-group)
   ========================================================================== */

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--surface-input);
  backdrop-filter: var(--glass-blur-subtle);
  -webkit-backdrop-filter: var(--glass-blur-subtle);
  color: var(--text-bright);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent-cyan-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.form-textarea {
  resize: vertical;
  line-height: 1.5;
  min-height: 88px;
}

.form-select {
  cursor: pointer;
}

.form-select option {
  background: #0F172A;
  color: var(--text-main);
}

.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.readonly-input {
  opacity: 0.8;
  background: var(--accent-secondary);
}

/* Existing Submission Preview Box */
.existing-sub-preview-box {
  background: var(--surface-input);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.existing-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.existing-sub-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-secondary);
  color: var(--accent-cyan-light);
  border: 1px solid var(--border-hover);
  text-transform: uppercase;
}

.existing-sub-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.existing-sub-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.existing-files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.existing-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.existing-sub-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-bright);
}

.existing-sub-file-info strong {
  display: block;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan-light);
  word-break: break-all;
}

.existing-sub-file-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.existing-sub-notice {
  font-size: 0.75rem;
  color: var(--accent-amber);
  margin: 0;
  line-height: 1.4;
}

/* Strikethrough and Edited Badge for Re-submissions */
.strikethrough-time {
  text-decoration: line-through;
  font-style: italic;
  color: var(--text-subtle);
  display: block;
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.badge-edited {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid #F59E0B;
  color: #FBBF24;
  text-transform: uppercase;
  margin-left: 4px;
}

.assignment-instruction-box {
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.instruction-heading {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.instruction-body {
  font-size: 0.875rem;
  color: var(--text-main);
  white-space: pre-wrap;
}

.deadline-indicator-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: clamp(0.6875rem, 0.85vw, 0.75rem);
  color: var(--accent-amber);
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
}

.deadline-indicator-badge span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.late-policy-tag {
  background: var(--accent-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

/* Alert Boxes */
.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.alert-box strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.alert-box p {
  font-size: 0.8125rem;
  line-height: 1.4;
  margin: 0;
}

.alert-closed {
  background: var(--accent-rose-subtle);
  border: 1px solid var(--accent-rose);
  color: #FECACA;
}

.alert-late-warn {
  background: var(--accent-amber-subtle);
  border: 1px solid var(--accent-amber);
  color: #FEF3C7;
}

/* File Dropzone */
.file-dropzone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface-input);
  transition: border-color var(--transition-fast);
}

.file-dropzone.drag-over {
  border-color: var(--accent-cyan-light);
  background: var(--surface-card);
}

.dropzone-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.selected-file-display {
  font-size: 0.75rem;
  color: var(--accent-cyan-light);
  font-weight: 600;
  word-break: break-all;
}

/* Multi-file selection list inside dropzone */
.selected-files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 6px;
  padding: 4px;
}

.selected-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.8125rem;
  text-align: left;
}

.selected-file-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.selected-file-name {
  font-family: var(--font-mono);
  color: var(--accent-cyan-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8125rem;
}

.selected-file-size {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.btn-remove-selected-file {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}

.btn-remove-selected-file:hover {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.15);
}

/* Multi-file preview stack in tables */
.submission-files-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 240px;
}

.btn-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  max-width: 100%;
  text-align: left;
}

.btn-file-pill:hover {
  border-color: var(--accent-cyan-light);
  background: var(--surface-hover);
  color: #fff;
}

.file-pill-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.file-pill-size {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-left: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

/* Submissions Table with Horizontal Scroll Support on Mobile */
.submissions-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-table);
  backdrop-filter: var(--glass-blur-std);
  -webkit-backdrop-filter: var(--glass-blur-std);
  box-shadow: var(--shadow-sm), var(--glass-inner-shadow);
  width: 100%;
}

.file-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  text-align: left;
}

.file-table th {
  padding: 12px 14px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-sidebar);
}

.file-table td {
  padding: 12px 14px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.file-table tr:hover td {
  background: var(--surface-card);
  color: var(--text-main);
}

.tag-status-late {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--accent-rose-subtle);
  border: 1px solid var(--accent-rose);
  color: #F87171;
}

.tag-status-timely {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--accent-emerald-subtle);
  border: 1px solid var(--accent-emerald);
  color: #34D399;
}

.code-password-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--accent-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan-light);
  letter-spacing: 0.05em;
}

/* UI State Containers */
.ui-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 340px;
  padding: 32px 16px;
}

.state-icon-box {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  color: var(--accent-cyan-light);
  margin-bottom: 20px;
}

.state-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.state-desc {
  max-width: 440px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.state-actions {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 12px);
  flex-wrap: nowrap;
  justify-content: center;
}

/* App & Author Credit */
.sidebar-credit {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.sidebar-credit strong {
  color: var(--accent-cyan-light);
  font-weight: 600;
}

.auth-credit-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: -4px;
}

.auth-credit-note strong {
  color: var(--accent-cyan-light);
  font-weight: 600;
}

/* Toast Notifications: Always on very top of everything (z-index 2147483647) */
.toast-container,
.dialog-toast-box {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  left: auto !important;
  z-index: 2147483647 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  pointer-events: none !important;
}

.toast {
  pointer-events: auto !important;
  min-width: 280px !important;
  max-width: 440px !important;
  padding: 13px 18px !important;
  background: rgba(17, 24, 39, 0.96) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
  font-size: 0.875rem !important;
  color: var(--text-bright) !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  animation: slideIn 180ms ease-out !important;
  z-index: 2147483647 !important;
}

.toast-success {
  border-left: 5px solid var(--accent-emerald) !important;
}

.toast-error {
  border-left: 5px solid var(--accent-rose) !important;
}

.toast-warning {
  border-left: 5px solid #F59E0B !important;
}

.toast-info {
  border-left: 5px solid var(--accent-cyan-light) !important;
}

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

/* Utilities */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Mobile Responsive Rules (Thumb-Friendly, Clean No-Wrap Layouts)
   ========================================================================== */
@media (max-width: 840px) {
  /* Header Adjustments */
  .glass-header {
    padding: 10px 14px;
    gap: 8px;
  }

  .brand-title {
    font-size: 1.0625rem;
  }

  .brand-badge {
    display: none;
  }

  .mobile-menu-toggle-btn {
    display: inline-flex;
  }

  /* Slide-in Mobile Navigation Drawer for Sidebar (Physical Pull Drawer Feel) */
  .glass-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 86vw;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.55);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 16px;
    gap: 20px;
    will-change: transform;
  }

  .glass-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-mobile-header {
    display: flex;
  }

  .glass-main {
    padding: 14px 12px;
    gap: 14px;
  }

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

  #tasksViewPage {
    padding: 12px 10px;
    border-radius: var(--radius-md);
  }

  .assignments-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  /* Toolbar stack on tablet and mobile to prevent text squishing */
  .explorer-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .toolbar-left {
    width: 100%;
  }

  .toolbar-right {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }

  .search-box {
    flex: 1 1 auto;
    max-width: 100%;
    min-width: 0;
  }

  .select-wrapper {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 150px;
  }
}

@media (max-width: 640px) {
  /* Modals Centered on Screen for Mobile Devices */
  .glass-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    width: 94%;
    max-width: 480px;
    padding: 10px;
  }

  .modal-content {
    border-radius: var(--radius-lg);
    max-height: 86vh;
    max-height: 86dvh;
    padding: 18px 14px;
    border: 1px solid var(--border-default);
  }

  /* Table padding in modals on mobile */
  .file-table {
    min-width: 520px;
  }

  .file-table th {
    padding: 10px 8px;
    font-size: 0.625rem;
  }

  .file-table td {
    padding: 10px 8px;
    font-size: 0.8125rem;
  }

  /* Khusus Riwayat Tugas di Ponsel: Menempel di Bagian Bawah Layar & Animasi Slide ke Atas */
  #taskHistoryModal {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #taskHistoryModal[open] .modal-content {
    animation: historySheetSlideUp 260ms cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }

  #taskHistoryModal .modal-content {
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    max-height: 86vh !important;
    max-height: 86dvh !important;
    padding: 18px 14px 24px 14px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  @keyframes historySheetSlideUp {
    from {
      opacity: 0.5;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
  }

  .modal-footer .btn {
    flex: 1 1 auto;
    white-space: nowrap;
    min-height: 44px;
    font-size: 0.8125rem;
    padding: 0 10px;
  }

  .card-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .card-footer-actions .btn {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.8125rem;
  }

  .toast-container,
  .dialog-toast-box {
    left: 14px !important;
    right: 14px !important;
    bottom: 14px !important;
    z-index: 2147483647 !important;
  }

  .toast {
    min-width: 100% !important;
    max-width: 100% !important;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .auth-continue-btn {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Global Auto-Refresh Loading Bar (bawah layar, gelap)
   ========================================================================== */
#globalRefreshBar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.6);
  z-index: 170;
  pointer-events: none;
  overflow: hidden;
}

#globalRefreshBarFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0b1220, #334155 70%, #0b1220);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.06);
}

@media (prefers-reduced-motion: reduce) {
  #globalRefreshBar {
    height: 3px;
  }
}

/* ==========================================================================
   Global Loading Overlay & Processing Screen
   ========================================================================== */
.global-loading-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  background: rgba(7, 10, 18, 0.88) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px;
  pointer-events: auto !important;
}

.global-loading-overlay.hidden {
  display: none !important;
}

.loading-modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface-modal);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  box-shadow: var(--shadow-lg), 0 0 35px rgba(56, 189, 248, 0.28);
  animation: modalEnter 220ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loading-spinner-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-cyan-light);
  border-right-color: var(--accent-primary);
  animation: spin 0.75s linear infinite;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
}

.loading-content-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.loading-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
}

.loading-message {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.loading-progress-bar-container {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 8px;
}

.loading-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38BDF8, #10B981);
  border-radius: 9999px;
  transition: width 0.2s ease;
}

.loading-progress-percent-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan-light);
  margin-top: 4px;
}

/* ==========================================================================
   Halaman Kustomisasi Data (Khusus Guru)
   ========================================================================== */
.customize-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.customize-tabs::-webkit-scrollbar {
  display: none;
}
.customize-tab-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms ease, background 120ms ease;
}
.customize-tab-btn:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.07);
}
.customize-tab-btn.active {
  color: var(--accent-cyan-light);
  border-bottom: 2px solid var(--accent-cyan-light);
  background: rgba(56, 189, 248, 0.10);
}
.customize-tab-panel {
  display: none;
}
.customize-tab-panel.active {
  display: block;
}
.customize-toolbar-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.customize-toolbar-row input[type="text"] {
  flex: 1 1 220px;
  min-width: 160px;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}
.customize-info-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan-light);
  margin-left: 10px;
}

/* Pengaturan Server */
.customize-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .customize-settings-grid {
    grid-template-columns: 1fr;
  }
  .customize-tabs {
    gap: 4px;
  }
  .customize-tab-btn {
    padding: 8px 12px;
    font-size: 0.8125rem;
  }
}
.settings-card {
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.settings-card h4 {
  margin: 0 0 12px 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.settings-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.settings-table td:first-child {
  color: var(--text-muted);
  width: 40%;
}
.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.settings-note {
  margin: 8px 0 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Fix Image 1: Deadline Expired Text Typography */
.deadline-countdown-text.deadline-expired,
.assignment-card .deadline-countdown-text.deadline-expired,
.card-swap-card .deadline-countdown-text.deadline-expired {
  font-family: inherit !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
  color: #F87171 !important;
}

/* Fix Image 2: Mobile / Tablet Screen Hides Dashboard Server DB Card */
@media (max-width: 840px) {
  #dashboardServerDbCell {
    display: none !important;
  }
}

/* ==========================================================================
   QUIZ & EXAM MAKER STYLES (GOOGLE FORMS STYLE + ANTI-CHEAT RUNNER)
   ========================================================================== */

/* Quizzes Grid */
.quizzes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.quiz-card {
  background: #090D16 !important;
  border: 1.5px solid rgba(56, 189, 248, 0.42) !important;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
}

.quiz-card:hover {
  transform: translateY(-3px);
  border-color: #38BDF8 !important;
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.22), 0 14px 34px rgba(0, 0, 0, 0.6);
}

.quiz-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.quiz-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.quiz-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 16px 0;
  flex-grow: 1;
}

.quiz-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 10px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.quiz-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiz-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Quiz Maker Dialog */
.quiz-maker-dialog {
  max-width: 900px;
  width: 94vw;
  max-height: 92vh;
  padding: 0;
}

.quiz-maker-content {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  padding: 0;
}

.quiz-maker-scrollable {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-meta-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--accent-indigo);
  border-radius: var(--radius-md);
  padding: 20px;
}

.quiz-title-input {
  font-size: 1.15rem;
  font-weight: 700;
}

.quiz-toggles-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Maker Question Card (Google Forms Style) */
.maker-questions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.maker-question-card {
  background: #090D16 !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  position: relative;
}

.maker-question-card:focus-within,
.maker-question-card:hover {
  border-color: #38BDF8 !important;
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.18), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.maker-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.maker-q-badge {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
}

.maker-q-type-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  font-size: 0.8125rem;
  padding: 6px 12px;
  border-radius: 6px;
}

.maker-q-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text-bright);
  font-size: 0.9375rem;
  resize: vertical;
  min-height: 60px;
  margin-bottom: 14px;
}

.maker-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.maker-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.maker-option-key-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.15s ease;
}

.maker-option-key-btn.is-correct {
  color: #10B981;
}

.maker-option-input {
  flex: 1 1 auto;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-bright);
  font-size: 0.875rem;
}

.maker-btn-remove-opt {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.maker-btn-remove-opt:hover {
  color: var(--accent-rose);
}

.maker-add-opt-btn {
  background: none;
  border: 1px dashed var(--border-subtle);
  color: var(--accent-cyan);
  font-size: 0.8125rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 4px;
}

.maker-add-opt-btn:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--accent-cyan);
}

.maker-question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: 12px;
  font-size: 0.8125rem;
}

.maker-points-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.maker-points-input {
  width: 70px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-bright);
  text-align: center;
  font-weight: 700;
}

.maker-add-bar {
  margin: 10px 0;
}

.quiz-maker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   QUIZ RUNNER (FULLSCREEN & ANTI-CHEAT EXAM MODE)
   ========================================================================== */
.quiz-runner-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #0B0F17 !important;
  border: none !important;
  z-index: 99999 !important;
  box-shadow: none !important;
}

.runner-screen-wrap {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #0B0F17;
  color: #F3F4F6;
}

.runner-header {
  height: 64px;
  min-height: 64px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  z-index: 10;
}

.runner-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.runner-exam-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
}

.runner-exam-student {
  font-size: 0.75rem;
  color: #9CA3AF;
  display: block;
}

.runner-timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 6px 14px;
  border-radius: 8px;
  color: #F87171;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.fs-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Violation Alert Banner */
.runner-violation-banner {
  background: rgba(239, 68, 68, 0.95);
  color: #FFFFFF;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5);
  animation: shakeAlert 0.4s ease-in-out;
  z-index: 20;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.violation-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.violation-content strong {
  display: block;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}

.violation-content p {
  margin: 2px 0 0 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.9);
}

.runner-scroll-container {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  justify-content: center;
}

.runner-inner-content {
  width: 100%;
  max-width: 800px;
}

.runner-instructions-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.runner-instructions-card h4 {
  margin: 0 0 6px 0;
  font-size: 0.9375rem;
  color: #60A5FA;
}

.runner-instructions-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: #CBD5E1;
  line-height: 1.5;
}

.runner-questions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.runner-question-card {
  background: #090D16 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.runner-q-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.runner-q-num {
  background: rgba(99, 102, 241, 0.2);
  color: #A5B4FC;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.runner-q-text {
  font-size: 1rem;
  font-weight: 600;
  color: #F9FAFB;
  line-height: 1.5;
  margin: 0;
  flex: 1 1 auto;
}

.runner-q-points {
  font-size: 0.75rem;
  color: #9CA3AF;
  white-space: nowrap;
}

.runner-opt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.runner-opt-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9375rem;
  color: #E5E7EB;
}

.runner-opt-label:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.runner-opt-label.selected {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818CF8;
}

.runner-text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px 14px;
  color: #FFFFFF;
  font-size: 0.9375rem;
  resize: vertical;
}

.runner-footer {
  height: 68px;
  min-height: 68px;
  background: rgba(17, 24, 39, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  z-index: 10;
}

.runner-progress-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  color: #9CA3AF;
  min-width: 180px;
}

.runner-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.runner-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366F1, #10B981);
  transition: width 0.3s ease;
}

/* ==========================================================================
   LIVE SESSION MONITOR (ADMIN/GURU REAL-TIME RED ALERT SYSTEM)
   ========================================================================== */
.session-monitor-dialog {
  max-width: 1000px;
  width: 95vw;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #F87171;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.05em;
}

.pulse-red-dot {
  width: 8px;
  height: 8px;
  background: #EF4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #EF4444;
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

.monitor-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.monitor-summary-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.stat-pill-num {
  font-weight: 700;
  color: var(--text-bright);
}

.stat-pill-warning .stat-pill-num {
  color: #EF4444;
}

.stat-pill-success .stat-pill-num {
  color: #10B981;
}

.monitor-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

.monitor-student-card {
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
}

/* FLASHING RED ALERT FOR FULLSCREEN / TAB EXIT VIOLATION */
.session-alert-red {
  border: 2px solid #EF4444 !important;
  background: rgba(239, 68, 68, 0.18) !important;
  animation: pulseRedAlert 1.2s infinite ease-in-out !important;
}

@keyframes pulseRedAlert {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.mon-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mon-student-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.mon-student-absen {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mon-status-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.mon-badge-ok {
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
}

.mon-badge-violation {
  background: #EF4444;
  color: #FFFFFF;
  font-weight: 800;
}

.mon-badge-done {
  background: rgba(99, 102, 241, 0.2);
  color: #A5B4FC;
}

.mon-violation-box {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #FECACA;
}

.mon-score-box {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 10px;
  font-size: 0.8125rem;
  color: #A7F3D0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Live Monitor Extra (All 16 Students & Real-Time Progress Bar) */
.mon-badge-offline {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #94A3B8 !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

.mon-badge-active {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #93C5FD !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

.monitor-student-card.is-offline {
  opacity: 0.68;
  border: 1px dashed rgba(255, 255, 255, 0.15) !important;
  background: rgba(15, 23, 42, 0.35) !important;
}

.monitor-student-card.is-active {
  border: 1px solid rgba(59, 130, 246, 0.45) !important;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12);
}

.mon-progress-box {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
}

.mon-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #CBD5E1;
  font-weight: 600;
  margin-bottom: 6px;
}

.mon-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.mon-progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.35s ease;
  background: linear-gradient(90deg, #3B82F6, #06B6D4);
}

.mon-progress-bar-fill.fill-done {
  background: #10B981 !important;
}

.mon-progress-bar-fill.fill-locked {
  background: #EF4444 !important;
}

.mon-progress-bar-fill.fill-offline {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Remedial Modal & Responsive Cards */
.remedial-students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.remedial-student-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.remedial-student-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.4);
}

.remedial-student-item.is-below-kkm {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

@media (max-width: 640px) {
  .quiz-maker-dialog,
  .session-monitor-dialog {
    width: 96vw !important;
    max-height: 94vh !important;
  }

  .quiz-maker-scrollable {
    padding: 14px 16px;
  }

  .maker-question-card {
    padding: 14px;
  }

  .maker-question-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .maker-question-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .quiz-card {
    padding: 16px;
  }

  .quiz-card-actions {
    width: 100%;
    justify-content: stretch;
  }

  .quiz-card-actions button {
    flex: 1 1 auto;
  }

  .remedial-students-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Interactive Tools for Teachers: Wheel of Names & Random Team Generator
   ========================================================================== */

.modal-extra-large {
  max-width: 1040px;
  width: 96vw;
  max-height: 94vh;
  padding: 0;
}

.class-tools-dialog {
  overflow: hidden;
}

.class-tools-content {
  display: flex;
  flex-direction: column;
  max-height: 94vh;
  height: 100%;
}

.tools-tab-bar {
  display: flex;
  gap: 8px;
  padding: 10px 24px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-default);
  overflow-x: auto;
}

.tools-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tools-tab-btn:hover {
  background: var(--surface-card);
  color: var(--text-bright);
}

.tools-tab-btn.active {
  background: var(--surface-card);
  color: var(--text-bright);
  border-color: var(--border-default);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tools-tab-panel {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px;
}

/* Tab 1: Wheel of Names Layout */
.wheel-layout-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.wheel-stage-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

.wheel-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

#wheelCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
}

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  transition: transform 0.06s ease;
}

.wheel-pointer.tick {
  transform: translateX(-50%) rotate(-12deg);
}

.wheel-center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFFFFF, #E2E8F0 60%, #94A3B8 100%);
  border: 4px solid #0F172A;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  color: #0F172A;
  cursor: pointer;
  z-index: 5;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.wheel-center-hub:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

.wheel-center-hub:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.wheel-actions-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

.wheel-options-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wheel-hint-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wheel-names-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.names-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wheel-names-textarea {
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 220px;
  resize: vertical;
}

.wheel-recent-winners-card {
  padding: 10px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}

.wheel-winners-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 80px;
  overflow-y: auto;
}

.winner-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 3px 8px;
  background: rgba(16, 185, 129, 0.15);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 9999px;
  font-weight: 600;
}

/* Tab 2: Random Team Generator Layout */
.teams-config-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.teams-config-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.radio-pill-group {
  display: flex;
  gap: 8px;
  background: var(--surface-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.radio-pill-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin: 0;
}

/* Hollow dot indicator on every pill */
.radio-pill-label::before {
  content: '';
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  border: 2px solid var(--text-muted);
  background: transparent;
  transition: all var(--transition-fast);
}

.radio-pill-label:hover {
  color: var(--text-bright);
}

.radio-pill-label input[type="radio"] {
  display: none;
}

/* Selected pill: accent cyan tint + filled glowing dot */
.radio-pill-label:has(input:checked) {
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent-cyan-light);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.55), 0 0 12px rgba(56, 189, 248, 0.15);
}

.radio-pill-label:has(input:checked)::before {
  border-color: var(--accent-cyan-light);
  background: var(--accent-cyan-light);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.65);
}

.teams-results-wrapper {
  margin-top: 10px;
}

.teams-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.team-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.team-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.team-card-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-subtle);
}

.team-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0;
}

.team-card-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
}

.team-members-list {
  padding: 14px 16px;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.team-member-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-subtle);
  border: 1px solid var(--border-default);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Winner Celebration Modal */
.wheel-winner-modal {
  max-width: 480px;
  width: 90vw;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(56, 189, 248, 0.2);
}

.winner-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.winner-modal-content {
  position: relative;
  z-index: 2;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.winner-badge-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 8px;
  animation: bounceWinner 0.8s ease infinite alternate;
}

@keyframes bounceWinner {
  from { transform: scale(0.95) translateY(0); }
  to { transform: scale(1.1) translateY(-6px); }
}

.winner-subtitle-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-cyan-light);
  margin: 0 0 6px 0;
  text-transform: uppercase;
}

.winner-name-display {
  font-size: 2rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 8px 0;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  word-break: break-word;
}

.winner-meta-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 24px 0;
}

.winner-actions-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

/* Mobile & Tablet Responsive Queries */
@media (max-width: 860px) {
  .wheel-layout-grid {
    grid-template-columns: 1fr;
  }

  .teams-config-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tools-tab-bar {
    padding: 8px 12px;
  }

  .tools-tab-btn {
    padding: 6px 12px;
    font-size: 0.8125rem;
  }

  .tools-tab-panel {
    padding: 14px 12px;
  }

  .wheel-canvas-wrapper {
    max-width: 320px;
  }

  .wheel-center-hub {
    width: 56px;
    height: 56px;
    font-size: 0.75rem;
  }

  .winner-name-display {
    font-size: 1.625rem;
  }
}

/* ==========================================================================
   QUIZ TAB LOCK OVERLAY (DISQUALIFICATION ON TAB EXIT / FOCUS LOSS)
   ========================================================================== */
.runner-tab-lock-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(10, 10, 16, 0.94) !important;
  backdrop-filter: blur(20px);
  z-index: 999999 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  animation: fadeInLock 0.3s ease-out;
}

.runner-tab-lock-overlay.hidden {
  display: none !important;
}

@keyframes fadeInLock {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.tab-lock-card {
  max-width: 540px;
  width: 100%;
  background: rgba(26, 18, 24, 0.95);
  border: 2px solid rgba(239, 68, 68, 0.7);
  box-shadow: 0 16px 48px rgba(239, 68, 68, 0.35);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  color: #FFFFFF;
}

.tab-lock-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.tab-lock-title {
  margin: 0 0 12px 0;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #EF4444;
}

.tab-lock-desc {
  margin: 0 0 16px 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #E2E8F0;
}

.tab-lock-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 6px 16px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.tab-lock-instruction-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.tab-lock-instruction-box p {
  margin: 0;
  font-size: 0.8125rem;
  color: #94A3B8;
  line-height: 1.5;
}

.tab-lock-spinner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: #CBD5E1;
}

/* ==========================================================================
   MOBILE-FRIENDLY RESPONSIVE QUIZ RUNNER & EXAM INTERFACE
   ========================================================================== */
@media (max-width: 768px) {
  .runner-header {
    height: auto !important;
    min-height: auto !important;
    padding: 10px 14px !important;
    flex-wrap: wrap;
    gap: 10px !important;
  }

  .runner-header-left {
    flex: 1 1 auto;
    min-width: 140px;
    gap: 8px !important;
  }

  .runner-exam-title {
    font-size: 0.875rem !important;
    line-height: 1.2;
  }

  .runner-exam-student {
    font-size: 0.7rem !important;
  }

  .runner-header-center {
    order: 2;
  }

  .runner-timer-box {
    padding: 4px 10px !important;
    font-size: 0.9375rem !important;
    border-radius: 6px !important;
  }

  .runner-header-right {
    order: 3;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .fs-badge {
    padding: 3px 8px !important;
    font-size: 0.7rem !important;
  }

  .runner-scroll-container {
    padding: 14px 12px !important;
  }

  .runner-question-card {
    padding: 14px 14px !important;
    border-radius: 10px !important;
  }

  .runner-q-num {
    font-size: 0.75rem !important;
    padding: 3px 7px !important;
  }

  .runner-q-text {
    font-size: 0.9375rem !important;
    line-height: 1.45 !important;
  }

  .runner-opt-label {
    min-height: 48px !important;
    padding: 12px 14px !important;
    font-size: 0.875rem !important;
    border-radius: 8px !important;
    gap: 10px !important;
    touch-action: manipulation;
  }

  .runner-opt-label input[type="radio"],
  .runner-opt-label input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
  }

  .runner-footer {
    height: auto !important;
    min-height: auto !important;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .runner-progress-box {
    width: 100% !important;
    font-size: 0.75rem !important;
  }

  #btnSubmitExam {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
    font-size: 0.875rem !important;
  }

  .tab-lock-card {
    padding: 24px 16px !important;
  }

  .tab-lock-title {
    font-size: 1.15rem !important;
  }

  .tab-lock-desc {
    font-size: 0.8125rem !important;
  }
}

@media (max-width: 640px) {
  .quizzes-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .quiz-card {
    padding: 14px !important;
  }

  .quiz-card .quiz-actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .quiz-card .quiz-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ==========================================================================
   RIWAYAT SISWA & REKAP NILAI MODAL (TASKS, COMBINED, DAILY TEST)
   ========================================================================== */
.history-tabs-bar {
  display: flex !important;
  flex-direction: row !important;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 14px;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 48px !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: auto;
  overflow-y: hidden !important;
  align-items: center;
}

.history-tab-btn {
  flex: 1 1 0;
  min-width: 140px;
  min-height: 36px;
  height: auto;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #94A3B8;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.history-tab-btn:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.06);
}

.history-tab-btn.active {
  background: #3B82F6 !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.history-filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  flex-shrink: 0 !important;
}

.history-filter-item {
  flex: 1 1 180px;
}

.history-filter-item select,
.history-filter-item input {
  width: 100%;
}

.mon-btn-unlock {
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mon-btn-unlock:hover {
  background: rgba(16, 185, 129, 0.35);
  border-color: #34D399;
}

/* ==========================================================================
   TOMBOL KEMBALI (HIERARCHICAL BACK NAVIGATION)
   ========================================================================== */
.btn-nav-back {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  min-height: 36px !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #E2E8F0 !important;
  cursor: pointer !important;
  transition: all 240ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  user-select: none;
}

.btn-nav-back:hover {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #FFFFFF !important;
  transform: translateX(-3px);
}

.btn-nav-back:active {
  transform: scale(0.97) translateX(-1px);
}

/* ==========================================================================
   LOGIN GURU LONG-PRESS ACCESS (ARCZNEWERA TRIGGER)
   ========================================================================== */
.auth-credit-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-credit-row {
  font-size: 0.8125rem;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.teacher-press-trigger {
  cursor: pointer;
  color: #38BDF8 !important;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  transition: all 260ms cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
  display: inline-block;
}

.teacher-press-trigger:hover,
.teacher-press-trigger:focus-visible {
  background: rgba(56, 189, 248, 0.2);
  border-style: solid;
  border-color: #38BDF8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.teacher-press-trigger.is-holding {
  background: rgba(56, 189, 248, 0.35) !important;
  border-color: #38BDF8 !important;
  border-style: solid !important;
  transform: scale(1.1);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
  color: #FFFFFF !important;
}

.teacher-hint-text {
  margin-top: 6px;
  font-size: 0.7188rem;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: color 240ms ease;
  user-select: none;
}

.teacher-hold-track {
  width: 140px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  margin-top: 6px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 200ms ease;
}

.teacher-hold-track.is-active {
  opacity: 1;
}

.teacher-hold-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38BDF8, #10B981);
  border-radius: 9999px;
  transition: width 40ms linear;
}

/* ==========================================================================
   TATA LETAK TOMBOL DI QUIZ MOBILE (BOTTOM ACTION BAR)
   ========================================================================== */
@media (max-width: 768px) {
  #quizzesViewPage {
    padding-bottom: 110px !important;
  }

  #quizzesGridContainer {
    margin-bottom: 30px !important;
  }

  #quizTeacherActionGroup {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    background: rgba(11, 17, 32, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.6) !important;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    z-index: 100 !important;
    box-sizing: border-box !important;
  }

  #quizTeacherActionGroup .btn {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
  }
}

/* ==========================================================================
   SOFT ANIMATIONS & TRANSISI HALUS (EASY ACCESS + EASY LOOK)
   ========================================================================== */
/* Smooth Login Transition */
.auth-gateway-overlay.is-exiting {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 380ms ease, transform 380ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  pointer-events: none;
}

.main-app-shell-entering {
  animation: appShellSoftEnter 420ms cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes appShellSoftEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Button Soft Feedback */
.btn:active, button:active {
  transform: scale(0.975);
  transition: transform 120ms ease;
}

/* Smooth Modals */
.glass-modal[open] .modal-content {
  animation: modalGentleEnter 280ms cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes modalGentleEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Smooth Spinner Continuous Loop */
.loading-spinner-ring {
  will-change: transform;
  animation: continuousSpin 0.8s linear infinite !important;
}

@keyframes continuousSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   TODAY AGENDA WIDGET ON DASHBOARD (JADWAL, PIKET, DEVO HARI INI)
   ========================================================================== */
.today-agenda-section {
  margin-top: 24px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.today-agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.agenda-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agenda-header-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0;
}

.today-date-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  color: #34D399;
  font-size: 0.75rem;
  font-weight: 600;
}

.temp-schedule-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #FDE68A;
}

.temp-banner-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.temp-banner-content strong {
  display: block;
  font-size: 0.875rem;
  color: #F59E0B;
}

.temp-banner-content span {
  font-size: 0.8125rem;
  color: #E2E8F0;
}

.today-agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.agenda-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.agenda-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
}

.agenda-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.agenda-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.agenda-card-icon.type-schedule {
  background: rgba(59, 130, 246, 0.18);
  color: #60A5FA;
}

.agenda-card-icon.type-piket {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
}

.agenda-card-icon.type-devo {
  background: rgba(168, 85, 247, 0.18);
  color: #C084FC;
}

.agenda-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0;
}

.agenda-card-subtitle {
  font-size: 0.75rem;
  color: #94A3B8;
}

.agenda-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.agenda-schedule-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.8125rem;
}

.agenda-schedule-mini-item.is-substituted {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.agenda-mini-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #94A3B8;
  font-weight: 600;
}

.agenda-mini-subject {
  font-weight: 600;
  color: #F1F5F9;
}

.agenda-piket-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agenda-piket-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  color: #A7F3D0;
  font-size: 0.8125rem;
  font-weight: 500;
}

.agenda-devo-highlight {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
}

.agenda-devo-topic {
  font-weight: 700;
  color: #F8FAFC;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.agenda-devo-meta {
  font-size: 0.75rem;
  color: #C084FC;
}

/* ==========================================================================
   SCHEDULE VIEW PAGE (ROSTER, TEMPORARY SCHEDULE, PIKET, DEVO)
   ========================================================================== */
.schedule-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-top: 12px;
  margin-bottom: 18px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.schedule-actions-bar .teacher-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .schedule-actions-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 14px;
    scrollbar-width: thin;
  }

  .schedule-actions-bar::-webkit-scrollbar {
    height: 4px;
  }

  .schedule-actions-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
  }

  .schedule-actions-bar .teacher-action-btn {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.78125rem;
  }
}

.schedule-tabs-container {
  margin-bottom: 20px;
}

.schedule-nav-tabs {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px;
  overflow-x: auto;
  align-items: center;
  box-sizing: border-box;
}

.schedule-tab-btn {
  flex: 1 1 0;
  min-width: 140px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #94A3B8;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.schedule-tab-btn:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.05);
}

.schedule-tab-btn.active {
  background: #3B82F6 !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.tab-badge-pill {
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}

.schedule-subview.hidden {
  display: none !important;
}

.subview-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.subview-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0 0 4px 0;
}

.subview-desc {
  font-size: 0.8125rem;
  color: #94A3B8;
  margin: 0;
}

/* Day Selector Chips */
.schedule-day-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.day-chip-btn {
  padding: 8px 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #94A3B8;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 40px;
}

.day-chip-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
}

.day-chip-btn.active {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.temp-schedule-alert-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  color: #FDE68A;
}

.temp-schedule-alert-box.hidden {
  display: none !important;
}

.temp-schedule-alert-box .alert-icon {
  font-size: 1.3rem;
  color: #F59E0B;
}

.temp-schedule-alert-box .alert-text strong {
  display: block;
  font-size: 0.875rem;
  color: #F59E0B;
}

.temp-schedule-alert-box .alert-text span {
  font-size: 0.8125rem;
  color: #E2E8F0;
}

/* Schedule Cards Grid (Roster) */
.schedule-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.schedule-card-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.schedule-card-item:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.schedule-card-item.is-substituted {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(245, 158, 11, 0.08));
}

.schedule-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedule-time-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #60A5FA;
  background: rgba(59, 130, 246, 0.12);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.schedule-subject-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0;
}

.schedule-teacher-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: #CBD5E1;
}

.schedule-room-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #94A3B8;
}

.schedule-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Temporary Schedules Cards */
.temp-schedule-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.temp-schedule-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 0.2s ease;
}

.temp-schedule-card.is-inactive {
  opacity: 0.65;
  border-color: rgba(255, 255, 255, 0.1);
}

.temp-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #F59E0B;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.temp-date-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #CBD5E1;
}

/* Piket Days Grid */
.piket-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.piket-day-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.piket-day-card.is-today {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(16, 185, 129, 0.08));
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.piket-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.piket-day-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0;
}

.piket-today-pill {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 8px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34D399;
  border-radius: 999px;
}

.piket-students-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.piket-student-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.piket-absen-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.piket-student-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #F1F5F9;
}

/* Piket Modal Checklist */
.piket-students-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.piket-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.8125rem;
  color: #E2E8F0;
  user-select: none;
}

.piket-check-label:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
}

.piket-check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Devo Cards Grid */
.devo-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.devo-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.devo-card.status-today {
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(168, 85, 247, 0.08));
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15);
}

.devo-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.devo-date-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #C084FC;
  background: rgba(168, 85, 247, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.devo-topic-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0;
}

.devo-scripture-box {
  background: rgba(30, 41, 59, 0.5);
  border-left: 3px solid #A855F7;
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
  font-size: 0.8125rem;
  color: #E2E8F0;
  font-style: italic;
}

.devo-person-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8125rem;
  color: #CBD5E1;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .schedule-tab-btn {
    min-width: 120px;
    font-size: 0.8125rem;
  }
}

/* ==========================================================================
   PELAJARAN SENI: STUDIO MUSIK (GESTURE SYNTH ASLI & NATIVE)
   ========================================================================== */
.seni-header-toolbar {
  padding: 12px 18px;
  border-radius: var(--radius-lg, 16px);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.seni-title-badge {
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.seni-compact-select {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(232, 161, 61, 0.3);
  color: #E8A13D;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.seni-compact-select:hover,
.seni-compact-select:focus {
  border-color: #E8A13D;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 10px rgba(232, 161, 61, 0.2);
}

.rec-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #EF4444;
  margin-right: 6px;
  transition: transform 0.2s ease;
}

.rec-dot.is-recording {
  animation: pulseRecording 1s infinite alternate;
}

@keyframes pulseRecording {
  from { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 rgba(239, 68, 68, 0.4); }
  to { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px rgba(239, 68, 68, 0.8); }
}

.seni-guide-panel {
  background: rgba(232, 161, 61, 0.06);
  border: 1px solid rgba(232, 161, 61, 0.25);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 20px;
  backdrop-filter: blur(10px);
  animation: fadeInSoft 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.seni-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.seni-guide-col {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: 12px;
}

.seni-guide-col strong {
  display: block;
  font-size: 0.875rem;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.seni-guide-col p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted, #94A3B8);
  line-height: 1.45;
}

.seni-step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #E8A13D;
  color: #111111;
  font-weight: 700;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

/* Tutorial Practice Banner */
.seni-tutorial-panel {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(232, 161, 61, 0.3);
  border-radius: var(--radius-lg, 16px);
  padding: 14px 18px;
  backdrop-filter: blur(12px);
  animation: fadeInSoft 0.3s ease;
}

.seni-tutorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.seni-tutorial-timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px;
  scrollbar-width: thin;
}

.tutorial-step-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
  font-size: 0.8125rem;
  transition: all 0.25s ease;
  cursor: pointer;
}

.tutorial-step-chip.active {
  background: rgba(232, 161, 61, 0.25);
  border-color: #E8A13D;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(232, 161, 61, 0.3);
}

.tutorial-step-chip .step-deg {
  font-size: 0.6875rem;
  color: #E8A13D;
  font-weight: 700;
  margin-bottom: 2px;
}

/* Recording Result Bar */
.seni-recording-result-bar {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg, 16px);
  padding: 12px 18px;
  backdrop-filter: blur(12px);
}

/* Stage Canvas & Frame Container */
.seni-stage-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-xl, 20px);
  overflow: hidden;
  border: 1px solid rgba(232, 161, 61, 0.25);
  background: #0B0F19;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(232, 161, 61, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.seni-webcam-hidden {
  display: none !important;
}

.seni-canvas-wrapper {
  position: relative;
  width: 100%;
  height: clamp(520px, 70vh, 760px);
  background: #0B0F19;
  overflow: hidden;
}

#seniStageCanvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Floating HUDs on Canvas */
.seni-center-hud {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 10;
  animation: fadeInSoft 0.4s ease;
}

.seni-chord-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 28px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(232, 161, 61, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(232, 161, 61, 0.25);
}

.seni-degree-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: #E8A13D;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.seni-chord-title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(232, 161, 61, 0.6);
}

.seni-notes-pill {
  margin-top: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-cyan-light, #38BDF8);
  font-family: monospace;
}

.seni-tilt-badge {
  margin-top: 8px;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Left & Right HUDs */
.seni-left-hud {
  position: absolute;
  top: 24px;
  left: 20px;
  z-index: 10;
  pointer-events: none;
}

.seni-right-hud {
  position: absolute;
  top: 24px;
  right: 20px;
  z-index: 10;
  pointer-events: none;
}

.seni-hud-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
  font-size: 0.8125rem;
}

.seni-hud-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted, #94A3B8);
}

.seni-hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.seni-hud-fingers-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.finger-pill {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.finger-pill.active {
  background: rgba(232, 161, 61, 0.3);
  color: #FFFFFF;
  font-weight: 700;
  border-left: 3px solid #E8A13D;
}

/* VU Meter */
.seni-vu-meter-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seni-vu-bars {
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  width: 44px;
}

.vu-bar {
  display: block;
  height: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.1s ease;
}

.vu-bar.lit-green { background: #10B981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
.vu-bar.lit-amber { background: #E8A13D; box-shadow: 0 0 6px rgba(232, 161, 61, 0.6); }
.vu-bar.lit-red { background: #EF4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.8); }

.seni-vu-readout {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
}

.seni-vu-readout strong {
  font-size: 1rem;
  color: #38BDF8;
}

/* Bottom HUD: Piano Roll */
.seni-bottom-hud {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  background: linear-gradient(to top, rgba(11, 15, 25, 0.95), rgba(11, 15, 25, 0));
  display: flex;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.seni-piano-roll {
  display: flex;
  height: 72px;
  position: relative;
  background: #1E293B;
  border-radius: 10px 10px 0 0;
  padding: 4px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.piano-key {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  transition: all 0.1s ease;
}

.piano-key.white {
  width: 24px;
  height: 64px;
  background: #F8FAFC;
  color: #334155;
  border: 1px solid #CBD5E1;
  border-radius: 0 0 4px 4px;
  z-index: 1;
}

.piano-key.black {
  width: 16px;
  height: 40px;
  background: #0F172A;
  color: #94A3B8;
  margin-left: -8px;
  margin-right: -8px;
  z-index: 2;
  border-radius: 0 0 3px 3px;
}

.piano-key.active {
  background: #E8A13D !important;
  color: #111111 !important;
  box-shadow: 0 0 14px rgba(232, 161, 61, 0.9);
  transform: translateY(2px);
}

/* Camera Permission / Start Overlay */
.seni-camera-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
  transition: opacity 0.3s ease;
}

.seni-camera-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.seni-overlay-card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 32px 28px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(232, 161, 61, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(232, 161, 61, 0.2);
}

.seni-overlay-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.seni-overlay-title {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
}

.seni-overlay-desc {
  margin: 0 0 24px 0;
  color: #94A3B8;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.seni-overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.seni-overlay-note {
  display: block;
  margin-top: 18px;
  font-size: 0.75rem;
  color: var(--text-muted, #64748B);
}

/* Fullscreen Exit Bar */
.seni-fullscreen-exit-bar {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 24px;
  align-items: center;
  justify-content: space-between;
  z-index: 10000;
  color: #E8A13D;
  font-weight: 700;
  font-size: 0.9375rem;
}

.seni-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #10B981;
  background: rgba(16, 185, 129, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
}

/* Fullscreen State */
.seni-stage-container.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
}

.seni-stage-container.is-fullscreen .seni-fullscreen-exit-bar {
  display: flex !important;
}

.seni-stage-container.is-fullscreen .seni-canvas-wrapper {
  height: calc(100vh - 52px) !important;
  margin-top: 52px;
}

/* Tactile Touch Chord Pads */
.seni-touch-deck {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl, 20px);
  padding: 16px 20px;
}

.seni-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.seni-deck-sliders {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-label {
  font-size: 0.8125rem;
  color: var(--text-muted, #94A3B8);
  font-weight: 600;
}

.seni-range {
  width: 90px;
  accent-color: #E8A13D;
  cursor: pointer;
}

.seni-chord-pads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 10px;
}

.chord-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  min-height: 84px;
}

.chord-pad:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(232, 161, 61, 0.4);
  transform: translateY(-2px);
}

.chord-pad:active,
.chord-pad.active {
  background: rgba(232, 161, 61, 0.25) !important;
  border-color: #E8A13D !important;
  box-shadow: 0 4px 16px rgba(232, 161, 61, 0.4);
  transform: scale(0.97);
}

.chord-pad .pad-num {
  font-size: 0.6875rem;
  color: #E8A13D;
  font-weight: 700;
  background: rgba(232, 161, 61, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
}

.chord-pad .pad-roman {
  font-size: 0.75rem;
  color: #94A3B8;
  font-weight: 600;
}

.chord-pad .pad-name {
  font-size: 0.9375rem;
  font-weight: 800;
  margin: 2px 0;
  color: #FFFFFF;
}

.chord-pad .pad-role {
  font-size: 0.6875rem;
  color: #64748B;
}

.chord-pad.pad-stop {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.chord-pad.pad-stop .pad-num {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.2);
}

.chord-pad.pad-stop:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #EF4444;
}

@media (max-width: 768px) {
  .seni-canvas-wrapper {
    height: 440px;
  }

  .seni-chord-title {
    font-size: 1.8rem;
  }

  .seni-left-hud,
  .seni-right-hud {
    display: none; /* Hemat ruang layar di ponsel */
  }

  .seni-piano-roll {
    height: 52px;
  }

  .piano-key.white {
    width: 16px;
    height: 46px;
  }

  .piano-key.black {
    width: 11px;
    height: 28px;
    margin-left: -5.5px;
    margin-right: -5.5px;
  }

  .seni-chord-pads-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}








/* ==========================================================================
   SENI GESTURE SYNTH 99% FIDELITY COMPONENT STYLES
   ========================================================================== */

/* Mode Tangan & Semitone Buttons */
.seni-mode-group,
.seni-semitone-group {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.seni-mode-btn,
.seni-semitone-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  outline: none;
}

.seni-semitone-btn {
  font-size: 0.875rem;
  padding: 3px 8px;
}

.seni-mode-btn:hover,
.seni-semitone-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.seni-mode-btn.active,
.seni-semitone-btn.active {
  background: #E8A13D !important;
  color: #111111 !important;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(232, 161, 61, 0.4);
}

/* Floating Gesture Guide Panels (Left & Right) */
.gesture-guide-panel {
  position: absolute;
  top: 14px;
  z-index: 15;
  width: 104px;
  padding: 8px 6px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.75));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 161, 61, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-family: monospace;
  user-select: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gesture-guide-panel.left-panel {
  left: 14px;
}

.gesture-guide-panel.right-panel {
  right: 14px;
}

.gesture-guide-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.gesture-guide-title {
  color: #E8A13D;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.gesture-guide-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gesture-guide-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 6px;
  border-radius: 6px;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.gesture-guide-row.active {
  background: rgba(232, 161, 61, 0.25) !important;
  color: #E8A13D !important;
  box-shadow: 0 0 10px rgba(232, 161, 61, 0.4);
  transform: scale(1.02);
}

.gesture-guide-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.gesture-guide-tilt {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.gesture-guide-tilt-item {
  flex: 1;
  padding: 4px 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #64748B;
  font-size: 9px;
  text-align: center;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.15s ease;
}

.gesture-guide-tilt-item.active {
  background: rgba(232, 161, 61, 0.25) !important;
  color: #E8A13D !important;
  box-shadow: 0 0 8px rgba(232, 161, 61, 0.3);
}

.gesture-guide-tilt-item .gesture-guide-icon {
  width: 20px;
  height: 20px;
}

/* Interactive Song Tutorial Layer */
.seni-tutorial-panel {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(232, 161, 61, 0.3);
  border-radius: var(--radius-xl, 20px);
  padding: 14px 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  animation: fadeInSoft 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.seni-tutorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tutorial-mode-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 2px;
}

.tut-mode-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.tut-mode-btn.active {
  background: #E8A13D !important;
  color: #111111 !important;
}

.tutorial-phrase-layer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
}

.tut-lyrics-display {
  font-size: 1.125rem;
  font-weight: 700;
  color: #FFFFFF;
  text-align: center;
  letter-spacing: 0.02em;
  min-height: 28px;
}

.tut-cue-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(232, 161, 61, 0.35);
  border-radius: 14px;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 320px;
  transition: all 0.25s ease;
}

.tut-cue-box.matched {
  border-color: #10B981 !important;
  background: rgba(16, 185, 129, 0.15) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.tut-gesture-hint {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tut-hand-cues {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tut-hand-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tut-hand-label {
  font-size: 0.6875rem;
  color: #64748B;
  font-weight: 600;
}

.tut-hand-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 4px;
}

.tut-target-chord {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 16px;
  background: rgba(232, 161, 61, 0.15);
  border-radius: 12px;
  border: 1px solid rgba(232, 161, 61, 0.4);
}

.tut-chord-name {
  font-size: 1.75rem;
  font-weight: 900;
  color: #E8A13D;
  line-height: 1;
}

.tut-chord-quality {
  font-size: 0.75rem;
  font-weight: 700;
  color: #F8FAFC;
}

.tut-match-status {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #94A3B8;
}

.tut-cue-box.matched .tut-match-status {
  color: #10B981;
}

/* Quick Walkthrough Modal */
.seni-walkthrough-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.seni-walkthrough-modal.hidden {
  display: none;
}

.walkthrough-card {
  position: relative;
  max-width: 440px;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(232, 161, 61, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(232, 161, 61, 0.2);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
}

.btn-close-wt {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.125rem;
  cursor: pointer;
  padding: 4px;
}

.wt-step {
  font-size: 0.75rem;
  font-weight: 800;
  color: #E8A13D;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 6px 0;
}

.wt-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 8px 0;
}

.wt-desc {
  font-size: 0.875rem;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.wt-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0;
}

.wt-status {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #E8A13D;
  margin-bottom: 16px;
}

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


/* ==========================================================================
   XOZEN TUNNEL & TERMINAL MANAGER STYLES
   ========================================================================== */

.tunnel-header-toolbar {
  padding: 12px 18px;
  border-radius: var(--radius-lg, 16px);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.tunnel-title-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.2);
  color: #38BDF8;
  flex-shrink: 0;
}

.tunnel-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: monospace;
  transition: all 0.25s ease;
}

.tunnel-status-badge.stopped {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tunnel-status-badge.running {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.tunnel-status-badge.starting {
  background: rgba(234, 179, 8, 0.18);
  color: #FACC15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
}

.tunnel-status-badge.running .status-indicator-dot {
  animation: pulseRecording 1s infinite alternate;
}

.tunnel-grid-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  align-items: flex-start;
}

.tunnel-config-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tunnel-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl, 18px);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card-eyebrow {
  font-size: 0.6875rem;
  font-weight: 800;
  color: #38BDF8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tunnel-url-box {
  background: rgba(7, 11, 18, 0.85);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.url-label {
  font-size: 0.6875rem;
  color: #94A3B8;
  margin-bottom: 4px;
  font-weight: 600;
}

.url-value {
  font-family: monospace;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #34D399;
  word-break: break-all;
  line-height: 1.4;
  margin-bottom: 10px;
}

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

.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
}

.tunnel-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94A3B8;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.tunnel-meta-row strong {
  color: #FFFFFF;
}

.desktop-script-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(7, 11, 18, 0.6);
  border: 1px dashed rgba(14, 165, 233, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
}

/* Jendela Terminal Konsol Interaktif */
.terminal-window {
  background: #070B12;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl, 18px);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(14, 165, 233, 0.1);
  display: flex;
  flex-direction: column;
}

.terminal-titlebar {
  background: #111827;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #EF4444; }
.dot-yellow { background: #F59E0B; }
.dot-green { background: #10B981; }

.terminal-title {
  font-family: monospace;
  font-size: 0.75rem;
  color: #94A3B8;
  font-weight: 600;
}

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

.term-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94A3B8;
  font-size: 0.6875rem;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.term-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.terminal-screen {
  height: 480px;
  max-height: 600px;
  overflow-y: auto;
  padding: 14px;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #4ADE80;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.term-line {
  word-break: break-all;
  white-space: pre-wrap;
}

.term-line .term-time {
  color: #64748B;
  margin-right: 6px;
  user-select: none;
}

.term-line.term-system {
  color: #38BDF8;
}

.term-line.term-stderr {
  color: #CBD5E1;
}

.term-line.term-success {
  color: #34D399;
  font-weight: bold;
}

.term-line.term-error {
  color: #F87171;
  font-weight: bold;
}

.terminal-quickbar {
  background: #0F172A;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.term-prompt {
  color: #34D399;
  font-family: monospace;
  font-weight: 800;
  font-size: 0.9375rem;
}

.term-quick-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.term-quick-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #94A3B8;
  font-family: monospace;
  font-size: 0.75rem;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.term-quick-btn:hover {
  background: rgba(14, 165, 233, 0.2);
  color: #38BDF8;
  border-color: rgba(14, 165, 233, 0.4);
}

@media (max-width: 900px) {
  .tunnel-grid-layout {
    grid-template-columns: 1fr;
  }

  .terminal-screen {
    height: 380px;
  }
}


/* ==========================================================================
   MYPNK CLOUD LOGO & GLASS UI QUIZ STYLING
   ========================================================================== */

.header-brand-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.auth-brand-logo-img {
  max-width: 140px;
  height: auto;
  object-fit: contain;
  margin: 0 auto 12px auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.auth-brand-subtitle {
  margin: 4px 0 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted, #94A3B8);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Glass UI Quiz Cards */
.quiz-card {
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  padding: 22px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease !important;
}

.quiz-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(56, 189, 248, 0.15) !important;
}

/* Glass UI Empty State for Quizzes */
#quizzesEmptyState {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  padding: 48px 24px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4) !important;
  max-width: 540px;
  margin: 30px auto;
}

#quizzesEmptyState .state-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

#quizzesEmptyState .state-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 8px 0;
}

#quizzesEmptyState .state-desc {
  font-size: 0.875rem;
  color: #94A3B8;
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}
