/* final-compact-ui.css
   Final compact mobile-friendly UI polish for public + admin pages.
   Safe override stylesheet only. No database or logic changes.
*/

:root{
  --fc-bg:#070706;
  --fc-card:rgba(20,20,14,.86);
  --fc-card-2:rgba(27,25,17,.92);
  --fc-line:rgba(245,170,40,.38);
  --fc-gold:#f5aa28;
  --fc-orange:#ff922b;
  --fc-text:#fff7e8;
  --fc-muted:rgba(255,247,232,.68);
  --fc-radius:14px;
  --fc-shadow:0 8px 22px rgba(0,0,0,.26);
}

/* ===== Global compact base ===== */
html{font-size:14px;}
body{
  font-size:.94rem;
  line-height:1.42;
  overflow-x:hidden;
}
img{max-width:100%;height:auto;}
.container,.page-wrap,.admin-wrap,.main-wrap,main{
  max-width:1160px;
  margin-left:auto;
  margin-right:auto;
}
main,.page-wrap,.admin-wrap{
  padding-top:14px!important;
  padding-bottom:14px!important;
}

/* ===== Header and nav ===== */
.site-header,.topbar,.header,.admin-header{
  min-height:auto!important;
}
.site-header,.topbar{
  padding:6px 10px!important;
  border-bottom:1px solid rgba(245,170,40,.52)!important;
}
.brand,.site-brand,.brand-wrap{
  gap:8px!important;
}
.brand img,.site-logo,.logo{
  max-height:42px!important;
  width:auto!important;
}
.brand-title,.site-title{
  font-size:1rem!important;
  line-height:1.1!important;
}
.brand-subtitle,.site-subtitle{
  font-size:.78rem!important;
  line-height:1.1!important;
}
.nav,.site-nav,.main-nav,.admin-nav{
  gap:5px!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}
.nav a,.site-nav a,.main-nav a,.admin-nav a,.lang-link,.nav-pill{
  font-size:.78rem!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  white-space:nowrap!important;
  line-height:1.15!important;
}

/* ===== Public hero/homepage ===== */
.hero,.event-hero,.hero-card{
  border-radius:var(--fc-radius)!important;
  padding:18px!important;
  margin:12px auto!important;
  min-height:auto!important;
  box-shadow:var(--fc-shadow);
}
.hero h1,.event-hero h1,.hero-title{
  font-size:clamp(1.65rem,3.2vw,2.35rem)!important;
  line-height:1.04!important;
  margin:0 0 8px!important;
}
.hero p,.event-hero p,.hero-desc{
  max-width:620px;
  font-size:.94rem!important;
  line-height:1.38!important;
  margin:0 0 10px!important;
}
.hero .badge,.hero-badges span,.meta-pill,.pill{
  font-size:.78rem!important;
  padding:6px 9px!important;
}
.hero img,.event-poster,.poster-img{
  max-height:360px!important;
  object-fit:contain!important;
  border-radius:12px!important;
}

/* ===== Cards / sections ===== */
.section-card,.card,.panel,.box,.form-card,.admin-card{
  border-radius:var(--fc-radius)!important;
  padding:14px!important;
  margin:10px 0!important;
  background:var(--fc-card)!important;
  border:1px solid var(--fc-line)!important;
}
.card-grid,.quick-grid,.stats-grid,.dashboard-grid{
  gap:10px!important;
}
.info-card,.stat-card,.quick-card{
  min-height:auto!important;
  padding:12px!important;
}
h1{font-size:1.65rem!important;margin:.25rem 0 .65rem!important;line-height:1.1!important;}
h2{font-size:1.22rem!important;margin:.2rem 0 .55rem!important;line-height:1.15!important;}
h3{font-size:1.05rem!important;margin:.2rem 0 .5rem!important;line-height:1.15!important;}
p{margin:.25rem 0 .55rem!important;}
small,.muted,.text-muted{font-size:.82rem!important;}

/* ===== Buttons ===== */
.btn,button,input[type="submit"],.button,.action-btn{
  font-size:.86rem!important;
  padding:8px 12px!important;
  border-radius:999px!important;
  line-height:1.15!important;
}
.btn-row,.actions,.button-row{
  gap:8px!important;
  flex-wrap:wrap!important;
}

/* ===== Forms ===== */
form{margin:0!important;}
label{
  font-size:.86rem!important;
  margin-bottom:5px!important;
}
input,select,textarea{
  font-size:.92rem!important;
  padding:9px 10px!important;
  border-radius:10px!important;
  max-width:100%;
  box-sizing:border-box;
}
textarea{min-height:90px!important;}
.form-grid,.grid-2,.grid-3,.admin-form-grid{
  gap:10px 12px!important;
}
.checkbox-list,.check-grid{
  gap:8px!important;
}
.checkbox-list label,.check-grid label,.agreement-box label{
  font-size:.88rem!important;
  line-height:1.35!important;
}

/* ===== Registration page compactness ===== */
.register-page .section-card,
.registration-page .section-card{
  padding:13px!important;
}
.safety-checklist,.gear-checklist{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px 12px!important;
}

/* ===== Itinerary / images ===== */
.itinerary-img,.event-itinerary-img{
  max-height:78vh!important;
  object-fit:contain!important;
  width:100%!important;
  border-radius:12px!important;
}
.poster-preview img,.itinerary-preview img{
  border-radius:12px!important;
}

/* ===== Sponsor cards ===== */
.sponsor-front-card{padding:13px!important;}
.sponsor-front-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
}
.sponsor-front-item{
  min-height:66px!important;
  padding:10px 12px!important;
  gap:10px!important;
  border-radius:13px!important;
}
.sponsor-front-item img{
  width:48px!important;
  height:48px!important;
  object-fit:contain!important;
  background:#fff!important;
  border-radius:10px!important;
  padding:4px!important;
}
.sponsor-front-item strong{font-size:.9rem!important;}

/* ===== Footer ===== */
.site-footer,footer{
  font-size:.82rem!important;
  padding:12px 10px!important;
}
.site-footer a,footer a{font-size:.82rem!important;}

/* ===== Admin layout ===== */
.admin-layout,.admin-page,.admin-container{
  max-width:1200px!important;
  margin:0 auto!important;
  padding:12px!important;
}
.admin-top,.admin-user-bar{
  font-size:.82rem!important;
  padding:8px 10px!important;
  border-radius:12px!important;
  margin-bottom:10px!important;
}
.admin-card h1,.admin-card h2,.admin-card h3,
.admin-page h1,.admin-page h2,.admin-page h3{
  margin-top:0!important;
}
.admin-actions,.admin-menu,.admin-buttons{
  gap:6px!important;
}
.admin-menu a,.admin-actions a{
  font-size:.8rem!important;
  padding:7px 10px!important;
}

/* ===== Admin tables ===== */
.table-wrap,.admin-table-wrap{
  width:100%!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch;
  border-radius:12px!important;
}
table{
  width:100%;
  border-collapse:collapse;
}
th,td{
  font-size:.86rem!important;
  padding:9px 8px!important;
  line-height:1.25!important;
}
td .btn,td button,td input[type="submit"]{
  font-size:.78rem!important;
  padding:7px 10px!important;
}

/* Sponsor admin specific */
.sponsor-admin-page{
  max-width:1200px!important;
  margin:0 auto!important;
}
.sponsor-admin-page .sponsor-form-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
  align-items:start!important;
}
.sponsor-admin-page .sponsor-form-grid > *{
  min-width:0!important;
}
.sponsor-admin-page .table-wrap{
  width:100%!important;
  overflow-x:auto!important;
}
.sponsor-admin-page table{
  min-width:820px!important;
}
.sponsor-admin-page th:nth-child(1),.sponsor-admin-page td:nth-child(1){width:80px!important;}
.sponsor-admin-page th:nth-child(3),.sponsor-admin-page td:nth-child(3){width:80px!important;text-align:center;}
.sponsor-admin-page th:nth-child(4),.sponsor-admin-page td:nth-child(4){width:95px!important;text-align:center;}
.sponsor-admin-page th:nth-child(5),.sponsor-admin-page td:nth-child(5){width:150px!important;text-align:center;}
.sponsor-admin-page td img,.sponsor-admin-page .logo-thumb{
  width:46px!important;
  height:46px!important;
  object-fit:contain!important;
  border-radius:9px!important;
  background:#fff!important;
  padding:4px!important;
}

/* Login page */
.login-card,.admin-login-card{
  max-width:420px!important;
  padding:18px!important;
  margin:28px auto!important;
}

/* ===== Mobile first fixes ===== */
@media (max-width: 900px){
  html{font-size:13.5px;}
  .container,.page-wrap,.admin-wrap,main{
    width:100%!important;
    max-width:100%!important;
    padding-left:10px!important;
    padding-right:10px!important;
    box-sizing:border-box!important;
  }
  .hero,.event-hero,.hero-card{
    display:block!important;
    padding:14px!important;
    margin:10px 0!important;
  }
  .hero img,.event-poster,.poster-img{
    width:100%!important;
    max-height:420px!important;
    margin-top:12px!important;
  }
  .card-grid,.quick-grid,.stats-grid,.dashboard-grid,
  .grid-2,.grid-3,.form-grid,.admin-form-grid{
    grid-template-columns:1fr!important;
  }
  .sponsor-front-grid{grid-template-columns:1fr!important;}
  .sponsor-front-item{
    justify-content:flex-start!important;
    min-height:58px!important;
  }
  .safety-checklist,.gear-checklist{
    grid-template-columns:1fr!important;
  }
  .site-header,.topbar{
    position:sticky!important;
    top:0!important;
    z-index:50!important;
  }
  .brand img,.site-logo,.logo{max-height:36px!important;}
  .brand-title,.site-title{font-size:.93rem!important;}
  .brand-subtitle,.site-subtitle{font-size:.72rem!important;}
  .nav,.site-nav,.main-nav,.admin-nav{
    padding-bottom:4px!important;
  }
}

@media (max-width: 520px){
  html{font-size:13px;}
  h1{font-size:1.42rem!important;}
  h2{font-size:1.12rem!important;}
  .section-card,.card,.panel,.box,.form-card,.admin-card{
    padding:11px!important;
    margin:8px 0!important;
    border-radius:12px!important;
  }
  .btn,button,input[type="submit"],.button,.action-btn{
    font-size:.82rem!important;
    padding:8px 10px!important;
  }
  input,select,textarea{
    font-size:.9rem!important;
    padding:8px 9px!important;
  }
  th,td{font-size:.82rem!important;padding:8px 7px!important;}
  .hero h1,.event-hero h1,.hero-title{font-size:1.55rem!important;}
  .hero p,.event-hero p,.hero-desc{font-size:.88rem!important;}
  .admin-layout,.admin-page,.admin-container{padding:8px!important;}
  .sponsor-admin-page .sponsor-form-grid{grid-template-columns:1fr!important;}
}

/* Print safety */
@media print{
  body{background:#fff!important;color:#000!important;font-size:11pt!important;}
  .site-header,.site-footer,.nav,.admin-nav,.btn,button,.no-print{display:none!important;}
  .section-card,.card,.panel{border:1px solid #ccc!important;box-shadow:none!important;background:#fff!important;color:#000!important;}
}