/* ============================================================
   OORKANAKU ERP — Dashboard Shared Stylesheet
   Inspired by screenshot UI language, built uniquely premium
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Noto+Sans+Tamil:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Root Variables ── */
:root {
  --sidebar-width: 248px;
  --sidebar-mini: 64px;
  --navbar-height: 64px;
  --footer-height: 44px;

  /* Brand Colors */
  --saffron:        #FF6B00;
  --saffron-light:  #FF8C2D;
  --saffron-dark:   #E05500;
  --gold:           #F0A500;
  --gold-light:     #FFD060;
  --temple-red:     #B71C1C;
  --temple-red-light: #EF5350;
  --village-green:  #1B5E20;
  --village-green-light: #43A047;
  --royal-blue:     #1565C0;
  --royal-blue-light: #42A5F5;
  --deep-maroon:    #4A0E2E;

  /* Sidebar */
  --sidebar-bg:        #0F1729;
  --sidebar-bg2:       #141E35;
  --sidebar-hover:     rgba(255, 107, 0, 0.1);
  --sidebar-active:    rgba(255, 107, 0, 0.18);
  --sidebar-border:    rgba(255,255,255,0.06);
  --sidebar-text:      rgba(255,255,255,0.65);
  --sidebar-text-hover:rgba(255,255,255,0.92);
  --sidebar-text-active:#FFFFFF;
  --sidebar-accent:    #FF6B00;

  /* Navbar */
  --navbar-bg:     #FFFFFF;
  --navbar-border: rgba(0,0,0,0.08);
  --navbar-shadow: 0 1px 0 rgba(0,0,0,0.08);

  /* Content Area */
  --content-bg:    #F4F6FA;
  --card-bg:       #FFFFFF;
  --card-shadow:   0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  --card-radius:   14px;
  --card-border:   1px solid rgba(0,0,0,0.06);

  /* Text */
  --text-primary:   #1A1A2E;
  --text-secondary: #4A4A6A;
  --text-muted:     #8888AA;
  --text-white:     #FFFFFF;

  /* Status Colors */
  --success:        #1B5E20;
  --success-bg:     #E8F5E9;
  --success-text:   #2E7D32;
  --danger:         #B71C1C;
  --danger-bg:      #FFEBEE;
  --danger-text:    #C62828;
  --warning:        #E65100;
  --warning-bg:     #FFF3E0;
  --warning-text:   #EF6C00;
  --info:           #0D47A1;
  --info-bg:        #E3F2FD;
  --info-text:      #1565C0;
  --purple-bg:      #F3E5F5;
  --purple-text:    #7B1FA2;

  /* Transitions */
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Poppins', 'Noto Sans Tamil', 'Inter', sans-serif;
  background: var(--content-bg);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.tamil, .ta { font-family: 'Noto Sans Tamil', 'Poppins', sans-serif; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.app-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--transition-slow);
  box-shadow: 4px 0 24px rgba(0,0,0,0.25);
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  height: var(--navbar-height);
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,107,0,0.4);
}
.sidebar-brand-text {
  overflow: hidden;
  min-width: 0;
}
.sidebar-brand-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.1;
  white-space: nowrap;
}
.sidebar-brand-sub {
  display: block;
  font-size: 0.6rem;
  font-family: 'Noto Sans Tamil', sans-serif;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  margin-top: 2px;
}

/* Sidebar User Card */
.sidebar-user-card {
  margin: 12px 12px 8px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sidebar-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-info { min-width: 0; }
.sidebar-user-name {
  display: block;
  font-size: 0.78rem; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'Noto Sans Tamil', sans-serif;
}
.sidebar-user-role {
  display: block;
  font-size: 0.62rem; color: rgba(255,255,255,0.45);
  white-space: nowrap;
  font-family: 'Noto Sans Tamil', sans-serif;
}
.sidebar-user-status {
  width: 8px; height: 8px;
  border-radius: 50%; background: #4CAF50;
  box-shadow: 0 0 6px rgba(76,175,80,0.8);
  flex-shrink: 0; margin-left: auto;
}

/* Sidebar Scrollable Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

/* Nav Labels */
.nav-label {
  padding: 10px 10px 4px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.25);
  font-family: 'Poppins', sans-serif;
}

/* Nav Items */
.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  position: relative;
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
  line-height: 1.3;
}
.nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-hover);
}
.nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  font-weight: 600;
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--saffron);
  border-radius: 0 2px 2px 0;
}
.nav-link .nav-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  transition: all var(--transition);
}
.nav-link:hover .nav-icon, .nav-link.active .nav-icon {
  background: rgba(255,107,0,0.2);
}
.nav-link .nav-text { flex: 1; min-width: 0; white-space: nowrap; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--saffron); color: #fff;
  font-size: 0.58rem; font-weight: 700;
}
.nav-arrow {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  transition: transform var(--transition);
}
.nav-item.open > .nav-link .nav-arrow { transform: rotate(90deg); }

/* Submenu */
.nav-submenu {
  display: none;
  padding: 4px 0 4px 40px;
}
.nav-item.open > .nav-submenu { display: block; }
.nav-submenu .nav-link {
  font-size: 0.73rem;
  padding: 7px 10px;
  color: rgba(255,255,255,0.5);
}
.nav-submenu .nav-link:hover { color: rgba(255,255,255,0.85); }
.nav-submenu .nav-link.active {
  color: var(--saffron-light);
  background: rgba(255,107,0,0.08);
}
.nav-submenu .nav-link::before { display: none; }

/* Sidebar Footer Help */
.sidebar-help {
  flex-shrink: 0;
  margin: 8px 10px 12px;
  padding: 12px;
  background: rgba(255,107,0,0.08);
  border: 1px solid rgba(255,107,0,0.15);
  border-radius: 12px;
}
.sidebar-help-title {
  font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.7);
  margin-bottom: 4px; font-family: 'Noto Sans Tamil', sans-serif;
}
.sidebar-help-phone {
  font-size: 0.7rem; color: var(--saffron-light); font-weight: 600;
}
.sidebar-help-email {
  font-size: 0.62rem; color: rgba(255,255,255,0.4); margin-top: 2px;
}

/* ============================================================
   MAIN AREA
   ============================================================ */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-slow);
}

/* ============================================================
   TOP NAVBAR
   ============================================================ */
.app-navbar {
  position: sticky;
  top: 0;
  height: var(--navbar-height);
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--navbar-border);
  box-shadow: var(--navbar-shadow);
  z-index: 400;
  display: flex;
  align-items: center;
  padding: 0 20px 0 16px;
  gap: 12px;
}

/* Temple Header Section */
.navbar-temple-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.navbar-temple-image {
  width: 40px; height: 40px;
  border-radius: 10px;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.navbar-temple-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.navbar-temple-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Noto Sans Tamil', sans-serif;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.navbar-temple-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
  font-family: 'Noto Sans Tamil', sans-serif;
}

/* Festival Badge in Navbar */
.navbar-festival-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255,107,0,0.08), rgba(240,165,0,0.08));
  border: 1px solid rgba(255,107,0,0.2);
  border-radius: 10px;
  flex-shrink: 0;
}
.navbar-festival-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--saffron-dark);
  font-family: 'Noto Sans Tamil', sans-serif;
  white-space: nowrap;
}
.navbar-festival-dates {
  font-size: 0.62rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}

/* Navbar Right Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.navbar-action-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--content-bg);
  border: 1px solid rgba(0,0,0,0.07);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
  text-decoration: none;
}
.navbar-action-btn:hover {
  background: #fff;
  color: var(--saffron);
  border-color: rgba(255,107,0,0.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.action-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--temple-red-light);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.navbar-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 10px;
  background: var(--content-bg);
  border: 1px solid rgba(0,0,0,0.07);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}
.navbar-user-btn:hover {
  background: #fff;
  border-color: rgba(0,0,0,0.12);
  color: var(--text-primary);
}
.navbar-user-avatar {
  width: 30px; height: 30px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.75rem;
}
.navbar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.navbar-user-info { text-align: left; }
.navbar-user-name {
  display: block;
  font-size: 0.75rem; font-weight: 700; color: var(--text-primary);
  font-family: 'Noto Sans Tamil', sans-serif;
  white-space: nowrap;
}
.navbar-user-role {
  display: block;
  font-size: 0.6rem; color: var(--text-muted);
  white-space: nowrap;
}

/* Sidebar Toggle */
.sidebar-toggle-btn {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--content-bg);
  border: 1px solid rgba(0,0,0,0.07);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: #fff; color: var(--saffron); }

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.app-content {
  flex: 1;
  padding: 22px 24px;
  background: var(--content-bg);
}

/* Page Header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left {}
.page-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
}
.page-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-family: 'Noto Sans Tamil', sans-serif;
}
.page-header-right {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* Breadcrumb */
.page-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'Noto Sans Tamil', sans-serif;
}
.page-breadcrumb a {
  color: var(--text-muted); text-decoration: none;
  transition: color var(--transition);
}
.page-breadcrumb a:hover { color: var(--saffron); }
.page-breadcrumb .sep { color: rgba(0,0,0,0.2); }
.page-breadcrumb .current { color: var(--text-primary); font-weight: 600; }

/* ============================================================
   KPI STAT CARDS
   ============================================================ */
.stats-row {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
.stats-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stats-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stats-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stats-row.cols-6 { grid-template-columns: repeat(6, 1fr); }
.stats-row.cols-2 { grid-template-columns: repeat(2, 1fr); }

.stat-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--sc-color, linear-gradient(90deg, var(--saffron), var(--gold)));
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}
.stat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.stat-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'Noto Sans Tamil', sans-serif;
  line-height: 1.4;
}
.stat-card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.stat-card-value {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card-footer {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.7rem; color: var(--text-muted);
}
.stat-card-link {
  font-size: 0.7rem;
  color: var(--saffron);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap var(--transition);
}
.stat-card-link:hover { gap: 8px; }
.stat-trend {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 20px;
  font-size: 0.65rem; font-weight: 700;
}
.stat-trend.up { background: var(--success-bg); color: var(--success-text); }
.stat-trend.down { background: var(--danger-bg); color: var(--danger-text); }
.stat-trend.neutral { background: var(--warning-bg); color: var(--warning-text); }

/* ============================================================
   CONTENT CARDS
   ============================================================ */
.content-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.content-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
}
.content-card-title .card-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.content-card-actions {
  display: flex; align-items: center; gap: 8px;
}
.content-card-body {
  padding: 20px;
}
.card-view-all {
  font-size: 0.72rem; color: var(--saffron);
  text-decoration: none; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  transition: all var(--transition);
}
.card-view-all:hover { gap: 8px; color: var(--saffron-dark); }

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-main-sidebar { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
.grid-sidebar-main { display: grid; grid-template-columns: 360px 1fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #FAFBFD;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}
.data-table td {
  padding: 11px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: middle;
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFBFD; }
.data-table .amount-positive { color: var(--success-text); font-weight: 700; }
.data-table .amount-negative { color: var(--danger-text); font-weight: 700; }

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.65rem; font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-info    { background: var(--info-bg);    color: var(--info-text); }
.badge-purple  { background: var(--purple-bg);  color: var(--purple-text); }
.badge-saffron { background: rgba(255,107,0,0.1); color: var(--saffron-dark); }
.badge-gold    { background: rgba(240,165,0,0.12); color: var(--gold); }

/* Status Dot */
.status-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem;
}
.status-dot::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.status-dot.active  { color: var(--success-text); }
.status-dot.pending { color: var(--warning-text); }
.status-dot.closed  { color: var(--text-muted); }
.status-dot.danger  { color: var(--danger-text); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none; white-space: nowrap;
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
  line-height: 1.3;
}
.btn i { font-size: 0.8rem; }
.btn-sm { padding: 5px 12px; font-size: 0.72rem; border-radius: 7px; }
.btn-lg { padding: 11px 24px; font-size: 0.88rem; border-radius: 11px; }

.btn-primary {
  background: linear-gradient(135deg, var(--saffron), var(--saffron-light));
  color: #fff;
  box-shadow: 0 4px 14px rgba(255,107,0,0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255,107,0,0.4);
  color: #fff;
}
.btn-success {
  background: linear-gradient(135deg, var(--village-green), var(--village-green-light));
  color: #fff;
  box-shadow: 0 4px 14px rgba(27,94,32,0.3);
}
.btn-success:hover { transform: translateY(-1px); color: #fff; }
.btn-danger {
  background: linear-gradient(135deg, var(--temple-red), var(--temple-red-light));
  color: #fff;
}
.btn-danger:hover { transform: translateY(-1px); color: #fff; }
.btn-outline {
  background: transparent;
  border-color: rgba(0,0,0,0.12);
  color: var(--text-secondary);
}
.btn-outline:hover {
  background: var(--content-bg);
  border-color: rgba(0,0,0,0.2);
  color: var(--text-primary);
}
.btn-outline-primary {
  background: transparent;
  border-color: rgba(255,107,0,0.3);
  color: var(--saffron-dark);
}
.btn-outline-primary:hover {
  background: rgba(255,107,0,0.06);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: rgba(0,0,0,0.05); color: var(--text-primary); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
}
.form-label span.required { color: var(--temple-red-light); margin-left: 2px; }
.form-control, .form-select {
  display: block; width: 100%;
  padding: 9px 13px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 9px;
  font-size: 0.78rem;
  color: var(--text-primary);
  background: #fff;
  transition: all var(--transition);
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
  line-height: 1.5;
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.12);
}
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint {
  font-size: 0.67rem; color: var(--text-muted);
  margin-top: 4px; font-family: 'Noto Sans Tamil', sans-serif;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============================================================
   QUICK ACTIONS BAR
   ============================================================ */
.quick-actions-bar {
  display: flex;
  gap: 10px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  flex: 1;
  min-width: 80px;
}
.quick-action-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(255,107,0,0.2);
}
.quick-action-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.quick-action-label {
  font-size: 0.65rem; font-weight: 600;
  color: var(--text-secondary); text-align: center;
  font-family: 'Noto Sans Tamil', sans-serif;
  line-height: 1.3;
}

/* ============================================================
   ACTIVITY / TRANSACTION LISTS
   ============================================================ */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.activity-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.activity-content { flex: 1; min-width: 0; }
.activity-title {
  font-size: 0.78rem; font-weight: 600; color: var(--text-primary);
  font-family: 'Noto Sans Tamil', sans-serif;
  line-height: 1.4;
}
.activity-meta {
  font-size: 0.68rem; color: var(--text-muted);
  margin-top: 2px; font-family: 'Noto Sans Tamil', sans-serif;
}
.activity-amount { font-size: 0.85rem; font-weight: 800; flex-shrink: 0; }
.activity-amount.positive { color: var(--success-text); }
.activity-amount.negative { color: var(--danger-text); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  height: 8px; background: rgba(0,0,0,0.06);
  border-radius: 4px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  transition: width 1.2s ease;
}
.progress-fill.green { background: linear-gradient(90deg, var(--village-green), var(--village-green-light)); }
.progress-fill.blue  { background: linear-gradient(90deg, var(--royal-blue), var(--royal-blue-light)); }
.progress-fill.red   { background: linear-gradient(90deg, var(--temple-red), var(--temple-red-light)); }

/* ============================================================
   CALENDAR / EVENTS
   ============================================================ */
.event-list { display: flex; flex-direction: column; gap: 8px; }
.event-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.02);
  border-radius: 10px;
  border-left: 3px solid var(--ei-color, var(--saffron));
  transition: all var(--transition);
}
.event-item:hover { background: rgba(255,107,0,0.04); }
.event-date-badge {
  text-align: center;
  flex-shrink: 0; min-width: 36px;
}
.event-date-day {
  display: block; font-size: 1.1rem; font-weight: 900;
  color: var(--text-primary); line-height: 1;
}
.event-date-month {
  display: block; font-size: 0.58rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  font-family: 'Noto Sans Tamil', sans-serif;
}
.event-info { flex: 1; }
.event-name {
  font-size: 0.78rem; font-weight: 700; color: var(--text-primary);
  font-family: 'Noto Sans Tamil', sans-serif; line-height: 1.3;
}
.event-time {
  font-size: 0.65rem; color: var(--text-muted); margin-top: 2px;
  font-family: 'Noto Sans Tamil', sans-serif;
}

/* ============================================================
   FESTIVAL COUNTDOWN
   ============================================================ */
.festival-countdown-card {
  background: linear-gradient(135deg, var(--saffron-dark), #8B1A1A);
  border-radius: var(--card-radius);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.festival-countdown-card::before {
  content: '';
  position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1582510003544-4d00b7f74220?w=600&q=60&fit=crop')
    center/cover;
  opacity: 0.12;
}
.festival-countdown-inner { position: relative; z-index: 1; }
.festival-countdown-label {
  font-size: 0.68rem; font-weight: 600;
  color: rgba(255,255,255,0.7);
  font-family: 'Noto Sans Tamil', sans-serif;
  margin-bottom: 4px;
}
.festival-countdown-title {
  font-size: 0.95rem; font-weight: 800;
  font-family: 'Noto Sans Tamil', sans-serif;
  margin-bottom: 8px;
}
.festival-days {
  font-size: 2.8rem; font-weight: 900;
  line-height: 1; color: var(--gold-light);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.festival-days span { font-size: 0.8rem; font-weight: 400; color: rgba(255,255,255,0.7); }
.festival-countdown-date {
  font-size: 0.75rem; color: rgba(255,255,255,0.7);
  margin-top: 6px; font-family: 'Noto Sans Tamil', sans-serif;
}
.festival-countdown-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 7px 16px; border-radius: 20px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 0.72rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all var(--transition);
  font-family: 'Noto Sans Tamil', sans-serif;
}
.festival-countdown-btn:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* ============================================================
   NOTICE / ALERTS
   ============================================================ */
.notice-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.notice-item:last-child { border-bottom: none; }
.notice-bullet {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--saffron); margin-top: 5px;
  flex-shrink: 0;
}
.notice-text {
  font-size: 0.75rem; color: var(--text-secondary);
  line-height: 1.5; font-family: 'Noto Sans Tamil', sans-serif;
}
.notice-date {
  font-size: 0.65rem; color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}

/* ============================================================
   CHART WRAPPER
   ============================================================ */
.chart-wrapper { position: relative; }
.chart-container { width: 100%; }

/* ============================================================
   WELCOME BANNER
   ============================================================ */
.welcome-banner {
  background: linear-gradient(135deg, var(--sidebar-bg), var(--sidebar-bg2));
  border-radius: var(--card-radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '🏛️';
  position: absolute; right: -10px; top: -10px;
  font-size: 8rem; opacity: 0.06;
}
.welcome-text { position: relative; z-index: 1; }
.welcome-greeting {
  font-size: 1.1rem; font-weight: 800;
  color: #fff;
  font-family: 'Noto Sans Tamil', sans-serif;
  margin-bottom: 4px;
}
.welcome-sub {
  font-size: 0.78rem; color: rgba(255,255,255,0.6);
  font-family: 'Noto Sans Tamil', sans-serif;
}
.welcome-actions { display: flex; gap: 8px; position: relative; z-index: 1; }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  padding: 12px 24px;
  background: var(--card-bg);
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-wrap: wrap; gap: 8px;
  font-family: 'Noto Sans Tamil', sans-serif;
}

/* ============================================================
   SIDEBAR COLLAPSED STATE
   ============================================================ */
.app-wrapper.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-mini);
}
.app-wrapper.sidebar-collapsed .app-main {
  margin-left: var(--sidebar-mini);
}
.app-wrapper.sidebar-collapsed .sidebar-brand-text,
.app-wrapper.sidebar-collapsed .sidebar-user-info,
.app-wrapper.sidebar-collapsed .sidebar-user-status,
.app-wrapper.sidebar-collapsed .nav-text,
.app-wrapper.sidebar-collapsed .nav-badge,
.app-wrapper.sidebar-collapsed .nav-arrow,
.app-wrapper.sidebar-collapsed .nav-label,
.app-wrapper.sidebar-collapsed .sidebar-help,
.app-wrapper.sidebar-collapsed .nav-submenu {
  display: none !important;
}
.app-wrapper.sidebar-collapsed .sidebar-user-card {
  justify-content: center; padding: 10px;
}
.app-wrapper.sidebar-collapsed .nav-link {
  justify-content: center; padding: 9px;
}
.app-wrapper.sidebar-collapsed .nav-link::before { display: none; }
.app-wrapper.sidebar-collapsed .sidebar-header { justify-content: center; padding: 0 10px; }

/* Mobile Overlay */
.sidebar-mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 499;
  opacity: 0;
  transition: opacity var(--transition);
}
.sidebar-mobile-overlay.active { opacity: 1; }

/* ============================================================
   DROPDOWN MENU
   ============================================================ */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  z-index: 600;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  overflow: hidden;
}
.dropdown.open .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 0.78rem; color: var(--text-secondary);
  text-decoration: none; cursor: pointer;
  transition: all var(--transition);
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
  border: none; background: none; width: 100%;
}
.dropdown-item:hover { background: #FAFBFD; color: var(--saffron); }
.dropdown-item i { width: 16px; text-align: center; }
.dropdown-divider { height: 1px; background: rgba(0,0,0,0.06); margin: 4px 0; }
.dropdown-header-section {
  padding: 16px;
  background: #FAFBFD;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* ============================================================
   NOTIFICATION PANEL
   ============================================================ */
.notification-panel { min-width: 320px; max-width: 360px; }
.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px;
  cursor: pointer; transition: background var(--transition);
  text-decoration: none;
}
.notif-item:hover { background: #FAFBFD; }
.notif-item.unread { background: rgba(255,107,0,0.03); }
.notif-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.notif-content { flex: 1; min-width: 0; }
.notif-title {
  font-size: 0.75rem; color: var(--text-primary); font-weight: 600;
  line-height: 1.4; font-family: 'Noto Sans Tamil', sans-serif;
}
.notif-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 2px; }
.notif-unread-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--saffron); flex-shrink: 0; margin-top: 4px;
}

/* ============================================================
   VOTE / POLL CARDS
   ============================================================ */
.vote-poll-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 12px;
  transition: all var(--transition);
}
.vote-poll-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}
.vote-poll-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px; margin-bottom: 12px;
}
.vote-poll-title {
  font-size: 0.85rem; font-weight: 700; color: var(--text-primary);
  font-family: 'Noto Sans Tamil', sans-serif; line-height: 1.4;
}
.vote-poll-desc {
  font-size: 0.72rem; color: var(--text-secondary);
  font-family: 'Noto Sans Tamil', sans-serif; margin-top: 4px; line-height: 1.5;
}
.vote-option-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.vote-option-name {
  font-size: 0.72rem; color: var(--text-secondary);
  font-family: 'Noto Sans Tamil', sans-serif;
}
.vote-option-pct {
  font-size: 0.75rem; font-weight: 700; color: var(--text-primary);
  white-space: nowrap;
}

/* ============================================================
   SCHEDULE TABLE
   ============================================================ */
.schedule-table .schedule-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.schedule-table .schedule-row:last-child { border-bottom: none; }
.schedule-time {
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
  font-family: 'Poppins', sans-serif;
}
.schedule-name {
  font-size: 0.78rem; font-weight: 600; color: var(--text-primary);
  font-family: 'Noto Sans Tamil', sans-serif;
}
.schedule-status { flex-shrink: 0; }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--content-bg);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 9px;
  flex: 1; max-width: 320px;
  transition: all var(--transition);
}
.search-bar:focus-within {
  background: #fff;
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.1);
}
.search-bar i { color: var(--text-muted); font-size: 0.85rem; }
.search-bar input {
  border: none; background: none; outline: none;
  font-size: 0.78rem; color: var(--text-primary);
  width: 100%; font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1400px) {
  .stats-row.cols-6 { grid-template-columns: repeat(3, 1fr); }
  .grid-main-sidebar { grid-template-columns: 1fr 320px; }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 220px; }
  .stats-row.cols-5 { grid-template-columns: repeat(3, 1fr); }
  .stats-row.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-main-sidebar, .grid-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 992px) {
  :root { --sidebar-width: 248px; }
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
  }
  .app-wrapper.mobile-open .app-sidebar { transform: translateX(0); }
  .app-wrapper.mobile-open .sidebar-mobile-overlay { display: block; }
  .app-main { margin-left: 0 !important; }
  .navbar-temple-name { font-size: 0.85rem; }
  .navbar-festival-badge { display: none; }
  .stats-row.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-sidebar-main { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .app-content { padding: 14px 14px; }
  .stats-row.cols-4, .stats-row.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .stats-row.cols-5, .stats-row.cols-6 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .navbar-temple-meta { display: none; }
  .navbar-user-info { display: none; }
  .welcome-banner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .stats-row.cols-4, .stats-row.cols-3,
  .stats-row.cols-5, .stats-row.cols-6 { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; gap: 10px; }
  .quick-actions-bar { gap: 8px; }
  .quick-action-item { min-width: 60px; padding: 10px 8px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-saffron { color: var(--saffron); }
.text-gold    { color: var(--gold); }
.text-success { color: var(--success-text); }
.text-danger  { color: var(--danger-text); }
.text-warning { color: var(--warning-text); }
.text-info    { color: var(--info-text); }
.text-muted   { color: var(--text-muted); }
.text-primary-color { color: var(--text-primary); }
.text-tamil   { font-family: 'Noto Sans Tamil', sans-serif; }
.fw-900 { font-weight: 900; }
.fw-800 { font-weight: 800; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-start { display: flex; align-items: center; justify-content: flex-start; }
.flex-col { flex-direction: column; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
