/* =========================================================
   KarmasBox — Unified Stylesheet (Clean + Structured)
   - Theme tokens
   - Base / layout
   - Components (cards/buttons)
   - Header/Nav
   - Hero (with diagonal watermark)
   - Twitch blocks
   - Auth/Admin
   - News Feed cards
   - Homepage full-width (body.home-page)
   - Responsive (single, non-conflicting section)
   ========================================================= */

/* =========================
   THEME TOKENS
   ========================= */
:root{
  --bg:#07060a;
  --panel:#0f0b16;
  --panel2:#120d1c;
  --border:rgba(255,255,255,.08);
  --text:#ffffff;
  --muted:rgba(255,255,255,.72);

  --purple:#8b5cf6;
  --purple2:#a78bfa;
  --glow:rgba(139,92,246,.35);

  --orange:#ff7a00;
}

*{ box-sizing:border-box; }

html, body{
  margin:0;
  padding:0;
  background:var(--bg);
  max-width:100%;
  overflow-x:hidden; /* prevent sideways scroll site-wide */
}

body{
  color:var(--text);
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(167,139,250,.12), transparent 55%),
    var(--bg);
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center top;
}

a{ color:inherit; text-decoration:none; }
a:hover{ color:var(--purple2); }

/* =========================
   LAYOUT: CONTAINER / GRID
   ========================= */
.container{
  max-width:1200px;
  margin:0 auto;
  padding:16px;
}

.grid{
  display:grid;
  grid-template-columns:240px 1fr 380px;
  gap:16px;
  margin-top:16px;
  min-width:0;
}

/* =========================
   COMPONENTS: CARDS / LISTS
   ========================= */
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  min-width:0;
}

.card h2{
  margin:0 0 10px;
  font-size:14px;
  letter-spacing:.4px;
  color:var(--purple2);
}

.meta{
  color:var(--muted);
  font-size:12px;
  margin-bottom:10px;
}

.list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.item{
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(0,0,0,.18);
}

.item-title{
  font-weight:650;
  margin-bottom:6px;
}

.item-body{
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(139,92,246,.35);
  background:rgba(139,92,246,.10);
  color:var(--purple2);
  font-size:12px;
}

/* =========================
   BUTTONS
   ========================= */
.btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(139,92,246,.45);
  background:linear-gradient(180deg, rgba(139,92,246,.22), rgba(139,92,246,.10));
  cursor:pointer;
  transition:all .2s ease;
  color:#fff;
  font-weight:750;
}

.btn:hover{
  border-color:rgba(167,139,250,.65);
  box-shadow:0 0 24px rgba(139,92,246,.18);
  color:#fff;
}

.btn-ghost{
  border:1px solid rgba(255,255,255,.18) !important;
  background:rgba(255,255,255,.06) !important;
}

.btn-ghost:hover{
  border-color:rgba(139,92,246,.55) !important;
  box-shadow:0 0 0 2px rgba(139,92,246,.18) inset, 0 0 18px rgba(139,92,246,.14);
}

.btn-accent{
  border-color: rgba(255,122,0,.75) !important;
  background: linear-gradient(180deg, rgba(255,122,0,.24), rgba(255,122,0,.12)) !important;
  box-shadow: 0 0 0 2px rgba(255,122,0,.14) inset;
}
.btn-accent:hover{ filter: brightness(1.08); }

/* =========================
   TOPBAR / NAV
   ========================= */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(7,6,10,.72);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
}

.topbar-inner{
  max-width:1200px;
  margin:0 auto;
  padding:0 16px 14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  min-width:0;
}

.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:14px 0 10px;
}

.brand-badge{
  width:36px;
  height:36px;
  border-radius:12px;
  background:linear-gradient(135deg, var(--purple), #3b1f84);
  box-shadow:0 0 0 1px rgba(255,255,255,.08), 0 0 24px var(--glow);
}

.brand h1{
  font-size:18px;
  margin:0;
  letter-spacing:.6px;
}

.brand span{
  color:var(--muted);
  font-size:12px;
}

.nav{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}

.nav a{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  transition:all .2s ease;
}

.nav a:hover{ border-color:rgba(139,92,246,.35); }

.nav a.active{
  border-color:rgba(139,92,246,.55);
  box-shadow:0 0 0 2px rgba(139,92,246,.15) inset;
}

/* admin button in nav */
.nav .nav-admin-btn{
  border-color:rgba(255,255,255,.22);
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  font-weight:700;
}
.nav .nav-admin-btn:hover{
  border-color:rgba(139,92,246,.75);
  box-shadow:0 0 0 2px rgba(139,92,246,.22) inset, 0 0 18px rgba(139,92,246,.18);
}

/* =========================
   HERO (Twitch esports header)
   ========================= */
.hero{
  position:relative;
  width:100%;
  padding:18px 0 22px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(900px 300px at 30% 10%, rgba(139,92,246,.30), transparent 60%),
    radial-gradient(700px 260px at 75% 0%, rgba(167,139,250,.18), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.40));
  overflow:hidden;      /* clip watermark */
  isolation:isolate;    /* contain layers */
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035), transparent 35%, transparent 65%, rgba(255,255,255,.035)),
    radial-gradient(circle at 50% 0%, rgba(0,0,0,0), rgba(0,0,0,.55));
  opacity:.55;
}

/* Diagonal watermark */
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  background-image:url("/uploads/karmasbox-diagonal.png");
  background-repeat:no-repeat;
  background-position:73% 42%;
  background-size:28%;
  opacity:.14;
  pointer-events:none;
  transform:scale(.90);
  transform-origin:right center;
}

.hero-inner{
  position:relative;
  z-index:2;
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.hero-logo{
  width:120px;
  height:120px;
  object-fit:contain;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  box-shadow:
    0 0 0 2px rgba(139,92,246,.18) inset,
    0 0 30px rgba(139,92,246,.28);
  transition:transform .2s ease;
}
.hero-logo:hover{ transform:scale(1.05); }

.hero-title{
  font-size:34px;
  font-weight:950;
  letter-spacing:.6px;
  line-height:1.05;
}
.hero-white{ color:#fff; }
.hero-purple{
  color:var(--purple);
  text-shadow:0 0 10px rgba(139,92,246,.55), 0 0 22px rgba(139,92,246,.28);
}

.hero-subtitle{
  margin-top:6px;
  color:rgba(255,255,255,.78);
  font-size:13px;
  letter-spacing:.2px;
}

.hero-badges{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.90);
  font-size:12px;
  font-weight:800;
}

.hero-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.55);
}

/* Live badge states */
.hero-badge-live.is-live{
  border-color:rgba(255,64,64,.55);
  background:rgba(255,64,64,.18);
}
.hero-badge-live.is-live .hero-dot{
  background:rgba(255,64,64,.95);
  box-shadow:0 0 12px rgba(255,64,64,.65);
}
.hero-badge-live.is-offline{
  border-color:rgba(255,255,255,.15);
  background:rgba(255,255,255,.06);
}
.hero-badge-live.is-offline .hero-dot{
  background:rgba(255,255,255,.55);
  box-shadow:none;
}

/* Larger watermark on big screens */
@media (min-width:1200px){
  .hero::after{
    inset:-22%;
    transform:scale(1.22);
    opacity:.16;
  }
}

/* =========================
   TWITCH LEGACY EMBED
   ========================= */
.twitch-card{ padding:14px; }

.twitch-embed{
  position:relative;
  width:100%;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  background:#000;
  box-shadow:0 0 0 1px rgba(139,92,246,.12), 0 0 34px rgba(139,92,246,.12);
}
.twitch-embed::before{ content:""; display:block; padding-top:56.25%; }
.twitch-embed iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* =========================
   TWITCH PREVIEW CARD (twp)
   ========================= */
aside.card.twp{ text-align:left; }
.twp{ padding:14px; }

.twp-row{
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:flex-start;
}

.twp-avatar{
  width:58px;
  height:58px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.35);
  box-shadow:0 0 0 2px rgba(255,122,0,.18) inset, 0 0 18px rgba(0,0,0,.35);
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

.twp-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.twp-main{
  flex:1 1 0%;
  min-width:0;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.twp-top{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  width:100%;
  justify-content:flex-start;
}

.twp-name{
  font-size:18px;
  font-weight:850;
  letter-spacing:.2px;
}

.twp-live{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.3px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.90);
}

.twp-live .twp-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.55);
}

.twp-live.is-live{
  border-color:rgba(255,64,64,.45);
  background:rgba(255,64,64,.14);
}
.twp-live.is-live .twp-dot{
  background:rgba(255,64,64,.95);
  box-shadow:0 0 10px rgba(255,64,64,.45);
}
.twp-live.is-offline{
  border-color:rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
}

.twp-subline{
  margin-top:6px;
  color:rgba(255,255,255,.72);
  font-size:13px;
  line-height:1.45;
  width:100%;
  max-width:100%;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

.twp-chips{
  margin-top:10px;
  width:100%;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.twp-chip{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.85);
  font-size:12px;
  font-weight:750;
  margin:0;
}

#twpViewers{ display:none; }
#twpPreviewWrap{ display:none; }

.twp-actions{
  width:100%;
  display:flex;
  justify-content:flex-start;
  margin-top:12px;
}

.twp-actions .btn{
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:850;
  line-height:1;
  width:auto;
}

.twp-preview{
  margin-top:14px;
  width:100%;
}
.twp-preview-embed{
  position:relative;
  width:100%;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background:#000;
  box-shadow:0 0 0 1px rgba(139,92,246,.12), 0 0 34px rgba(139,92,246,.12);
}
.twp-preview-embed::before{ content:""; display:block; padding-top:56.25%; }
.twp-preview-embed iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* =========================
   FOOTER
   ========================= */
.footer{
  margin:18px 0 8px;
  color:rgba(255,255,255,.55);
  font-size:12px;
  text-align:center;
}

/* =========================
   LOGIN / AUTH
   ========================= */
body.auth-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 16px;
  background:
    radial-gradient(900px 500px at 20% 0%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(800px 450px at 80% 10%, rgba(167,139,250,.12), transparent 55%),
    var(--bg);
}

.auth-wrap{ width:100%; max-width:520px; }

.auth-card{
  position:relative;
  overflow:hidden;
  padding:18px;
  border-radius:18px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  box-shadow:
    0 0 0 1px rgba(139,92,246,.35),
    0 0 24px rgba(139,92,246,.35),
    0 0 60px rgba(139,92,246,.15);
}

.auth-title{
  margin:0 0 12px;
  font-size:14px;
  letter-spacing:.4px;
  color:var(--purple2);
  padding-right:56px;
}

.form-row{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.input{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  color:var(--text);
  outline:none;
}
.input::placeholder{ color:rgba(255,255,255,.45); }
.input:focus{
  border-color:rgba(139,92,246,.55);
  box-shadow:0 0 0 3px rgba(139,92,246,.18);
}

.auth-btn{ width:100%; }

.alert{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,64,64,.35);
  background:rgba(255,64,64,.10);
  color:#fff;
  margin-bottom:10px;
  font-size:13px;
}

img.auth-logo{
  position:absolute;
  top:6px;
  right:6px;
  z-index:5;
  pointer-events:none;
  width:34px;
  height:34px;
  object-fit:contain;
  display:block;
  opacity:1;
  transform:scale(1.12);
  transform-origin:top right;
  filter:drop-shadow(0 0 6px rgba(139,92,246,.35));
}

/* =========================
   ADMIN (background + inputs)
   ========================= */
body.admin-page{
  min-height:100vh;
  background:
    radial-gradient(900px 500px at 20% 0%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(800px 450px at 80% 10%, rgba(167,139,250,.12), transparent 55%),
    var(--bg) !important;
  background-repeat:no-repeat !important;
  background-size:cover !important;
  background-position:center top !important;
}

.admin-page input,
.admin-page textarea,
.admin-page select,
.admin-page .input{
  color:#fff !important;
  caret-color:#fff;
}

.admin-page input::placeholder,
.admin-page textarea::placeholder{
  color:rgba(255,255,255,.55) !important;
}

.admin-page input,
.admin-page textarea,
.admin-page select{
  background:rgba(0,0,0,.28) !important;
  border:1px solid rgba(255,255,255,.12) !important;
}

.admin-page input:focus,
.admin-page textarea:focus,
.admin-page select:focus{
  border-color:rgba(139,92,246,.55) !important;
  box-shadow:0 0 0 3px rgba(139,92,246,.18) !important;
  outline:none !important;
}

/* =========================
   NEWS FEED CARDS (front-end)
   ========================= */
.news-item{
  position:relative;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
  box-shadow:0 0 0 1px rgba(255,255,255,.04) inset;
  overflow:hidden;
}

.news-corner-logo{
  position:absolute;
  top:12px;
  right:12px;
  width:44px;
  height:44px;
  object-fit:contain;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  box-shadow:
    0 0 0 2px rgba(139,92,246,.18) inset,
    0 0 20px rgba(139,92,246,.20);
  opacity:.95;
  pointer-events:none;
}

.news-headline{ padding-right:64px; }

.news-title{
  margin:0;
  font-size:18px;
  font-weight:900;
  letter-spacing:.2px;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.news-sep{
  margin:10px 0 8px;
  height:1px;
  width:100%;
  background:linear-gradient(90deg, rgba(139,92,246,.45), rgba(255,255,255,.10), transparent);
}

.news-meta{
  color:rgba(255,255,255,.65);
  font-size:12px;
}

.news-body{
  margin-top:10px;
  color:rgba(255,255,255,.78);
  font-size:13px;
  line-height:1.55;
}

.news-readmore{
  display:inline-block;
  margin-top:10px;
  font-weight:800;
  color:rgba(167,139,250,1);
}
.news-readmore:hover{ filter:brightness(1.1); }

.card .list .news-item + .news-item{ margin-top:12px; }

/* =========================================================
   ✅ HOMEPAGE FULL WIDTH (desktop + mobile)
   Requires: <body class="home-page">
   ========================================================= */
body.home-page .container,
body.home-page .topbar-inner,
body.home-page .hero-inner{
  max-width:100% !important;
  width:100% !important;
}

body.home-page .container{
  padding-left:32px !important;
  padding-right:32px !important;
}

body.home-page .grid{
  width:100% !important;
  max-width:100% !important;
  grid-template-columns:
    minmax(260px, 320px)
    minmax(600px, 1fr)
    minmax(320px, 420px);
  gap:22px;
}

/* Make hero banner full-bleed on homepage */
body.home-page .hero{
  width:100vw;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
}

/* =========================
   RESPONSIVE (single section)
   ========================= */
@media (max-width:1060px){
  .grid{ grid-template-columns:1fr; }
}

/* Phone/tablet: stack layout + full-bleed hero + visible watermark */
@media (max-width:900px){

  .container{
    width:100% !important;
    max-width:100% !important;
    padding-left:14px !important;
    padding-right:14px !important;
  }

  .grid{
    grid-template-columns:1fr !important;
    gap:14px !important;
  }

  /* Full-bleed hero even when inside constrained parents */
  .hero{
    width:100vw !important;
    max-width:100vw !important;
    margin-left:calc(50% - 50vw) !important;
    margin-right:calc(50% - 50vw) !important;
    border-radius:0 !important;
  }

  .hero-inner{
    flex-direction:column;
    align-items:flex-start;
    padding-left:14px !important;
    padding-right:14px !important;
  }

  .hero-logo{
    width:64px;
    height:64px;
  }

  .hero-title{
    font-size:28px;
    line-height:1.1;
  }

  /* Make diagonal watermark visible on phone */
  .hero::after{
    inset:0 !important;
    transform:none !important;
    background-position:85% 50% !important;
    background-size:140% !important;
    opacity:.14 !important;
  }

  /* Homepage padding a bit tighter on mobile */
  body.home-page .container{
    padding-left:14px !important;
    padding-right:14px !important;
  }
}

/* =========================================================
   ADMIN LOGO SIZE FIX (news.php + edit.php)
   - Makes top-right logos match dashboard vibe
   ========================================================= */

/* 1) If news.php uses a wrapper like: <div class="news-head-logo"><img ...></div> */
.news-head-logo{
  width: 72px;              /* ✅ close to dashboard size */
  height: 72px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;          /* ✅ prevents the image from overflowing */
  box-shadow:
    0 0 0 2px rgba(139,92,246,.14) inset,
    0 0 26px rgba(139,92,246,.18);
}

.news-head-logo img{
  width: 48px;              /* ✅ logo inside the badge */
  height: 48px;
  object-fit: contain;
  display:block;
}

/* 2) If edit.php uses: <img class="edit-logo" ...> */
.edit-logo{
  width: 72px !important;   /* ✅ force it down */
  height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
  object-fit: contain !important;

  border-radius: 18px;
  padding: 8px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 0 0 2px rgba(139,92,246,.14) inset,
    0 0 26px rgba(139,92,246,.18);
}

/* 3) If dashboard uses a different class (keep consistent) */
.dash-logout-img{
  width: 72px !important;
  height: 72px !important;
  object-fit: contain !important;
}

/* Mobile: slightly smaller */
@media (max-width: 720px){
  .news-head-logo{ width: 60px; height: 60px; border-radius: 16px; }
  .news-head-logo img{ width: 40px; height: 40px; }

  .edit-logo{
    width: 60px !important;
    height: 60px !important;
    border-radius: 16px;
  }
}

/* =========================================================
   ADMIN DASHBOARD RESTORE (panel + 3 cards)
   Paste at VERY BOTTOM of styles.css
   ========================================================= */

body.admin-page .container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px;
}

.dash-panel{
  width: 100%;
  margin: 18px auto;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  box-shadow:
    0 0 0 1px rgba(139,92,246,.18),
    0 0 44px rgba(0,0,0,.40);
}

.dash-hero{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.dash-title{
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: .2px;
}

.dash-sub{
  margin: 0 0 12px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.55;
  max-width: 900px;
}

.dash-pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  font-size: 12px;
  color: rgba(255,255,255,.88);
}

.dash-pill-dot{ opacity:.6; }
.dash-pill-muted{ color: rgba(255,255,255,.65); }

.dash-grid{
  margin-top: 16px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dash-card{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  padding: 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
  min-width: 0;
}

.dash-card-head{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}

.dash-icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(139,92,246,.14);
  border: 1px solid rgba(139,92,246,.25);
  box-shadow: 0 0 18px rgba(139,92,246,.18);
  flex: 0 0 auto;
}

.dash-card-title{
  font-weight: 800;
  color: rgba(255,255,255,.94);
  margin-bottom: 4px;
}

.dash-card-desc{
  color: rgba(255,255,255,.70);
  font-size: 12px;
  line-height: 1.55;
}

.dash-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.dash-actions .btn{
  width: auto;
  white-space: nowrap;
}

.dash-footer{
  margin-top: 14px;
  display:flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255,255,255,.65);
  font-size: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* If your logout link got recolored by global styles */
.dash-link{
  color: #ffffff !important;
  font-weight: 750;
}
.dash-link:hover{ color: rgba(255,255,255,.85) !important; }

@media (max-width: 980px){
  .dash-grid{ grid-template-columns: 1fr; }
}

/* News admin search row */
.news-tools{ margin: 10px 0 14px; }

.news-search{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.news-search-input{
  max-width: 320px;
  width: 100%;
}

/* =========================
   NEWS ADMIN — panel + header alignment (FINAL)
   ========================= */

/* Make the page look like the dashboard panel */
.news-panel{
  padding: 22px;
}

/* Header: left content + right logo (locked to the right) */
.news-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 14px;
}

.news-head-left{ min-width:0; }
.news-head-right{
  flex: 0 0 auto;
  display:flex;
  justify-content:flex-end;
  align-items:flex-start;
}

/* Dashboard-sized logo (NOT huge) */
.news-head-logo{
  width: 90px;
  height: 90px;
  border-radius: 14px;
  padding: 8px;
  border: 1px solid rgba(139,92,246,.18);
  background: rgba(139,92,246,.08);
  box-shadow: 0 0 20px rgba(139,92,246,.18);
  display:flex;
  align-items:center;
  justify-content:center;
}
.news-head-logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
}

/* Title + subtitle */
.news-title{
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .2px;
}
.news-sub{
  margin: 10px 0 0;
  color: rgba(255,255,255,.78);
  line-height: 1.5;
}

/* Search row */
.news-tools{ margin: 10px 0 14px; }
.news-search{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.news-search-input{
  max-width: 320px;
  width: 100%;
}

/* Table card wrapper */
.news-table-card{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  box-shadow: 0 0 0 2px rgba(255,255,255,.03) inset;
  overflow: hidden;
}

/* Table spacing stays clean */
.news-table-wrap{ overflow-x:auto; }
.news-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.news-table thead th{
  padding: 14px 16px;
  font-size: 12px;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.70);
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.news-table tbody td{
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.news-table thead th{
  padding: 10px 14px;   /* tighten header too */
}
.news-title-cell{ font-weight: 800; }
.news-date{ color: rgba(255,255,255,.70); }

/* Actions alignment */
.news-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.ta-right{ text-align:right !important; }

/* Mobile: stack header but keep logo visible */
@media (max-width: 720px){
  .news-head{
    flex-direction: column;
    align-items: flex-start;
  }
  .news-head-logo{
    width: 72px;
    height: 72px;
    padding: 6px;
  }
  .news-title{ font-size: 24px; }
}

/* =========================================================
   NEWS ADMIN — compact rows + spacing tweak (FINAL OVERRIDE)
   Paste at VERY BOTTOM of styles.css
   ========================================================= */

/* Move buttons further away from "Logged in" pill */
.news-head-actions{
  margin-top: 18px; /* was too tight */
}

/* Make the table rows tighter */
.news-table thead th{
  padding: 8px 12px !important;  /* tighter header */
}

.news-table tbody td{
  padding: 6px 12px !important;  /* tighter body rows */
}

/* Reduce row height further (helps with tall font/line-height) */
.news-table tbody td,
.news-table thead th{
  line-height: 1.2;
}

/* Tighten action buttons so the Actions column doesn't inflate rows */
.news-actions .btn{
  padding: 6px 10px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

/* Optional: make action buttons sit closer together */
.news-actions{
  gap: 6px !important;
}

/* =========================================================
   NEWS SINGLE POST (Read More / view page) — Dashboard vibe
   Paste at VERY BOTTOM of styles.css
   ========================================================= */

/* Outer post panel */
.news-view{
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  box-shadow:
    0 0 0 2px rgba(139,92,246,.10) inset,
    0 12px 44px rgba(0,0,0,.45);
  padding: 18px;
}

/* Header row: title/meta on left, logo on right */
.news-view-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 12px;
}

.news-view-title-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.news-view-title{
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .2px;
  line-height: 1.15;
}

/* Nice separator between header and body (if you keep it) */
.news-view-sep{
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, rgba(139,92,246,.40), rgba(255,255,255,.10), transparent);
  margin: 12px 0;
}

/* Body typography */
.news-view-body{
  color: rgba(255,255,255,.86);
  font-size: 14px;
  line-height: 1.65;
}

/* Logo badge (top-right) — matches dashboard vibe */
.news-view-logo{
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  padding: 8px;
  border: 1px solid rgba(139,92,246,.18);
  background: rgba(139,92,246,.08);
  box-shadow: 0 0 20px rgba(139,92,246,.18);
  display:flex;
  align-items:center;
  justify-content:center;
}

.news-view-logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
}

/* Buttons area */
.news-view-actions{
  margin-top: 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Smaller buttons (only in this view) */
.news-view-actions .btn{
  padding: 7px 10px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

/* Mobile */
@media (max-width: 720px){
  .news-view-head{ flex-direction: column; }
  .news-view-logo{ width: 60px; height: 60px; padding: 6px; }
  .news-view-title{ font-size: 20px; }
}

/* =========================================================
   NEWS VIEW BUTTON POLISH (smaller + cleaner)
   ========================================================= */

.news-view-actions{
  margin-top: 18px;
  display:flex;
  gap:12px;
}

/* Smaller, cleaner buttons */
.news-view-actions .btn{
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  line-height: 1 !important;

  border: 1px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.04) !important;
  color: rgba(255,255,255,.92) !important;

  transition: all .18s ease;
}

/* Hover glow */
.news-view-actions .btn:hover{
  border-color: rgba(139,92,246,.55) !important;
  background: rgba(139,92,246,.12) !important;
  box-shadow: 0 0 18px rgba(139,92,246,.25);
  color: #fff !important;
}

/* Make the arrow button slightly more subtle */
.news-view-actions .btn:first-child{
  padding-left: 10px !important;
}

/* Optional: make "All News" slightly more prominent */
.news-view-actions .btn:last-child{
  border-color: rgba(139,92,246,.35) !important;
}

/* =========================================================
   NEWS SINGLE POST (Read More / view page) — FINAL
   - Keeps the panel + logo
   - Makes buttons actually smaller
   - Prevents extra bottom growth
   ========================================================= */

.news-view{
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  box-shadow:
    0 0 0 2px rgba(139,92,246,.10) inset,
    0 12px 44px rgba(0,0,0,.45);
  padding: 18px;
}

/* Header row: title/meta on left, logo on right */
.news-view-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 12px;
}

.news-view-title{
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .2px;
  line-height: 1.15;
}

.news-view-body{
  color: rgba(255,255,255,.86);
  font-size: 14px;
  line-height: 1.65;
}

/* Logo badge (top-right) */
.news-view-logo{
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  padding: 8px;
  border: 1px solid rgba(139,92,246,.18);
  background: rgba(139,92,246,.08);
  box-shadow: 0 0 20px rgba(139,92,246,.18);
  display:flex;
  align-items:center;
  justify-content:center;
}

.news-view-logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
}

/* Buttons area — tighter and NOT tall */
.news-view-actions{
  margin-top: 12px !important;   /* keep section from getting huge */
  display:flex;
  gap:10px !important;
  flex-wrap:wrap;
  align-items:center;
}

/* Smaller buttons (forced to beat global .btn) */
.news-view-actions .btn{
  padding: 4px 10px !important;  /* ✅ actually smaller */
  font-size: 12px !important;
  font-weight: 750 !important;
  border-radius: 10px !important;
  line-height: 1 !important;

  border: 1px solid rgba(255,255,255,.16) !important;
  background: rgba(255,255,255,.04) !important;
  color: rgba(255,255,255,.92) !important;

  box-shadow: none !important;
  min-height: 0 !important;
  height: auto !important;
}

/* Hover polish */
.news-view-actions .btn:hover{
  border-color: rgba(139,92,246,.55) !important;
  background: rgba(139,92,246,.12) !important;
  box-shadow: 0 0 16px rgba(139,92,246,.22) !important;
  color:#fff !important;
}

/* Mobile */
@media (max-width: 720px){
  .news-view-head{ flex-direction: column; }
  .news-view-logo{ width: 60px; height: 60px; padding: 6px; }
  .news-view-title{ font-size: 20px; }
}

/* =========================================================
   NEWS VIEW — HARD OVERRIDE (buttons smaller + kill empty space)
   Paste at VERY BOTTOM of styles.css
   ========================================================= */

/* 1) Kill any forced height that is creating the big empty bottom area */
.news-view,
.news-view *{
  min-height: 0 !important;
}

.news-view{
  height: auto !important;
  padding-bottom: 14px !important;  /* keeps panel tight */
}

/* If your template uses a wrapper inside .news-view, this prevents stretch */
.news-view .news-view-body{
  margin-bottom: 10px !important;
}

/* Fallback: if those links aren’t wrapped in .news-view-actions */
.news-view a[href*="news"],
.news-view a[href="/"],
.news-view a[href="/news.php"]{
  padding: 4px 10px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
}

/* 2) Make the action area NOT add extra space */
.news-view-actions{
  margin: 10px 0 0 !important;
  padding: 0 !important;
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

/* 3) FORCE smaller buttons no matter what they’re using (a, button, .btn, etc.) */
.news-view-actions a,
.news-view-actions button,
.news-view-actions .btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 4px 10px !important;     /* ✅ smaller */
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1 !important;

  border-radius: 10px !important;
  height: auto !important;
  min-height: 0 !important;

  border: 1px solid rgba(255,255,255,.16) !important;
  background: rgba(255,255,255,.04) !important;
  color: rgba(255,255,255,.92) !important;

  box-shadow: none !important;
}

/* Hover polish */
.news-view-actions a:hover,
.news-view-actions button:hover,
.news-view-actions .btn:hover{
  border-color: rgba(139,92,246,.55) !important;
  background: rgba(139,92,246,.12) !important;
  box-shadow: 0 0 16px rgba(139,92,246,.22) !important;
  color: #fff !important;
}

/* =========================================================
   NEWS VIEW — remove forced height (fix empty bottom space)
   Paste at VERY BOTTOM
   ========================================================= */

/* Kill any forced height on the view panel and its direct children */
.news-view{
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 14px !important;
}

.news-view > *{
  min-height: 0 !important;
  height: auto !important;
}

/* If the body/content wrapper is forcing height */
.news-view-body{
  min-height: 0 !important;
  height: auto !important;
  margin-bottom: 10px !important;
}

/* Remove any sneaky extra spacing from last elements */
.news-view-body > :last-child{
  margin-bottom: 0 !important;
}

/* Ensure the actions row doesn't add extra vertical space */
.news-view-actions{
  margin-top: 10px !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* =========================================================
   FIX: Admin .news-title was affecting front-end titles
   ========================================================= */

/* Restore front-end post list title look */
.news-item .news-title{
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: .2px !important;
}

/* Scope the BIG admin title to the admin panel only */
.news-panel .news-title{
  font-size: 28px !important;
  font-weight: 900 !important;
  letter-spacing: .2px !important;
  margin: 0 !important;
}

/* =========================================================
   FIX: Admin .news-title was overriding front-end .news-title
   ========================================================= */

/* Scope admin header title/subtitle ONLY inside the admin panel */
.news-panel .news-title{
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .2px;
}

.news-panel .news-sub{
  margin: 10px 0 0;
  color: rgba(255,255,255,.78);
  line-height: 1.5;
}

/* Force front-end/news-card titles back to the correct size */
.news-item .news-title{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   FIX: Read-more panel stretching due to grid column height
   ========================================================= */

.news-view{
  align-self: start; /* stops the panel from stretching to sidebar height */
}