/* ================================================================
   Dark Intentions Loot Manager — Stylesheet
   Dark WoW-themed guild management UI
   ================================================================ */

/* ── Custom Properties ─────────────────────────────────────────── */
:root {
  --bg-primary:       #0a0a12;
  --bg-secondary:     #111120;
  --bg-sidebar:       #0c0c18;
  --bg-card:          #16162a;
  --bg-input:         #1a1a2e;

  --color-gold:       #c8a84b;
  --color-gold-bright:#f5c842;
  --color-gold-dim:   #7a6530;
  --color-gold-glow:  rgba(200, 168, 75, 0.15);
  --color-gold-border:rgba(200, 168, 75, 0.25);

  --color-text:       #d4d4d8;
  --color-text-muted: #6b6b80;
  --color-border:     #222235;

  --color-success:    #4caf73;
  --color-error:      #e05555;

  --sidebar-width:    260px;
  --transition:       0.28s ease;

  /* WoW Class Colours */
  --dk:   #C41E3A;
  --dh:   #A330C9;
  --druid:#FF7C0A;
  --evok: #33937F;
  --hunt: #AAD372;
  --mage: #3FC7EB;
  --monk: #00FF98;
  --pala: #F48CBA;
  --pri:  #c8c8c8;
  --rog:  #FFF468;
  --sha:  #0070DD;
  --lock: #8788EE;
  --warr: #C69B3A;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--color-text);
  font-size: 10px;
  line-height: 1.6;
}

/* ── Hamburger ──────────────────────────────────────────────────── */
.hamburger {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1100;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--color-gold-border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  transition: background var(--transition), border-color var(--transition);
}

.hamburger:hover {
  background: rgba(200, 168, 75, 0.12);
  border-color: var(--color-gold);
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-gold);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Sidebar Overlay (mobile) ───────────────────────────────────── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--color-gold-border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform var(--transition);
  overflow: hidden;
}

.sidebar.closed {
  transform: translateX(-100%);
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 18px 64px;
  border-bottom: 1px solid var(--color-gold-border);
  background: linear-gradient(180deg, rgba(200,168,75,0.08) 0%, transparent 100%);
  min-height: 70px;
  flex-shrink: 0;
}

.brand-logo {
  font-size: 27px;
  filter: drop-shadow(0 0 8px rgba(200, 168, 75, 0.6));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-guild {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-gold-bright);
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(200, 168, 75, 0.4);
}

.brand-sub {
  font-size: 10px;
  color: var(--color-text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Nav */
.nav-menu {
  list-style: none;
  padding: 10px 0;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition);
  color: var(--color-text-muted);
  user-select: none;
}

.nav-item:hover {
  background: rgba(200, 168, 75, 0.07);
  color: var(--color-text);
  border-left-color: rgba(200, 168, 75, 0.2);
}

.nav-item.active {
  background: rgba(200, 168, 75, 0.11);
  color: var(--color-gold-bright);
  border-left-color: var(--color-gold);
}

.nav-icon {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--color-border);
  font-size: 10px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* ── Main Content ───────────────────────────────────────────────── */
.main-content {
  height: 100vh;
  margin-left: 0;
  transition: margin-left var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-content.sidebar-open {
  margin-left: var(--sidebar-width);
}

/* ── Tab Panels ─────────────────────────────────────────────────── */
.tab-panel {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.tab-panel.active {
  display: flex;
}

/* Panel header */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px 18px 70px;
  border-bottom: 1px solid var(--color-gold-border);
  background: linear-gradient(180deg, rgba(200,168,75,0.05) 0%, transparent 100%);
  flex-shrink: 0;
  min-height: 70px;
}

.panel-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.panel-header h1 {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-gold-bright);
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(200, 168, 75, 0.25);
}

/* Scrollable content area */
.content-scroll {
  flex: 1;
  overflow: auto;
  padding: 20px 28px 28px;
}

/* ── Message / Alert ────────────────────────────────────────────── */
.message {
  margin: 10px 28px 0;
  padding: 10px 16px;
  border-radius: 5px;
  font-size: 10px;
  border: 1px solid;
  flex-shrink: 0;
}

.message.hidden { display: none; }

.message.success {
  background: rgba(76, 175, 115, 0.1);
  border-color: rgba(76, 175, 115, 0.3);
  color: var(--color-success);
}

.message.error {
  background: rgba(224, 85, 85, 0.1);
  border-color: rgba(224, 85, 85, 0.3);
  color: var(--color-error);
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 23px;
  border-radius: 5px;
  border: 1px solid;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.18s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, #231c0c 0%, #15110a 100%);
  border-color: var(--color-gold-dim);
  color: var(--color-gold);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #332b14 0%, #231d0e 100%);
  border-color: var(--color-gold);
  color: var(--color-gold-bright);
  box-shadow: 0 0 14px rgba(200, 168, 75, 0.18);
}

.btn-primary:active { transform: translateY(1px); }

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-danger {
  background: linear-gradient(180deg, #3d1414 0%, #2a0d0d 100%);
  border-color: #8b3a3a;
  color: #ff6b6b;
}

.btn-danger:hover {
  background: linear-gradient(180deg, #5a2020 0%, #3d1414 100%);
  border-color: #ff6b6b;
  color: #ff8888;
  box-shadow: 0 0 14px rgba(255, 107, 107, 0.25);
}

.btn-danger:active { transform: translateY(1px); }

.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-icon-only {
  background: var(--bg-card);
  border-color: var(--color-border);
  color: var(--color-text-muted);
  padding: 9px 13px;
  font-family: inherit;
  font-size: 10px;
}

.btn-icon-only:hover {
  border-color: var(--color-gold-dim);
  color: var(--color-gold);
}

.btn-icon { font-size: 17px; }

.btn-no-top-margin {
  margin-top: -14px;
}

/* ── Data Tables ────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
}

.data-table thead th {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-gold);
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-gold-border);
  text-align: left;
  background: rgba(200, 168, 75, 0.04);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background 0.12s;
}

.data-table tbody tr:hover {
  background: rgba(200, 168, 75, 0.04);
}

.data-table tbody td {
  padding: 10px 14px;
  vertical-align: middle;
}

.empty-row td {
  text-align: center;
  color: var(--color-text-muted);
  padding: 48px 14px;
  font-style: italic;
  font-size: 17px;
}

/* Expandable roster rows */
.roster-row {
  cursor: pointer;
}

.roster-detail-row {
  display: none;
}

.roster-detail-row:not(.hidden) {
  display: table-row;
  background: rgba(200, 168, 75, 0.08);
}

.detail-content {
  padding: 12px;
  font-size: 15px;
}

.detail-content h4 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gold);
  font-family: 'Cinzel', serif;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--color-gold);
  border-radius: 3px;
}

.detail-label {
  font-weight: 600;
  color: var(--color-gold);
  margin-right: 10px;
}

.detail-value {
  color: var(--color-text);
  font-family: 'Courier New', monospace;
  font-size: 18px;
}

/* Roster: class-coloured names */
.char-name { font-weight: 600; }

.class-death-knight  { color: var(--dk);    }
.class-demon-hunter  { color: var(--dh);    }
.class-druid         { color: var(--druid); }
.class-evoker        { color: var(--evok);  }
.class-hunter        { color: var(--hunt);  }
.class-mage          { color: var(--mage);  }
.class-monk          { color: var(--monk);  }
.class-paladin       { color: var(--pala);  }
.class-priest        { color: var(--pri);   }
.class-rogue         { color: var(--rog);   }
.class-shaman        { color: var(--sha);   }
.class-warlock       { color: var(--lock);  }
.class-warrior       { color: var(--warr);  }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-active {
  background: rgba(76, 175, 115, 0.13);
  color: var(--color-success);
  border: 1px solid rgba(76, 175, 115, 0.22);
}

.status-inactive {
  background: rgba(107, 107, 128, 0.13);
  color: var(--color-text-muted);
  border: 1px solid rgba(107, 107, 128, 0.22);
}

/* ── EPGP Gear Table ────────────────────────────────────────────── */
.section-title {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--color-gold);
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  padding-bottom: 8px;
}

.gear-table-wrapper {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.gear-table-wrapper .btn {
  flex-shrink: 0;
  height: fit-content;
}

.gear-table {
  max-width: 720px;
}

/* Give the 3rd column (right gear slot name) some breathing room */
.gear-table td:nth-child(3) {
  padding-left: 32px;
}

/* Point value cells */
.gear-table td:nth-child(2),
.gear-table td:nth-child(4) {
  width: 130px;
}

.slot-name {
  color: var(--color-text);
  font-weight: 500;
}

/* ── On Time Bonus Section ──────────────────────────────────────── */
.on-time-bonus-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.on-time-bonus-table {
  max-width: 1200px;
}

.on-time-bonus-table td:nth-child(1),
.on-time-bonus-table td:nth-child(3),
.on-time-bonus-table td:nth-child(5),
.on-time-bonus-table td:nth-child(7) {
  text-align: center;
  padding: 8px;
  width: 40px;
}

.on-time-bonus-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-gold);
}

.bonus-ep-input {
  flex: 0 0 auto !important;
  width: 120px !important;
  min-width: 120px !important;
}

/* Remove spinner arrows from number input */
.bonus-ep-input::-webkit-outer-spin-button,
.bonus-ep-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bonus-ep-input[type="number"] {
  -moz-appearance: textfield;
}

.gear-input {
  width: 96px;
  background: var(--bg-input);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  padding: 6px 10px;
  font-size: 17px;
  font-family: 'Open Sans', sans-serif;
  text-align: right;
  transition: border-color 0.18s;
  -moz-appearance: textfield;
}

.gear-input::-webkit-outer-spin-button,
.gear-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.gear-input:focus {
  outline: none;
  border-color: var(--color-gold-dim);
  box-shadow: 0 0 0 2px rgba(200, 168, 75, 0.1);
}

/* ── Admin Form ─────────────────────────────────────────────────── */
.admin-section {
  max-width: 580px;
}

.admin-separator {
  border: none;
  border-top: 5px solid var(--color-border);
  margin: 16px 0;
}

.admin-subsection {
  margin-bottom: 24px;
}

.subsection-title {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.subsection-description {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 12px;
  line-height: 1.4;
}

.admin-input-group {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.form-select {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  color: var(--color-text);
  padding: 10px 12px;
  font-size: 13px;
  font-family: 'Open Sans', sans-serif;
}

.form-select:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.admin-subseparator {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 20px 0;
}

.form-group {
  margin-bottom: 22px;
}

.form-group-no-top-margin {
  margin-bottom: 22px;
  margin-top: -16px;
}

.form-group label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gold);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.input-group {
  display: flex;
  gap: 8px;
}

.form-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  color: var(--color-text);
  padding: 10px 14px;
  font-size: 17px;
  font-family: 'Open Sans', sans-serif;
  transition: border-color 0.18s;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-gold-dim);
  box-shadow: 0 0 0 2px rgba(200, 168, 75, 0.1);
}

.form-input::placeholder { color: var(--color-text-muted); }

.form-hint {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  color: var(--color-text-muted);
  font-style: italic;
}

.form-hint code {
  font-style: normal;
  background: rgba(200, 168, 75, 0.08);
  border: 1px solid var(--color-gold-border);
  border-radius: 3px;
  padding: 0 4px;
  font-size: 10px;
  color: var(--color-gold);
}

/* ── EPGP Log Form ──────────────────────────────────────────────── */
.epgp-log-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: flex-end;
}

.epgp-log-form .form-input,
.epgp-log-form .form-select {
  flex: 1;
  min-width: 120px;
}

.epgp-log-form .btn {
  flex-shrink: 0;
}

/* ── Collapsible Sections ────────────────────────────────────────── */
.collapsible-section {
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(200, 168, 75, 0.02);
}

.collapsible-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  color: var(--color-text);
  font-family: inherit;
  gap: 12px;
  transition: background-color 0.18s, border-bottom 0.18s;
}

.collapsible-header:hover {
  background: rgba(200, 168, 75, 0.05);
}

.collapsible-header .section-title {
  margin: 0;
  font-size: 14px;
  flex: 1;
  text-align: left;
}

.collapse-icon {
  display: inline-block;
  transition: transform 0.18s;
  font-size: 12px;
  color: var(--color-gold);
  transform: translateY(-3px);
  flex-shrink: 0;
}

.collapsible-header.collapsed {
  border-bottom: none;
  padding-bottom: 7px;
}

.collapsible-section:has(.collapsible-header.collapsed) {
  border: 1px solid var(--color-border);
}

.collapsible-header.collapsed .collapse-icon {
  transform: translateY(-3px) rotate(-90deg);
}

.collapsible-content {
  padding: 16px;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.collapsible-header.collapsed + .collapsible-content {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* ── Roster Filters ─────────────────────────────────────────────── */
.roster-filters {
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}

.filter-input {
  flex: 1;
  max-width: 300px;
  background: var(--bg-input);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  color: var(--color-text);
  padding: 8px 12px;
  font-size: 17px;
  font-family: 'Open Sans', sans-serif;
  transition: border-color 0.18s;
}

.filter-input:focus {
  outline: none;
  border-color: var(--color-gold-dim);
  box-shadow: 0 0 0 2px rgba(200, 168, 75, 0.1);
}

.filter-input::placeholder { color: var(--color-text-muted); }

/* Sortable table headers */
.sortable-header {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 18px !important;
}

.sortable-header:hover {
  background: rgba(200, 168, 75, 0.08) !important;
}

.sortable-header::after {
  content: '⇅';
  position: absolute;
  right: 6px;
  opacity: 0.3;
  font-size: 17px;
}

.sortable-header.sort-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--color-gold);
}

.sortable-header.sort-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--color-gold);
}

/* ── Coming Soon ────────────────────────────────────────────────── */
.coming-soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--color-text-muted);
}

.coming-soon-icon {
  font-size: 54px;
  opacity: 0.25;
  margin-bottom: 8px;
}

.coming-soon h2 {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  color: var(--color-text-muted);
}

.coming-soon p { font-size: 17px; }

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: rgba(200, 168, 75, 0.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-gold-dim); }

/* ── Loading pulse ──────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.loading {
  color: var(--color-text-muted);
  font-style: italic;
  animation: pulse 1.6s ease-in-out infinite;
}

/* ── Modal ───────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.28s ease;
}

.modal.hidden {
  display: none;
  opacity: 0;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-width: 400px;
  width: 90%;
}

#transaction-history-modal .modal-content {
  max-width: 1000px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--color-gold);
  margin: 0;
}

.btn-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s;
}

.btn-close:hover {
  color: var(--color-gold);
}

.modal-body {
  padding: 20px;
}

.export-textarea {
  width: 100%;
  min-height: 300px;
  background: var(--color-bg-main);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.export-textarea:focus {
  outline: none;
  border-color: var(--color-gold-border);
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid var(--color-border);
  justify-content: flex-end;
}

.alert-modal-content {
  max-width: 420px;
  text-align: center;
}

.alert-modal-content .modal-header {
  justify-content: center;
  border-bottom: none;
  padding-bottom: 0;
}

.alert-modal-content .modal-body {
  padding: 16px 24px 8px;
}

.alert-modal-content .modal-body p {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.alert-modal-content .modal-footer {
  justify-content: center;
  border-top: none;
  padding-top: 8px;
}

.alert-modal-content .modal-footer .btn {
  min-width: 100px;
  justify-content: center;
  text-align: center;
}

.confirm-modal-input {
  margin-top: 12px;
  width: 100%;
  text-align: center;
  font-size: 14px;
}

.confirm-modal-input.hidden {
  display: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--color-gold);
}

/* ── Custom EP Buttons Container ─────────────────────────────────── */
.custom-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-ep-button-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.custom-ep-button-row select {
  width: auto;
  max-width: 300px;
  min-width: 200px;
}

.custom-ep-button-row .btn {
  flex-shrink: 0;
  padding: 11px 17px;
}

/* ── Transaction History ─────────────────────────────────────────── */
.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-gold);
  border-radius: 4px;
}

.transaction-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  background: rgba(200, 168, 75, 0.08);
  border: 1px solid var(--color-gold-dim);
  border-radius: 3px;
  color: var(--color-gold);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.18s;
}

.transaction-icon-btn:hover {
  background: rgba(200, 168, 75, 0.15);
  border-color: var(--color-gold);
  color: var(--color-gold-bright);
}

.transaction-icon-btn.delete-btn {
  background: rgba(255, 107, 107, 0.08);
  border-color: #8b3a3a;
  color: #ff6b6b;
}

.transaction-icon-btn.delete-btn:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: #ff6b6b;
  color: #ff8888;
}

.transaction-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.transaction-type-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.transaction-type-badge.ep {
  background: rgba(76, 175, 115, 0.2);
  color: var(--color-success);
  border: 1px solid rgba(76, 175, 115, 0.4);
}

.transaction-type-badge.gp {
  background: rgba(100, 200, 255, 0.2);
  color: #64c8ff;
  border: 1px solid rgba(100, 200, 255, 0.4);
}

.transaction-details {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 0px;
  min-width: 0;
  align-items: center;
}

.transaction-amount {
  font-weight: 700;
  color: var(--color-text);
  font-size: 17px;
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
  min-width: 50px;
  margin-right: 8px;
}

.transaction-reason {
  color: var(--color-text);
  font-size: 17px;
  font-family: 'Courier New', monospace;
  word-wrap: break-word;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.transaction-timestamp {
  color: var(--color-text);
  font-size: 17px;
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
  min-width: 160px;
  text-align: right;
}

.transaction-list-empty {
  text-align: center;
  padding: 32px;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ── Attendance Tab ──────────────────────────────────────────────── */
.attendance-container {
  width: 100%;
}

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

.attendance-table thead {
  background: rgba(200, 168, 75, 0.08);
  border-bottom: 2px solid var(--color-gold-border);
}

.attendance-table th {
  color: var(--color-gold);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.attendance-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.attendance-table tbody tr:hover {
  background: rgba(200, 168, 75, 0.05);
}

/* Status color codes */
.status-present {
  color: var(--color-success);
  font-weight: 600;
}

.status-absent {
  color: var(--color-error);
  font-weight: 600;
}

.status-tentative {
  color: #ffc107;
  font-weight: 600;
}

.status-unknown {
  color: var(--color-error);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-content.sidebar-open { margin-left: 0; }
  .panel-header { padding: 14px 16px; }
  .content-scroll { padding: 16px; }
  .message { margin: 8px 16px 0; }
  .gear-table { font-size: 10px; }
  .gear-input { width: 80px; }
}

@media (max-width: 480px) {
  .panel-header h1 { font-size: 17px; }
  .btn { padding: 8px 12px; font-size: 17px; }
}
