/* ============================================================
   MALDIVES RESORT INSIDER — Dark Theme v2
   Red × Black
   ============================================================ */

/* ──────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   ────────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds – darkest → most elevated */
  --bg-base:     #0b0b0b;
  --bg-card:     #151515;
  --bg-surface:  #1b1b1b;
  --bg-raised:   #212121;
  --bg-input:    #0f0f0f;

  /* Borders */
  --border:        #3f3f3f;
  --border-mid:    #616161;
  --border-bright: #808080;

  /* Reds */
  --red:         #d11d1d;
  --red-bright:  #e53935;
  --red-dark:    #8e0000;
  --red-tint:    rgba(198, 40, 40, 0.10);
  --red-glow:    rgba(198, 40, 40, 0.28);

  /* Text */
  --text-1: #f5f5f5;   /* headings / primary */
  --text-2: #dbdbdb;   /* body copy           */
  --text-3: #c5c5c5;   /* meta / muted        */
  --text-4: #999999;   /* very dim / disabled */

  /* Accent – purple (used for Lower trend) */
  --purple:     #8b5cf6;
  --purple-tint:rgba(139, 92, 246, 0.13);

  /* Trend colours */
  --trend-up:     #ef5350;   /* ▲ Higher  — red     */
  --trend-down:   #8b5cf6;   /* ▼ Lower   — purple  */
  --trend-steady: #ce6f21;   /* ● Steady  — neutral */

  /* Status */
  --ok-bg:    rgba(87, 21, 21, 0.28);
  --ok-text:  #fff1f1;
  --ok-line:  #a02121;

  --warn-bg:  rgba(96, 56,  0,  0.28);
  --warn-text:#ffd54f;
  --warn-line:#f57f17;

  --err-bg:   rgba(45, 10, 90, 0.3);
  --err-text: #bf9aef;
  --err-line: #6528c6;

  /* Shape */
  --radius-sm: 4px;
  --radius-md: 7px;
  --radius-lg: 10px;
}


/* ──────────────────────────────────────────────────────────────
   2. RESET & BASE
   ────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
  background: var(--bg-base);
  min-height: 100vh;
}

a {
  color: var(--red-bright);
  text-decoration: none;
  transition: color 0.18s;
}
a:hover { color: var(--text-1); }

h1, h2, h3, h4, h5 {
  color: var(--text-1);
  font-weight: 700;
  line-height: 1.3;
}

img, video { max-width: 100%; display: block; }


/* ──────────────────────────────────────────────────────────────
   3. HEADER
   ────────────────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(180deg, #1c1c1c 0%, #101010 100%);
  border-bottom: 2px solid var(--red);
  box-shadow: 0 2px 20px rgba(0,0,0,0.7);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 13px 20px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img { height: 40px; width: auto; }

.site-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.01em;
}


/* ──────────────────────────────────────────────────────────────
   4. NAVIGATION
   ────────────────────────────────────────────────────────────── */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  align-items: center;
}

.main-nav a {
  display: inline-block;
  color: var(--text-3);
  font-size: 0.87rem;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
}

.main-nav a:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.226);
}

.main-nav a.active {
  color: var(--red-bright);
  font-weight: 600;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: 0.25s;
}


/* ──────────────────────────────────────────────────────────────
   5. LAYOUT
   ────────────────────────────────────────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
}

/* Section headings with red accent underline */
section > h2,
.main-content > h2,
.service-charge > h2,
.latest-news > h2 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-mid);
  position: relative;
}

section > h2::after,
.main-content > h2::after,
.service-charge > h2::after,
.latest-news > h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 36px;
  height: 2px;
  background: var(--red);
}


/* ──────────────────────────────────────────────────────────────
   6. BUTTONS
   ────────────────────────────────────────────────────────────── */

/* Shared base */
.btn-anonymous, .btn-forum, .btn-search, .btn-submit,
.btn-history, .btn-add-file, .btn-filter,
.btn-edit, .btn-delete, .btn-approve, .btn-reject, .btn-move-pending {
  display: inline-block;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.87rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.13s, box-shadow 0.13s, background 0.18s, color 0.18s;
}

/* Primary – filled red */
.btn-anonymous {
  background: var(--red);
  color: #fff;
  padding: 11px 26px;
  font-size: 0.94rem;
}

.btn-search, .btn-filter {
  background: var(--red);
  color: #fff;
  padding: 8px 18px;
}

.btn-submit {
  background: var(--red);
  color: #fff;
  padding: 10px 28px;
  font-size: 0.95rem;
  margin-top: 10px;
}

.btn-anonymous:hover, .btn-search:hover,
.btn-filter:hover {
  background: var(--red-bright);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--red-glow);
}

.btn-submit:hover:not(:disabled) {
  background: var(--red-bright);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--red-glow);
}

.btn-submit:disabled {
  background: #2e00007a;
  color: var(--text-4);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Secondary – outlined */
.btn-forum {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border-mid);
  padding: 11px 26px;
  font-size: 0.94rem;
}

.btn-forum:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  transform: translateY(-1px);
}

/* Ghost – table row action */
.btn-history {
  background: transparent;
  color: var(--red-bright);
  border: 1px solid var(--border-mid);
  padding: 4px 11px;
  font-size: 0.8rem;
}

.btn-history:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* File actions */
.btn-add-file {
  background: var(--bg-raised);
  color: var(--text-2);
  border: 1px solid var(--border-mid);
  padding: 8px 18px;
}

.btn-add-file:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* Admin actions */
.btn-approve {
  background: var(--red);
  color: var(--ok-text);
  border: 1px solid var(--ok-line);
  padding: 6px 14px;
}

.btn-approve:hover {
  background: var(--ok-line);
  color: #fff;
  transform: translateY(-1px);
}

.btn-reject {
  background: var(--err-bg);
  color: var(--err-text);
  border: 1px solid var(--err-line);
  padding: 6px 14px;
}

.btn-reject:hover {
  background: var(--purple);
  color: #fff;
  transform: translateY(-1px);
}

.btn-move-pending {
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid var(--warn-line);
  padding: 6px 14px;
}

.btn-move-pending:hover {
  background: #b45309;
  color: #fff;
  transform: translateY(-1px);
}

.btn-edit {
  background: var(--bg-raised);
  color: var(--text-2);
  border: 1px solid var(--border-mid);
  padding: 5px 12px;
}

.btn-edit:hover {
  background: var(--bg-surface);
  color: var(--text-1);
  border-color: var(--border-bright);
}

.btn-delete {
  background: var(--err-bg);
  color: var(--err-text);
  border: 1px solid var(--err-line);
  padding: 5px 12px;
}

.btn-delete:hover {
  background: var(--purple);
  color: #fff;
  transform: translateY(-1px);
}

.btn-small {
    background: var(--bg-raised);
    color: var(--text-2);
    border: 1px solid var(--border-mid);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 5px;
    transition: background 0.18s, color 0.18s;
}
.btn-small:hover { background: var(--red); color: #fff; }

/* CTA row */
.cta-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}


/* CSV import form – give it a card feel */
.csv-import {
    background: var(--bg-card);
    border: 1px dashed var(--border-mid);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.csv-import label { display: block; margin-bottom: 6px; color: var(--text-3); font-size: 0.85rem; }
.csv-import input[type="file"] { margin-bottom: 8px; }

/* ──────────────────────────────────────────────────────────────
   7. FORMS & INPUTS
   ────────────────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
select,
textarea {
  background: var(--bg-input);
  color: var(--text-1);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-tint);
}

input:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
  border-color: var(--border-bright);
}

input::placeholder { color: var(--text-4); }

select option {
  background: var(--bg-card);
  color: var(--text-1);
}

.sc-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.sc-form input,
.sc-form select {
  padding: 8px 12px;
}

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

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 7px;
}

.required { color: var(--red-bright); }

.form-group select,
.form-group textarea,
.form-group input {
  width: 100%;
  padding: 10px 12px;
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.55;
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 0.79rem;
}

.subtitle {
  color: var(--text-3);
  margin-bottom: 22px;
  font-size: 0.92rem;
}

.cooldown-msg {
  color: var(--red-bright);
  font-size: 0.83rem;
  margin-top: 6px;
}


.checkbox-label {
  text-align: center;
    display: inline;
    font-size: 0.9rem;
    color: var(--text-2);
    cursor: pointer;
}

/* Dark file input wrapper */
.file-input-dark {
    position: relative;
    display: inline-block;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-input);
    color: var(--text-2);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.85rem;
    transition: border-color 0.18s, background 0.18s;
}
.file-input-dark:hover {
    border-color: var(--red);
    background: var(--bg-surface);
}
.file-input-dark input[type="file"] {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Status messages */
.disclaimer {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-line);
  color: var(--warn-text);
  padding: 13px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 28px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.success-msg {
  background: var(--ok-bg);
  border-left: 4px solid var(--ok-line);
  color: var(--ok-text);
  padding: 13px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
  font-size: 0.88rem;
}

.error-msg {
  background: var(--err-bg);
  border-left: 4px solid var(--err-line);
  color: var(--err-text);
  padding: 13px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
  font-size: 0.88rem;
}


/* ──────────────────────────────────────────────────────────────
   8. UPLOAD ZONE
   ────────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-mid);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  background: var(--bg-input);
  text-align: center;
  color: var(--text-3);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--red);
  background: var(--red-tint);
  color: var(--text-2);
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  justify-content: center;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  padding: 5px 10px 5px 12px;
  font-size: 0.82rem;
  color: var(--text-2);
}

.file-chip-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-remove {
  background: var(--red-dark);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  cursor: pointer;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
  transition: background 0.18s;
}

.file-chip-remove:hover { background: var(--red-bright); }


/* ──────────────────────────────────────────────────────────────
   9. SERVICE CHARGE TABLE
   ────────────────────────────────────────────────────────────── */
.service-charge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 36px;
}

.sc-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.sc-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

.sc-table thead {
  border-bottom: 2px solid var(--red);
}

.sc-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  white-space: nowrap;
}

.sc-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.9rem;
}

.sc-table tbody tr:last-child td { border-bottom: none; }

.sc-table tbody tr { transition: background 0.14s; }

.sc-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.018);
}

.sc-table tbody tr:hover {
  background: var(--red-tint);
}

.sc-table tbody tr:hover td {
  color: var(--text-1);
}


/* ──────────────────────────────────────────────────────────────
   10. TREND BADGES
   The signature element of this design: pill badges that encode
   the service charge trend at a glance.
   ────────────────────────────────────────────────────────────── */
.trend-up,
.trend-down,
.trend-steady {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.trend-up {
  background: rgba(239, 83, 80, 0.13);
  color: var(--trend-up);
  border: 1px solid rgba(239, 83, 80, 0.30);
}

.trend-down {
  background: var(--purple-tint);
  color: var(--trend-down);
  border: 1px solid rgba(139, 92, 246, 0.28);
}

.trend-steady {
  background: #503f0949;;
  color: var(--trend-steady);
  border: 1px solid #64500c77;
}


/* ──────────────────────────────────────────────────────────────
   11. MODAL
   ────────────────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.84);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.18s ease;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-top: 3px solid var(--red);
  margin: 8% auto;
  padding: 28px;
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 700px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
  animation: slideUp 0.22s ease;
}

.close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
  color: var(--text-3);
  line-height: 1;
  transition: color 0.18s;
}

.close:hover { color: var(--red-bright); }


/* ──────────────────────────────────────────────────────────────
   12. PAGINATION
   ────────────────────────────────────────────────────────────── */
.pagination ul {
  list-style: none;
  display: flex;
  gap: 5px;
  margin-top: 22px;
  justify-content: center;
  flex-wrap: wrap;
}

.pagination a {
  display: block;
  padding: 7px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: 0.84rem;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.pagination a:hover {
  background: var(--bg-raised);
  color: var(--text-1);
  border-color: var(--border-bright);
}

.pagination li.active a,
.pagination li.active {
  background: var(--red) !important;
  border-color: var(--red) !important;
  padding: 7px 14px;
  color: #fff !important;
  font-weight: 700;
}


/* ──────────────────────────────────────────────────────────────
   13. FORUM
   ────────────────────────────────────────────────────────────── */
.forum-disclaimer {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-line);
  color: var(--warn-text);
  padding: 12px 16px;
  margin-bottom: 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.86rem;
}

.forum-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  align-items: center;
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.forum-filters select { padding: 8px 12px; min-width: 140px; }

/* Public complaint cards */
.complaint-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red-dark);
  padding: 18px 20px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  transition: border-left-color 0.18s, box-shadow 0.18s;
}

.complaint-card:hover {
  border-left-color: var(--red-bright);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.79rem;
  color: var(--text-3);
  margin-bottom: 8px;
  gap: 10px;
  flex-wrap: wrap;
}

.ref-code {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--red-bright);
}

.complaint-text {
  margin-top: 10px;
  white-space: pre-wrap;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Admin complaint cards
   Apply these classes in PHP to replace inline styles.
   See PHP change notes at the bottom of this file. */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-left: 3px solid var(--border-bright);
  padding: 18px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.admin-card.status-approved { border-left-color: var(--red-dark); }
.admin-card.status-rejected { border-left-color: var(--err-line); }

.admin-card .card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 0.79rem;
  margin-bottom: 10px;
}


/* ──────────────────────────────────────────────────────────────
   14. REDACTION
   ────────────────────────────────────────────────────────────── */
.redaction,
.redaction-with-reason {
  background: #e2e2e2;
  color: #292929;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.88em;
  font-weight: 700;
  display: inline-block;
}

.redaction-with-reason { color: #ff6b6b; }

.bb-censor {
  background: #e2e2e2;
  display: inline-block;
  height: 1.1em;
  vertical-align: middle;
  margin: 0 2px;
}

.bb-admin-note {
  background: rgba(207, 28, 28, 0.219);
  color: #ff9696;
  border: 1px solid rgba(221, 28, 28, 0.582);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.77rem;
  font-weight: 700;
}


/* ──────────────────────────────────────────────────────────────
   15. FILE GALLERY
   ────────────────────────────────────────────────────────────── */
.file-gallery {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.file-gallery img {
  max-height: 130px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 0.18s, border-color 0.18s;
}

.file-gallery img:hover {
  opacity: 1;
  border-color: var(--red);
}

.file-gallery video {
  max-width: 280px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
}

.file-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.84rem;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.file-download:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}


/* ──────────────────────────────────────────────────────────────
   16. LATEST NEWS
   ────────────────────────────────────────────────────────────── */
.latest-news { margin: 36px 0 0; }

.news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.news-item:first-of-type { border-top: 1px solid var(--border); }

.news-item a {
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.18s;
}

.news-item a:hover { color: var(--red-bright); }

.news-date {
  color: var(--text-3);
  font-size: 0.77rem;
  white-space: nowrap;
  flex-shrink: 0;
}


/* ──────────────────────────────────────────────────────────────
   17. SPONSORS
   ────────────────────────────────────────────────────────────── */
.sponsor-tier { margin: 24px 0; }

.sponsor-tier-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-4);
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.sponsor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.sponsor-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: border-color 0.18s;
}

.sponsor-item:hover { border-color: var(--border-mid); }

.sponsor-compact {
  background: var(--bg-card);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px -20px;
}

.sponsor-compact .sponsor-grid {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 14px;
  padding: 0 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sponsor-compact .sponsor-grid::-webkit-scrollbar { display: none; }

.sponsor-compact .sponsor-item {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  padding: 0;
}

.sponsor-item img { max-height: 150px; } 

/* ──────────────────────────────────────────────────────────────
   18. STATISTICS
   ────────────────────────────────────────────────────────────── */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: border-color 0.18s;
}
.stat-card:hover { border-color: var(--red); }
.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--red-bright);
}
.stat-label {
    color: var(--text-3);
    font-size: 0.85rem;
    margin-top: 4px;
}
.chart-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    min-height: 300px;
    max-height: 700px;
}
.chart-box h3 {
    margin-bottom: 16px;
    color: var(--text-1);
}

.chart-box canvas {
    max-height: 400px;
}

/* ──────────────────────────────────────────────────────────────
   18. FOOTER
   ────────────────────────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(0deg, #222222 0%, #000000 100%);
  border-top: 1px solid var(--border);
  color: var(--text-3);
  padding: 36px 20px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.quick-links h3,
.quick-links h4 {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-4);
  margin-bottom: 10px;
}

.quick-links ul { list-style: none; }
.quick-links li { margin-bottom: 6px; }

.quick-links a {
  color: var(--text-4);
  font-size: 0.85rem;
  transition: color 0.18s;
}

.quick-links a:hover { color: var(--red-bright); }

.footer-copy {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.77rem;
  color: var(--text-4);
}


/* ──────────────────────────────────────────────────────────────
   19. ADMIN NAVBAR
   Note: remove the <style> block from foniadmin/admin-header.php
   These rules now live here and will conflict with it.
   ────────────────────────────────────────────────────────────── */
.admin-navbar {
  background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  border-bottom: 2px solid var(--red);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-navbar .brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-1);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.admin-navbar .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
}

.admin-navbar .nav-links a {
  display: inline-block;
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.79rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.18s, background 0.18s;
}

.admin-navbar .nav-links a:hover {
  color: var(--text-1);
  background: rgba(255,255,255,0.05);
}

.admin-navbar .nav-links a.active {
  color: var(--red-bright);
  font-weight: 600;
}

.admin-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
}


/* ──────────────────────────────────────────────────────────────
   20. SEARCHABLE SELECT
   ────────────────────────────────────────────────────────────── */
.searchable-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.searchable-select-wrapper input { width: 100%; padding: 10px 12px; }

.searchable-select-wrapper .ss-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 1000;
  display: none;
}

.searchable-select-wrapper .ss-dropdown.show { display: block; }

/* Improve touch scrolling inside dropdown */
.ss-dropdown {
    -webkit-overflow-scrolling: touch;
}

.searchable-select-wrapper .ss-option {
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 0.87rem;
  transition: background 0.14s;
}

.searchable-select-wrapper .ss-option:hover {
  background: var(--red);
  color: #fff;
}

.searchable-select-wrapper .ss-no-results {
  padding: 8px 12px;
  color: var(--text-3);
  font-size: 0.84rem;
}


/* ──────────────────────────────────────────────────────────────
   21. ANIMATIONS
   ────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ──────────────────────────────────────────────────────────────
   22. RESPONSIVE
   ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Mobile nav overlay */
  .main-nav {
    position: fixed;
    top: 63px;
    left: 0;
    width: 100%;
    background: #111;
    border-bottom: 2px solid var(--red);
    flex-direction: column;
    display: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    z-index: 190;
    max-height: calc(100vh - 63px);
    overflow-y: auto;
  }

  .main-nav.active { display: flex; }

  .main-nav ul {
    flex-direction: column;
    padding: 14px 20px;
    gap: 2px;
  }

  .main-nav a {
    padding: 10px 14px;
    display: block;
    font-size: 0.93rem;
  }

  .hamburger { display: flex; }
  .header-inner { position: relative; }

  /* Scrollable table */
  .sc-table {
    font-size: 0.83rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .service-charge { padding: 16px; border-radius: var(--radius-md); }

  .cta-buttons { flex-direction: column; }

  .btn-anonymous,
  .btn-forum {
    width: 100%;
    text-align: center;
  }

  .modal-content {
    margin: 4% auto;
    padding: 20px 16px;
  }

  /* Admin nav mobile */
  .admin-navbar .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 6px 0;
    gap: 0;
  }

  .admin-navbar .nav-links.show { display: flex; }

  .admin-navbar .nav-links a {
    padding: 9px 16px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.87rem;
  }

  .admin-hamburger { display: block; }

  .forum-filters { flex-direction: column; align-items: stretch; }
  .forum-filters select { width: 100%; }

  .card-header { flex-direction: column; align-items: flex-start; gap: 4px; }
}





@media (max-width: 480px) {
  body { font-size: 14px; }

  .site-name { font-size: 1rem; }

  .main-content { margin: 20px auto; }

  .modal-content { padding: 16px; }

  .sc-form { flex-direction: column; align-items: stretch; }
  .sc-form input,
  .sc-form select,
  .sc-form .btn-search { width: 100%; }

  .footer-inner { flex-direction: column; }

  /* Statistics: 2 cards per row */
  .stat-grid {
      grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Stack the two top charts vertically */
  .charts-row {
      grid-template-columns: 1fr !important;
  }

  /* Shrink charts on mobile */
  .chart-box {
      padding: 12px;
      min-height: 250px;
      max-height: 350px;
  }

  .chart-box canvas {
      max-height: 280px;          /* prevent vertical overflow */
  }

  /* Make stat cards more compact */
  .stat-card {
      padding: 14px 10px;
  }
  .stat-number {
      font-size: 1.5rem;
  }
  .stat-label {
      font-size: 0.75rem;
  }
}