*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0f2b4a;
  --navy-mid: #1a3d6b;
  --blue: #1a6bb5;
  --sky: #3b9edd;
  --mint: #2dc98e;
  --mint-light: #e6faf3;
  --sand: #fdf8f3;
  --white: #ffffff;
  --bg: #f0f5f9;
  --text: #1a2535;
  --muted: #617589;
  --border: #dde8f0;
  --amber: #f59e0b;
  --amber-light: #fef3c7;
  --red: #ef4444;
  --red-light: #fef2f2;
  --sidebar-w: 252px;
  --sidebar-w-collapsed: 64px;
  --header-h: 64px;
  --shadow-sm: 0 1px 3px rgba(15, 43, 74, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 43, 74, 0.09);
  --shadow-lg: 0 12px 40px rgba(15, 43, 74, 0.12);
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* -- SIDEBAR -- */
/* -- SIDEBAR -- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  flex-shrink: 0;
  transition: width .22s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 17px;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  text-decoration: none;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.575rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  flex-shrink: 0;
  position: relative;
}

.logo-img-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.logo-bg {
  position: absolute;
  right: 5px;
  top: 76%;
  transform: translateY(-50%);
  height: 39px;
  width: auto;
  opacity: .92;
  pointer-events: none;
}

.logo-txt {
  transition: opacity .18s, width .18s;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 37px;
}

.logo-txt span {
  color: #7dd4f7
}

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden
}

.nav-section-label {
  font-size: .6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .22);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 14px 10px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .15s, height .2s, padding .2s;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .48);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, padding .22s;
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .85)
}

.nav-item.active {
  background: rgba(59, 158, 221, .18);
  color: #fff
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--sky), var(--mint))
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: .6
}

.nav-item.active svg {
  opacity: 1
}

.nav-item-label {
  transition: opacity .15s, width .18s;
  overflow: hidden
}

.nav-badge {
  margin-left: auto;
  flex-shrink: 0;
  background: rgba(59, 158, 221, .25);
  color: #7dd4f7;
  font-size: .65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
  transition: opacity .15s;
}

.nav-badge.mint {
  background: rgba(45, 201, 142, .2);
  color: #5de8b2
}

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  flex-shrink: 0
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  color: rgba(255, 255, 255, .4);
  transition: background .15s, color .15s, border-color .15s;
  padding: 0;
  margin-top: 6px;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(255, 255, 255, .22)
}

.sidebar-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s;
  overflow: hidden;
  text-decoration: none;
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, .06)
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--mint));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0
}

.user-info {
  flex: 1;
  min-width: 0;
  transition: opacity .15s, width .18s;
  overflow: hidden
}

.user-name {
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.user-plan {
  font-size: .7rem;
  color: rgba(255, 255, 255, .3)
}

.user-chevron {
  flex-shrink: 0;
  transition: opacity .15s
}

.user-chevron svg {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, .2)
}

.nav-item[data-tip] {
  position: relative
}

.nav-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--navy-mid);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  box-shadow: 0 4px 12px rgba(15, 43, 74, .25);
  z-index: 300;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-w-collapsed);
}

body.sidebar-collapsed .logo-txt {
  opacity: 0;
  width: 0;
}

body.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

body.sidebar-collapsed .nav-section-label {
  opacity: 0;
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

body.sidebar-collapsed .nav-item {
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
  gap: 0;
}

body.sidebar-collapsed .nav-item.active::before {
  display: none;
}

body.sidebar-collapsed .nav-item-label {
  opacity: 0;
  width: 0;
}

body.sidebar-collapsed .nav-badge {
  opacity: 0;
  width: 0;
  padding: 0;
  min-width: 0;
  margin-left: 0;
}

body.sidebar-collapsed .user-info {
  opacity: 0;
  width: 0;
}

body.sidebar-collapsed .user-chevron {
  opacity: 0;
  width: 0;
}

body.sidebar-collapsed .sidebar-user {
  justify-content: center;
}

@media (min-width:769px) {
  body.sidebar-collapsed .nav-item[data-tip]:hover::after {
    opacity: 1;
  }
}

@media (min-width:769px) {
  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover {
    width: var(--sidebar-w);
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .logo-txt {
    opacity: 1;
    width: auto;
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .nav-section-label {
    opacity: 1;
    height: auto;
    padding: 14px 10px 6px;
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .nav-item {
    padding: 9px 11px;
    justify-content: flex-start;
    gap: 10px;
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .nav-item.active::before {
    display: block;
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .nav-item-label {
    opacity: 1;
    width: auto;
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .nav-badge {
    opacity: 1;
    width: auto;
    padding: 2px 7px;
    min-width: 20px;
    margin-left: auto;
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .user-info {
    opacity: 1;
    width: auto;
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .user-chevron {
    opacity: 1;
    width: auto;
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .sidebar-user {
    justify-content: flex-start;
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover~* {
    margin-left: var(--sidebar-w-collapsed);
  }

  body.sidebar-collapsed:not(.sidebar-pinned) .sidebar:hover .nav-item[data-tip]::after {
    opacity: 0 !important;
  }
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .22s cubic-bezier(.4, 0, .2, 1)
}

body.sidebar-collapsed .main {
  margin-left: var(--sidebar-w-collapsed);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 35, .55);
  z-index: 199;
  backdrop-filter: blur(2px);
}

@media (max-width:768px) {
  .sidebar {
    left: calc(var(--sidebar-w-collapsed) * -1);
    width: var(--sidebar-w) !important;
    box-shadow: none;
  }

  body.sidebar-collapsed .sidebar {
    left: 0;
    width: var(--sidebar-w-collapsed) !important;
  }

  body.sidebar-expanded-mobile .sidebar {
    left: 0;
    width: var(--sidebar-w) !important;
    box-shadow: 4px 0 32px rgba(10, 20, 35, .35);
  }

  body.sidebar-expanded-mobile .sidebar-backdrop {
    display: block;
  }

  body.sidebar-expanded-mobile .logo-txt {
    opacity: 1;
    width: auto;
  }

  body.sidebar-expanded-mobile .sidebar-toggle svg {
    transform: rotate(180deg);
  }

  body.sidebar-expanded-mobile .nav-section-label {
    opacity: 1;
    height: auto;
    padding: 14px 10px 6px;
  }

  body.sidebar-expanded-mobile .nav-item {
    padding: 9px 11px;
    justify-content: flex-start;
    gap: 10px;
  }

  body.sidebar-expanded-mobile .nav-item.active::before {
    display: block;
  }

  body.sidebar-expanded-mobile .nav-item-label {
    opacity: 1;
    width: auto;
  }

  body.sidebar-expanded-mobile .nav-badge {
    opacity: 1;
    width: auto;
    padding: 2px 7px;
    min-width: 20px;
    margin-left: auto;
  }

  body.sidebar-expanded-mobile .user-info {
    opacity: 1;
    width: auto;
  }

  body.sidebar-expanded-mobile .user-chevron {
    opacity: 1;
    width: auto;
  }

  body.sidebar-expanded-mobile .sidebar-user {
    justify-content: flex-start;
  }

  .main {
    margin-left: var(--sidebar-w-collapsed) !important;
  }

  .topbar {
    padding: 0 16px;
    gap: 10px;
  }
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 32px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.topbar-spacer {
  flex: 1;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 14px;
  width: 260px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(59, 158, 221, 0.1);
  background: var(--white);
}

.search-bar svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex-shrink: 0;
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--mint);
  color: white;
}

.btn-primary:hover {
  background: #25b37d;
  box-shadow: 0 4px 14px rgba(45, 201, 142, 0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--sky);
  color: var(--blue);
}

.btn svg {
  width: 15px;
  height: 15px;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: white;
  cursor: pointer;
  flex-shrink: 0;
}

/* -- CONTENT -- */
.content {
  padding: 28px 32px;
  flex: 1;
}

/* STATS ROW */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.si-blue {
  background: #e8f3fd;
}

.si-mint {
  background: var(--mint-light);
}

.si-amber {
  background: var(--amber-light);
}

.si-navy {
  background: #e8eef5;
}

.stat-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.trend-up {
  color: var(--mint);
  font-weight: 700;
}

.trend-down {
  color: var(--red);
  font-weight: 700;
}

/* TWO COLUMN LAYOUT */
.two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  margin-bottom: 20px;
}

/* CARD */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 16px;
  height: 16px;
  color: var(--sky);
}

/* EVENT TABLE */
.event-table {
  width: 100%;
  border-collapse: collapse;
}

.event-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 10px 22px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.event-table td {
  padding: 14px 22px;
  border-bottom: 1px solid #f0f5f9;
  font-size: 0.875rem;
  vertical-align: middle;
}

.event-table tr:last-child td {
  border-bottom: none;
}

.event-table tr:hover td {
  background: #fafcfe;
}

.event-table tr {
  cursor: pointer;
}

/* FILTER BAR */
.events-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.filter-tabs {
  display: flex;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.ftab {
  padding: 5px 13px;
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  border: none;
  background: transparent;
  font-family: inherit;
}

.ftab:hover {
  color: var(--navy);
  background: var(--bg);
}

.ftab.active {
  background: var(--navy);
  color: white;
}

.events-search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 6px 12px;
  flex: 1;
  max-width: 260px;
  transition: border-color .2s;
}

.events-search:focus-within {
  border-color: var(--sky);
}

.events-search svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

.events-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: .82rem;
  font-family: inherit;
  color: var(--text);
  width: 100%;
}

.events-search input::placeholder {
  color: var(--muted);
}

.filter-spacer {
  flex: 1;
}

.row-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  background: white;
  transition: all .15s;
  white-space: nowrap;
}

.row-action-btn:hover {
  border-color: var(--sky);
  color: var(--blue);
  background: #f0f8ff;
}

.event-name {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
}

.event-org {
  font-size: 0.75rem;
  color: var(--muted);
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
}

.pf-mint {
  background: var(--mint);
}

.pf-sky {
  background: var(--sky);
}

.pf-amber {
  background: var(--amber);
}

.progress-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 32px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pill-green {
  background: var(--mint-light);
  color: #16a870;
}

.pill-green::before {
  background: var(--mint);
}

.pill-amber {
  background: var(--amber-light);
  color: #b45309;
}

.pill-amber::before {
  background: var(--amber);
}

.pill-blue {
  background: #e8f3fd;
  color: var(--blue);
}

.pill-blue::before {
  background: var(--sky);
}

.pill-gray {
  background: var(--bg);
  color: var(--muted);
}

.pill-gray::before {
  background: var(--muted);
}

.amount {
  font-weight: 700;
  color: var(--navy);
}

.amount-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ACTIVITY FEED */
.activity-list {
  padding: 6px 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f5f9;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ad-mint {
  background: var(--mint-light);
}

.ad-blue {
  background: #e8f3fd;
}

.ad-amber {
  background: var(--amber-light);
}

.ad-navy {
  background: #e8eef5;
}

.activity-body {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 0.845rem;
  color: var(--text);
  line-height: 1.45;
}

.activity-text strong {
  font-weight: 700;
  color: var(--navy);
}

.activity-time {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}

/* QUICK ACTIONS */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}

.qa-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s;
}

.qa-btn:hover {
  background: #e8f3fd;
  border-color: var(--sky);
}

.qa-icon {
  font-size: 1.3rem;
}

.qa-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
}

.qa-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

/* SECTION HEADING */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
  font-family: 'Bricolage Grotesque', sans-serif;
}

.view-all {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sky);
  text-decoration: none;
  transition: color 0.15s;
}

.view-all:hover {
  color: var(--blue);
}

/* UPCOMING DEADLINES */
.deadline-list {
  padding: 4px 0;
}

.deadline-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f5f9;
  cursor: pointer;
  transition: background 0.15s;
}

.deadline-item:hover {
  background: #fafcfe;
}

.deadline-item:last-child {
  border-bottom: none;
}

.deadline-date {
  width: 42px;
  height: 48px;
  background: linear-gradient(160deg, var(--navy-mid, #1a3d6b), var(--navy));
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.deadline-date .day {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.deadline-date .mon {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.deadline-info {
  flex: 1;
  min-width: 0;
}

.deadline-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deadline-org {
  font-size: 0.75rem;
  color: var(--muted);
}

.deadline-meta {
  text-align: right;
}

.deadline-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
}

.deadline-sub {
  font-size: 0.7rem;
  color: var(--muted);
}

.urgent {
  border-left: 3px solid var(--red);
}

.urgent .deadline-date {
  background: linear-gradient(160deg, #c0392b, var(--red));
}

/* ═══════ GLOBAL MOBILE ≤768px ═══════ */
@media (max-width:768px) {
  .topbar-title {
    font-size: .95rem
  }

  .content {
    padding: 16px
  }

  .table-wrap,
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
  }

  table {
    min-width: 520px
  }

  .topbar-actions .btn span {
    display: none
  }

  .topbar-actions .btn {
    padding: 7px 10px;
    min-width: 36px
  }

  .card {
    border-radius: 12px
  }

  .modal,
  .drawer {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    transform: none !important
  }

  .pill {
    font-size: .65rem;
    padding: 2px 8px
  }

  /* Stat cards: 2 columns */
  .stat-cards,
  div[style*="repeat(4, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important
  }

  /* Two-col layout stacks */
  .two-col {
    grid-template-columns: 1fr !important;
    gap: 16px !important
  }

  .event-row td {
    padding: 8px 10px;
    font-size: .78rem
  }

  .stat-card {
    padding: 14px 16px
  }

  .stat-value {
    font-size: 1.5rem
  }

  .search-bar {
    width: 100%
  }
}



/* --- LOGIN CSS --- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0f2b4a;
  --navy-mid: #1a3d6b;
  --blue: #1a6bb5;
  --sky: #3b9edd;
  --mint: #2dc98e;
  --mint-light: #e6faf3;
  --white: #ffffff;
  --bg: #f0f5f9;
  --text: #1a2535;
  --muted: #617589;
  --border: #dde8f0;
  --amber: #f59e0b;
  --amber-light: #fef3c7;
  --red: #ef4444;
  --red-light: #fef2f2;
  --shadow-sm: 0 1px 3px rgba(15, 43, 74, .06);
  --shadow-md: 0 4px 24px rgba(15, 43, 74, .11);
  --shadow-lg: 0 8px 40px rgba(15, 43, 74, .14);
}

html,
body {
  height: 100%;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

/* ══════════════════════════════════════
   LEFT PANEL
══════════════════════════════════════ */
.left {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-mid) 55%, #164e8a 100%);
  display: flex;
  flex-direction: column;
  padding: 40px 48px 48px;
  position: relative;
  overflow: hidden;
}

.left::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 201, 142, .15) 0%, transparent 68%);
  pointer-events: none;
}

.left::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -50px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 158, 221, .13) 0%, transparent 68%);
  pointer-events: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.logo-img-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.logo-bg {
  position: absolute;
  right: 0;
  top: 76%;
  transform: translateY(-50%);
  height: 39px;
  width: auto;
  opacity: .92;
  pointer-events: none;
}

.logo-text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.575rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  padding-right: 37px;
}

.logo-text span {
  color: #7dd4f7;
}

.left-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.left-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(45, 201, 142, .18);
  border: 1px solid rgba(45, 201, 142, .3);
  color: #5de8b2;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.left-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2dc98e;
}

.left-headline {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.04em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.left-headline em {
  font-style: normal;
  color: #7dd4f7;
}

.left-sub {
  font-size: .9rem;
  color: rgba(255, 255, 255, .5);
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: 44px;
}

.left-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 13px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 17px;
  height: 17px;
  color: #5de8b2;
}

.stat-label {
  font-size: .82rem;
  color: rgba(255, 255, 255, .5);
  line-height: 1.4;
}

.stat-label strong {
  display: block;
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
}

.left-footer {
  font-size: .7rem;
  color: rgba(255, 255, 255, .22);
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════ */
.right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: var(--white);
  position: relative;
}

/* ── SCREENS ── */
.screen {
  width: 100%;
  max-width: 400px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* shared heading */
.screen-heading {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.03em;
  margin-bottom: 6px;
}

.screen-sub {
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 30px;
  line-height: 1.55;
}

.screen-sub strong {
  color: var(--navy);
}

/* ── FIELDS ── */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: .875rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.field input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(59, 158, 221, .1);
}

.field input::placeholder {
  color: #b0c8d8;
}

.field input.error {
  border-color: var(--red);
}

.pw-wrap {
  position: relative;
}

.pw-wrap input {
  padding-right: 40px;
}

.pw-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: #b0c8d8;
  display: flex;
  align-items: center;
  transition: color .15s;
}

.pw-eye:hover {
  color: var(--muted);
}

.pw-eye svg {
  width: 15px;
  height: 15px;
}

.field-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.field-row-between label {
  margin-bottom: 0;
  font-size: .75rem;
  font-weight: 700;
  color: var(--navy);
}

.forgot-link {
  font-size: .72rem;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* remember me */
.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.remember-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--mint);
  cursor: pointer;
  flex-shrink: 0;
}

.remember-row label {
  font-size: .78rem;
  color: var(--muted);
  cursor: pointer;
}

/* error banner */
.error-banner {
  display: none;
  background: var(--red-light);
  border: 1.5px solid #fca5a5;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: .78rem;
  color: #b91c1c;
  font-weight: 600;
  margin-bottom: 16px;
  align-items: center;
  gap: 8px;
}

.error-banner.show {
  display: flex;
}

.error-banner svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--red);
}

/* submit button */
.btn-submit {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #2dc98e, #1db87a);
  color: white;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(45, 201, 142, .32);
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #25b37d, #17a36c);
  box-shadow: 0 6px 22px rgba(45, 201, 142, .42);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: .7;
  transform: none;
  cursor: not-allowed;
}

.btn-submit svg {
  width: 16px;
  height: 16px;
}

/* or divider */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.or-divider span {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
}

/* SSO */
.btn-sso {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: white;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: all .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.btn-sso:hover {
  border-color: var(--sky);
  background: #f0f8ff;
}

.btn-sso svg {
  width: 17px;
  height: 17px;
}

.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: .72rem;
  color: var(--muted);
}

.form-footer a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════
   ORG SELECTOR SCREEN
══════════════════════════════════════ */
.user-greeting {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 15px;
  margin-bottom: 26px;
}

.user-greeting-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.user-greeting-label {
  font-size: .68rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.user-greeting-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--navy);
}

.user-greeting-email {
  font-size: .72rem;
  color: var(--muted);
}

.user-greeting-switch {
  margin-left: auto;
  font-size: .72rem;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  font-family: inherit;
  transition: color .15s;
  flex-shrink: 0;
}

.user-greeting-switch:hover {
  color: var(--navy);
  text-decoration: underline;
}

.org-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.org-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all .18s;
  background: white;
  position: relative;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.org-card:hover {
  border-color: var(--sky);
  box-shadow: 0 4px 18px rgba(59, 158, 221, .1);
  transform: translateY(-1px);
}

.org-card.selected {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(45, 201, 142, .12);
}

.org-card:focus {
  outline: none;
  border-color: var(--sky);
}

.org-logo {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  letter-spacing: -.02em;
}

.org-info {
  flex: 1;
  min-width: 0;
}

.org-name {
  font-size: .92rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.org-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 700;
}

.org-role-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.pill-navy {
  background: #e8eef5;
  color: var(--navy);
}

.pill-navy::before {
  background: var(--navy);
}

.pill-blue {
  background: #e8f3fd;
  color: var(--blue);
}

.pill-blue::before {
  background: var(--sky);
}

.pill-amber {
  background: var(--amber-light);
  color: #b45309;
}

.pill-amber::before {
  background: var(--amber);
}

.pill-gray {
  background: var(--bg);
  color: var(--muted);
}

.pill-gray::before {
  background: var(--muted);
}

.pill-green {
  background: var(--mint-light);
  color: #16a870;
}

.pill-green::before {
  background: var(--mint);
}

.org-members {
  font-size: .7rem;
  color: var(--muted);
  font-weight: 500;
}

.org-arrow {
  flex-shrink: 0;
  color: #b0c8d8;
  transition: color .15s, transform .15s;
}

.org-card:hover .org-arrow {
  color: var(--sky);
  transform: translateX(2px);
}

.org-card.selected .org-arrow {
  color: var(--mint);
}

.org-arrow svg {
  width: 16px;
  height: 16px;
}

/* last-used badge */
.org-last-used {
  position: absolute;
  top: -1px;
  right: 12px;
  background: var(--mint);
  color: white;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 0 0 6px 6px;
}

/* new org link */
.new-org-row {
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  padding-top: 4px;
}

.new-org-row a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.new-org-row a:hover {
  text-decoration: underline;
}

/* continue button for org step */
.btn-continue {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #2dc98e, #1db87a);
  color: white;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(45, 201, 142, .32);
  letter-spacing: -.01em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: .45;
  pointer-events: none;
}

.btn-continue.ready {
  opacity: 1;
  pointer-events: auto;
}

.btn-continue.ready:hover {
  background: linear-gradient(135deg, #25b37d, #17a36c);
  box-shadow: 0 6px 22px rgba(45, 201, 142, .42);
  transform: translateY(-1px);
}

.btn-continue svg {
  width: 16px;
  height: 16px;
}

/* ── SPINNER ── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin .7s linear infinite;
}

/* ── RESPONSIVE ── */
@media (max-width:860px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .left {
    display: none;
  }

  .right {
    padding: 32px 20px;
    min-height: 100vh;
  }
}

/* ═══════ TOAST NOTIFICATIONS ═══════ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 11px;
  background: var(--navy);
  color: white;
  font-size: .845rem;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(15, 43, 74, .25);
  pointer-events: auto;
  animation: toastIn .22s ease;
  min-width: 240px;
  max-width: 340px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.97)
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

.toast.out {
  animation: toastOut .22s ease forwards
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px) scale(.97)
  }
}

.toast-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .8rem
}

.toast-icon.mint {
  background: rgba(45, 201, 142, .25)
}

.toast-icon.red {
  background: rgba(239, 68, 68, .25)
}

.toast-msg {
  flex: 1;
  line-height: 1.35
}

.toast-msg strong {
  display: block;
  font-weight: 700
}

.toast-msg span {
  font-size: .75rem;
  color: rgba(255, 255, 255, .55)
}

.toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, .4);
  cursor: pointer;
  padding: 2px;
  font-size: 1rem;
  line-height: 1;
  transition: color .15s
}

.toast-close:hover {
  color: white
}