/* =============================================
   SSSS Admin Panel – Premium Theme (Rotary Brand)
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --sidebar-w: 240px;
  --header-h: 64px;

  /* Brand */
  --blue:       #17458F;
  --blue-dark:  #0d2d5e;
  --blue-light: #2a5ab5;
  --gold:       #F7A81B;
  --gold-dark:  #d4891a;
  --gold-light: #ffc84a;

  /* Neutrals */
  --bg:         #F0F4FA;
  --white:      #FFFFFF;
  --silver:     #F4F6FB;
  --border:     #dde3f0;
  --text:       #1A1A2E;
  --text-muted: #5a6480;
  --text-light: #9ca3af;

  /* Status */
  --green:      #16a34a;
  --green-bg:   #f0fdf4;
  --red:        #dc2626;
  --red-bg:     #fef2f2;
  --orange:     #ea580c;
  --orange-bg:  #fff7ed;
  --purple:     #7c3aed;
  --purple-bg:  #f5f3ff;

  /* Shadows */
  --shadow-sm:  0 1px 4px rgba(23,69,143,0.08);
  --shadow-md:  0 4px 20px rgba(23,69,143,0.12);
  --shadow-lg:  0 8px 40px rgba(23,69,143,0.18);

  --radius:     10px;
  --radius-sm:  7px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ══ LAYOUT ══════════════════════════════════ */
.admin-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--blue-dark);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

.admin-header {
  position: fixed; top: 0;
  left: var(--sidebar-w); right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 28px; z-index: 90;
  box-shadow: var(--shadow-sm);
}

.admin-main {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  padding: 28px 32px 80px; /* Added bottom padding for fixed footer */
  flex: 1;
}

/* ══ SIDEBAR ═════════════════════════════════ */
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.sidebar-logo img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.sidebar-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 14px; font-weight: 700;
  color: var(--gold); line-height: 1.2;
}
.sidebar-logo-sub { font-size: 10px; color: rgba(255,255,255,0.45); margin-top: 2px; }

/* Sidebar section label */
.sidebar-section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 16px 16px 6px;
}

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

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.65);
  transition: all 0.18s; cursor: pointer;
  text-decoration: none; width: 100%;
  border: none; background: none; text-align: left;
  border-radius: 0; position: relative;
}
.nav-item:hover {
  color: var(--gold);
  background: rgba(247,168,27,0.07);
}
.nav-item.active {
  color: var(--blue-dark);
  background: var(--gold);
  font-weight: 600;
  margin: 2px 10px;
  border-radius: var(--radius-sm);
  width: calc(100% - 20px);
  padding-left: 14px;
}
.nav-item.active .nav-icon { color: var(--blue-dark); }
.nav-icon {
  width: 20px; height: 20px; display: flex;
  align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  color: rgba(255,255,255,0.5);
}
.nav-item.active .nav-icon { color: var(--blue-dark); }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.user-info {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold);
  color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: white; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 1px; }
.logout-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 9px;
  background: rgba(220,38,38,0.15);
  color: #fca5a5;
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.logout-btn:hover { background: rgba(220,38,38,0.25); color: #fecaca; }

.pagination-ajax {
  display: flex; justify-content: center; gap: 6px; padding: 20px;
  border-top: 1px solid var(--border);
}
.page-btn {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  min-width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  transition: all 0.2s;
}
.page-btn.active {
  background: var(--blue-dark);
  color: var(--white);
  border-color: var(--blue-dark);
  box-shadow: var(--shadow-sm);
}
.page-btn:hover:not(.active) {
  background: var(--silver);
  border-color: var(--text-light);
}

/* ══ HEADER ══════════════════════════════════ */
.header-left { display: flex; flex-direction: column; }
.header-breadcrumb {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px;
}
.header-breadcrumb span { color: var(--text-muted); }
.header-page-name { 
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-top: 2px;
}
.header-date { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.header-right { display: flex; align-items: center; gap: 14px; }
.notif-btn {
  position: relative; background: var(--bg);
  border: 1px solid var(--border); border-radius: 50%;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; color: var(--text-muted);
  transition: all 0.15s;
}
.notif-btn:hover { background: var(--blue); color: white; border-color: var(--blue); }
.notif-dot {
  position: absolute; top: 6px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 1.5px solid white;
}
.header-user { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.header-user-info { text-align: right; }
.header-user-name { font-size: 13px; font-weight: 700; color: var(--text); }
.header-user-role { font-size: 11px; color: var(--text-muted); }
.header-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(23,69,143,0.3);
}

/* ══ PAGE HEADER ═════════════════════════════ */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 14px;
}
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px; font-weight: 700;
  color: var(--blue-dark); margin-bottom: 3px;
}
.page-subtitle { font-size: 13px; color: var(--text-muted); }

/* ══ STAT CARDS ══════════════════════════════ */
.stats-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 18px; margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex; align-items: flex-start;
  justify-content: space-between;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 3px;
}
.stat-card.blue::after { background: var(--blue); }
.stat-card.gold::after { background: var(--gold); }
.stat-card.green::after { background: var(--green); }
.stat-card.red::after { background: var(--red); }
.stat-card.purple::after { background: var(--purple); }

.stat-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.07em; margin-bottom: 8px;
}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 32px; font-weight: 700;
  color: var(--text); line-height: 1; margin-bottom: 5px;
}
.stat-value.blue { color: var(--blue); }
.stat-value.gold { color: var(--gold-dark); }
.stat-value.green { color: var(--green); }
.stat-value.red { color: var(--red); }
.stat-sub { font-size: 12px; color: var(--text-muted); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon.blue { background: #dbeafe; }
.stat-icon.gold { background: #fef3c7; }
.stat-icon.green { background: var(--green-bg); }
.stat-icon.red { background: var(--red-bg); }
.stat-icon.purple { background: var(--purple-bg); }

/* ══ CARD ════════════════════════════════════ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 25px;
}
.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--silver);
}
.card-header h3 {
  font-size: 14px; font-weight: 700;
  color: var(--blue-dark);
  display: flex; align-items: center; gap: 8px;
}
.card-header h3::before {
  content: ''; display: block;
  width: 3px; height: 16px;
  background: var(--gold); border-radius: 2px;
}
.card-body { padding: 22px; }

/* ══ TABLES ══════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--silver); }
thead th {
  padding: 11px 18px; text-align: left;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.07em; white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8faff; }
tbody td {
  padding: 13px 18px; font-size: 13px;
  color: var(--text); vertical-align: middle;
}

/* Member ID */
.member-id-chip {
  font-size: 12px; font-weight: 600; color: var(--blue);
  background: #dbeafe; padding: 3px 10px;
  border-radius: 5px; display: inline-block; letter-spacing: 0.02em;
  width: fit-content;
}
.member-avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white; display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  margin-right: 8px; flex-shrink: 0; vertical-align: middle;
  object-fit: cover;
  object-position: top;
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.badge-success { background: var(--green-bg); color: var(--green); }
.badge-danger  { background: var(--red-bg);   color: var(--red); }
.badge-warning { background: #fffbeb; color: #b45309; }
.badge-blue    { background: #dbeafe; color: var(--blue); }
.badge-gray    { background: var(--silver); color: var(--text-muted); }
.badge-gold    { background: #fef3c7; color: var(--gold-dark); }

/* Action buttons */
.btn-icon {
  width: 32px; height: 32px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; border: 1px solid var(--border);
  background: var(--white); color: var(--text-muted);
  cursor: pointer; transition: all 0.15s; text-decoration: none;
}
.btn-icon:hover { background: var(--blue); color: white; border-color: var(--blue); }
.btn-icon.red:hover { background: var(--red); color: white; border-color: var(--red); }

/* ══ BUTTONS ═════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; border: none;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(23,69,143,0.3); }
.btn-gold { background: var(--gold); color: var(--blue-dark); }
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(247,168,27,0.4); }
.btn-dark { background: var(--blue-dark); color: white; }
.btn-dark:hover { background: #061928; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: white; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm  { padding: 7px 16px; font-size: 12px; }
.btn-xs  { padding: 5px 10px; font-size: 11px; }
.btn-full { width: 100%; }

.cancel-link {
  text-align: center; font-size: 12px; color: var(--text-muted);
  cursor: pointer; display: block; margin-top: 2px;
}
.cancel-link:hover { color: var(--blue); text-decoration: underline; }

/* ══ FORM STYLES ═════════════════════════════ */
.form-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  margin-bottom: 20px; overflow: hidden;
}

/* ══ FORM SECTION TITLE ══════════════════════ */
.form-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--blue-dark);
    padding: 24px 18px 10px 18px;
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--silver);
    position: relative;
}
.form-section-title i {
    color: var(--gold);
    font-size: 14px;
    width: 20px;
    text-align: center;
}
.form-section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 18px;
    width: 30px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.form-card-header {
  padding: 14px 22px; background: var(--silver);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.form-card-header h3 {
  font-size: 14px; font-weight: 700; color: var(--blue-dark);
  display: flex; align-items: center; gap: 8px;
}
.form-card-header h3::before {
  content: ''; display: block;
  width: 3px; height: 16px;
  background: var(--gold); border-radius: 2px;
}

.form-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
}
.form-cell {
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.form-cell:last-child { border-right: none; }
.form-cell.span2 { grid-column: span 2; }
.form-cell.span4 { grid-column: span 4; }
.form-cell label {
  display: block; font-size: 10px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 7px;
}
.form-cell input, .form-cell select, .form-cell textarea {
  width: 100%; border: none; outline: none;
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  color: var(--text); background: transparent; padding: 4px 0 0 0;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.form-cell select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0px center;
  padding-right: 20px;
}
.form-cell input::placeholder { color: var(--text-light); font-weight: 400; }
.form-cell textarea { resize: vertical; min-height: 80px; }
.form-cell select option { color: var(--text); background: var(--white); }

/* Standalone form groups */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; color: var(--text);
  outline: none; transition: border-color 0.2s; background: white;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue); }
.form-group input::placeholder { color: var(--text-light); }

.form-actions {
  padding: 18px 22px;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--border);
  background: var(--silver);
}

/* ══ PHOTO UPLOAD ════════════════════════════ */
.photo-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 36px 20px; text-align: center; cursor: pointer;
  transition: all 0.2s; margin: 18px;
  background: var(--silver);
}
.photo-upload-area:hover { border-color: var(--blue); background: #eff6ff; }
.photo-upload-icon { font-size: 32px; margin-bottom: 10px; }
.photo-upload-area p { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.photo-upload-area small { font-size: 11px; color: var(--text-light); }

/* ══ NOTIFICATION BLOCKS ═════════════════════ */
.notif-block {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 25px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.notif-block-header {
  padding: 16px 22px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--silver); border-bottom: 1px solid var(--border);
}
.notif-block-title { display: flex; flex-direction: column; gap: 3px; }
.notif-block-name { font-size: 16px; font-weight: 700; color: var(--blue-dark); }
.notif-block-amount { font-size: 13px; color: var(--text-muted); }
.notif-tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 4px;
}
.notif-tag.latest { background: #dcfce7; color: var(--green); }
.notif-tag.previous { background: var(--silver); color: var(--text-muted); border: 1px solid var(--border); }

/* ══ TWO PANEL ═══════════════════════════════ */
.two-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 25px;
}
.panel-header {
  padding: 14px 20px; background: var(--silver);
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 700; color: var(--blue-dark);
  display: flex; align-items: center; gap: 8px;
}
.panel-header::before {
  content: ''; display: block;
  width: 3px; height: 16px;
  background: var(--gold); border-radius: 2px;
}
.panel-body { padding: 20px; }

.team-member-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.team-member-row:last-child { border-bottom: none; padding-bottom: 0; }
.team-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.team-info { flex: 1; }
.team-info strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.team-info span { font-size: 11px; color: var(--text-muted); margin-top: 1px; display: block; }

/* ══ MODAL ═══════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: white; border-radius: var(--radius); padding: 28px;
  max-width: 420px; width: 100%; box-shadow: var(--shadow-lg);
  transform: translateY(16px); transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal h3 { font-size: 17px; font-weight: 700; color: var(--blue-dark); margin-bottom: 8px; }
.modal p { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; line-height: 1.65; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ══ SEARCH BAR ══════════════════════════════ */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 14px;
  transition: border-color 0.2s; flex: 1; max-width: 500px;
}
.search-bar:focus-within { border-color: var(--blue); }
.search-bar input {
  border: none; outline: none; width: 100%;
  padding: 9px 0; font-size: 13px; background: transparent;
  color: var(--text);
}
.search-bar input::placeholder { color: var(--text-light); }
.search-icon { color: var(--text-light); font-size: 14px; flex-shrink: 0; }

/* ══ EMPTY STATE ═════════════════════════════ */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-light); font-size: 13px;
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { color: var(--text-muted); }

/* ══ FOOTER ══════════════════════════════════ */
.admin-footer {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  text-align: center; 
  padding: 12px 24px;
  font-size: 11px; 
  color: var(--text-light);
  border-top: 1px solid var(--border);
  background: rgba(240, 244, 250, 0.8);
  backdrop-filter: blur(8px);
  z-index: 85;
}

/* ══ QUICK ACTIONS ═══════════════════════════ */
.quick-action-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.quick-action-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md);
  border-color: var(--blue);
}
.qa-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.qa-icon.blue { background: #dbeafe; }
.qa-icon.gold { background: #fef3c7; }
.qa-icon.green { background: var(--green-bg); }
.qa-icon.purple { background: var(--purple-bg); }
.qa-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.qa-sub { font-size: 11px; color: var(--text-muted); }

/* ══ BULK IMPORT ═════════════════════════════ */
.bulk-import-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 28px; display: flex;
  align-items: center; justify-content: space-between;
  margin: 18px; gap: 16px; flex-wrap: wrap;
  background: var(--silver); transition: border-color 0.2s;
}
.bulk-import-area:hover { border-color: var(--blue); }

/* ══ INFO BANNER ═════════════════════════════ */
.info-banner {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 13px; color: var(--blue);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}

/* ══ RESPONSIVE ══════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

.sidebar-close-btn {
  position: absolute;
  top: 15px; right: 15px;
  background: rgba(255,255,255,0.1); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  color: white; font-size: 16px;
  cursor: pointer;
  display: none !important;
  align-items: center; justify-content: center;
  z-index: 101;
}

@media (max-width: 768px) {
  .sidebar-close-btn { display: flex !important; }
  :root { --sidebar-w: 0px; }
  .admin-sidebar { transform: translateX(-240px); transition: transform 0.3s; width: 240px; box-shadow: none; }
  .admin-sidebar.open { transform: translateX(0); box-shadow: 4px 0 15px rgba(0,0,0,0.25); }
  .admin-header { left: 0; }
  .admin-main { margin-left: 0; padding: 30px 16px 130px; }
  .admin-footer { position: fixed !important; left: 0; bottom: 0; right: 0; }
  .header-breadcrumb, .header-page-name { display: none; }
  
  .sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    display: none;
    backdrop-filter: blur(4px);
  }
  .sidebar-overlay.active { display: block; }

  .card { border-radius: 0; border-left: none; border-right: none; }
  .card-body, .form-card { padding: 12px; overflow: hidden; }
  .panel-body { padding: 18px 12px; overflow: hidden; }
  .form-card { border-radius: 12px; margin: 0; width: 100%; }
  
  /* Table to Accordion Conversion for Mobile */
  .table-wrap { overflow: visible; padding: 12px 4px 0; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap th, .table-wrap td, .table-wrap tr { 
    display: block; width: 100%; 
  }
  .table-wrap thead { display: none; }
  .table-wrap tr {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 18px 14px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
  }
  .table-wrap tr::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 20px; right: 18px;
    font-size: 10px;
    color: var(--text-light);
    transition: transform 0.3s;
  }
  .table-wrap tr.expanded { border-color: var(--blue); box-shadow: var(--shadow-md); }
  .table-wrap tr.expanded::after { transform: rotate(180deg); color: var(--blue); }

  .table-wrap td {
    padding: 10px 0;
    border-bottom: 1px solid var(--silver);
    display: none; /* Hide by default */
    flex-direction: column;
    gap: 4px;
    text-align: left !important;
  }
  
  /* Always show the first cell (the summary) */
  .table-wrap td:first-child { 
    display: flex; 
    border-bottom: none;
    padding: 0;
    margin-top: 12px;
    margin-right: 30px;
  }
  
  /* Show all when expanded */
  .table-wrap tr.expanded td { display: flex; }
  .table-wrap tr.expanded td:first-child { border-bottom: 1px solid var(--silver); padding-bottom: 10px; margin-bottom: 5px; }

  /* Side-by-side cells for Joined and Status on Mobile */
  .table-wrap td[data-label="Joined"], 
  .table-wrap td[data-label="Payment Status"],
  .table-wrap td[data-label="Reg. Date"],
  .table-wrap td[data-label="Date (IST)"],
  .table-wrap td[data-label="Status"] {
    display: none; /* Hidden by default in accordion */
    width: 50%;
    border-bottom: none;
  }
  .table-wrap tr.expanded td[data-label="Joined"], 
  .table-wrap tr.expanded td[data-label="Payment Status"],
  .table-wrap tr.expanded td[data-label="Reg. Date"],
  .table-wrap tr.expanded td[data-label="Date (IST)"],
  .table-wrap tr.expanded td[data-label="Status"] {
    display: inline-flex !important;
    vertical-align: top;
  }
  
  .table-wrap tr { overflow: hidden; position: relative; }
  .table-wrap tr.expanded td[data-label="Actions"] { clear: both; border-top: 1px solid var(--silver); padding-top: 15px; }

  .table-wrap td:last-child { border-bottom: none; }
  .table-wrap td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
  }
  
  .badge { width: fit-content !important; }

  /* Mobile Header Adjustments */
  .admin-header { padding: 0 15px; }
  .header-breadcrumb { display: none !important; }
  .header-page-name { font-size: 13px; }
  .header-user-info { display: none; }
  
  @media (min-width: 480px) {
    .header-user-info { display: block; }
    .header-user-role { display: none; }
  }

  /* Welcome Banner Mobile */
  .welcome-banner {
    padding: 30px 20px;
    text-align: center;
  }
  .welcome-banner h2 { font-size: 24px; }
  .welcome-banner p { font-size: 13px; margin: 0 auto; }
  .welcome-banner div[style*="display: flex; gap: 15px"] {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px !important;
  }

  .stats-grid { grid-template-columns: 1fr; }
  .two-panel { grid-template-columns: 1fr; }
  
  /* Grid gap for quick actions on mobile */
  [style*="grid-template-columns:repeat(auto-fit"] { gap: 0 !important; border: 1px solid var(--border) !important; background: var(--white) !important; }
  .quick-action-card { border-radius: 0 !important; border: none !important; border-bottom: 1px solid var(--border) !important; }
  .quick-action-card:last-child { border-bottom: none !important; }

  /* Grid stack for dashboard rows on mobile */
  [style*="grid-template-columns:2fr 1fr"] { grid-template-columns: 1fr !important; }

  /* Hide accordion icon for empty states */
  .table-wrap tr:has(.empty-state)::after { display: none !important; }

  .bulk-import-area {
    flex-direction: column;
    text-align: center;
    padding: 24px 15px;
    margin: 10px 0;
    gap: 20px;
  }
  .bulk-import-area input[type="file"] {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
  .bulk-import-area .btn {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
}
