:root {
  --primary: #6d5dfc;
  --primary-2: #00d4ff;
  --dark: #111827;
  --muted: #6b7280;
  --surface: rgba(255, 255, 255, .82);
  --border: rgba(255, 255, 255, .45);
  --radius: 24px;
  --shadow: 0 24px 70px rgba(17, 24, 39, .12);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--dark);
  background:
    radial-gradient(circle at 12% 18%, rgba(109, 93, 252, .22), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(0, 212, 255, .20), transparent 30%),
    linear-gradient(135deg, #f7f8ff 0%, #eef6ff 45%, #fff7fb 100%);
  background-attachment: fixed;
}

a {
  text-decoration: none;
}

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

.sidebar {
  position: sticky;
  top: 0;
  width: 280px;
  height: 100vh;
  padding: 24px;
  background: rgba(18, 23, 42, .88);
  color: #fff;
  backdrop-filter: blur(18px);
  box-shadow: 20px 0 60px rgba(17, 24, 39, .18);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-size: 1.45rem;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(109, 93, 252, .35);
}

.brand strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.brand small {
  color: rgba(255, 255, 255, .58);
  font-size: .8rem;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.side-nav a {
  color: rgba(255, 255, 255, .78);
  padding: 13px 14px;
  border-radius: 16px;
  font-weight: 600;
  transition: .2s ease;
}

.side-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  transform: translateX(4px);
}

.user-mini {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .10);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--primary);
  font-weight: 800;
}

.user-mini strong {
  display: block;
  font-size: .95rem;
}

.user-mini small {
  color: rgba(255, 255, 255, .62);
}

.logout {
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .10);
  font-weight: 700;
}

.logout:hover {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

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

.content-wrap {
  padding: 32px;
}

.mobile-topbar {
  display: none;
}

.hero-card {
  min-height: 210px;
  border-radius: 34px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(109, 93, 252, .95), rgba(0, 212, 255, .78)),
    url("data:image/svg+xml,%3Csvg width='700' height='240' viewBox='0 0 700 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255,255,255,.22)' stroke-width='2'%3E%3Ccircle cx='590' cy='40' r='80'/%3E%3Ccircle cx='90' cy='210' r='110'/%3E%3Cpath d='M420 20 C490 90 500 160 650 190'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
  box-shadow: 0 28px 70px rgba(109, 93, 252, .30);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  overflow: hidden;
}

.eyebrow {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .92);
  font-weight: 700;
  font-size: .82rem;
  margin-bottom: 14px;
}

.hero-title {
  max-width: 780px;
  font-size: clamp(1.8rem, 3.6vw, 3.4rem);
  line-height: 1.08;
  font-weight: 800;
  margin: 0 0 10px;
}

.hero-subtitle {
  max-width: 760px;
  color: rgba(255, 255, 255, .82);
  margin: 0;
}

.btn-glow {
  flex: 0 0 auto;
  border: 0;
  border-radius: 18px;
  padding: 14px 20px;
  background: #fff;
  color: var(--primary);
  font-weight: 800;
  box-shadow: 0 20px 45px rgba(17, 24, 39, .18);
}

.btn-glow:hover {
  background: #f8fbff;
  color: var(--primary);
  transform: translateY(-2px);
}

.stat-card-v2,
.panel-card,
.card {
  border: 1px solid rgba(255, 255, 255, .55) !important;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card-v2 {
  min-height: 145px;
  padding: 20px;
  transition: .22s ease;
  overflow: hidden;
  position: relative;
}

.stat-card-v2::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -28px;
  bottom: -28px;
  background: linear-gradient(135deg, rgba(109, 93, 252, .18), rgba(0, 212, 255, .18));
  border-radius: 999px;
}

.stat-card-v2:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 80px rgba(17, 24, 39, .16);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: rgba(109, 93, 252, .10);
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
}

.panel-card {
  padding: 24px;
}

.progress-xl {
  height: 18px;
  background: rgba(109, 93, 252, .10);
  border-radius: 999px;
  overflow: hidden;
}

.progress-animated {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  position: relative;
}

.progress-animated::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

.soft-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(109, 93, 252, .10);
  color: var(--primary);
  font-weight: 800;
}

.link-more {
  color: var(--primary);
  font-weight: 800;
}

.task-timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(17, 24, 39, .06);
  transition: .18s ease;
}

.timeline-item:hover {
  transform: translateX(4px);
  background: #fff;
}

.timeline-item.danger {
  border-color: rgba(220, 53, 69, .24);
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 7px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 0 6px rgba(109, 93, 252, .10);
}

.timeline-item.danger .timeline-dot {
  background: #dc3545;
  box-shadow: 0 0 0 6px rgba(220, 53, 69, .10);
}

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

.auth-card {
  max-width: 430px;
  margin-top: 7vh;
}

.form-card {
  max-width: 850px;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.form-control,
.form-select {
  border-radius: 15px;
  border-color: rgba(17, 24, 39, .10);
  padding: .72rem .9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .25rem rgba(109, 93, 252, .14);
}

.btn {
  border-radius: 14px;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border: 0;
  box-shadow: 0 14px 30px rgba(109, 93, 252, .22);
}

.btn-primary:hover {
  filter: brightness(.98);
  transform: translateY(-1px);
}

.chip {
  background: rgba(109, 93, 252, .10);
  color: #374151;
  border-radius: 999px;
  padding: .3rem .6rem;
}

.status-badge {
  background: #eef2ff;
  color: #4f46e5;
}

.priority-Cao {
  background: #ffe4e6;
  color: #be123c;
}

.priority-Trung,
.priority-Trung bình {
  background: #fef3c7;
  color: #92400e;
}

.priority-Thấp {
  background: #dcfce7;
  color: #166534;
}

.task-card {
  transition: transform .18s ease, box-shadow .18s ease;
}

.task-card:hover {
  transform: translateY(-4px);
}

.task-card.overdue {
  border-left: 7px solid #dc3545 !important;
}

.mini-task {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(17, 24, 39, .06);
  border-radius: 16px;
  padding: .75rem;
}

.day-column {
  min-height: 360px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-radius: 26px;
}

.calendar-head {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  padding: .85rem;
  font-weight: 800;
  text-align: center;
}

.calendar-cell {
  min-height: 135px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(17, 24, 39, .06);
  padding: .7rem;
}

.calendar-cell.muted {
  background: rgba(243, 244, 246, .68);
  color: #9ca3af;
}

.calendar-cell.today {
  outline: 3px solid rgba(109, 93, 252, .22);
  z-index: 1;
}

.calendar-task {
  font-size: .78rem;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 10px;
  padding: .28rem .42rem;
  margin-bottom: .28rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modern-alert {
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

@media (max-width: 992px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 50;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(18, 23, 42, .90);
    backdrop-filter: blur(16px);
  }

  .mobile-brand {
    color: #fff;
    font-weight: 800;
    font-size: 1.35rem;
  }

  .content-wrap {
    padding: 18px;
  }

  .hero-card {
    display: block;
    padding: 24px;
  }

  .btn-glow {
    margin-top: 20px;
    width: 100%;
  }

  .calendar-grid {
    display: block;
  }

  .calendar-head {
    display: none;
  }

  .calendar-cell {
    min-height: auto;
    margin-bottom: .65rem;
    border-radius: 18px;
  }
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 992px) {
  .mobile-bottom-nav {
    position: fixed;
    bottom: 14px;
    left: 12px;
    right: 12px;
    z-index: 9999;

    display: flex;
    justify-content: space-around;
    align-items: center;

    padding: 11px 8px;
    border-radius: 24px;

    background: rgba(20, 24, 40, .92);
    backdrop-filter: blur(18px);

    box-shadow:
      0 20px 50px rgba(0, 0, 0, .24),
      inset 0 1px rgba(255, 255, 255, .08);
  }

  .mobile-bottom-nav a {
    flex: 1;
    color: rgba(255, 255, 255, .78);
    text-decoration: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;

    font-size: .68rem;
    font-weight: 700;
    line-height: 1.1;
  }

  .mobile-bottom-nav a:hover,
  .mobile-bottom-nav a:active {
    color: #fff;
    transform: translateY(-2px);
  }

  .mobile-nav-icon {
    font-size: 1.15rem;
  }

  .content-wrap {
    padding-bottom: 110px !important;
  }
}