/* ============================================================
   ANTINOOB MEDIA — Task Management System
   Premium Dark Theme CSS
   ============================================================ */

/* ----- CSS Reset ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body, input, textarea, select, button {
  font-family: 'Urbanist', sans-serif;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; }
input, textarea, select { outline: none; border: none; background: none; }

/* ----- CSS Custom Properties ----- */
:root {
  /* Surfaces */
  --bg-root: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1a1a1a;
  --bg-input: #141414;

  /* Accent */
  --accent: #EE692E;
  --accent-rgb: 238, 105, 46;
  --accent-hover: #f57b44;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);

  /* Radii */
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);

  /* Glass */
  --glass-bg: rgba(20, 20, 20, 0.6);
  --glass-blur: blur(20px);
  --glass-border: 1px solid var(--border-subtle);

  /* Focus */
  --focus-ring: 0 0 0 2px rgba(238, 105, 46, 0.3);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s var(--ease);

  /* Sizes */
  --header-h: 64px;
  --container-max: 1200px;

  /* Priority Colors */
  --priority-low: #4ade80;
  --priority-medium: #facc15;
  --priority-high: #f97316;
  --priority-urgent: #ef4444;
  --priority-redzone: #991b1b;

  /* Status Colors */
  --status-pending: #6b7280;
  --status-progress: #3b82f6;
  --status-completed: #22c55e;
  --status-overdue: #ef4444;

  /* Toast */
  --toast-success: #22c55e;
  --toast-error: #ef4444;
  --toast-info: #EE692E;
}

/* ----- Base Body ----- */
body {
  background: var(--bg-root);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ----- Typography ----- */
h1 { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 24px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.4; }
h4 { font-size: 16px; font-weight: 500; line-height: 1.4; }

p { color: var(--text-secondary); line-height: 1.6; }

.required { color: var(--accent); font-weight: 500; }
.optional { color: var(--text-muted); font-weight: 300; font-size: 13px; }
.muted-text { color: var(--text-muted); font-size: 14px; }

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

/* ----- Custom Scrollbar ----- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(238, 105, 46, 0.3);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(238, 105, 46, 0.55);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(238, 105, 46, 0.3) transparent;
}

/* ----- Layout ----- */
.page-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 40px) 24px 60px;
}

.view {
  animation: fadeIn 0.4s var(--ease);
}
.view.active {
  display: block;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(238, 105, 46, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(238, 105, 46, 0.04) 0%, transparent 50%),
    var(--bg-root);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-card);
  padding: 48px 40px;
  box-shadow: var(--shadow-elevated);
  animation: slideUp 0.6s var(--ease);
  position: relative;
  overflow: hidden;
}

/* Subtle top accent bar */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}

.login-logo {
  text-align: center;
  margin-bottom: 8px;
}

.brand-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.login-tagline {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 36px;
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-input);
  margin-bottom: 16px;
  animation: fadeIn 0.3s var(--ease);
}

.login-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 24px;
}

/* Password wrapper */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  width: 100%;
  padding-right: 48px;
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
  padding: 4px;
  transition: var(--transition);
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
}
.toggle-pw:hover {
  color: var(--text-secondary);
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-inner {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-left {
  flex-shrink: 0;
}

.header-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.nav-link:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(238, 105, 46, 0.12);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

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

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #d45a1f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: var(--text-primary);
  padding: 4px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 1001;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Urbanist', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  border: none;
  outline: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.4);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.btn-outline:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--status-overdue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="datetime-local"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Urbanist', sans-serif;
  transition: var(--transition);
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="datetime-local"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--focus-ring);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 48px;
}

/* datetime-local icon color fix */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}

.readonly-field {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* Form layout */
.form-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.form-row {
  display: grid;
  gap: 20px;
}
.form-row.two-col {
  grid-template-columns: 1fr 1fr;
}

.form-header {
  margin-bottom: 32px;
}

.form-header h1 {
  margin-bottom: 8px;
}

.form-quote {
  font-style: italic;
  color: var(--accent) !important;
  font-size: 15px;
  font-weight: 400;
  position: relative;
  padding-left: 20px;
}
.form-quote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -4px;
  font-size: 28px;
  color: rgba(var(--accent-rgb), 0.4);
  font-family: Georgia, serif;
  line-height: 1;
}

.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-row label:first-child {
  margin-bottom: 0;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  display: inline-block;
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 0 !important;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Conditional fields */
.conditional-field {
  margin-top: 12px;
  animation: slideDown 0.3s var(--ease);
}
.conditional-field.hidden {
  display: none;
}
.conditional-field.visible {
  display: block;
  animation: slideDown 0.3s var(--ease);
}

/* ============================================================
   CUSTOM SELECT
   ============================================================ */
.custom-select {
  position: relative;
  user-select: none;
}

/* Trigger button */
.cs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  min-height: 46px;
}

.cs-trigger:hover {
  border-color: var(--border-light);
}

.custom-select.open .cs-trigger {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--focus-ring);
}

.cs-value {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select.open .cs-value,
.cs-value.has-value {
  color: var(--text-primary);
}

.cs-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: var(--transition);
  margin-left: 12px;
  flex-shrink: 0;
}

.custom-select.open .cs-arrow {
  transform: rotate(180deg);
}

/* Dropdown panel */
.cs-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-elevated);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  overflow: hidden;
}

.custom-select.open .cs-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Search inside dropdown */
.cs-search-wrap {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.cs-search {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'Urbanist', sans-serif;
}
.cs-search:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--focus-ring);
}
.cs-search::placeholder {
  color: var(--text-muted);
}

/* Options list */
.cs-options {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

.cs-option {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.cs-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.cs-option.selected {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  font-weight: 500;
}

.cs-option.selected:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

/* Multi-select tags (if used) */
.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cs-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-pill);
}

.cs-tag .tag-remove {
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: var(--transition);
}
.cs-tag .tag-remove:hover {
  opacity: 1;
}

/* ============================================================
   TIME PICKER
   ============================================================ */
.time-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-select {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Urbanist', sans-serif;
  transition: var(--transition);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.time-select:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--focus-ring);
}

.time-sep {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ============================================================
   WELCOME SECTION
   ============================================================ */
.welcome-section {
  margin-bottom: 40px;
}

.welcome-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.welcome-title span {
  color: var(--accent);
}

.welcome-date {
  font-size: 15px;
  color: var(--text-muted);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: rgba(var(--accent-rgb), 0.15);
}

.stat-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   ACTION CARDS
   ============================================================ */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  opacity: 0;
  background: radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.08) 0%, transparent 70%);
  transition: var(--transition);
}

.action-card:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.08);
}

.action-card:hover::before {
  opacity: 1;
}

.action-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.action-card h3 {
  color: var(--text-primary);
  margin-bottom: 6px;
  position: relative;
}

.action-card p {
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
}

/* ============================================================
   MY TASKS VIEW
   ============================================================ */
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'Urbanist', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  min-width: 140px;
}

.filter-select:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--focus-ring);
}

.filter-search {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'Urbanist', sans-serif;
  transition: var(--transition);
  min-width: 200px;
}
.filter-search::placeholder {
  color: var(--text-muted);
}
.filter-search:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--focus-ring);
}

/* Task list */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  cursor: pointer;
  transition: var(--transition);
  flex-wrap: wrap;
}

.task-card:hover {
  border-color: rgba(var(--accent-rgb), 0.25);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.task-id-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Urbanist', monospace;
}

.task-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 140px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

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

/* Priority colors */
.priority-low .priority-dot { background: var(--priority-low); }
.priority-low { color: var(--priority-low); }

.priority-medium .priority-dot { background: var(--priority-medium); }
.priority-medium { color: var(--priority-medium); }

.priority-high .priority-dot { background: var(--priority-high); }
.priority-high { color: var(--priority-high); }

.priority-urgent .priority-dot { background: var(--priority-urgent); }
.priority-urgent { color: var(--priority-urgent); }

.priority-redzone .priority-dot { background: var(--priority-redzone); }
.priority-redzone { color: var(--priority-redzone); }

.task-due {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-pending {
  background: rgba(107, 114, 128, 0.15);
  color: var(--status-pending);
}

.status-progress {
  background: rgba(59, 130, 246, 0.15);
  color: var(--status-progress);
}

.status-completed {
  background: rgba(34, 197, 94, 0.15);
  color: var(--status-completed);
}

.status-overdue {
  background: rgba(239, 68, 68, 0.15);
  color: var(--status-overdue);
}

/* Complete button on task card */
.task-complete-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  color: var(--status-completed);
}

.task-complete-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--status-completed);
  transform: scale(1.1);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.page-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
}

.admin-search {
  margin-bottom: 24px;
}

.admin-search input {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Urbanist', sans-serif;
  transition: var(--transition);
}
.admin-search input::placeholder {
  color: var(--text-muted);
}
.admin-search input:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--focus-ring);
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  transition: var(--transition);
}

.admin-user-row:hover {
  border-color: rgba(var(--accent-rgb), 0.15);
  background: var(--bg-elevated);
}

.admin-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #d45a1f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

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

.admin-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-user-dept {
  font-size: 13px;
  color: var(--text-muted);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.role-admin {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}

.role-manager {
  background: rgba(59, 130, 246, 0.12);
  color: var(--status-progress);
}

.role-executor {
  background: rgba(107, 114, 128, 0.12);
  color: var(--text-muted);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  animation: fadeIn 0.25s var(--ease);
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-elevated);
  border: var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevated);
  animation: slideUp 0.35s var(--ease);
  overflow: hidden;
}

.modal-card.modal-lg {
  max-width: 640px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
  font-size: 20px;
}

.modal-close {
  font-size: 24px;
  color: var(--text-muted);
  padding: 4px;
  cursor: pointer;
  transition: var(--transition);
  background: none;
  border: none;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px 28px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border-subtle);
}

/* Task detail modal body */
.task-detail-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

.task-detail-label {
  color: var(--text-muted);
  font-weight: 500;
  min-width: 120px;
  flex-shrink: 0;
}

.task-detail-value {
  color: var(--text-primary);
  word-break: break-word;
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  z-index: 3000;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-card);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: auto;
  animation: slideInRight 0.4s var(--ease);
  max-width: 400px;
}

.toast.toast-success {
  border-left: 3px solid var(--toast-success);
}

.toast.toast-error {
  border-left: 3px solid var(--toast-error);
}

.toast.toast-info {
  border-left: 3px solid var(--toast-info);
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.toast.dismissing {
  animation: slideOutRight 0.3s var(--ease) forwards;
}

/* ============================================================
   TIME TAKEN LIST (EOD)
   ============================================================ */
.time-taken-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.time-taken-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
}

.time-taken-row .task-label {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-taken-row .time-picker {
  flex-shrink: 0;
}

.time-taken-row .time-select {
  padding: 8px 12px;
  font-size: 13px;
  min-width: 80px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 400px;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(80px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================================
   RESPONSIVE — Tablet (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .form-row.two-col {
    grid-template-columns: 1fr 1fr;
  }

  .welcome-title {
    font-size: 28px;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  h1 { font-size: 24px; }

  .page-container {
    padding: calc(var(--header-h) + 24px) 16px 40px;
  }

  /* Header responsive */
  .header-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 12px 16px;
    gap: 2px;
    animation: fadeIn 0.2s var(--ease);
  }

  .header-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
    border-radius: var(--radius-input);
    width: 100%;
  }

  .mobile-menu-btn {
    display: block;
  }

  .header-right {
    display: none;
  }

  .header-inner {
    padding: 0 16px;
  }

  /* Grids */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .form-row.two-col {
    grid-template-columns: 1fr;
  }

  /* Login */
  .login-card {
    padding: 36px 24px;
  }

  /* Forms */
  .form-card {
    padding: 24px 20px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }

  /* Filters */
  .page-header-row {
    flex-direction: column;
    gap: 16px;
  }

  .filter-bar {
    width: 100%;
    flex-direction: column;
  }

  .filter-select,
  .filter-search {
    width: 100%;
    min-width: unset;
  }

  /* Task card */
  .task-card {
    padding: 16px;
    gap: 10px;
  }

  /* Admin */
  .admin-user-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Toast */
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    max-width: 100%;
  }

  /* Modal */
  .modal-card {
    max-width: 100%;
  }

  .modal-card.modal-lg {
    max-width: 100%;
  }

  .modal-header {
    padding: 20px 20px 16px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 12px 20px 20px;
  }

  .stat-value {
    font-size: 36px;
  }

  .stat-card {
    padding: 20px;
  }

  .welcome-section {
    margin-bottom: 24px;
  }
}

/* ============================================================
   MISC / EXTRA POLISH
   ============================================================ */

/* Selection highlight */
::selection {
  background: rgba(var(--accent-rgb), 0.3);
  color: var(--text-primary);
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.5);
  outline-offset: 2px;
}

/* Loading spinner (utility) */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Smooth page view transitions */
.view {
  will-change: opacity;
}

/* Link style for inline links */
a.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a.inline-link:hover {
  color: var(--accent-hover);
}

/* ─────────────────────────────────────────────────────────────
   §10.5 MY TO-DOS & TIME BLOCKING STYLES
   ───────────────────────────────────────────────────────────── */

.todos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.todo-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(238, 105, 46, 0.3);
  transform: translateY(-2px);
}

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

.todo-item-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.todo-item-note {
  font-size: 14px;
  color: #94a3b8;
}

.todo-item-date {
  font-size: 12px;
  color: #ee692e;
  font-weight: 500;
}

.todo-item-right {
  display: flex;
  gap: 10px;
}

.todo-delete-btn {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.todo-delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

/* Time Blocking Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  min-width: 800px;
}

.calendar-day-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px;
  min-height: 400px;
}

.calendar-day-header {
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 5px;
}

.calendar-day-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.calendar-day-date {
  font-size: 12px;
  color: #94a3b8;
}

.calendar-event-card {
  padding: 10px 12px;
  background: rgba(238, 105, 46, 0.08);
  border: 1px solid rgba(238, 105, 46, 0.25);
  border-left: 4px solid #ee692e;
  border-radius: 8px;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.calendar-event-card:hover {
  background: rgba(238, 105, 46, 0.15);
  transform: translateY(-2px);
}

.calendar-event-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.calendar-event-time {
  font-size: 11px;
  color: #ee692e;
  font-weight: 500;
}

.calendar-event-note {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  word-break: break-all;
}

.calendar-event-creator {
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
  display: block;
}

.calendar-event-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  display: none;
}

.calendar-event-card:hover .calendar-event-delete {
  display: block;
}

.calendar-event-delete:hover {
  color: #ef4444;
}
