html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ---------------------------------------------------------------------- */
/* App shell: left sidebar + content, replaces the Flutter main_shell     */
/* ---------------------------------------------------------------------- */

body {
  background-color: #f4f6fb;
  margin-bottom: 0;
}

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

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #14161f;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.sidebar-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #3b82f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: background-color .15s ease, color .15s ease;
}

.sidebar-icon {
  width: 20px;
  display: inline-flex;
  justify-content: center;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-link.active {
  background: #3b82f6;
  color: #fff;
}

.sidebar-footer {
  padding: 14px 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer .navbar-nav {
  flex-direction: column;
}

.sidebar-footer a, .sidebar-footer button {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.85rem;
}

.app-content {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 60px;
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .app-content {
    padding: 20px;
  }
}

/* ---------------------------------------------------------------------- */
/* Dashboard-style cards, stat tiles, progress bars, badges               */
/* ---------------------------------------------------------------------- */

.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  height: 100%;
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.stat-card .stat-sub {
  font-size: 0.78rem;
  color: #94a3b8;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.duffl-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.progress-thin {
  height: 7px;
  border-radius: 4px;
  background-color: rgba(15, 23, 42, 0.07);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-circle.sm {
  width: 26px;
  height: 26px;
  font-size: 0.65rem;
}

.avatar-stack {
  display: flex;
}

.avatar-stack .avatar-circle {
  border: 2px solid #fff;
  margin-left: -10px;
}

.avatar-stack .avatar-circle:first-child {
  margin-left: 0;
}

.project-icon-tile {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
  background: rgba(15, 23, 42, 0.05);
  text-decoration: none;
  border: none;
}

.chip.active {
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding-top: 10px;
}

.bar-chart .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
}

.bar-chart .bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
}

.bar-chart .bar {
  width: 10px;
  border-radius: 4px;
  min-height: 4px;
}

.bar-chart .bar-day-label {
  font-size: 0.7rem;
  color: #94a3b8;
}

.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}

.task-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(15, 23, 42, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  color: #fff;
  font-size: 0.8rem;
}

.task-checkbox.done {
  background: #22c55e;
  border-color: #22c55e;
}

.task-title.done {
  text-decoration: line-through;
  color: #94a3b8;
}