/* ============================================================
   QSL.HEI.MY.ID — Main Stylesheet
   Dark theme, konsisten dengan qso.hei.my.id
   ============================================================ */

:root {
  --bg-dark:    #0d1117;
  --bg-card:    #161b22;
  --bg-alt:     #1a2030;
  --border:     #30363d;
  --accent:     #f0a500;
  --accent2:    #00b4d8;
  --text:       #e6edf3;
  --text-muted: #8b949e;
  --success:    #3fb950;
  --danger:     #f85149;
  --live:       #ff4757;
  --radius:     10px;
  --shadow:     0 4px 20px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Courier New', monospace;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.nav-brand img {
    height: 40px;
    width: auto;
    display: block;
}
.nav-brand .brand-text,
.nav-brand .brand-icon,
.nav-brand span {
    display: none !important;
}

.brand-icon { font-size: 1.3rem; }
.brand-accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: all .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.06); text-decoration: none; }

.nav-inbox { position: relative; }
.badge {
  background: var(--live);
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 10px;
  position: absolute;
  top: 0; right: 0;
}

.btn-nav-primary {
  background: var(--accent) !important;
  color: #000 !important;
  font-weight: bold;
  padding: 6px 14px !important;
  border-radius: 6px;
}
.btn-nav-login {
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.nav-user {
  position: relative;
  cursor: pointer;
}
.user-call {
  background: rgba(0,180,216,.15);
  border: 1px solid var(--accent2);
  color: var(--accent2);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
}
.nav-user .dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 110%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  z-index: 200;
  padding: 6px 0;
}
.nav-user:hover .dropdown { display: block; }
.nav-user .dropdown a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  font-size: 0.85rem;
}
.nav-user .dropdown a:hover { background: rgba(255,255,255,.06); }
.nav-user .dropdown hr { border-color: var(--border); margin: 4px 0; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0d1117 0%, #1a2030 50%, #0d1117 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 20px 40px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(240,165,0,.15);
  border: 1px solid rgba(240,165,0,.4);
  color: var(--accent);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-accent { color: var(--accent); }
.hero p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all .2s;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover { background: #d4920a; text-decoration: none; color: #000; }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.btn-lg { padding: 13px 30px; font-size: 1rem; }

/* Hero search */
.hero-search {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.hero-search form {
  display: flex;
  gap: 0;
  max-width: 460px;
  width: 100%;
}
.search-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.btn-search {
  padding: 12px 20px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-weight: bold;
  font-family: inherit;
  transition: background .2s;
}
.btn-search:hover { background: #d4920a; }

/* Hero stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--accent);
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.active-stat .stat-num { color: var(--live); }

/* ===== QUICK LINKS ===== */
.quick-links {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 20px;
}
.quick-link-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all .2s;
  text-align: center;
}
.quick-link-card:hover {
  border-color: var(--accent);
  background: rgba(240,165,0,.06);
  text-decoration: none;
}
.ql-icon { font-size: 1.6rem; margin-bottom: 6px; }
.ql-title { font-size: 0.85rem; font-weight: bold; color: var(--text); }
.ql-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

/* ===== SECTIONS ===== */
.section { padding: 40px 20px; }
.section-alt { background: var(--bg-alt); }
.container { max-width: 1200px; margin: 0 auto; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.section-header h2 { font-size: 1.2rem; }
.section-header a { font-size: 0.85rem; color: var(--accent2); }

/* ===== EVENT CARDS ===== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.event-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.ec-header {
  padding: 12px 16px;
  background: rgba(240,165,0,.08);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ec-code {
  font-size: 1rem;
  font-weight: bold;
  color: var(--accent);
  letter-spacing: 1px;
}
.ec-cat {
  font-size: 0.7rem;
  background: rgba(0,180,216,.15);
  color: var(--accent2);
  border: 1px solid rgba(0,180,216,.3);
  padding: 2px 8px;
  border-radius: 10px;
}
.ec-body { padding: 14px 16px; flex: 1; }
.ec-name {
  font-size: 0.9rem;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--text);
}
.ec-lokal {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.ec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.ec-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,.02);
}
.badge-active {
  background: rgba(255,71,87,.15);
  color: var(--live);
  border: 1px solid rgba(255,71,87,.3);
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: bold;
  animation: pulse 2s infinite;
}
.badge-upcoming {
  background: rgba(0,180,216,.1);
  color: var(--accent2);
  border: 1px solid rgba(0,180,216,.3);
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
}
.badge-past {
  background: rgba(63,185,80,.1);
  color: var(--success);
  border: 1px solid rgba(63,185,80,.3);
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
}
.btn-card {
  background: var(--accent);
  color: #000;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: bold;
  text-decoration: none;
}
.btn-card:hover { background: #d4920a; text-decoration: none; color: #000; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
}
.footer-brand {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.footer p { color: var(--text-muted); font-size: 0.83rem; margin: 8px 0; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.footer-links a { color: var(--accent2); font-size: 0.83rem; }
.footer-copy { font-size: 0.78rem !important; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--bg-card); }

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}
.alert-success { background: rgba(63,185,80,.1); border: 1px solid rgba(63,185,80,.3); color: var(--success); }
.alert-error   { background: rgba(248,81,73,.1);  border: 1px solid rgba(248,81,73,.3);  color: var(--danger); }
.alert-info    { background: rgba(0,180,216,.1);  border: 1px solid rgba(0,180,216,.3);  color: var(--accent2); }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th {
  background: var(--bg-alt);
  padding: 10px 14px;
  text-align: left;
  color: var(--text-muted);
  font-weight: normal;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
tr:hover td { background: rgba(255,255,255,.02); }

/* ===== PAGE HEADER ===== */
.page-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 24px 20px;
}
.page-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 1.3rem; }
.breadcrumb { font-size: 0.8rem; color: var(--text-muted); }
.breadcrumb a { color: var(--accent2); }

/* ===== CARD ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}


/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state p { margin-bottom: 8px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.page-btn { padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); text-decoration: none; font-size: .82rem; }
.page-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }
.page-btn:hover { border-color: var(--accent); text-decoration: none; }

/* ===== QSL BADGE ===== */
.qsl-badge {
  background: rgba(63,185,80,.1);
  color: var(--success);
  border: 1px solid rgba(63,185,80,.3);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .72rem;
  text-decoration: none;
}

/* ===== NO QSL ===== */
.no-qsl { color: var(--text-muted); font-size: .72rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 10px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 40px 16px 30px; }
  .hero-stats { gap: 24px; }
  .event-grid { grid-template-columns: 1fr; }
  .quick-link-grid { grid-template-columns: repeat(2, 1fr); }
}