/* ── RESET & BASE ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:   #c8a84b;
  --gold2:  #e8c96a;
  --dark:   #1a1209;
  --panel:  #231a08;
  --card:   #2c2010;
  --text:   #f2e8d0;
  --muted:  #a89060;
  --border: rgba(200,168,75,0.25);
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Lato', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(200,168,75,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(200,168,75,0.05) 0%, transparent 60%);
}

/* ── HEADER ───────────────────────────────────── */
header {
  background: rgba(26,18,9,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {

  width:100%;

  max-width:100%;

  margin:0;

  padding:14px 20px;

  display:flex;

  align-items:center;

  gap:16px;

  flex-wrap:wrap;

}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo i { font-size: 1.4rem; }

#breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.bc-item {
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.bc-item:hover  { color: var(--gold); }
.bc-item.active { color: var(--gold); font-weight: 700; }
.bc-sep         { color: var(--muted); opacity: 0.5; flex-shrink: 0; }

/* ── MAIN ─────────────────────────────────────── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.page { display: none; animation: fadeUp 0.4s ease both; }
.page.active { display: block; }


/* ═══════════════════════════════
   BUDGET ACTION BUTTONS
═══════════════════════════════ */

.budget-action-cell{

  width:120px;

  text-align:center;

}

.budget-row-actions{

  display:flex;

  align-items:center;

  justify-content:flex-end;

  gap:8px;

}

/* EDIT */
.budget-btn-edit{

  width:34px;
  height:34px;

  border:none;
  border-radius:8px;

  background:
    linear-gradient(
      135deg,
      #1ea64b,
      #157a36
    );

  color:#fff;

  display:flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;

  transition:.2s;

  box-shadow:
    0 4px 12px rgba(0,0,0,.28);

}

/* DELETE */
.budget-btn-delete{

  width:34px;
  height:34px;

  border:none;
  border-radius:8px;

  background:
    linear-gradient(
      135deg,
      #d93636,
      #a11d1d
    );

  color:#fff;

  display:flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;

  transition:.2s;

  box-shadow:
    0 4px 12px rgba(0,0,0,.28);

}

.budget-btn-edit:hover,
.budget-btn-delete:hover{

  transform:
    translateY(-2px)
    scale(1.05);

}

.budget-btn-edit i,
.budget-btn-delete i{

  color:#fff;
  font-size:13px;

}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HEADER ──────────────────────────────── */
.page-header {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  color: var(--gold);
  line-height: 1.2;
  word-break: break-word;
}

.page-header p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── ADD BUTTON ───────────────────────────────── */
.btn-add {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: var(--dark);
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(200,168,75,0.3);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-add:hover  { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,168,75,0.4); }
.btn-add:active { transform: translateY(0); filter: brightness(0.95); }

/* ── EVENTS GRID ──────────────────────────────── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  opacity: 0;
  transition: opacity 0.2s;
}

.event-card:hover  { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.event-card:hover::before { opacity: 1; }
.event-card:active { transform: translateY(-1px); }

.event-card .ev-id   { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 7px; }
.event-card .ev-name { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--text); margin-bottom: 11px; }
.event-card .ev-date { display: flex; align-items: center; gap: 6px; color: var(--gold); font-size: 0.83rem; }

.event-card .ev-arrow {
  position: absolute;
  bottom: 18px; right: 18px;
  color: var(--gold);
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}

.event-card:hover .ev-arrow { opacity: 1; transform: translateX(0); }

.empty-state { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state i { font-size: 2.8rem; margin-bottom: 14px; opacity: 0.4; display: block; }

/* ── OPTION CARDS ─────────────────────────────── */
.option-cards {

  display:grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap:20px;

  width:100%;

}

/* CARD */
.option-card {

  background: var(--card);

  border: 1px solid var(--border);

  border-radius: var(--radius);

  padding: 44px 28px;

  cursor: pointer;

  text-align: center;

  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;

  -webkit-tap-highlight-color: transparent;

  touch-action: manipulation;
}

.option-card:hover  { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--gold); }
.option-card:active { transform: translateY(-2px); }
.option-card i      { font-size: 2.4rem; color: var(--gold); margin-bottom: 14px; display: block; }
.option-card h2     { font-family: 'Playfair Display', serif; font-size: 1.35rem; color: var(--text); margin-bottom: 7px; }
.option-card p      { color: var(--muted); font-size: 0.85rem; }

/* ── REPORT TABLE ─────────────────────────────── */
.report-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
}

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

thead {
  background: linear-gradient(135deg, #2c2010, #3a2a10);
  position: sticky;
  top: 0;
  z-index: 1;
}

thead th {
  padding: 13px 15px;
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.76rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid rgba(200,168,75,0.1); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(200,168,75,0.06); }
tbody td { padding: 12px 15px; color: var(--text); vertical-align: middle; }

.amount-income  { color: #4caf7d; font-weight: 700; }
.amount-expense { color: #e05a5a; font-weight: 700; }
.amount-neutral { color: var(--gold); font-weight: 700; }

.summary-row td {
  background: rgba(200,168,75,0.08);
  font-weight: 700;
  color: var(--gold2);
  border-top: 2px solid var(--border);
}

.no-data { text-align: center; padding: 50px 20px; color: var(--muted); }

/* ── EXPORT BUTTONS ───────────────────────────── */
.export-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-export {
  padding: 9px 14px;
  border: none;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: filter 0.2s, transform 0.15s;
  font-family: 'Lato', sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
}

.btn-export:hover  { filter: brightness(1.15); transform: translateY(-1px); }
.btn-export:active { transform: translateY(0); }
.btn-export.excel  { background: #217a45; color: #fff; }
.btn-export.pdf    { background: #8b2020; color: #fff; }

/* ══════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  z-index: 300;
  background: #1e1508;
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #1e1508;
  z-index: 1;
}

.modal-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 9px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-shrink: 0;
}

.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.08); }

.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 15px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.req { color: #e05a5a; }

.form-group input {
  background: #2c2010;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 1rem;            /* 1rem = no iOS auto-zoom */
  font-family: 'Lato', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,168,75,0.15);
}

.form-group input::placeholder { color: #6a5030; }

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6) sepia(1) saturate(2) hue-rotate(0deg);
  cursor: pointer;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.modal-footer {
  padding: 14px 22px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: #1e1508;
}

.btn-cancel {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-cancel:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.btn-save {
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border: none;
  border-radius: 8px;
  color: var(--dark);
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: filter 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-save:hover  { filter: brightness(1.1); transform: translateY(-1px); }
.btn-save:active { transform: translateY(0); }

/* ── TOAST ────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ACTION BUTTONS */

.action-btns{
  display:flex;
  gap:8px;
}

.btn-edit,
.btn-delete{
  border:none;
  width:34px;
  height:34px;
  border-radius:8px;
  cursor:pointer;
  color:#fff;
  transition:0.2s;
}

.btn-edit{
  background:#217a45;
}

.btn-delete{
  background:#8b2020;
}

.btn-edit:hover,
.btn-delete:hover{
  transform:scale(1.08);
}


/* ═══════════════════════════════════════
   INCOME PAGE BUTTONS ONLY
═══════════════════════════════════════ */

.income-row-actions{

  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;

}

/* EDIT BUTTON */
.income-btn-edit{

  width:34px;
  height:34px;

  border:none;
  border-radius:8px;

  background:
    linear-gradient(
      135deg,
      #1ea64b,
      #157a36
    );

  color:#fff;

  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  transition:.2s;

  box-shadow:
    0 4px 12px rgba(0,0,0,.28);

}

/* DELETE BUTTON */
.income-btn-delete{

  width:34px;
  height:34px;

  border:none;
  border-radius:8px;

  background:
    linear-gradient(
      135deg,
      #d93636,
      #a11d1d
    );

  color:#fff;

  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  transition:.2s;

  box-shadow:
    0 4px 12px rgba(0,0,0,.28);

}

/* HOVER */
.income-btn-edit:hover,
.income-btn-delete:hover{

  transform:
    translateY(-2px)
    scale(1.06);

}

/* ICON */
.income-btn-edit i,
.income-btn-delete i{

  color:#fff !important;

  font-size:13px;

  pointer-events:none;

}

/* ACTION COLUMN */
.income-action-cell{

  min-width:110px;

  text-align:center;

}

/* ═══════════════════════════════
   BREADCRUMB TABS
═══════════════════════════════ */

#breadcrumb{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.bc-item{

  padding:8px 14px;

  border-radius:10px;

  background:
    rgba(200,168,75,.08);

  border:
    1px solid rgba(200,168,75,.14);

  color:var(--gold2);

  font-size:13px;
  font-weight:700;

  cursor:pointer;

  transition:.2s;
}

.bc-item:hover{

  background:
    rgba(200,168,75,.18);

  transform:
    translateY(-1px);

}

.bc-sep{

  color:var(--muted);

  font-size:12px;

}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
════════════════════════════════════════════════════════════ */

/* ── Tablet  ≤ 900px ─────────────────────────── */
@media (max-width: 900px) {
  .events-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  .option-cards {
    max-width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .page-header h1 { font-size: 1.7rem; }
}

/* ── Large Mobile / Small Tablet  ≤ 700px ───── */
@media (max-width: 700px) {
  main { padding: 22px 16px 80px; }

  .header-inner { padding: 12px 16px; gap: 10px; }
  .logo { font-size: 1.15rem; }
  .logo i { font-size: 1.25rem; }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }
  .page-header h1 { font-size: 1.5rem; }

  .page-header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .btn-add { flex: 1; justify-content: center; }
  .export-btns { justify-content: flex-end; }

  .events-grid { grid-template-columns: 1fr 1fr; gap: 13px; }
  .event-card  { padding: 18px 16px 26px; }
  .event-card .ev-name { font-size: 1.05rem; }

  .option-cards { grid-template-columns: 1fr 1fr; gap: 14px; }
  .option-card  { padding: 32px 18px; }
  .option-card i { font-size: 2rem; }
  .option-card h2 { font-size: 1.1rem; }

  thead th { font-size: 0.72rem; padding: 11px 12px; }
  tbody td { padding: 11px 12px; font-size: 0.83rem; }

  .form-row { grid-template-columns: 1fr 1fr; }
}


/* ═══════════════════════════════════════
   ARRANGEMENTS
═══════════════════════════════════════ */

.arr-group{
  margin-bottom:18px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#1c1307;
  overflow:hidden;
}

/* GROUP HEADER */
.arr-group-title{
  display:flex;
  align-items:center;
  justify-content:space-between;

  padding:12px 18px;

  background:rgba(200,168,75,0.05);

  border-bottom:1px solid rgba(200,168,75,.12);
}

.arr-group-left{
  display:flex;
  align-items:center;
  gap:10px;
}

.arr-group-title h3{
  font-size:20px;
  font-weight:700;
  color:var(--gold2);
  letter-spacing:.3px;
}

.arr-count{
  background:rgba(200,168,75,.12);
  color:var(--gold2);

  min-width:28px;
  height:28px;

  border-radius:8px;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:13px;
  font-weight:700;
}

/* MEMBERS GRID */
.arr-members{
  display:grid;

  grid-template-columns:
    repeat(auto-fill,minmax(240px,1fr));

  gap:12px;

  padding:14px;
}

/* CARD */
.arr-card{
  position:relative;

  background:
    linear-gradient(
      135deg,
      #2a1d0d,
      #241809
    );

  border:1px solid rgba(200,168,75,.14);

  border-radius:12px;

  padding:12px 14px;

  min-height:92px;

  transition:.18s ease;
}

.arr-card:hover{
  border-color:var(--gold);
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(0,0,0,.28);
}

/* TOP */
.arr-top{
  display:flex;
  align-items:flex-start;
  gap:10px;
}

/* SERIAL NO */
.arr-no{
  width:34px;
  height:34px;

  border-radius:50%;

  background:linear-gradient(
    135deg,
    var(--gold),
    var(--gold2)
  );

  color:#000;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:14px;
  font-weight:700;

  flex-shrink:0;
}

/* CONTENT */
.arr-content{
  flex:1;
  min-width:0;
}

/* NAME */
.arr-name{
  font-size:15px;
  font-weight:700;
  color:#fff;

  line-height:1.25;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;

  padding-right:56px;
}

/* PHONE */
.arr-phone{
  margin-top:6px;

  display:flex;
  align-items:center;
  gap:6px;

  color:var(--gold2);

  font-size:12px;
}

.arr-phone i{
  font-size:11px;
}

/* ACTIONS TOP RIGHT */
.action-btns{
  position:absolute;

  top:10px;
  right:10px;

  display:flex;
  align-items:center;
  gap:5px;
}

/* SMALL BUTTONS */
.btn-edit,
.btn-delete{

  width:24px;
  height:24px;

  border:none;
  border-radius:6px;

  display:flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;

  font-size:10px;

  transition:.15s;
}

.btn-edit{
  background:#1f8a46;
  color:#fff;
}

.btn-delete{
  background:#a12626;
  color:#fff;
}

.btn-edit:hover,
.btn-delete:hover{
  transform:scale(1.08);
}


.arr-sub-group{

  margin:14px;

  border:1px solid rgba(200,168,75,.15);

  border-radius:10px;

  overflow:hidden;
}

.arr-sub-title{

  padding:10px 16px;

  background:rgba(200,168,75,.08);

  color:var(--gold2);
 
  font-weight:700;

  border-bottom:1px solid rgba(200,168,75,.12);
}


/* RESPONSIBILITY GROUP ROW */

.group-row{
  display:flex;
  gap:10px;
  align-items:center;
}

.group-row select{
  flex:1;
}

/* SELECT DESIGN */

.form-group select{

  width:100%;

  background:#2c2010;

  border:1px solid rgba(200,168,75,.25);

  color:#f2e8d0;

  border-radius:10px;

  padding:12px 14px;

  font-size:15px;

  outline:none;

  transition:.2s;
}

.form-group select:focus{

  border-color:#c8a84b;

  box-shadow:
    0 0 0 3px rgba(200,168,75,.12);
}

/* ADD BUTTON */

.btn-new-group{

  width:48px;
  height:48px;

  border:none;

  border-radius:10px;

  background:
    linear-gradient(
      135deg,
      #c8a84b,
      #e8c96a
    );

  color:#000;

  cursor:pointer;

  font-size:18px;

  flex-shrink:0;

  transition:.2s;
}

.btn-new-group:hover{

  transform:translateY(-2px);

  box-shadow:
    0 8px 18px rgba(0,0,0,.28);
}

/* RESPONSIBILITY FILTERS */

.res-filter-wrap{

  display:flex;
  align-items:center;
  gap:10px;

}

.res-filter-wrap select{

  height:46px;

  min-width:170px;

  background:#2c2010;

  border:1px solid rgba(200,168,75,.25);

  border-radius:10px;

  color:#fff;

  padding:0 14px;

  font-size:14px;

  outline:none;

}

.res-filter-wrap select:focus{

  border-color:var(--gold);

  box-shadow:0 0 0 3px rgba(200,168,75,.12);

}

/* MASTER REPORT SEARCH */
.arr-search-box{

  margin-bottom:18px;

}

.arr-search-box input{

  width:320px;

  max-width:100%;

  background:#241607;

  border:1px solid rgba(200,168,75,.2);

  color:#fff;

  padding:12px 14px;

  border-radius:10px;

  outline:none;

}

.arr-search-box input:focus{

  border-color:#c8a84b;

}


/* ═══════════════════════════════════════
   TABLE ACTION BUTTONS
═══════════════════════════════════════ */

.table-action-btns{

  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;

}

/* EDIT */
.table-btn-edit{

  width:34px;
  height:34px;

  border:none;
  border-radius:8px;

  background:#1f8a46;
  color:#fff;

  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  transition:.2s;
}

/* DELETE */
.table-btn-delete{

  width:34px;
  height:34px;

  border:none;
  border-radius:8px;

  background:#a12626;
  color:#fff;

  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  transition:.2s;
}

.table-btn-edit:hover,
.table-btn-delete:hover{

  transform:translateY(-2px) scale(1.05);

}

.table-btn-edit i,
.table-btn-delete i{

  font-size:13px;

}

/* MOBILE */
@media(max-width:700px){

  .arr-members{
    grid-template-columns:1fr;
    gap:10px;
  }

  .arr-card{
    padding:11px 12px;
  }

  .arr-group-title{
    padding:11px 14px;
  }

  .arr-group-title h3{
    font-size:17px;
  }

}



/* ── Mobile  ≤ 480px ─────────────────────────── */
@media (max-width: 480px) {
  main { padding: 18px 14px 80px; }
  .header-inner { padding: 11px 14px; }
  .logo { font-size: 1.05rem; }
  #breadcrumb { font-size: 0.76rem; }
  .bc-item    { max-width: 110px; }

  .page-header h1 { font-size: 1.3rem; }
  .page-header p  { font-size: 0.82rem; }

  /* Stack Add + export buttons vertically */
  .page-header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .btn-add    { width: 100%; justify-content: center; }
  .export-btns { width: 100%; gap: 8px; }
  .btn-export { flex: 1; justify-content: center; font-size: 0.8rem; padding: 9px 10px; }

  /* Single-column cards on small phones */
  .events-grid { grid-template-columns: 1fr; gap: 12px; }
  .event-card  { padding: 18px 18px 28px; }
  /* Always show arrow on touch */
  .event-card .ev-arrow { opacity: 0.55; transform: translateX(0); }

  /* Stack option cards, horizontal layout */
  .option-cards { grid-template-columns: 1fr; max-width: 100%; gap: 12px; }
  .option-card  {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    text-align: left;
    gap: 18px;
  }
  .option-card i { font-size: 1.9rem; margin-bottom: 0; flex-shrink: 0; }
  .option-card h2 { font-size: 1.1rem; }

  /* Compact table */
  .report-container { border-radius: 8px; }
  thead th { font-size: 0.68rem; padding: 10px 10px; letter-spacing: 0; }
  tbody td { padding: 10px 10px; font-size: 0.79rem; }

  /* Modal fills screen width */
  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }
  .modal-header  { padding: 14px 16px 12px; }
  .modal-header h2 { font-size: 1rem; }
  .modal-body    { padding: 16px; gap: 13px; }
  .modal-footer  { padding: 12px 16px 16px; }

  /* Stack form-row on mobile */
  .form-row { grid-template-columns: 1fr; gap: 13px; }

  .form-group input { padding: 12px 13px; font-size: 1rem; }

  /* Full-width footer buttons */
  .btn-cancel, .btn-save { flex: 1; justify-content: center; }

  .toast { font-size: 0.8rem; padding: 10px 16px; }
}

/* ── Tiny Mobile  ≤ 360px ────────────────────── */
@media (max-width: 360px) {
  .logo span  { display: none; }   /* keep icon, drop text to save space */
  .page-header h1 { font-size: 1.15rem; }
  .btn-add        { font-size: 0.78rem; padding: 9px 12px; }
  .btn-export     { font-size: 0.74rem; padding: 8px 8px; }
  thead th        { font-size: 0.62rem; padding: 9px 8px; }
  tbody td        { font-size: 0.75rem; padding: 9px 8px; }
  .modal-body     { padding: 14px; }
  .modal-header   { padding: 12px 14px 10px; }
}

/* ── Landscape Phone (short & wide) ──────────── */
@media (max-height: 500px) and (orientation: landscape) {
  header { position: relative; }

  .modal {
    top: 50%;
    max-height: calc(100dvh - 16px);
  }

  .option-card  { padding: 18px 22px; }
  .option-cards { gap: 10px; }

  main { padding-top: 16px; }
}

/* ── iPad Pro / Large Tablet  ≥ 1024px ──────── */
@media (min-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
 .option-cards {

    grid-template-columns:
      repeat(4, 1fr);

    max-width: 100%;
  }
}

/* ── Touch: remove hover flicker ─────────────── */
@media (hover: none) {
  .event-card:hover       { transform: none; box-shadow: none; border-color: var(--border); }
  .event-card:hover::before { opacity: 0; }
  .event-card:active      { transform: scale(0.985); border-color: var(--gold); }
  .event-card:active::before { opacity: 1; }

  .option-card:hover  { transform: none; box-shadow: none; border-color: var(--border); }
  .option-card:active { transform: scale(0.975); border-color: var(--gold); box-shadow: var(--shadow); }

  .btn-add:hover    { transform: none; filter: none; box-shadow: 0 2px 12px rgba(200,168,75,0.3); }
  .btn-add:active   { filter: brightness(0.92); transform: scale(0.97); }

  .btn-export:hover  { transform: none; filter: none; }
  .btn-export:active { filter: brightness(0.88); }

  .btn-save:hover  { transform: none; filter: none; }
  .btn-save:active { filter: brightness(0.9); }

  .event-card .ev-arrow { opacity: 0.5; transform: translateX(0); }
}



/* GROUP DROPDOWN */

.group-row{
  display:flex;
  gap:10px;
}

#inp-arr-group{
  flex:1;

  background:#2c2010;

  border:1px solid var(--border);

  border-radius:8px;

  padding:11px 14px;

  color:var(--text);

  font-size:15px;

  outline:none;
}

#inp-arr-group:focus{
  border-color:var(--gold);
}

.btn-new-group{

  width:44px;
  min-width:44px;

  border:none;

  border-radius:8px;

  background:linear-gradient(
    135deg,
    var(--gold),
    var(--gold2)
  );

  color:#000;

  cursor:pointer;

  font-size:15px;

  transition:.15s;
}

.btn-new-group:hover{
  transform:scale(1.05);
}

#inp-arr-new-group{

  width:100%;

  background:#2c2010;

  border:1px solid var(--border);

  border-radius:8px;

  padding:11px 14px;

  color:var(--text);

  font-size:15px;

  outline:none;
}

#inp-arr-new-group:focus{
  border-color:var(--gold);
}

/* SEARCH */

.btn-filter{
  width:44px;
  height:44px;

  border:none;
  border-radius:10px;

  cursor:pointer;

  background:#2d220f;
  color:var(--gold);

  font-size:16px;

  transition:.2s;
}

.btn-filter:hover{
  background:var(--gold);
  color:#000;
}

.arr-search-box{

  margin-top:-8px;
  margin-bottom:18px;

  display:none;
  align-items:center;
  gap:10px;

  background:#241809;

  border:1px solid var(--border);

  border-radius:12px;

  padding:12px 14px;
}

.arr-search-box.open{
  display:flex;
}

.arr-search-box i{
  color:var(--gold);
  font-size:14px;
}

.arr-search-box input{

  flex:1;

  border:none;
  outline:none;

  background:transparent;

  color:#fff;

  font-size:15px;
}

.arr-search-box input::placeholder{
  color:#8d7447;
}

/* ═══════════════════════════════════════
   ULTRA RESPONSIVE PATCH
   ADD THIS AT THE END OF CSS
═══════════════════════════════════════ */

/* GLOBAL SAFE WIDTH */
*{
  min-width:0;
}

img,
svg,
video,
canvas{
  max-width:100%;
  height:auto;
}

/* BODY */
body{
  overflow-x:hidden;
}

/* MAIN */
main{
  width:100%;
  max-width:100%;
}

/* TABLE RESPONSIVE */
.report-container{
  width:100%;
  overflow:auto;
}

table{
  min-width:700px;
}

/* BUTTON WRAP */
.page-header-actions,
.export-btns,
.action-btns{
  flex-wrap:wrap;
}

/* INPUT FIX */
input,
select,
textarea,
button{
  max-width:100%;
}

/* OPTION CARD FIX */
.option-card{
  height:100%;
}

/* EVENT CARD FIX */
.event-card{
  min-height:180px;
}

/* ARR CARD FIX */
.arr-card{
  width:100%;
}

/* MODAL FIX */
.modal{
  overscroll-behavior:contain;
}

/* LONG TEXT FIX */
.ev-name,
.arr-name,
.page-header h1,
.logo,
td,
th{
  word-break:break-word;
}

/* ═══════════════════════════════════════
   LAPTOP
═══════════════════════════════════════ */
@media (max-width:1200px){

  .header-inner,
  main{
    padding-left:18px;
    padding-right:18px;
  }

  .option-cards{
    grid-template-columns:
      repeat(3,1fr);
  }

}

/* ═══════════════════════════════════════
   TABLET
═══════════════════════════════════════ */
@media (max-width:992px){

  .events-grid{
    grid-template-columns:
      repeat(2,1fr);
  }

  .option-cards{
    grid-template-columns:
      repeat(2,1fr);
  }

  .page-header{
    gap:14px;
  }

  .page-header-actions{
    width:100%;
  }

  .arr-members{
    grid-template-columns:
      repeat(2,1fr);
  }

}

/* ═══════════════════════════════════════
   MOBILE
═══════════════════════════════════════ */
@media (max-width:768px){

  html{
    font-size:15px;
  }

  header{
    position:sticky;
  }

  .header-inner{
    flex-direction:column;
    align-items:flex-start;
  }

  #breadcrumb{
    width:100%;
  }

  .page-header{
    flex-direction:column;
    align-items:flex-start;
  }

  .page-header-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .btn-add,
  .btn-export{
    width:100%;
    justify-content:center;
  }

  .events-grid{
    grid-template-columns:1fr;
  }

  .option-cards{
    grid-template-columns:1fr;
  }

  .option-card{
    flex-direction:row;
    text-align:left;
    align-items:center;
  }

  .option-card i{
    margin-bottom:0;
  }

  .form-row{
    grid-template-columns:1fr;
  }

  .modal{
    width:calc(100vw - 20px);
    left:50%;
  }

  .modal-body{
    padding:16px;
  }

  .modal-footer{
    flex-direction:column;
  }

  .btn-save,
  .btn-cancel{
    width:100%;
    justify-content:center;
  }

  .arr-members{
    grid-template-columns:1fr;
  }

  .group-row{
    flex-direction:column;
    align-items:stretch;
  }

  .btn-new-group{
    width:100%;
    height:46px;
  }

  .res-filter-wrap{
    flex-direction:column;
    align-items:stretch;
  }

  .res-filter-wrap select{
    width:100%;
  }

  .arr-search-box{
    width:100%;
  }

  .arr-search-box input{
    width:100%;
  }

}

/* ═══════════════════════════════════════
   SMALL MOBILE
═══════════════════════════════════════ */
@media (max-width:480px){

  html{
    font-size:14px;
  }

  main{
    padding:14px;
  }

  .logo{
    font-size:1rem;
  }

  .page-header h1{
    font-size:1.2rem;
  }

  .event-card{
    padding:16px;
    min-height:auto;
  }

  .option-card{
    padding:18px;
    gap:14px;
  }

  .option-card h2{
    font-size:1rem;
  }

  .option-card p{
    font-size:.78rem;
  }

  .arr-group-title{
    padding:10px 12px;
  }

  .arr-group-title h3{
    font-size:15px;
  }

  .arr-card{
    padding:10px;
  }

  .arr-name{
    font-size:14px;
  }

  .arr-phone{
    font-size:11px;
  }

  .modal{
    border-radius:12px;
  }

  .toast{
    width:calc(100vw - 20px);
    white-space:normal;
  }

}

/* ═══════════════════════════════════════
   VERY SMALL DEVICES
═══════════════════════════════════════ */
@media (max-width:360px){

  .logo span{
    display:none;
  }

  .btn-add,
  .btn-export,
  .btn-save,
  .btn-cancel{
    font-size:.75rem;
  }

  .event-card .ev-name{
    font-size:1rem;
  }

  .option-card{
    padding:15px;
  }

  .modal-header,
  .modal-body,
  .modal-footer{
    padding-left:12px;
    padding-right:12px;
  }

}

/* ═══════════════════════════════════════
   LANDSCAPE MOBILE
═══════════════════════════════════════ */
@media (max-height:500px) and (orientation:landscape){

  header{
    position:relative;
  }

  .modal{
    max-height:95dvh;
  }

  .page-header{
    margin-bottom:14px;
  }

  .option-card{
    padding:14px 16px;
  }

}

/* ═══════════════════════════════════════
   TOUCH DEVICES
═══════════════════════════════════════ */
@media (hover:none){

  button,
  .btn-add,
  .btn-export,
  .btn-save,
  .btn-cancel,
  .btn-edit,
  .btn-delete,
  .event-card,
  .option-card{
    -webkit-tap-highlight-color:transparent;
  }

  .btn-add:active,
  .btn-export:active,
  .btn-save:active,
  .btn-cancel:active{
    transform:scale(.97);
  }

}