:root {
  /* Brand palette */
  --navy: #00235e;
  --navy-2: #0b3b94;
  --navy-deep: #001636;
  --gold: #e8a93d;
  --gold-dark: #cc8b22;
  --offwhite: #f5f7fb;
  --white: #ffffff;
  --pink: #ff8fa3;
  --pink-deep: #5a0a1c;
  --green: #2ea465;
  --red: #e15361;

  /* Text */
  --text: #1b2438;
  --muted: #64708a;
  --border: #e5e9f2;

  /* Shape / motion */
  --radius: 12px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 10px rgba(0, 35, 94, 0.07);
  --shadow-md: 0 18px 34px rgba(0, 35, 94, 0.12);

  /* Layout */
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 80px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  /* background: var(--offwhite); */
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', sans-serif;
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--gold);
  color: var(--navy);
}

/* ---------------------------------------------------------
   App shell — reused by both the user & admin shell layouts
   --------------------------------------------------------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content {
  padding: 1.6rem;
}

/* ---------------------------------------------------------
   Welcome band
   --------------------------------------------------------- */
.welcome-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
  position: relative;
  overflow: hidden;
}

/*
.welcome-band::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(232, 169, 61, 0.18);
  top: -90px;
  right: -60px;
}
*/

.welcome-band h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  position: relative;
}

.welcome-band p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  margin: 0;
  position: relative;
}

.welcome-band p strong {
  color: #fff;
}

.cta {
  position: relative;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.65rem 1.2rem;
  border-radius: 7px;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(232, 169, 61, 0.3);
  transition: transform 0.15s var(--ease);
}

.cta:hover {
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   Grids
   --------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.4rem;
  align-items: start;
}

/* ---------------------------------------------------------
   Panel — generic card container (calendar, tables, feeds…)
   --------------------------------------------------------- */
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.panel-head h3 {
  font-size: 1.02rem;
  color: var(--navy);
  font-weight: 600;
}

.panel-head a.link {
  font-size: 0.8rem;
  color: var(--navy-2);
  font-weight: 600;
}

.panel-head a.link:hover {
  color: var(--gold-dark);
}

.subhead {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.empty-note {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.6rem 0 1rem;
}

/* ---------------------------------------------------------
   Event list — "today / upcoming" birthday & anniversary rows
   --------------------------------------------------------- */
.event-list {
  margin: 0 0 1.3rem;
}

.event-list:last-child {
  margin-bottom: 0;
}

.event-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.event-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ev-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
}

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

.ev-info .nm {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.ev-info .rl {
  font-size: 0.74rem;
  color: var(--muted);
}

.ev-when {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  margin-right: 0.3rem;
  white-space: nowrap;
}

.ev-when strong {
  display: block;
  color: var(--navy);
  font-size: 0.78rem;
}

.ev-btn {
  border: 1px solid var(--gold);
  background: rgba(232, 169, 61, 0.12);
  color: var(--gold-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  white-space: nowrap;
}

.ev-btn:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ---------------------------------------------------------
   Admin: data table
   --------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.data-table td {
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.mini-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mini-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  flex-shrink: 0;
}

.status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}

.status-pill.active {
  background: rgba(46, 164, 101, 0.14);
  color: var(--green);
}

.status-pill.inactive {
  background: rgba(100, 112, 138, 0.14);
  color: var(--muted);
}

/* ---------------------------------------------------------
   Admin: activity feed
   --------------------------------------------------------- */
.feed li {
  display: flex;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.feed li:last-child {
  border: none;
  padding-bottom: 0;
}

.feed-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.feed-icon.new {
  background: rgba(11, 59, 148, 0.1);
  color: var(--navy-2);
}

.feed-icon.sent {
  background: rgba(232, 169, 61, 0.16);
  color: var(--gold-dark);
}

.feed-text {
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.45;
}

.feed-text b {
  color: var(--navy);
}

.feed-time {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ---------------------------------------------------------
   Admin: simple css bar chart
   --------------------------------------------------------- */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  height: 140px;
  margin-top: 1.6rem;
}

.bar-chart .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border-radius: 6px 6px 0 0;
  position: relative;
}

.bar-chart .bar span {
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
}

.bar-chart .bar.peak {
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .content {
    padding: 1.1rem;
  }

  .welcome-band {
    flex-direction: column;
    align-items: flex-start;
  }
}
