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

:root {
  --bg: #f3f3f3;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(119, 119, 119, 0.15);
  --purple: #7c7c7c;
  --purple-light: #9f9f9f;
  --teal: #a6a6a6;
  --green: #919191;
  --amber: #d2d2d2;
  --red: #7d7d7d;
  --text-primary: #1c1c1c;
  --text-secondary: #686868;
  --text-muted: #999999;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
  --transition: 0.2s ease;
  --color-mint: #e5e5e5;
  --color-skyblue: #e1e1e1;
  --color-lavender: #dfdfdf;
  --color-cream: #f5f5f5;
  --color-peach: #e4e4e4;
  --color-cyan: #e9e9e9;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Glass utility ────────────────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 24px 60px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

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

/* ── AUTH SCREEN ──────────────────────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #eeeeee 0%, #ebebeb 50%, #ececec 100%);
}

.auth-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 8s ease-in-out infinite;
}

.blob1 {
  width: 400px;
  height: 400px;
  background: #7c7c7c;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.blob2 {
  width: 300px;
  height: 300px;
  background: #a6a6a6;
  bottom: -80px;
  right: -80px;
  animation-delay: -3s;
}

.blob3 {
  width: 200px;
  height: 200px;
  background: #919191;
  top: 50%;
  left: 60%;
  animation-delay: -6s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(20px, -20px) scale(1.05);
  }

  66% {
    transform: translate(-10px, 10px) scale(0.95);
  }
}

.auth-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1c1c1c;
}

.brand-icon {
  display: flex;
  align-items: center;
}

.brand-icon.small svg {
  width: 28px;
  height: 28px;
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.75rem;
}

.auth-tab {
  flex: 1;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--purple);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(124, 124, 124, 0.3);
}

/* Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #686868;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.72rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 124, 124, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.93rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 124, 124, 0.15);
}

.form-group select option {
  background: #ffffff;
  color: var(--text-primary);
}

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

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  padding-right: 3rem;
}

.eye-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.eye-btn:hover {
  opacity: 1;
}

.form-row {
  display: flex;
  gap: 1rem;
}

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

.req {
  color: var(--red);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, #7c7c7c, #808080);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 16px rgba(124, 124, 124, 0.25);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 124, 124, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 124, 124, 0.2);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover {
  background: rgba(124, 124, 124, 0.08);
  color: var(--text-primary);
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.auth-error {
  color: #606060;
  font-size: 0.84rem;
  padding: 0.6rem 0.9rem;
  background: rgba(125, 125, 125, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(125, 125, 125, 0.3);
}

/* ── APP LAYOUT ───────────────────────────────────────────────────────── */
.app-screen {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f3f3f3;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(124, 124, 124, 0.15);
  border-radius: 0;
  padding: 1.5rem 1rem;
  overflow: hidden;
  transition: width 0.3s ease, padding 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  background: #ffffff;
}

.sidebar.collapsed {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  border-right-color: transparent;
  pointer-events: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0 0.5rem;
  margin-bottom: 2rem;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: var(--transition);
}

.nav-item:hover {
  background: rgba(124, 124, 124, 0.08);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(124, 124, 124, 0.15);
  color: var(--purple);
  font-weight: 600;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(124, 124, 124, 0.15);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  overflow: hidden;
}

.user-pill span {
  font-size: 0.85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.logout-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.logout-btn:hover {
  background: rgba(125, 125, 125, 0.12);
  color: #7d7d7d;
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 2rem 1rem;
  border-bottom: 1px solid rgba(124, 124, 124, 0.1);
  flex-shrink: 0;
  background: #ffffff;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.content-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1c1c1c;
}

.subtitle {
  font-size: 0.85rem;
  color: #686868;
  margin-top: 0.2rem;
}

/* Views */
.view {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem 2rem;
  background: #f3f3f3;
}

.view.active {
  display: block;
}

.view.hidden {
  display: none;
}

/* ── DASHBOARD ────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
  border: 1px solid rgba(124, 124, 124, 0.1);
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card[data-color="purple"] {
  background: #dfdfdf;
  border-color: rgba(124, 124, 124, 0.2);
}

.stat-card[data-color="amber"] {
  background: #e4e4e4;
  border-color: rgba(210, 210, 210, 0.3);
}

.stat-card[data-color="blue"] {
  background: #e1e1e1;
  border-color: rgba(166, 166, 166, 0.3);
}

.stat-card[data-color="green"] {
  background: #e5e5e5;
  border-color: rgba(145, 145, 145, 0.3);
}

.stat-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  color: #1c1c1c;
}

.stat-label {
  font-size: 0.78rem;
  color: #686868;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
  display: block;
}

.stat-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  right: -20px;
  bottom: -20px;
  opacity: 0.1;
}

.stat-card[data-color="purple"] .stat-ring {
  background: var(--purple);
}

.stat-card[data-color="amber"] .stat-ring {
  background: var(--amber);
}

.stat-card[data-color="blue"] .stat-ring {
  background: var(--teal);
}

.stat-card[data-color="green"] .stat-ring {
  background: var(--green);
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quick-section {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.section-header {
  display: flex;
  align-items: center;

  gap: 0.6rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #1c1c1c;
}

.badge {
  background: rgba(124, 124, 124, 0.15);
  color: #7c7c7c;
  border-radius: 20px;
  padding: 0.1rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── SKELETON LOADER ──────────────────────────────────────────────────── */
.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skeleton {
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.05) 25%, rgba(0, 0, 0, 0.08) 50%, rgba(0, 0, 0, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ── TASK LIST ────────────────────────────────────────────────────────── */
.tasks-container {
  display: grid;
  grid: wrap;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 10px;
}

.tasks-container .task-card {
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  min-width: 420px;
  /* important */
  opacity: 100%;
  padding: 1.5rem;
  border-left: 4px solid transparent;
  border-top: 4px solid transparent;
  background: white;
  border: 1px solid rgba(160, 160, 160, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 20px 46px rgba(22, 22, 22, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tasks-container .task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(22, 22, 22, 0.12);
}

.tasks-container .task-card.status-IN_PROGRESS {
  border-color: #e7e7e7;
}

.tasks-container .task-card.status-COMPLETED {
  border-color: rgba(82, 82, 82, 0.548);
}

.tasks-container .task-card.status-PENDING {
  border-color: #a0a0a0
}

.tasks-container .task-card.priority-HIGH {
  border-left-color: rgba(108, 108, 108, 0.65);
}

.tasks-container .task-card.priority-MEDIUM {
  border-left-color: rgba(192, 192, 192, 0.65);
}

.tasks-container .task-card.priority-LOW {
  border-left-color: rgba(97, 97, 97, 0.65);
}

.tasks-container .task-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tasks-container .task-title {
  font-size: 1.2rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.tasks-container .task-desc {
  font-size: 0.92rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  margin-bottom: auto;
  line-height: 1.5;
}

.tasks-container .task-meta {
  margin-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(124, 124, 124, 0.1);
}

.tasks-container .task-actions {
  width: 100%;
  justify-content: flex-end;
  margin-top: 1rem;
}

.task-card {
  background: #ffffff;
  border: 1px solid rgba(124, 124, 124, 0.15);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.task-card.status-COMPLETED {
  opacity: 0.65;
}

.task-card.status-IN_PROGRESS {
  border-left: 3px solid var(--teal);
}

.task-card.status-COMPLETED {
  border-left: 3px solid var(--green);
}

.task-card.status-PENDING {
  border-left: 3px solid var(--amber);
}

.task-main {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1c1c1c;
}

.task-card.status-COMPLETED .task-title {
  text-decoration: line-through;
  color: #686868;
}

.task-desc {
  font-size: 0.82rem;
  color: #686868;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.chip {
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.chip-priority-HIGH {
  background: rgba(125, 125, 125, 0.15);
  color: #7d7d7d;
}

.chip-priority-MEDIUM {
  background: rgba(210, 210, 210, 0.15);
  color: #d2d2d2;
}

.chip-priority-LOW {
  background: rgba(90, 90, 90, 0.15);
  color: rgba(97, 97, 97, 0.65);
}

.chip-status-PENDING {
  background: rgba(210, 210, 210, 0.15);
  color: #a0a0a0;
}

.chip-status-IN_PROGRESS {
  background: rgba(166, 166, 166, 0.15);
  color: #a6a6a6;
}

.chip-status-COMPLETED {
  background: rgba(82, 82, 82, 0.548);
  color: white;
}

.chip-forwhen {
  background: rgba(124, 124, 124, 0.1);
  color: #686868;
}

.chip-duration {
  background: rgba(124, 124, 124, 0.15);
  color: #7c7c7c;
}

.task-time-meta {
  font-size: 0.78rem;
  color: #999999;
  margin-top: 0.6rem;
}

.tasks-container .task-time-meta {
  margin-bottom: 0;
}

.task-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
  align-items: center;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #999999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.9rem;
}

.icon-btn:hover {
  background: rgba(124, 124, 124, 0.1);
  color: #1c1c1c;
}

.icon-btn.danger:hover {
  background: rgba(125, 125, 125, 0.15);
  color: #7d7d7d;
}

.icon-btn.success:hover {
  background: rgba(145, 145, 145, 0.15);
  color: #919191;
}

.icon-btn.info:hover {
  background: rgba(166, 166, 166, 0.15);
  color: #a6a6a6;
}

/* Mini task list for dashboard */
.task-list.mini .task-card {
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.task-list.mini {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Allow descriptions in the mini list to preserve newlines and wrap */
.task-list.mini .task-desc {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: block;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.filter-group {
  display: flex;
  gap: 0.75rem;
}

.filter-bar select {
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(124, 124, 124, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.filter-bar select:focus {
  border-color: var(--purple);
}

.filter-bar select option {
  background: #ffffff;
  color: var(--text-primary);
}

/* ── MODALS ───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(6px);
  animation: fadeOverlay 0.2s ease;
}

@keyframes fadeOverlay {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.12);
  animation: modalIn 0.25s ease;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.modal.small {
  max-width: 400px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(124, 124, 124, 0.15);
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1c1c1c;
}

.modal-close {
  width: 30px;
  height: 30px;
  border: none;
  background: rgba(124, 124, 124, 0.1);
  color: #686868;
  border-radius: 6px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}

.modal-close:hover {
  background: rgba(125, 125, 125, 0.15);
  color: #7d7d7d;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 3rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(124, 124, 124, 0.15);
  border-top-color: #7c7c7c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #999999;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ── TOAST ────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 9999;
}

.toast {
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  max-width: 320px;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: var(--shadow-sm);
}

.toast-success {
  background: rgba(145, 145, 145, 0.15);
  border: 1px solid rgba(145, 145, 145, 0.3);
  color: #919191;
}

.toast-error {
  background: rgba(125, 125, 125, 0.15);
  border: 1px solid rgba(125, 125, 125, 0.3);
  color: #7d7d7d;
}

.toast-info {
  background: rgba(124, 124, 124, 0.15);
  border: 1px solid rgba(124, 124, 124, 0.3);
  color: #7c7c7c;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* ── SCROLLBAR ────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(124, 124, 124, 0.2);
  border-radius: 10px;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .tasks-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    width: 200px;
  }
}

@media (max-width: 760px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

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

  .filter-bar select,
  .btn-ghost {
    width: 100%;
  }

  .task-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .sidebar {
    position: absolute;
    z-index: 1000;
    height: 100%;
    background: #ffffff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(-100%);
    width: 240px;
    padding: 1.5rem 1rem;
    opacity: 1;
    pointer-events: auto;
  }

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

  .stats-grid,
  .tasks-container {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .content-header {
    padding: 1rem;
  }

  .view {
    padding: 1rem;
  }

  .task-card {
    padding: 1.2rem;
  }

  .task-actions {
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
}