/* Base */
:root {
  --bg: #0b1021;
  --bg-soft: #0f1630;
  --card: #121a3c;
  --accent: #2f6bff;
  --accent-2: #5b8cff;
  --text: #e6ecff;
  --muted: #9fb0dd;
  --success: #20c997;
  --danger: #ff5c5c;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% -10%, #1b2a6b55, transparent),
              radial-gradient(1000px 900px at 120% 0%, #0c7bd755, transparent),
              var(--bg);
  overflow-x: hidden;
  position: relative;
  perspective: 1000px;
}
/* Portrait TV Mode - Rotate 90 degrees counter-clockwise */
html.portrait-mode {
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.portrait-mode {
  width: 100vh !important;
  height: 100vw !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate(-50%, -50%) rotate(-90deg) !important;
  transform-origin: center center !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  /* Hide scrollbar but keep functionality */
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE and Edge */
}

body.portrait-mode::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari, Opera */
}

/* Ensure background animation also rotates correctly */
body.portrait-mode .bg-animation {
  width: 100vh !important;
  height: 100vw !important;
}
/* 3D Background Animation */
.bg-animation {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 6px; height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: float 15s infinite linear;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.particle:nth-child(1) { left: 5%; animation-delay: 0s; animation-duration: 18s; width: 8px; height: 8px; background: rgba(255, 255, 255, 0.8); box-shadow: 0 0 16px rgba(255, 255, 255, 1); }
.particle:nth-child(2) { left: 15%; animation-delay: 1s; animation-duration: 22s; }
.particle:nth-child(3) { left: 25%; animation-delay: 2s; animation-duration: 16s; }
.particle:nth-child(4) { left: 35%; animation-delay: 3s; animation-duration: 20s; }
.particle:nth-child(5) { left: 45%; animation-delay: 4s; animation-duration: 25s; width: 8px; height: 8px; background: rgba(255, 255, 255, 0.8); box-shadow: 0 0 16px rgba(255, 255, 255, 1); }
.particle:nth-child(6) { left: 55%; animation-delay: 5s; animation-duration: 19s; }
.particle:nth-child(7) { left: 65%; animation-delay: 6s; animation-duration: 23s; }
.particle:nth-child(8) { left: 75%; animation-delay: 7s; animation-duration: 17s; }
.particle:nth-child(9) { left: 85%; animation-delay: 8s; animation-duration: 21s; }
.particle:nth-child(10) { left: 95%; animation-delay: 9s; animation-duration: 24s; width: 8px; height: 8px; background: rgba(255, 255, 255, 0.8); box-shadow: 0 0 16px rgba(255, 255, 255, 1); }
.particle:nth-child(11) { left: 10%; animation-delay: 10s; animation-duration: 18s; }
.particle:nth-child(12) { left: 20%; animation-delay: 11s; animation-duration: 22s; }
.particle:nth-child(13) { left: 30%; animation-delay: 12s; animation-duration: 16s; }
.particle:nth-child(14) { left: 40%; animation-delay: 13s; animation-duration: 20s; }
.particle:nth-child(15) { left: 50%; animation-delay: 14s; animation-duration: 25s; }
.particle:nth-child(16) { left: 60%; animation-delay: 15s; animation-duration: 21s; }
.particle:nth-child(17) { left: 70%; animation-delay: 16s; animation-duration: 26s; }
.particle:nth-child(18) { left: 80%; animation-delay: 17s; animation-duration: 19s; }
.particle:nth-child(19) { left: 90%; animation-delay: 18s; animation-duration: 23s; }
.particle:nth-child(20) { left: 5%; animation-delay: 19s; animation-duration: 27s; }

/* Additional larger particles for better visibility */
.particle:nth-child(3) { width: 7px; height: 7px; background: rgba(255, 255, 255, 0.7); box-shadow: 0 0 14px rgba(255, 255, 255, 0.9); }
.particle:nth-child(7) { width: 7px; height: 7px; background: rgba(255, 255, 255, 0.7); box-shadow: 0 0 14px rgba(255, 255, 255, 0.9); }
.particle:nth-child(12) { width: 7px; height: 7px; background: rgba(255, 255, 255, 0.7); box-shadow: 0 0 14px rgba(255, 255, 255, 0.9); }
.particle:nth-child(16) { width: 7px; height: 7px; background: rgba(255, 255, 255, 0.7); box-shadow: 0 0 14px rgba(255, 255, 255, 0.9); }

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Header */
.header {
  display: grid;
  grid-template-columns: 260px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 36px 28px 8px;
  position: relative;
}

.title-group { text-align: left; }
.page-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: white;
  font-size: clamp(28px, 4.2vw, 56px);
}
.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 500;
  font-size: clamp(14px, 2.2vw, 22px);
}
.date-text { margin-top: 8px; color: #cfe1ff; opacity: .85; font-size: clamp(12px, 2vw, 18px); }

/* Dashboard Info Banner */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(59,130,246,.10);
  border: 1px solid rgba(59,130,246,.25);
  flex-wrap: wrap;
}
.info-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  position: relative;
  top: 6px;
}
.info-text { font-size: 13px; color: var(--text); }

/* mini buttons on info banner */
.info-actions { margin-left: auto; display: flex; gap: 8px; }
.mini-btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(59,130,246,.35);
}
.mini-btn.outline {
  background: transparent;
  color: #4ae8c7;
  border: 1px solid rgba(32,201,151,.5);
  box-shadow: 0 2px 8px rgba(16,185,129,.25);
}

.mini-btn.admin-btn {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}

.mini-btn.admin-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

.mini-btn.logout-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
  cursor: pointer;
}

.mini-btn.logout-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .info-actions { width: 100%; justify-content: center; margin-left: 0; }
}

/* Login Controls */
.login-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 12px;
  color: white;
  width: 48px;
  height: 48px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-btn::before {
  content: attr(title);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1000;
}

.login-btn:hover::before {
  opacity: 1;
  bottom: -35px;
}

.login-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.5);
}

.login-btn:active {
  transform: translateY(0) scale(0.98);
}

.login-btn .btn-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.3s ease;
}

.login-btn:hover .btn-icon {
  transform: scale(1.1);
}

.login-btn.logout {
  background: linear-gradient(135deg, var(--danger), #ff7a7a);
  box-shadow: 0 4px 12px rgba(255, 92, 92, 0.3);
}

.login-btn.logout:hover {
  box-shadow: 0 6px 20px rgba(255, 92, 92, 0.5);
}

.login-btn.logout .btn-icon {
  stroke: white;
}

/* Fullscreen mode - hide login button */
body.fullscreen .login-controls {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* User Info */
.user-info, #user-info {
  margin-top: 16px;
  padding: 16px 20px;
  background: rgba(47, 107, 255, 0.1);
  border: 1px solid rgba(47, 107, 255, 0.2);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  backdrop-filter: blur(10px);
}

/* Position user-info at top-right and limit width on desktop */
.header .user-info, .header #user-info {
  position: absolute;
  top: 16px;
  right: 28px;
  margin-top: 0;
  max-width: 360px;
}

/* Space between buttons on desktop */
.user-info .logout-btn + .logout-btn, #user-info .logout-btn + .logout-btn {
  margin-left: 8px;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logged-as, .user-name {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.logged-as span, .user-name span {
  color: var(--accent-2);
  font-weight: 600;
}

.logout-btn {
  background: linear-gradient(135deg, var(--danger), #ff7a7a);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 92, 92, 0.3);
  position: relative;
  overflow: hidden;
}

.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 92, 92, 0.4);
}

.logout-btn:active {
  transform: translateY(0);
}

/* Display Mode Info */
.display-mode-info {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(32, 201, 151, 0.1);
  border: 1px solid rgba(32, 201, 151, 0.2);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.display-text {
  margin: 0;
  color: var(--success);
  font-size: 14px;
  font-weight: 600;
}

.back-to-login-btn {
  padding: 8px 16px;
  background: rgba(47, 107, 255, 0.1);
  border: 1px solid rgba(47, 107, 255, 0.3);
  border-radius: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-to-login-btn:hover {
  background: rgba(47, 107, 255, 0.2);
  border-color: rgba(47, 107, 255, 0.5);
  transform: translateY(-1px);
}

.logged-as {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.logged-as span {
  color: var(--accent);
  font-weight: 700;
}

.logout-btn {
  padding: 8px 16px;
  background: rgba(255, 92, 92, 0.1);
  border: 1px solid rgba(255, 92, 92, 0.3);
  border-radius: 8px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 92, 92, 0.2);
  border-color: rgba(255, 92, 92, 0.5);
  transform: translateY(-1px);
}

/* Analog Clock */
.clock {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
}
.clock-face {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #1e2a5e, #0e1431 65%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06), var(--shadow);
  overflow: hidden;
}

.clock-face::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: 50%;
  border-radius: 0;
  background-image: url('../assets/logo.png'), url('logo.png'), url('assets/logo.png');
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  filter: brightness(1.5) contrast(1.3) drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
}

.clock-face::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(30, 42, 94, 0.2), rgba(14, 20, 49, 0.4));
  z-index: 0;
  pointer-events: none;
}

.clock-face > * {
  position: relative;
  z-index: 1;
}
.number { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #cfe1ff; opacity: .95; font-weight: 800; text-shadow: 0 1px 0 rgba(0,0,0,.4); z-index: 1; font-size: clamp(14px, 2.4vw, 22px); }
/* tick styles removed as minute marks are disabled */
.center-dot {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  z-index: 3;
}
.hand { position: absolute; left: 50%; top: 50%; transform-origin: 0% 50%; transform: rotate(90deg); z-index: 2; }
.hand.hour   { width: 28%; height: 6px;  background: #ffffffd9; border-radius: 4px; }
.hand.minute { width: 38%; height: 4px;  background: #cfe1ff; border-radius: 4px; }
.hand.second { width: 42%; height: 2px;  background: var(--accent-2); box-shadow: 0 0 14px var(--accent-2); }

/* Layout */
.container { padding: 0 28px 40px; }

/* Two Column Layout */
.two-column-layout {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px;
  width: 100%;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px) rotateX(2deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.card-header, .row { display: grid; grid-template-columns: 80px 1fr 220px; align-items: center; }
.card-header {
  padding: 18px 22px;
  background: linear-gradient(180deg, #1932a8, #122a99);
  font-weight: 700;
  letter-spacing: .02em;
  font-size: 1.1rem;
}
.status-col { 
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}
.table-body .row:nth-child(odd) { background: #0d1636; }
.table-body .row:nth-child(even){ background: #0b1330; }
.row { padding: 16px 22px; }
.cell { font-size: 1.02rem; }
.cell.center { 
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px; /* Fixed width untuk alignment */
  min-width: 160px;
  max-width: 160px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  text-align: center;
  white-space: nowrap;
  transition: transform .1s ease, box-shadow .2s ease, background-color .2s ease;
}
.badge.success { background: rgba(32, 201, 151, .15); color: #34e4b5; box-shadow: inset 0 0 0 2px rgba(32,201,151,.35); }
.badge.warning { background: rgba(255, 193, 7, .15); color: #ffc107; box-shadow: inset 0 0 0 2px rgba(255,193,7,.35); }
.badge.danger  { background: rgba(255, 92, 92, .15); color: #ff8989; box-shadow: inset 0 0 0 2px rgba(255,92,92,.35); }
.badge.info    { background: rgba(23, 162, 184, .15); color: #4dd4e8; box-shadow: inset 0 0 0 2px rgba(23,162,184,.35); }
.badge:active { transform: scale(0.98); }

/* Dropdown Status Selector */
.status-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.dropdown-trigger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #1a2456, #0f1630);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.dropdown-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-option:first-child {
  border-radius: 12px 12px 0 0;
}

.dropdown-option:last-child {
  border-radius: 0 0 12px 12px;
  border-bottom: none;
}

.dropdown-option:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.dropdown-option.active {
  background: rgba(255, 255, 255, 0.1);
  position: relative;
}

.dropdown-option.active::before {
  content: '✓';
  position: absolute;
  left: 12px;
  font-weight: bold;
}

/* Dropdown option colors */
.dropdown-option.success { color: #34e4b5; }
.dropdown-option.warning { color: #ffc107; }
.dropdown-option.danger { color: #ff8989; }
.dropdown-option.info { color: #4dd4e8; }

.dropdown-option.success:hover { background: rgba(32, 201, 151, 0.1); }
.dropdown-option.warning:hover { background: rgba(255, 193, 7, 0.1); }
.dropdown-option.danger:hover { background: rgba(255, 92, 92, 0.1); }
.dropdown-option.info:hover { background: rgba(23, 162, 184, 0.1); }

/* Status change animations */
@keyframes status-bump { 0% { transform: scale(1); } 30% { transform: scale(1.08); } 60% { transform: scale(0.96); } 100% { transform: scale(1); } }
@keyframes status-glow-success { 0% { box-shadow: 0 0 0 0 rgba(32,201,151,.8); } 100% { box-shadow: 0 0 0 14px rgba(32,201,151,0); } }
@keyframes status-glow-warning { 0% { box-shadow: 0 0 0 0 rgba(255,193,7,.8); } 100% { box-shadow: 0 0 0 14px rgba(255,193,7,0); } }
@keyframes status-glow-danger  { 0% { box-shadow: 0 0 0 0 rgba(255,92,92,.8); } 100% { box-shadow: 0 0 0 14px rgba(255,92,92,0); } }
@keyframes status-glow-info    { 0% { box-shadow: 0 0 0 0 rgba(23,162,184,.8); } 100% { box-shadow: 0 0 0 14px rgba(23,162,184,0); } }

.badge.anim-success { animation: status-bump .42s ease, status-glow-success .9s ease; }
.badge.anim-warning { animation: status-bump .42s ease, status-glow-warning .9s ease; }
.badge.anim-danger  { animation: status-bump .42s ease, status-glow-danger .9s ease; }
.badge.anim-info    { animation: status-bump .42s ease, status-glow-info .9s ease; }

/* Status Select (Listbox) Styling */
.status-select {
  width: 100%;
  max-width: 180px;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.status-select.success {
  background-color: rgba(32, 201, 151, .15);
  color: #34e4b5;
  border-color: rgba(32,201,151,.35);
}

.status-select.warning {
  background-color: rgba(255, 193, 7, .15);
  color: #ffc107;
  border-color: rgba(255,193,7,.35);
}

.status-select.danger {
  background-color: rgba(255, 92, 92, .15);
  color: #ff8989;
  border-color: rgba(255,92,92,.35);
}

.status-select.info {
  background-color: rgba(23, 162, 184, .15);
  color: #4dd4e8;
  border-color: rgba(23,162,184,.35);
}

.status-select:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.status-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.3);
}

.status-select:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.status-select.loading {
  opacity: 0.6;
  pointer-events: none;
}

.status-select option {
  background: #0f1630;
  color: #e6ecff;
  padding: 10px;
  font-weight: 600;
}

/* Animation for status update */
@keyframes statusUpdate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.status-select.status-updated {
  animation: statusUpdate 0.4s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .status-select {
    max-width: 150px;
    font-size: 0.85rem;
    padding: 8px 10px;
    padding-right: 28px;
  }
}

@media (max-width: 480px) {
  .status-select {
    max-width: 130px;
    font-size: 0.8rem;
    padding: 7px 8px;
    padding-right: 24px;
  }
}

/* Loading gear on badge */
@keyframes gear-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.badge.loading { opacity: .95; pointer-events: none; }
.badge.loading::after {
  content: '⚙';
  display: inline-block;
  margin-left: 10px;
  font-size: 14px;
  animation: gear-spin 2s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.2));
}

.card-footer {
  padding: 14px 22px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 768px) {
  .header { grid-template-columns: 1fr; text-align: center; }
  .clock { margin: 0 auto; }
  .login-controls { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    z-index: 10;
  }
  .login-btn {
    width: 44px;
    height: 44px;
  }
  .login-btn .btn-icon {
    width: 22px;
    height: 22px;
  }
  .two-column-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .card-header, .row { grid-template-columns: 54px 1fr 150px; }
  
  .user-info, #user-info {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 12px 16px;
    position: static; /* reset absolute */
    max-width: none;
    width: 100%;
    margin-top: 12px;
  }
  /* Remove horizontal gap when stacked */
  .user-info .logout-btn + .logout-btn, #user-info .logout-btn + .logout-btn { margin-left: 0; width: 100%; max-width: 200px; }
  
  .user-details {
    align-items: center;
  }
  
  .logout-btn {
    width: 100%;
    max-width: 200px;
  }
  
  .display-mode-info {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* Portrait TV optimization */
@media (orientation: portrait) {
  .header { grid-template-columns: 1fr; text-align: center; padding: 28px 20px 8px; }
  .clock { width: min(72vw, 34vh); height: min(72vw, 34vh); margin: 0 auto; }
  .page-title { font-size: clamp(30px, 5.4vw, 64px); }
  .subtitle { font-size: clamp(18px, 3.2vw, 32px); }
  .date-text { font-size: clamp(16px, 3vw, 28px); }

  .container { padding: 8px 20px 36px; }
  .two-column-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .card-header, .row { grid-template-columns: 70px 1fr minmax(140px, 38vw); }
  .card-header { font-size: clamp(18px, 3.6vw, 30px); }
  .cell { font-size: clamp(16px, 3vw, 28px); }
  .badge { 
    width: clamp(140px, 34vw, 300px);
    min-width: clamp(140px, 34vw, 300px); 
    max-width: clamp(140px, 34vw, 300px);
    font-size: clamp(16px, 3.2vw, 28px); 
    padding: clamp(10px, 2.4vw, 18px) clamp(16px, 3.4vw, 24px); 
  }
  
  .user-info {
    padding: clamp(12px, 2.4vw, 20px) clamp(16px, 3.2vw, 24px);
    margin-top: clamp(16px, 3.2vw, 24px);
  }
  
  .display-mode-info {
    padding: clamp(12px, 2.4vw, 20px) clamp(16px, 3.2vw, 24px);
    margin-top: clamp(16px, 3.2vw, 24px);
  }
  
  .logged-as {
    font-size: clamp(14px, 2.8vw, 20px);
  }
  
  .logout-btn {
    font-size: clamp(12px, 2.4vw, 16px);
    padding: clamp(8px, 1.6vw, 12px) clamp(16px, 3.2vw, 20px);
  }
  
  .display-text {
    font-size: clamp(14px, 2.8vw, 20px);
  }
  
  .back-to-login-btn {
    font-size: clamp(12px, 2.4vw, 16px);
    padding: clamp(8px, 1.6vw, 12px) clamp(16px, 3.2vw, 20px);
  }
}

/* Small phones */
@media (max-width: 480px) {
  .container { padding: 10px; }
  .card { border-radius: 14px; }
  .card-header, .row { grid-template-columns: 44px 1fr 120px; }
  .cell { padding: 10px 8px; }
  .badge { 
    width: 120px;
    min-width: 120px; 
    max-width: 120px;
    padding: 10px 14px; 
  }
  .clock { width: 180px; height: 180px; }
  .page-title { font-size: 24px; }
}

/* Extra small height devices in portrait */
@media (orientation: portrait) and (max-height: 740px) {
  .clock { width: min(78vw, 34vh); height: min(78vw, 34vh); }
  .page-title { font-size: clamp(26px, 5vw, 52px); }
  .subtitle { font-size: clamp(16px, 2.8vw, 24px); }
  .date-text { font-size: clamp(14px, 2.6vw, 22px); }
  .card-header, .row { grid-template-columns: 60px 1fr minmax(130px, 36vw); }
}

/* Footer styles moved to assets/footer.css for better organization */


