/* =========================================================
   BUZZWORKS APP CSS (AUTH ONLY)
   Source of truth for logged-in pages
========================================================= */

/* =========================
   THEME VARIABLES
========================= */
:root{
  --bg:#05060a;
  --text:#f5e6cf;
  --muted:rgba(245,230,207,.78);

  --glass: rgba(12,10,14,.55);
  --border: rgba(255,170,60,.20);
  --shadow: 0 18px 50px rgba(0,0,0,.55);

  --orange:#ff8a1f;
  --orange2:#ffb34d;

  --radius:18px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height:100vh;
  overflow-x: hidden;
}

/* =========================================================
   APP BACKGROUND
========================================================= */
.page{
  min-height:100vh;
  background:
    radial-gradient(1200px 700px at 55% 20%, rgba(255,150,40,.22), rgba(0,0,0,0) 60%),
    radial-gradient(900px 540px at 12% 40%, rgba(255,120,20,.16), rgba(0,0,0,0) 58%),
    linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.65)),
    url("/images/bg-home-embers.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* =========================================================
   APP HEADER (AUTH SHELL)
   Matches marketing look, isolated for app
========================================================= */
.app-header{
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,170,60,.14);
  background: linear-gradient(
    to bottom,
    rgba(8,6,10,.86),
    rgba(8,6,10,.55)
  );
  backdrop-filter: blur(10px);
}

.app-header-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* ---- Brand ---- */
.app-header .logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 900;
  letter-spacing: .2px;
  white-space: nowrap;
}

.app-header .logo img{
  height: 36px;
  width: auto;
  display: block;
}

/* ---- Nav ---- */
.app-header .app-nav{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Nav links only (no bleed) */
.app-header .app-nav a{
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,170,60,.16);
  background: rgba(0,0,0,.18);
  color: rgba(245,230,207,.92);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, border-color .15s ease;
}

.app-header .app-nav a:hover{
  background: rgba(0,0,0,.28);
  border-color: rgba(255,170,60,.32);
}

/* Active tab */
.app-header .app-nav a.active{
  background: linear-gradient(
    180deg,
    rgba(255,168,68,.95),
    rgba(255,120,20,.95)
  );
  color: #1b0b00;
  border-color: rgba(255,170,60,.85);
}

/* Logout */
.app-header .app-nav #logoutLink{
  background: rgba(255,80,80,.08);
  border-color: rgba(255,80,80,.35);
  color: #ff9a9a;
}

.app-header .app-nav #logoutLink:hover{
  background: rgba(255,80,80,.18);
  border-color: rgba(255,80,80,.6);
}

/* =========================================================
   PAGE LAYOUT
========================================================= */
.page-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 18px 80px;
}

h2{
  margin: 0 0 6px;
  font-size: 30px;
}

.subtle{
  color: var(--muted);
  font-size: 14px;
}

/* =========================================================
   CARDS
========================================================= */
.card{
  margin-top: 22px;
  background: linear-gradient(180deg, rgba(10,8,12,.62), rgba(10,8,12,.38));
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,170,60,.18);
  backdrop-filter: blur(10px);
}

.card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.card-header h3{
  margin:0;
}

/* =========================================================
   BUTTONS
========================================================= */
.btn{
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  border: 1px solid rgba(255,170,60,.55);
  background: linear-gradient(180deg, rgba(255,168,68,1), rgba(255,120,20,1));
  color:#1b0b00;
}

.btn.secondary{
  background: rgba(0,0,0,.35);
  color: var(--text);
  border-color: rgba(255,170,60,.25);
}

.btn:hover{ filter: brightness(1.05); }

/* =========================================================
   DOWNLOAD QR BUTTON
========================================================= */
.btn-download-qr {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 170, 60, 0.35);
  background: rgba(255, 138, 31, 0.15);
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-download-qr:hover {
  background: rgba(255, 138, 31, 0.25);
  border-color: rgba(255, 170, 60, 0.5);
  filter: brightness(1.1);
}

.btn-download-qr:focus {
  outline: 2px solid rgba(255, 138, 31, 0.5);
  outline-offset: 2px;
}

.btn-download-qr:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================================================
   TABLES
========================================================= */
.table-wrap{
  margin-top: 14px;
  overflow-x: auto;
}

table{
  width:100%;
  border-collapse: collapse;
  font-size:14px;
}

thead th{
  text-align:left;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.12);
  white-space: nowrap;
}

tbody td{
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.06);
}

tbody tr:hover{
  background: rgba(255,255,255,.04);
}

td.empty{
  text-align:center;
  color: var(--muted);
  padding:20px;
}

/* =========================================================
   MODALS
========================================================= */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.hidden{
  display: none;
}

.modal-card{
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, rgba(10,8,12,.85), rgba(10,8,12,.65));
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid rgba(255,170,60,.25);
  box-shadow: var(--shadow);
}

.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top: 10px;
}

/* =========================================================
   FOOTER
========================================================= */
footer{
  text-align:center;
  font-size:13px;
  color: var(--muted);
  padding:26px 0;
}



