:root {
  color-scheme: dark;
  font-family: Inter, Arial, sans-serif;

  --bg-main: #0f172a;
  --bg-panel: rgba(30, 41, 59, 0.65);
  --bg-elevated: rgba(30, 41, 59, 0.85);

  --border-subtle: rgba(148, 163, 184, 0.15);
  --border-strong: rgba(148, 163, 184, 0.3);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;

  --accent: #6366f1;
  --accent-glow: #818cf8;

  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;

  --radius: 14px;
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 20%, #1e293b 0%, #0f172a 60%);
  color: var(--text-main);
  min-height: 100vh;
}

.topbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.6rem;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar h1,
.brand-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  height: 42px;
  width: auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(460px, 95vw);
}


.login-wrap {
  gap: 1.25rem;
}

.login-hero {
  text-align: center;
}

.login-hero-logo {
  width: min(78vw, 360px);
  height: auto;
  border-radius: 16px;
  box-shadow: 0 0 36px rgba(129, 140, 248, 0.7);
}

.login-hero-title {
  margin: 0.75rem 0 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: 0.6px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 0.75rem;
}

.auth-brand .brand-logo {
  height: 58px;
  margin-bottom: 0.3rem;
}

.container {
  padding: 1.6rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--bg-panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 10px 25px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.btn:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.8);
}

.btn.secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  box-shadow: none;
}

.btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.danger {
  background: var(--danger);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.form-grid {
  display: grid;
  gap: 0.55rem;
}

input,
select {
  width: 100%;
  padding: 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-main);
  transition: var(--transition);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.checkbox-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.filters {
  display: grid;
  gap: 0.55rem;
}

.list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.list-item {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.5);
  transition: var(--transition);
}

.list-item:hover {
  border-color: var(--border-strong);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.status {
  font-weight: 700;
}

.calendar-wrap {
  width: 100%;
  overflow-x: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.8rem;
  min-width: 720px;
}

.day-header {
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
}

.day-cell {
  min-height: 130px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.6rem;
  cursor: pointer;
  transition: var(--transition);
}

.day-cell:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.day-cell.muted {
  opacity: 0.3;
}

.day-number {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.shift-tag {
  margin-bottom: 0.35rem;
  border-radius: 8px;
  padding: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-content {
  width: min(620px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 1.2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.permissions-grid {
  display: grid;
  gap: 0.4rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem;
  background: rgba(15, 23, 42, 0.35);
}

.session-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  font-weight: 700;
  font-size: 0.85rem;
}

.status-pill {
  text-transform: capitalize;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.status-pill.pending {
  background: var(--warning);
}

.status-pill.approved {
  background: var(--success);
}

.status-pill.rejected {
  background: var(--danger);
}

.disabled-card {
  opacity: 0.6;
}

.small {
  font-size: 0.85rem;
}

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

.hidden {
  display: none !important;
}

a {
  color: #a5b4fc;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 0.9rem 1rem;
  }

  .topbar h1,
  .brand-title {
    font-size: 1.15rem;
  }

  .brand {
    width: 100%;
  }

  .container {
    padding: 0.8rem;
  }

  .login-hero-logo {
    width: min(86vw, 320px);
  }

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

  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .btn {
    width: 100%;
    text-align: center;
  }

  .actions {
    width: 100%;
  }

  .session-badge {
    width: 100%;
    text-align: center;
  }

  .day-cell {
    min-height: 110px;
  }
}
