/* ============================================================
   RASTIMO — Material Design 3 Light Theme
   Primary: Burgundy Red #800020
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Roboto+Mono&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Round');

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Primary - Burgundy Red */
  --md-primary: #800020;
  --md-on-primary: #ffffff;
  --md-primary-container: #ffdad9;
  --md-on-primary-container: #410007;

  /* Secondary */
  --md-secondary: #775656;
  --md-on-secondary: #ffffff;
  --md-secondary-container: #ffdad9;
  --md-on-secondary-container: #2c1516;

  /* Tertiary */
  --md-tertiary: #745b2f;
  --md-on-tertiary: #ffffff;
  --md-tertiary-container: #ffddb2;
  --md-on-tertiary-container: #281900;

  /* Error */
  --md-error: #ba1a1a;
  --md-on-error: #ffffff;
  --md-error-container: #ffdad6;

  /* Surface */
  --md-background: #fffbff;
  --md-on-background: #1f1111;
  --md-surface: #fffbff;
  --md-on-surface: #1f1111;
  --md-surface-variant: #f5dddd;
  --md-on-surface-variant: #534343;
  --md-surface-container: #f5eded;
  --md-surface-container-high: #efe7e7;
  --md-surface-container-highest: #e9e1e1;
  --md-outline: #857373;
  --md-outline-variant: #d8c2c2;

  /* Elevation Overlay */
  --elevation-1: 0 1px 2px rgba(0,0,0,.12), 0 1px 3px 1px rgba(0,0,0,.06);
  --elevation-2: 0 1px 2px rgba(0,0,0,.12), 0 2px 6px 2px rgba(0,0,0,.08);
  --elevation-3: 0 1px 3px rgba(0,0,0,.12), 0 4px 8px 3px rgba(0,0,0,.08);

  /* Sidebar */
  --sidebar-width: 280px;
  --sidebar-collapsed: 72px;

  /* Shape */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 28px;
  --radius-full: 50px;

  /* Typography */
  --font-body: 'Roboto', sans-serif;

  /* Transition */
  --transition: 0.2s cubic-bezier(0.2, 0, 0, 1);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--md-background);
  color: var(--md-on-background);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

a { color: var(--md-primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ─── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--md-outline-variant); border-radius: 3px; }

/* ─── AUTH SCREENS ───────────────────────────────────────────── */
.auth-screen {
  display: none;
  min-height: 100vh;
  width: 100%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #800020 0%, #4a0011 50%, #2c000a 100%);
  padding: 24px;
}
.auth-screen.active { display: flex; }

.auth-card {
  background: var(--md-surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--elevation-3);
  animation: slideUp 0.4s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 48px; height: 48px;
  background: var(--md-primary);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.auth-logo-icon .material-icons-round { color: white; font-size: 28px; }
.auth-logo-text { font-size: 24px; font-weight: 700; color: var(--md-primary); letter-spacing: -0.5px; }
.auth-logo-sub { font-size: 12px; color: var(--md-on-surface-variant); }

.auth-title { font-size: 22px; font-weight: 500; margin-bottom: 8px; }
.auth-subtitle { font-size: 14px; color: var(--md-on-surface-variant); margin-bottom: 28px; }

/* ─── FORM ELEMENTS ──────────────────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--md-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--md-outline-variant);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--md-surface);
  color: var(--md-on-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--md-primary);
  box-shadow: 0 0 0 3px rgba(128,0,32,.12);
}

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

.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--md-primary);
  color: var(--md-on-primary);
}
.btn-primary:hover { background: #6a001a; box-shadow: var(--elevation-2); }

.btn-outlined {
  background: transparent;
  color: var(--md-primary);
  border: 1.5px solid var(--md-outline);
}
.btn-outlined:hover { background: rgba(128,0,32,.06); }

.btn-text {
  background: transparent;
  color: var(--md-primary);
  padding: 10px 12px;
}
.btn-text:hover { background: rgba(128,0,32,.06); }

.btn-tonal {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}
.btn-tonal:hover { box-shadow: var(--elevation-1); }

.btn-danger {
  background: var(--md-error);
  color: var(--md-on-error);
}
.btn-danger:hover { background: #9b1515; }

.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: 50%; }

.btn .material-icons-round { font-size: 18px; }

/* ─── APP LAYOUT ──────────────────────────────────────────────── */
#app-layout {
  display: none;
  width: 100%;
  min-height: 100vh;
}
#app-layout.active { display: flex; }

/* ─── SIDEBAR (Navigation Rail/Drawer) ───────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--md-surface-container);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--md-outline-variant);
  min-height: 72px;
}

.sidebar-logo-icon {
  width: 40px; height: 40px; min-width: 40px;
  background: var(--md-primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo-icon .material-icons-round { color: white; font-size: 22px; }

.sidebar-logo-text {
  font-size: 18px; font-weight: 700;
  color: var(--md-primary);
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--md-on-surface-variant);
  padding: 16px 16px 8px;
  white-space: nowrap;
  opacity: 0.7;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 2px 8px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--md-on-surface-variant);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.nav-item:hover {
  background: rgba(128,0,32,.08);
  color: var(--md-primary);
}

.nav-item.active {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

.nav-item .material-icons-round {
  font-size: 22px;
  flex-shrink: 0;
  min-width: 22px;
}

.nav-badge {
  margin-left: auto;
  background: var(--md-primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--md-outline-variant);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition);
  overflow: hidden;
}
.user-chip:hover { background: rgba(128,0,32,.08); }

.user-avatar {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 50%;
  background: var(--md-primary);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-info { overflow: hidden; }
.user-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role {
  font-size: 11px;
  color: var(--md-on-surface-variant);
  white-space: nowrap;
}

/* ─── Sidebar Toggle Button (in footer) ───────────────────────── */
.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--md-outline-variant);
  background: var(--md-surface);
  color: var(--md-on-surface-variant);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 13px;
}
.sidebar-toggle-btn:hover {
  background: rgba(255, 107, 53, 0.08);
  border-color: #FF6B35;
  color: #FF6B35;
}
.sidebar-toggle-btn .material-icons-round {
  font-size: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.sidebar-toggle-label {
  font-weight: 600;
  font-size: 12px;
}

/* ─── Sidebar Hideable Elements ───────────────────────────────── */
.sidebar-hideable {
  transition: opacity 0.2s ease, max-width 0.2s ease;
  opacity: 1;
  max-width: 200px;
  overflow: hidden;
  white-space: nowrap;
}

/* ─── SIDEBAR COLLAPSED STATE ─────────────────────────────────── */
.sidebar.collapsed {
  width: 72px;
}

.sidebar.collapsed .sidebar-hideable {
  opacity: 0;
  max-width: 0;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 16px 8px;
  gap: 0;
}

.sidebar.collapsed .sidebar-logo-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #FF6B35;
}

.sidebar.collapsed .sidebar-toggle-btn {
  width: 44px;
  margin: 0 auto 8px;
  padding: 10px;
  justify-content: center;
  border: none;
  background: transparent;
}
.sidebar.collapsed .sidebar-toggle-btn:hover {
  background: rgba(255, 107, 53, 0.1);
}

.sidebar.collapsed .sidebar-nav {
  padding: 8px 0;
}

.sidebar.collapsed .nav-section-label {
  padding: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
  margin: 2px 12px;
  gap: 0;
  border-radius: 12px;
  position: relative;
}

/* Active indicator bar — matches redesign */
.sidebar.collapsed .nav-item.active {
  background: rgba(255, 107, 53, 0.1);
}
.sidebar.collapsed .nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: #FF6B35;
  border-radius: 0 3px 3px 0;
}
.sidebar.collapsed .nav-item.active .material-icons-round {
  color: #FF6B35;
}

.sidebar.collapsed .nav-item:hover {
  background: rgba(255, 107, 53, 0.08);
}

.sidebar.collapsed .sidebar-footer {
  padding: 8px 0;
}

.sidebar.collapsed .user-chip {
  justify-content: center;
  padding: 8px;
  gap: 0;
}

.sidebar.collapsed .user-avatar {
  width: 36px; height: 36px;
  background: #FF6B35;
}

/* Nav badge hidden when collapsed */
.sidebar.collapsed .nav-badge {
  display: none;
}

/* Tooltip on hover when collapsed */
@media (min-width: 769px) {
  .sidebar.collapsed .nav-item {
    position: relative;
  }
  .sidebar.collapsed .nav-item::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    background: #2D1B0E;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
  }
}

/* ─── MAIN CONTENT ────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}

/* ─── TOP BAR ─────────────────────────────────────────────────── */
.top-bar {
  position: sticky;
  top: 0;
  background: var(--md-surface);
  border-bottom: 1px solid var(--md-outline-variant);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  gap: 16px;
}

.top-bar-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--md-on-surface);
}

.top-bar-actions { display: flex; align-items: center; gap: 8px; }

/* ─── PAGE ────────────────────────────────────────────────────── */
.page {
  display: none;
  flex: 1;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}
.page.active { display: block; }

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

/* ─── PAGE HEADER ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title { font-size: 28px; font-weight: 600; color: var(--md-on-surface); }
.page-subtitle { font-size: 14px; color: var(--md-on-surface-variant); margin-top: 4px; }

/* ─── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--elevation-1);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--elevation-2); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.card-title { font-size: 16px; font-weight: 600; }
.card-subtitle { font-size: 13px; color: var(--md-on-surface-variant); }

/* ─── GRID LAYOUTS ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ─── STAT CARDS ──────────────────────────────────────────────── */
.stat-card {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--elevation-1);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon .material-icons-round { font-size: 26px; }

.stat-value { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 13px; color: var(--md-on-surface-variant); margin-top: 4px; }

/* ─── CHIPS / BADGES ──────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}
.chip-primary { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.chip-secondary { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.chip-success { background: #c8f5d6; color: #0a4d2e; }
.chip-warning { background: #fff3cd; color: #7d5a00; }
.chip-error { background: var(--md-error-container); color: var(--md-error); }
.chip-neutral { background: var(--md-surface-container-highest); color: var(--md-on-surface-variant); }

/* ─── FEED POST ───────────────────────────────────────────────── */
.feed-post {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--elevation-1);
  margin-bottom: 16px;
  transition: box-shadow var(--transition);
  position: relative;
}
.feed-post:hover { box-shadow: var(--elevation-2); }

.feed-post.pinned {
  border-left: 3px solid var(--md-primary);
}

.feed-post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.feed-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-post-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--md-on-surface);
}

.feed-post-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--md-on-surface-variant);
  white-space: pre-wrap;
}

.feed-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--md-outline-variant);
}

.feed-category-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.cat-workday { background: #e3f2fd; color: #1565c0; }
.cat-news { background: #f3e5f5; color: #6a1b9a; }
.cat-meeting { background: #fff8e1; color: #f57f17; }
.cat-menu { background: #e8f5e9; color: #2e7d32; }
.cat-excursion { background: #fce4ec; color: #880e4f; }
.cat-activity { background: #e8eaf6; color: #283593; }
.cat-offer { background: #fff3e0; color: #e65100; }
.cat-other { background: var(--md-surface-container-highest); color: var(--md-on-surface-variant); }

/* ─── CHAT ────────────────────────────────────────────────────── */
.chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: calc(100vh - 64px - 48px);
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
}

.chat-sidebar {
  border-right: 1px solid var(--md-outline-variant);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--md-outline-variant);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-rooms-list { overflow-y: auto; flex: 1; }

.chat-room-item {
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--md-outline-variant);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-room-item:hover { background: var(--md-surface-container); }
.chat-room-item.active { background: var(--md-primary-container); }

.chat-room-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--md-primary);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.chat-room-info { overflow: hidden; }
.chat-room-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room-last { font-size: 12px; color: var(--md-on-surface-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.chat-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--md-outline-variant);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--md-on-surface-variant);
  gap: 8px;
}
.chat-empty .material-icons-round { font-size: 48px; opacity: 0.3; }

.message {
  display: flex;
  gap: 8px;
  max-width: 70%;
}

.message.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px; height: 32px; min-width: 32px;
  border-radius: 50%;
  background: var(--md-primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 12px; font-weight: 600;
  flex-shrink: 0;
  align-self: flex-end;
}

.message-content { display: flex; flex-direction: column; gap: 2px; }

.message-sender {
  font-size: 11px;
  font-weight: 600;
  color: var(--md-on-surface-variant);
  padding: 0 4px;
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.message.mine .message-bubble {
  background: var(--md-primary);
  color: var(--md-on-primary);
  border-bottom-right-radius: 4px;
}

.message:not(.mine) .message-bubble {
  background: var(--md-surface-container);
  color: var(--md-on-surface);
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 10px;
  color: var(--md-on-surface-variant);
  padding: 0 4px;
  align-self: flex-end;
}
.message.mine .message-time { text-align: right; }

.typing-indicator {
  display: none;
  font-size: 13px;
  color: var(--md-on-surface-variant);
  font-style: italic;
  padding: 0 20px;
  height: 24px;
}
.typing-indicator.visible { display: block; }

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--md-outline-variant);
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--md-outline-variant);
  border-radius: var(--radius-xl);
  font-size: 14px;
  font-family: inherit;
  background: var(--md-surface);
  resize: none;
  max-height: 120px;
  overflow-y: auto;
  outline: none;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--md-primary); }

/* ─── DATA TABLE ──────────────────────────────────────────────── */
.data-table-wrapper {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-1);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: var(--md-surface-container);
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--md-on-surface-variant);
  border-bottom: 1px solid var(--md-outline-variant);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--md-outline-variant);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}
.data-table tbody tr:hover { background: var(--md-surface-container); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ─── MODAL ───────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--md-surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--elevation-3);
  animation: modalIn 0.3s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 20px; font-weight: 600; }
.modal-close { padding: 4px; border-radius: 50%; border: none; background: none; cursor: pointer; color: var(--md-on-surface-variant); transition: background var(--transition); }
.modal-close:hover { background: var(--md-surface-container); }
.modal-close .material-icons-round { font-size: 22px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; }

/* ─── SNACKBAR ────────────────────────────────────────────────── */
.snackbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1f1111;
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  box-shadow: var(--elevation-3);
}
.snackbar.visible { transform: translateX(-50%) translateY(0); }
.snackbar.success { background: #1b4332; }
.snackbar.error { background: #7f1d1d; }

/* ─── SEARCH BAR ──────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--md-surface-container);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: all var(--transition);
  flex: 1;
  max-width: 400px;
}
.search-bar:focus-within {
  background: var(--md-surface);
  border-color: var(--md-primary);
  box-shadow: 0 0 0 2px rgba(128,0,32,.12);
}
.search-bar .material-icons-round { color: var(--md-on-surface-variant); font-size: 20px; }
.search-bar input { border: none; background: none; outline: none; font-size: 14px; flex: 1; font-family: inherit; color: var(--md-on-surface); }
.search-bar input::placeholder { color: var(--md-on-surface-variant); }

/* ─── TABS ────────────────────────────────────────────────────── */
.tabs,
.tab-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 2px solid var(--md-outline-variant);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--md-on-surface-variant);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab:hover { color: var(--md-primary); background: rgba(128,0,32,.04); }
.tab.active { color: var(--md-primary); border-bottom-color: var(--md-primary); }

/* ─── CHILD PROFILE CARD ──────────────────────────────────────── */
.child-card {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.child-card:hover { box-shadow: var(--elevation-2); transform: translateY(-2px); }

.child-card-header {
  background: linear-gradient(135deg, var(--md-primary) 0%, #4a0011 100%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.child-photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 700;
  overflow: hidden;
}
.child-photo img { width: 100%; height: 100%; object-fit: cover; }

.child-name { font-size: 16px; font-weight: 600; color: white; }
.child-group { font-size: 12px; color: rgba(255,255,255,.8); }

.child-card-body { padding: 16px; }
.child-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--md-on-surface-variant);
  margin-bottom: 8px;
}
.child-info-row .material-icons-round { font-size: 16px; color: var(--md-primary); }

/* ─── FINANCE ─────────────────────────────────────────────────── */
.invoice-card {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--elevation-1);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow var(--transition);
}
.invoice-card:hover { box-shadow: var(--elevation-2); }

.invoice-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--md-primary);
}

.invoice-status-paid { color: #2e7d32; }
.invoice-status-unpaid { color: var(--md-error); }
.invoice-status-overdue { color: #f57f17; }

/* ─── GROUP GALLERY ───────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--md-surface-container);
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-item-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: white;
  padding: 20px 10px 10px;
  font-size: 12px;
  font-weight: 500;
}

/* ─── ATTENDANCE TABLE ────────────────────────────────────────── */
.attendance-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.attendance-dot.present { background: #2e7d32; }
.attendance-dot.absent { background: var(--md-error); }
.attendance-dot.partial { background: #f57f17; }

/* ─── SETTINGS ────────────────────────────────────────────────── */
.settings-section {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--elevation-1);
  margin-bottom: 16px;
}
.settings-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--md-outline-variant);
  gap: 16px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 14px; font-weight: 500; }
.settings-row-desc { font-size: 12px; color: var(--md-on-surface-variant); margin-top: 2px; }

/* ─── LOADING ─────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 12px;
  color: var(--md-on-surface-variant);
}

.spinner {
  width: 24px; height: 24px;
  border: 2.5px solid var(--md-outline-variant);
  border-top-color: var(--md-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 12px;
  text-align: center;
  color: var(--md-on-surface-variant);
}
.empty-state .material-icons-round { font-size: 56px; opacity: 0.3; }
.empty-state-title { font-size: 16px; font-weight: 500; }
.empty-state-subtitle { font-size: 13px; }

/* ─── FILTER BAR ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--md-outline-variant);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  color: var(--md-on-surface-variant);
  font-family: inherit;
}
.filter-chip:hover { border-color: var(--md-primary); color: var(--md-primary); background: rgba(128,0,32,.04); }
.filter-chip.active { background: var(--md-primary); color: white; border-color: var(--md-primary); }

/* ─── DIVIDER ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--md-outline-variant); margin: 16px 0; }

/* ─── TOGGLE / SWITCH ─────────────────────────────────────────── */
.toggle {
  position: relative;
  width: 48px; height: 28px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--md-outline-variant);
  border-radius: 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: white;
  left: 4px; top: 4px;
  transition: transform var(--transition);
  box-shadow: var(--elevation-1);
}
.toggle input:checked + .toggle-slider { background: var(--md-primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

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

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-100%); width: 280px; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--elevation-3); }
  .sidebar.collapsed { width: 280px; } /* Reset collapsed on mobile */
  .sidebar.collapsed .sidebar-hideable { opacity: 1; max-width: 200px; }
  .sidebar.collapsed .sidebar-header { justify-content: flex-start; padding: 20px 16px; gap: 12px; }
  .sidebar.collapsed .sidebar-logo-icon { background: var(--md-primary); }
  .sidebar.collapsed .nav-item { justify-content: flex-start; gap: 12px; padding: 12px 16px; margin: 2px 8px; }
  .sidebar.collapsed .nav-item.active::before { display: none; }
  .sidebar.collapsed .nav-item::after { display: none !important; }
  .sidebar.collapsed .user-chip { justify-content: flex-start; gap: 10px; padding: 10px; }
  .sidebar.collapsed .user-avatar { background: var(--md-primary); }
  .sidebar-toggle-btn { display: none; }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page { padding: 16px; }
  .auth-card { padding: 28px 20px; }
}

/* ─── FAB ────────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  border: none;
  box-shadow: var(--elevation-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 50;
}
.fab:hover { box-shadow: var(--elevation-3); transform: translateY(-2px); background: var(--md-primary); color: white; }
.fab .material-icons-round { font-size: 24px; }

/* ─── PROGRESS BAR ────────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--md-surface-container-highest);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--md-primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ─── ROLE BADGE ──────────────────────────────────────────────── */
.role-management { background: #fce4ec; color: #880e4f; }
.role-educator    { background: #e3f2fd; color: #1565c0; }
.role-parent      { background: #e8f5e9; color: #2e7d32; }

.role-label-management::after { content: 'Menadžment'; }
.role-label-educator::after   { content: 'Vaspitač'; }
.role-label-parent::after     { content: 'Roditelj'; }

/* ─── STATUS BADGES ───────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-active   { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.status-inactive { background: #f5f5f5; color: #757575; border: 1px solid #e0e0e0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

/* ─── INACTIVE ROW  ───────────────────────────────────────────── */
.row-inactive td { opacity: 0.5; }

/* ─── USER CARDS (tenant users panel) ────────────────────────── */
.user-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow var(--transition), transform var(--transition);
}
.user-card:hover { box-shadow: var(--elevation-2); transform: translateY(-2px); }
.user-card-inactive { opacity: 0.7; }

.user-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 8px;
}

.user-card-avatar {
  width: 48px; height: 48px; min-width: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}

.user-card-info { flex: 1; overflow: hidden; }
.user-card-name  { font-size: 15px; font-weight: 600; color: var(--md-on-surface); }
.user-card-role  { font-size: 12px; color: var(--md-on-surface-variant); display: flex; align-items: center; gap: 3px; margin-top: 2px; }
.user-card-email { font-size: 12px; color: var(--md-on-surface-variant); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.user-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--md-outline-variant);
  gap: 8px;
}

/* ─── SUPERADMIN STAT CARDS FLEX LAYOUT ──────────────────────── */
#superadmin-stats { margin-bottom: 24px; }
@media (max-width: 900px) {
  #superadmin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  #superadmin-stats { grid-template-columns: 1fr; }
}

/* ─── CALENDAR ────────────────────────────────────────────────── */
#cal-grid {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-1);
  overflow: hidden;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--md-outline-variant);
}

.cal-month-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--md-on-surface);
}

.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--md-outline-variant);
  background: var(--md-surface-container);
}

.cal-day-name {
  padding: 10px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--md-on-surface-variant);
}

.cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-cell {
  min-height: 90px;
  padding: 6px;
  border-right: 1px solid var(--md-outline-variant);
  border-bottom: 1px solid var(--md-outline-variant);
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: rgba(128,0,32,.04); }
.cal-cell-empty { cursor: default; background: var(--md-surface-container); opacity: 0.4; }
.cal-cell-empty:hover { background: var(--md-surface-container); }

.cal-cell-today {
  background: rgba(128,0,32,.06);
  box-shadow: inset 0 0 0 2px rgba(128,0,32,.2);
}

.cal-cell-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--md-on-surface-variant);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-today-badge {
  background: var(--md-primary);
  color: white;
  font-weight: 700;
}

.cal-cell-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.cal-event-dot {
  border-radius: 4px;
  padding: 2px 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.cal-event-label {
  font-size: 10px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cal-event-more {
  font-size: 10px;
  font-weight: 700;
  color: var(--md-on-surface-variant);
  padding: 1px 4px;
}

/* Calendar filter chips */
.cal-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--chip-color, var(--md-outline-variant));
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  color: var(--chip-color, var(--md-on-surface-variant));
  font-family: inherit;
}
.cal-filter-chip:has(input:checked) {
  background: var(--chip-color);
  color: white;
}

/* Day event modal cards */
.cal-event-card {
  background: var(--md-surface-container);
  border-radius: var(--radius-md);
  padding: 14px;
}
.cal-event-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

/* ─── GROUP TAB CONTENT ───────────────────────────────────────── */
.group-tab-content {
  padding-top: 8px;
}

/* ─── CHIP SM ─────────────────────────────────────────────────── */
.chip-sm { padding: 2px 8px; font-size: 11px; }

@media (max-width: 768px) {
  .cal-cell { min-height: 60px; padding: 3px; }
  .cal-cell-date { font-size: 11px; width: 22px; height: 22px; }
  .cal-event-label { display: none; }
}

/* ─── EXCURSIONS MODULE ──────────────────────────────────────── */

/* Live badge on card */
.exc-live-badge {
  position: absolute; top: 12px; right: 12px;
  background: #e53935; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-full);
  animation: excPulse 1.5s infinite;
  letter-spacing: 1px;
}
.exc-card { position: relative; }

@keyframes excPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Live banner */
.exc-live-banner {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
  color: #fff; padding: 14px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; margin-bottom: 20px;
  animation: excPulse 2s infinite;
}
.exc-live-banner .material-icons-round { font-size: 22px; }

/* Detail header */
.exc-detail-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}

/* Detail grid — map + timeline */
.exc-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

/* Map container */
.exc-map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-2);
}

/* Timeline panel */
.exc-timeline-panel {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--elevation-1);
  max-height: 500px;
  overflow-y: auto;
}

/* Timeline items */
.exc-timeline-item {
  display: flex; gap: 12px; position: relative;
  padding-bottom: 20px; padding-left: 4px;
}
.exc-timeline-item:not(:last-child)::before {
  content: ''; position: absolute;
  left: 17px; top: 32px; bottom: 0;
  width: 2px; background: var(--md-outline-variant);
}
.exc-timeline-item.completed:not(:last-child)::before {
  background: #2e7d32;
}

.exc-timeline-dot {
  width: 34px; height: 34px; min-width: 34px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  background: var(--md-surface-container-highest);
  color: var(--md-on-surface-variant);
  z-index: 1; border: 2px solid var(--md-outline-variant);
}
.exc-timeline-item.completed .exc-timeline-dot {
  background: #2e7d32; color: #fff; border-color: #2e7d32;
}
.exc-timeline-item.current .exc-timeline-dot {
  background: var(--md-primary); color: #fff; border-color: var(--md-primary);
  animation: excPulse 1.5s infinite;
}

.exc-timeline-content { flex: 1; padding-top: 4px; }
.exc-timeline-title { font-size: 14px; font-weight: 600; }
.exc-timeline-time { font-size: 12px; color: var(--md-on-surface-variant); margin-top: 2px; }
.exc-timeline-completed { font-size: 11px; color: #2e7d32; margin-top: 2px; }

/* Pulsing GPS marker */
.exc-pulse-marker { background: none !important; border: none !important; }
.exc-pulse-dot {
  width: 14px; height: 14px; background: #1976d2;
  border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(25,118,210,.5);
  position: absolute; top: 3px; left: 3px;
}
.exc-pulse-ring {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid #1976d2; position: absolute;
  top: -5px; left: -5px;
  animation: excRing 1.5s infinite;
}
@keyframes excRing {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Photos grid */
.exc-photos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.exc-photo-thumb {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer;
}
.exc-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.exc-photo-thumb:hover { box-shadow: var(--elevation-2); transform: scale(1.05); transition: all 0.2s; }

/* Reminder banner */
.exc-reminder-banner {
  display: flex; align-items: center; gap: 10px;
  background: #fff3e0; color: #e65100;
  padding: 14px 20px; border-radius: var(--radius-md);
  font-size: 14px; margin-bottom: 16px;
  border-left: 4px solid #e65100;
  animation: slideDown 0.3s ease;
}
.exc-reminder-banner .material-icons-round { font-size: 22px; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Create stop items */
.exc-create-stop-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--md-surface-container);
  border-radius: var(--radius-sm); margin-bottom: 6px;
}
.exc-create-stop-item input {
  padding: 6px 10px; border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-sm); font-size: 13px;
  background: var(--md-surface); color: var(--md-on-surface);
}
.exc-create-stop-num {
  width: 24px; height: 24px; min-width: 24px;
  border-radius: 50%; background: var(--md-primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* Responsive */
@media (max-width: 900px) {
  .exc-detail-grid { grid-template-columns: 1fr; }
  .exc-timeline-panel { max-height: none; }
}
@media (max-width: 600px) {
  .exc-detail-header { flex-direction: column; }
  .exc-create-stop-item { flex-wrap: wrap; }
  .exc-create-stop-item input[type="time"] { width: 80px !important; }
}

/* ============================================================
   QR CHECK-IN / CHECK-OUT MODULE
   ============================================================ */

/* ─── Stat Cards ──────────────────────────────────────────────── */
.checkin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.checkin-stat-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: var(--elevation-1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.checkin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--elevation-2);
}

.checkin-stat-card .material-icons-round {
  font-size: 28px;
  opacity: 0.8;
}

.checkin-stat-number {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.checkin-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.7;
}

.checkin-stat-present {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: #1b5e20;
}
.checkin-stat-absent {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: #b71c1c;
}
.checkin-stat-left {
  background: linear-gradient(135deg, #eceff1, #cfd8dc);
  color: #37474f;
}
.checkin-stat-total {
  background: linear-gradient(135deg, #ffdad9, #f5b8b8);
  color: #800020;
}

/* ─── Children Status Grid ────────────────────────────────────── */
.checkin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.checkin-child-card {
  background: var(--md-surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--elevation-1);
  transition: all 0.25s ease;
  animation: fadeIn 0.3s ease;
}
.checkin-child-card:hover {
  box-shadow: var(--elevation-2);
  transform: translateY(-1px);
}

.checkin-child-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.checkin-child-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.checkin-child-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.checkin-child-photo span {
  font-size: 15px;
}

.checkin-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--md-surface);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(46, 125, 50, 0); }
}

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

.checkin-child-name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkin-child-group {
  font-size: 12px;
  color: var(--md-on-surface-variant);
  margin-top: 1px;
}

.checkin-child-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.checkin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.checkin-child-actions {
  display: flex;
  gap: 4px;
}

/* ─── QR Scanner Overlay ──────────────────────────────────────── */
.qr-scanner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.qr-scanner-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.qr-scanner-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  margin-bottom: 20px;
}

.qr-scanner-video-wrapper {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: #111;
}

.qr-scanner-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-scanner-guide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.qr-scanner-corners {
  width: 220px;
  height: 220px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  position: relative;
  animation: scanPulse 2s ease-in-out infinite;
}

@keyframes scanPulse {
  0%, 100% { border-color: rgba(255,255,255,0.5); transform: scale(1); }
  50% { border-color: rgba(128,0,32,0.9); transform: scale(1.02); }
}

.qr-scanner-corners::before {
  content: '';
  position: absolute;
  left: -3px; right: -3px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #800020, transparent);
  animation: scanLine 2.5s linear infinite;
}

@keyframes scanLine {
  0% { top: 10%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 90%; opacity: 0; }
}

.qr-scanner-status {
  color: white;
  margin-top: 24px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.qr-scanner-hint {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Scan Result Overlay ─────────────────────────────────────── */
.scan-result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.scan-result-card {
  border-radius: 28px;
  padding: 40px 36px;
  text-align: center;
  color: white;
  max-width: 380px;
  width: 90%;
  animation: scanResultIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scanResultIn {
  from { opacity: 0; transform: scale(0.8) translateY(40px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.scan-result-icon {
  margin-bottom: 16px;
}
.scan-result-icon .material-icons-round {
  font-size: 56px;
  opacity: 0.9;
}

.scan-result-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  font-weight: 700;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.3);
}
.scan-result-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-result-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.scan-result-group {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 16px;
}

.scan-result-action {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 12px;
}

.scan-result-time {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

@media (max-width: 600px) {
  .checkin-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .checkin-stat-card {
    padding: 14px;
  }
  .checkin-stat-number {
    font-size: 28px;
  }
  .checkin-grid {
    grid-template-columns: 1fr;
  }
  .scan-result-card {
    padding: 28px 24px;
    border-radius: 20px;
  }
}

/* ============================================================
   DASHBOARD — WARM REDESIGN MODULE
   Inspired by RASTIMO REDESIGN.html (Nunito, Orange #FF6B35)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ─── Dashboard Page Override ─────────────────────────────────── */
#page-dashboard {
  padding: 0 !important;
  background: #FFF8F0;
  overflow-y: auto;
  animation: dashFadeIn 0.3s ease;
}

@keyframes dashFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#dashboard-content {
  font-family: 'Nunito', sans-serif;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ─── Dashboard Topbar ────────────────────────────────────────── */
.dash-topbar {
  background: #fff;
  border-bottom: 1px solid #FFE8D0;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.dash-greet { flex: 1; min-width: 200px; }
.dash-greet-name {
  font-size: 20px;
  font-weight: 800;
  color: #2D1B0E;
  letter-spacing: -0.3px;
}
.dash-greet-sub {
  font-size: 12px;
  color: #B07050;
  margin-top: 2px;
}

.dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFF8F0;
  border: 1.5px solid #FFE0C8;
  border-radius: 24px;
  padding: 8px 14px;
  width: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dash-search:focus-within {
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}
.dash-search input {
  border: none;
  background: none;
  font-size: 13px;
  color: #2D1B0E;
  outline: none;
  font-family: 'Nunito', sans-serif;
  width: 100%;
}
.dash-search input::placeholder { color: #C09080; }

.dash-notif-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFF0E8;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s, transform 0.15s;
}
.dash-notif-btn:hover { background: #FFE0C8; transform: scale(1.05); }
.dash-notif-btn .material-icons-round { font-size: 20px; color: #FF6B35; }

.dash-notif-badge {
  width: 8px; height: 8px;
  background: #FF6B35;
  border-radius: 50%;
  position: absolute;
  top: 8px; right: 8px;
  border: 2px solid #fff;
  animation: dashPulse 2s infinite;
}

@keyframes dashPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.7; }
}

/* ─── Stat Cards ──────────────────────────────────────────────── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 24px;
}

.dash-stat-card {
  border-radius: 16px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.dash-stat-card::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  pointer-events: none;
}

.dash-stat-icon {
  position: absolute;
  right: 14px; top: 14px;
  opacity: 0.25;
}
.dash-stat-icon .material-icons-round { font-size: 32px; }

.dash-stat-orange { background: linear-gradient(135deg, #FF6B35, #FF8F5E); color: #fff; }
.dash-stat-yellow { background: linear-gradient(135deg, #FFD93D, #FFE66D); color: #7A5800; }
.dash-stat-green  { background: linear-gradient(135deg, #6BCB77, #8EE09A); color: #1A5C23; }
.dash-stat-blue   { background: linear-gradient(135deg, #4D96FF, #7CB3FF); color: #fff; }

.dash-stat-num {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.dash-stat-label {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dash-stat-sub {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 1px;
}

/* ─── Two Column Layout ───────────────────────────────────────── */
.dash-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
  padding: 0 24px;
}

/* ─── Panel Base ──────────────────────────────────────────────── */
.dash-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #FFE8D0;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.dash-panel:hover { box-shadow: 0 4px 16px rgba(255, 107, 53, 0.08); }

.dash-panel-head {
  padding: 14px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #FFF0E8;
}

.dash-panel-title {
  font-size: 15px;
  font-weight: 800;
  color: #2D1B0E;
  font-family: 'Nunito', sans-serif;
  display: flex;
  align-items: center;
}

.dash-panel-action {
  font-size: 12px;
  font-weight: 700;
  color: #FF6B35;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}
.dash-panel-action:hover { color: #D94F20; }

/* ─── Board Filters ───────────────────────────────────────────── */
.dash-board-filters {
  display: flex;
  gap: 6px;
  padding: 10px 18px;
  border-bottom: 1px solid #FFF0E8;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}

.dash-bchip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  font-family: 'Nunito', sans-serif;
  flex-shrink: 0;
}
.dash-c1 { background: #FFF0E8; color: #D94F20; border-color: #FFD0B8; }
.dash-c2 { background: #FFF9E0; color: #8A6200; border-color: #FFE98A; }
.dash-c3 { background: #E8F8EC; color: #1E6B30; border-color: #A8E4B4; }
.dash-c4 { background: #E8F0FF; color: #1A45A8; border-color: #AABBF0; }
.dash-c5 { background: #F5E8FF; color: #6020A8; border-color: #D8AAFF; }

.dash-bchip:hover { opacity: 0.85; }
.dash-bchip.active-chip {
  background: #FF6B35 !important;
  color: #fff !important;
  border-color: #FF6B35 !important;
}

/* ─── Notice List ─────────────────────────────────────────────── */
.dash-notice-list {
  padding: 4px 0;
  max-height: 350px;
  overflow-y: auto;
}
.dash-notice-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 8px;
}

.dash-notice-item {
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #FFF8F4;
  cursor: pointer;
  transition: background 0.12s;
}
.dash-notice-item:hover { background: #FFFAF6; }
.dash-notice-item:last-child { border-bottom: none; }

.dash-n-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.dash-n-title {
  font-size: 13px;
  font-weight: 700;
  color: #2D1B0E;
  line-height: 1.35;
  font-family: 'Nunito', sans-serif;
}
.dash-n-meta {
  font-size: 11px;
  color: #B07050;
  margin-top: 2px;
}
.dash-n-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
  font-family: 'Nunito', sans-serif;
}

/* ─── Today Events ────────────────────────────────────────────── */
.dash-today-events {
  padding: 8px 0;
}

.dash-tevent {
  display: flex;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid #FFFAF6;
  align-items: flex-start;
  transition: background 0.12s;
}
.dash-tevent:hover { background: #FFFAF6; }
.dash-tevent:last-child { border-bottom: none; }

.dash-t-time {
  font-size: 10px;
  font-weight: 800;
  color: #B07050;
  width: 38px;
  flex-shrink: 0;
  padding-top: 2px;
  font-family: 'Nunito', sans-serif;
}

.dash-t-bar {
  width: 3px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 2px;
}

.dash-t-name {
  font-size: 13px;
  font-weight: 700;
  color: #2D1B0E;
  line-height: 1.3;
  font-family: 'Nunito', sans-serif;
}
.dash-t-group {
  font-size: 10px;
  color: #B07050;
  margin-top: 1px;
}

/* ─── Bottom Row ──────────────────────────────────────────────── */
.dash-bottom-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 24px 24px;
}

/* ─── Kids Scroll ─────────────────────────────────────────────── */
.dash-kids-scroll {
  padding: 12px 18px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dash-kid-card {
  flex-shrink: 0;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s;
}
.dash-kid-card:hover { transform: translateY(-3px); }

.dash-kid-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  border: 2.5px solid transparent;
  transition: box-shadow 0.15s;
  font-family: 'Nunito', sans-serif;
  overflow: hidden;
}
.dash-kid-card:hover .dash-kid-avatar {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.dash-kid-name {
  font-size: 10px;
  font-weight: 700;
  color: #2D1B0E;
  text-align: center;
  line-height: 1.2;
  font-family: 'Nunito', sans-serif;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-kid-group {
  font-size: 9px;
  color: #B07050;
  font-family: 'Nunito', sans-serif;
}

.dash-kid-status {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-top: -16px;
  margin-left: 32px;
  position: relative;
  z-index: 1;
}
.dash-present { background: #6BCB77; }
.dash-absent  { background: #FF6B35; }
.dash-late    { background: #FFD93D; }

/* ─── Meal Card ───────────────────────────────────────────────── */
.dash-meal-today {
  padding: 10px 18px;
}

.dash-meal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #FFF0E8;
}
.dash-meal-item:last-child { border-bottom: none; }

.dash-meal-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dash-meal-name {
  font-size: 13px;
  font-weight: 700;
  color: #2D1B0E;
  font-family: 'Nunito', sans-serif;
}
.dash-meal-time {
  font-size: 10px;
  color: #B07050;
}
.dash-meal-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: auto;
  font-family: 'Nunito', sans-serif;
}

/* ─── Finance Mini ────────────────────────────────────────────── */
.dash-finance-mini {
  padding: 10px 18px;
}

.dash-finance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #FFF8F4;
}
.dash-finance-row:last-child { border-bottom: none; }

.dash-f-name {
  font-size: 12px;
  font-weight: 600;
  color: #2D1B0E;
  font-family: 'Nunito', sans-serif;
}
.dash-f-amt {
  font-size: 13px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
}
.dash-f-paid { color: #1E6B30; }
.dash-f-due  { color: #D94F20; }
.dash-f-pend { color: #8A6200; }

/* ─── Dashboard Responsive ────────────────────────────────────── */
@media (max-width: 1200px) {
  .dash-bottom-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 16px;
    gap: 8px;
  }
  .dash-stat-card {
    padding: 14px;
  }
  .dash-stat-num {
    font-size: 24px;
  }
  .dash-two-col {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
  .dash-bottom-row {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
  }
  .dash-topbar {
    padding: 14px 16px;
  }
  .dash-search {
    width: 100%;
    order: 3;
  }
}

@media (max-width: 480px) {
  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }
  .dash-greet-name {
    font-size: 17px;
  }
}
