/* =============================================================================
   Vaulter Dashboard - Dark Theme (Matching Landing Page)
   ============================================================================= */

:root {
  /* Dark Theme Color Palette - Matching Landing Page */
  --primary: #10b981;           /* Emerald green */
  --primary-dark: #059669;
  --primary-light: #34d399;
  --primary-subtle: rgba(16, 185, 129, 0.1);

  --success: #22c55e;           /* Green */
  --success-light: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;           /* Amber */
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;            /* Red */
  --danger-light: rgba(239, 68, 68, 0.15);

  --accent: #3b82f6;            /* Blue */
  --accent-light: rgba(59, 130, 246, 0.15);

  /* Dark Slate Background - Matching Landing */
  --bg: #0f172a;                /* slate-900 */
  --bg-secondary: #1e293b;      /* slate-800 */
  --bg-card: #1e293b;           /* slate-800 */
  --bg-card-hover: #334155;     /* slate-700 */
  --bg-hover: #334155;
  --text: #f8fafc;              /* slate-50 */
  --text-muted: #94a3b8;        /* slate-400 */
  --text-dim: #64748b;          /* slate-500 */
  --border: #334155;            /* slate-700 */
  --border-light: #475569;      /* slate-600 */

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows - Dark Theme */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.3);
  --shadow-glow-blue: 0 0 24px rgba(59, 130, 246, 0.3);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Background Pattern - Matching Landing Page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.3;
  z-index: -1;
  background-image: radial-gradient(circle at 2px 2px, #334155 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

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

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

.header {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-md) var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* User Display */
.user-display {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.user-email {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
}

.user-role {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* =============================================================================
   Login Section
   ============================================================================= */

.login-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  min-height: calc(100vh - 70px);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-2xl);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.login-icon {
  width: 64px;
  height: 64px;
  color: var(--primary);
  margin-bottom: var(--spacing-md);
}

.login-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--spacing-sm);
}

.login-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.login-form .form-group label {
  display: block;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
  font-weight: 500;
}

.login-form input[type="email"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.login-form input[type="email"]::placeholder {
  color: var(--text-dim);
}

.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.login-form input[type="password"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.login-form input[type="password"]::placeholder {
  color: var(--text-dim);
}

.auth-toggle {
  margin-top: var(--spacing-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0;
  margin-left: var(--spacing-xs);
  transition: color 0.2s ease;
}

.btn-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.main {
  flex: 1;
  padding: var(--spacing-xl);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

/* =============================================================================
   Cards - Dark Theme
   ============================================================================= */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.card-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

/* Expandable Card Styles */
.card-expandable {
  padding: 0;
}

.card-header-expandable {
  padding: var(--spacing-lg) var(--spacing-xl);
  margin-bottom: 0;
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: var(--radius-2xl);
}

.card-header-expandable:hover {
  background: var(--bg-hover);
}

.expand-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.card-expandable.expanded .expand-icon {
  transform: rotate(180deg);
}

.card-body-expandable {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  max-height: 500px;
  opacity: 1;
  padding: 0 var(--spacing-xl) var(--spacing-xl);
}

.card-body-expandable.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0 var(--spacing-xl);
}

/* =============================================================================
   Status Card
   ============================================================================= */

.status-card {
  text-align: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(30, 41, 59, 0.8) 100%);
}

.status-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.status-content.hidden {
  display: none;
}

.status-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
}

.status-icon svg {
  width: 40px;
  height: 40px;
}

.status-free {
  background: var(--success-light);
  color: var(--success);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.2);
}

.status-locked {
  background: var(--warning-light);
  color: var(--warning);
  animation: pulse 2s infinite;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

.status-pending {
  background: var(--accent-light);
  color: var(--accent);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.pending-duration {
  font-size: 1.125rem;
  color: var(--text);
  margin: var(--spacing-md) 0;
}

.status-released {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.status-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.status-content p {
  color: var(--text-muted);
}

/* Countdown Display */
.countdown-display {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-lg) 0;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  min-width: 80px;
  border: 1px solid var(--border);
}

.countdown-value {
  font-size: 2.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.countdown-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.countdown-separator {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dim);
}

.release-date {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.deadlock-id {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: monospace;
}

/* =============================================================================
   Buttons - Dark Theme
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-small {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 0.75rem;
}

.btn-large {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow), 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

.btn-icon {
  padding: var(--spacing-sm);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-md);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* =============================================================================
   Create Form - Dark Theme
   ============================================================================= */

.create-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

.duration-picker {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.duration-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
}

.preset-btn {
  padding: var(--spacing-md);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}

.preset-btn.active {
  border-color: var(--primary);
  background: var(--primary-subtle);
  color: var(--primary);
}

.custom-duration {
  background: var(--bg);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.custom-duration label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
}

.custom-inputs {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.duration-input {
  width: 60px;
  padding: var(--spacing-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  text-align: center;
}

.duration-input:focus {
  outline: none;
  border-color: var(--primary);
}

.custom-inputs span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.selected-duration {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: var(--spacing-sm);
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.selected-duration strong {
  color: var(--primary);
}

/* Warning Box - Dark Theme */
.warning-box {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  color: var(--warning);
}

.warning-box svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.warning-box strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.875rem;
}

.warning-box p {
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.4;
}

/* =============================================================================
   Profile Restrictions - Modern Unified Design
   ============================================================================= */

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Restrictions Header */
.restrictions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.restrictions-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.restrictions-title label {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.restrictions-icon {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary-subtle);
  border-radius: var(--radius-lg);
  border: 1px solid var(--primary);
}

.restrictions-actions {
  display: flex;
  gap: var(--spacing-xs);
}

/* Restrictions Grid */
.restrictions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

@media (max-width: 600px) {
  .restrictions-grid {
    grid-template-columns: 1fr;
  }
}

/* Restriction Card */
.restriction-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.restriction-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.restriction-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

.restriction-card:hover .restriction-content {
  border-color: var(--border-light);
  background: var(--bg-hover);
}

.restriction-card input:checked + .restriction-content {
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.restriction-card input:checked + .restriction-content .restriction-toggle {
  background: var(--primary);
}

.restriction-card input:checked + .restriction-content .restriction-toggle::after {
  transform: translateX(18px);
}

.restriction-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.restriction-info {
  flex: 1;
  min-width: 0;
}

.restriction-info strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.restriction-info small {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Toggle Switch */
.restriction-toggle {
  width: 44px;
  height: 26px;
  background: var(--border);
  border-radius: 13px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.restriction-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Wide card for last item */
.restriction-card-wide {
  grid-column: 1 / -1;
}

.restriction-card-wide .restriction-content {
  background: linear-gradient(135deg, var(--bg) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.restriction-card-wide input:checked + .restriction-content {
  background: linear-gradient(135deg, var(--primary-subtle) 0%, rgba(16, 185, 129, 0.15) 100%);
}

/* Summary */
.restrictions-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--success-light);
  border: 1px solid var(--success);
  border-radius: var(--radius-md);
  color: var(--success);
  font-weight: 600;
  font-size: 0.9rem;
}

.summary-icon {
  width: 24px;
  height: 24px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* Unchecked state styling */
.restriction-card input:not(:checked) + .restriction-content .restriction-info strong {
  color: var(--text-dim);
}

.restriction-card input:not(:checked) + .restriction-content .restriction-icon {
  opacity: 0.5;
}

/* =============================================================================
   Download Section - Dark Theme
   ============================================================================= */

.download-section {
  text-align: center;
}

.download-section > p {
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
}

.download-steps {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  text-align: left;
}

.step {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.download-section .btn svg {
  width: 20px;
  height: 20px;
}

/* =============================================================================
   History Section - Dark Theme
   ============================================================================= */

.history-content {
  max-height: 300px;
  overflow-y: auto;
}

.empty-history {
  text-align: center;
  color: var(--text-dim);
  padding: var(--spacing-xl);
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--bg);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.history-item:last-child {
  margin-bottom: 0;
}

.history-item.clickable {
  cursor: pointer;
}

.history-item.clickable:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateX(4px);
}

.history-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.history-hint {
  font-size: 0.75rem;
  color: var(--primary);
  opacity: 0.8;
}

.history-item.clickable:hover .history-hint {
  opacity: 1;
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.history-date {
  font-weight: 600;
  color: var(--text);
}

.history-duration {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.history-status {
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.history-status.active {
  background: var(--warning-light);
  color: var(--warning);
}

.history-status.released {
  background: var(--success-light);
  color: var(--success);
}

.history-status.expired {
  background: var(--bg-hover);
  color: var(--text-dim);
}

/* =============================================================================
   Modal - Dark Theme
   ============================================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-xl);
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal-large {
  max-width: 600px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.password-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--primary);
}

.password-display code {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.15em;
}

.password-instructions {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.password-instructions strong {
  color: var(--text);
}

/* URL Display */
.url-display {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--bg);
  border-radius: var(--radius-md);
  margin: var(--spacing-md) 0;
  border: 1px solid var(--border);
}

.url-display code {
  flex: 1;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =============================================================================
   Toast - Dark Theme
   ============================================================================= */

.toast {
  position: fixed;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  animation: slideUp 0.3s ease;
  color: var(--text);
}

.toast.hidden {
  display: none;
}

.toast.success {
  border-color: var(--success);
  color: var(--success);
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* =============================================================================
   MDM Device Section - Dark Theme
   ============================================================================= */

.mdm-section {
  text-align: center;
}

.mdm-content.hidden {
  display: none;
}

.mdm-info-box {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
  text-align: left;
}

.mdm-info-box svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--accent);
}

.mdm-info-box strong {
  display: block;
  color: var(--accent);
  margin-bottom: var(--spacing-xs);
}

.mdm-info-box p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.mdm-steps {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  text-align: left;
}

.mdm-device-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--success-light);
  border: 1px solid var(--success);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
}

.device-icon {
  width: 60px;
  height: 60px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.device-icon svg {
  width: 32px;
  height: 32px;
  color: var(--text);
}

.device-info {
  text-align: left;
}

.device-info h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--spacing-xs);
}

.device-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
}

.enrolled-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--success);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.mdm-feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.feature-item svg {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex-shrink: 0;
}

.feature-item span {
  font-size: 0.875rem;
  color: var(--text);
}

.mdm-enrolled-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: var(--spacing-md);
  background: var(--bg);
  border-radius: var(--radius-md);
  text-align: left;
  border: 1px solid var(--border);
}

/* Status Badge */
.status-badge {
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge-pending {
  background: var(--warning-light);
  color: var(--warning);
}

.status-badge-enrolled {
  background: var(--success-light);
  color: var(--success);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* =============================================================================
   Wizard Progress & Steps - Dark Theme
   ============================================================================= */

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-sm) 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.progress-step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.progress-step.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.progress-step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.progress-step.completed .step-label {
  color: var(--success);
}

.progress-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  margin-bottom: 20px;
  transition: background 0.3s ease;
}

.progress-line.completed {
  background: var(--success);
}

/* Wizard Steps */
.wizard-step {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-md);
  animation: fadeIn 0.3s ease;
}

.wizard-step.active {
  display: flex;
}

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

.wizard-step h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.wizard-step p {
  color: var(--text-muted);
  max-width: 400px;
  font-size: 0.9rem;
}

/* QR Code Container */
#qrCodeContainer {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* =============================================================================
   Responsive - Dark Theme
   ============================================================================= */

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
  }

  .user-id-input {
    width: 150px;
  }

  .main {
    padding: var(--spacing-md);
  }

  .countdown-display {
    flex-wrap: wrap;
    justify-content: center;
  }

  .countdown-item {
    min-width: 65px;
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .countdown-value {
    font-size: 1.75rem;
  }

  .duration-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  .custom-inputs {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .countdown-separator {
    display: none;
  }

  .countdown-display {
    gap: var(--spacing-xs);
  }

  .duration-presets {
    grid-template-columns: 1fr 1fr;
  }
}

/* =============================================================================
   Utility Classes
   ============================================================================= */

.hidden {
  display: none !important;
}

.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* =============================================================================
   Additional Dark Theme Enhancements
   ============================================================================= */

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Selection */
::selection {
  background: var(--primary);
  color: white;
}

/* Focus States */
input:focus,
button:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* Link Styling */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-light);
}

/* Info Box */
.info-box {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  text-align: left;
}

.info-box svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}

.info-box strong {
  display: block;
  color: var(--accent);
  margin-bottom: 4px;
  font-size: 0.875rem;
}

.info-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Timer Info Box */
.timer-info-box {
  background: var(--primary-subtle);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-sm) 0;
}

.timer-duration {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

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

.timer-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, var(--success), #4ade80);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

/* =============================================================================
   Mobile Responsive Styles
   ============================================================================= */

@media (max-width: 768px) {
  /* Header */
  .header {
    padding: var(--spacing-sm) var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
  }

  .user-display {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: flex-end;
  }

  .user-email {
    font-size: 0.75rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Main Content */
  .main {
    padding: var(--spacing-md);
    gap: var(--spacing-md);
  }

  /* Cards */
  .card {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
  }

  .card-header {
    margin-bottom: var(--spacing-md);
  }

  .card-header h2 {
    font-size: 1.1rem;
  }

  /* Login Section */
  .login-section {
    padding: var(--spacing-md);
    min-height: calc(100vh - 60px);
  }

  .login-card {
    padding: var(--spacing-lg);
  }

  .login-icon {
    width: 48px;
    height: 48px;
  }

  .login-header h2 {
    font-size: 1.5rem;
  }

  .login-header p {
    font-size: 0.875rem;
  }

  /* Status Section */
  .status-icon {
    width: 64px;
    height: 64px;
  }

  .status-icon svg {
    width: 32px;
    height: 32px;
  }

  .status-content h3 {
    font-size: 1.25rem;
  }

  /* Countdown */
  .countdown {
    gap: var(--spacing-xs);
  }

  .countdown-item {
    min-width: 50px;
    padding: var(--spacing-sm);
  }

  .countdown-number {
    font-size: 1.75rem;
  }

  .countdown-label {
    font-size: 0.6rem;
  }

  /* Duration Presets */
  .preset-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs);
  }

  .preset-btn {
    padding: var(--spacing-sm);
    font-size: 0.8rem;
  }

  /* Custom Duration */
  .custom-duration {
    flex-direction: column;
    align-items: stretch;
  }

  .duration-input-group {
    flex: 1;
  }

  /* Buttons */
  .btn-large {
    padding: var(--spacing-md);
    font-size: 1rem;
  }

  .btn-small {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
  }

  /* Modals */
  .modal-content {
    width: 95%;
    max-width: none;
    margin: var(--spacing-md);
    padding: var(--spacing-md);
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-header h3 {
    font-size: 1.25rem;
  }

  /* Wizard */
  .wizard-progress {
    gap: var(--spacing-xs);
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .step-label {
    font-size: 0.7rem;
  }

  .progress-line {
    width: 30px;
  }

  /* URL Display */
  .url-display {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .url-display code {
    font-size: 0.7rem;
    word-break: break-all;
    padding: var(--spacing-sm);
  }

  /* History */
  .history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
  }

  .history-right {
    width: 100%;
    justify-content: space-between;
  }

  /* Expandable Cards */
  .card-header-expandable {
    padding: var(--spacing-md);
  }

  .card-body-expandable {
    padding: 0 var(--spacing-md) var(--spacing-md);
  }

  /* Restrictions */
  .restrictions-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .restrictions-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .restriction-content {
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
  }

  .restriction-icon {
    font-size: 1.25rem;
  }

  .restriction-info strong {
    font-size: 0.8rem;
  }

  .restriction-info span {
    font-size: 0.7rem;
  }

  /* QR Code */
  #qrCodeContainer {
    transform: scale(0.9);
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .header {
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .main {
    padding: var(--spacing-sm);
  }

  .card {
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
  }

  .login-card {
    padding: var(--spacing-md);
  }

  .countdown-item {
    min-width: 42px;
  }

  .countdown-number {
    font-size: 1.5rem;
  }

  .preset-buttons {
    grid-template-columns: 1fr 1fr;
  }

  .btn-large {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
  }

  .status-icon {
    width: 56px;
    height: 56px;
  }

  .status-content h3 {
    font-size: 1.1rem;
  }

  .status-content p {
    font-size: 0.875rem;
  }

  /* Hide less important elements on very small screens */
  .user-role {
    display: none;
  }

  .history-hint {
    display: none;
  }
}
