﻿*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  min-height:100%;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  background:#f3f5f8;
  color:#23364c;
}

/* LOGIN */
.login{
  min-height:100vh;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#061c3b,#123f6c);
}

.loginbox{
  width:min(410px,92vw);
  background:#fff;
  border-radius:12px;
  padding:32px;
  box-shadow:0 20px 70px #0004;
  text-align:center;
}

.loginbox img{
  width:88px;
  height:88px;
  border-radius:50%;
  object-fit:cover;
}

.loginbox h1{
  font:25px Georgia,serif;
  color:#08244A;
  margin:14px 0 5px;
}

.loginbox p{
  font-size:11px;
  color:#7c8998;
}

.loginbox input{
  width:100%;
  padding:12px;
  border:1px solid #dbe2e8;
  border-radius:6px;
  margin:9px 0;
  font-size:14px;
}

/* BUTTONS */
.btn{
  border:0;
  border-radius:5px;
  padding:10px 14px;
  background:#D5A62A;
  color:#08244A;
  font-weight:800;
  cursor:pointer;
}

.btn:hover{
  filter:brightness(.96);
}

.btn.outline{
  background:#fff;
  border:1px solid #D5A62A;
}

.btn.small{
  padding:6px 10px;
  font-size:12px;
}

.btn.danger{
  background:#b33;
  color:#fff;
}

.btn.ok{
  background:#3b8a50;
  color:#fff;
}

/* APPLICATION */
#appShell{
  min-height:100vh;
}

/* SIDEBAR */
.sidebar{
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  width:250px;
  background:#08244A;
  color:#fff;
  padding:18px 12px;
  overflow-y:auto;
  z-index:10;
}

/* WPA BRAND */
.sidebar .brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:4px 6px 18px;
  border-bottom:1px solid rgba(255,255,255,.15);
  margin-bottom:12px;
}

.sidebar .brand img{
  width:45px;
  height:45px;
  border-radius:50%;
  object-fit:cover;
  flex-shrink:0;
}

.sidebar .brand b{
  display:block;
  color:#fff;
  font-size:12px;
  font-weight:800;
  line-height:1.3;
}

.sidebar .brand small{
  display:block;
  color:#D5A62A;
  font-size:10px;
  margin-top:3px;
}

/* NAVIGATION */
#nav{
  margin-top:8px;
}

.nav-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  margin:3px 0;
  color:#d8e3ef !important;
  cursor:pointer;
  border-radius:6px;
  font-size:13px;
  transition:.15s;
}

.nav-item:hover{
  background:rgba(255,255,255,.12);
  color:#fff !important;
}

.nav-item.active{
  background:rgba(213,166,42,.25);
  color:#fff !important;
  border-left:4px solid #D5A62A;
  padding-left:6px;
}

.nav-item .ic{
  width:22px;
  min-width:22px;
  text-align:center;
  color:#D5A62A !important;
  font-size:16px;
  font-weight:bold;
}

.nav-item .label{
  color:inherit !important;
  flex:1;
}

/* MAIN */
.main{
  margin-left:250px;
  min-height:100vh;
  padding:0;
}

#pageTitle{
  margin:0;
  padding:30px 30px 18px;
  color:#08244A;
  font-size:30px;
  font-weight:800;
}

#content{
  padding:0 30px 30px;
  max-width:1500px;
}

/* CARDS */
.card{
  background:#fff;
  border:1px solid #e1e6ec;
  border-radius:12px;
  padding:16px;
  box-shadow:0 3px 12px #08244a08;
  margin-bottom:15px;
}

.card h3{
  font:16px Georgia,serif;
  color:#08244A;
  margin:0 0 10px;
}

/* DASHBOARD STATS */
.stat-row{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:15px;
  margin-bottom:20px;
}

.stat{
  background:#fff;
  border:1px solid #e1e6ec;
  border-radius:10px;
  padding:22px;
  min-height:110px;
}

.stat .num{
  font-size:28px;
  font-weight:800;
  color:#08244A;
}

.stat .lbl{
  color:#8793a0;
  font-size:13px;
  margin-top:6px;
}

/* TABLES */
.table{
  width:100%;
  border-collapse:collapse;
}

.table th{
  font-size:12px;
  text-align:left;
  color:#4f6072;
  padding:10px;
  border-bottom:1px solid #e7ebef;
}

.table td{
  font-size:13px;
  padding:11px 10px;
  border-bottom:1px solid #eef1f4;
}

/* STATUS */
.badge{
  display:inline-block;
  border-radius:12px;
  padding:4px 8px;
  font-size:11px;
  background:#e8f2ea;
  color:#39734b;
}

.badge.pending,
.pending{
  background:#faf1d8;
  color:#8d701e;
}

.badge.review,
.review{
  background:#e8f0f8;
  color:#3f688c;
}

.badge.rejected{
  background:#f8dddd;
  color:#a22;
}

/* GENERAL */
.row{
  display:flex;
  gap:8px;
  align-items:center;
}

.placeholder{
  padding:20px;
  color:#8793a0;
  text-align:center;
}

.muted-note{
  color:#8793a0;
  font-size:12px;
}

.formgrid{
  display:grid;
  gap:12px;
}

.input{
  padding:9px;
  border:1px solid #dbe2e8;
  border-radius:5px;
  font-size:13px;
  width:100%;
}

.actions{
  display:flex;
  gap:7px;
  margin-bottom:12px;
}

/* GALLERY */
.gallery{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:9px;
}

.photo{
  height:120px;
  border-radius:6px;
  background:linear-gradient(135deg,#08244A,#2a5b8d);
  color:#fff;
  display:flex;
  align-items:end;
  padding:10px;
  font-size:12px;
}

/* UPLOAD */
.upload{
  border:2px dashed #cfd8e1;
  border-radius:7px;
  padding:25px;
  text-align:center;
  margin-bottom:14px;
}

.upload input{
  display:block;
  margin:12px auto;
}

.notice{
  padding:10px;
  background:#f7fbf8;
  border-left:3px solid #4b8a60;
  font-size:12px;
  margin-bottom:14px;
}

/* FORM POPUP */
#formOverlay{
  position:fixed;
  inset:0;
  background:rgba(7,27,58,.55);
  align-items:center;
  justify-content:center;
  z-index:1000;
  padding:16px;
}

#formOverlay .formbox{
  background:#fff;
  border-radius:8px;
  padding:22px;
  width:100%;
  max-width:560px;
  max-height:90vh;
  overflow:auto;
}

#formOverlay .formactions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:16px;
}

/* TOAST */
#toast{
  position:fixed;
  left:50%;
  bottom:24px;
  transform:translateX(-50%);
  background:#071b3a;
  color:#fff;
  padding:10px 18px;
  border-radius:4px;
  font:14px Arial,sans-serif;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s;
  z-index:1100;
}

#toast.show{
  opacity:1;
}

/* LOGIN ERROR */
#bootError{
  display:none;
  background:#fdecea;
  color:#8a1c12;
  border-bottom:2px solid #c0392b;
  padding:12px 16px;
  font:14px/1.5 Arial,sans-serif;
}

#loginNote{
  min-height:1.4em;
  word-break:break-word;
}

/* RESPONSIVE */
@media(max-width:900px){
  .sidebar{
    width:205px;
  }

  .main{
    margin-left:205px;
  }

  .stat-row{
    grid-template-columns:repeat(2,1fr);
  }

  #content{
    padding-left:20px;
    padding-right:20px;
  }
}

@media(max-width:650px){
  .sidebar{
    display:none;
  }

  .main{
    margin-left:0;
  }

  #pageTitle{
    padding:20px 14px 12px;
    font-size:25px;
  }

  #content{
    padding:0 14px 20px;
  }

  .stat-row{
    grid-template-columns:1fr;
  }

  .gallery{
    grid-template-columns:1fr 1fr;
  }
}

/* CONTROL CENTRE TOPBAR */
.topbar{height:78px;background:#fff;border-bottom:1px solid #e3e8ee;display:flex;align-items:center;justify-content:space-between;padding:0 30px;box-shadow:0 2px 10px rgba(8,36,74,.06);position:sticky;top:0;z-index:20}
.topbar-label{display:inline-flex;align-items:center;gap:10px;color:#08244A;font-size:14px;font-weight:900;letter-spacing:.8px}
.topbar-label:before{content:'';display:inline-block;width:4px;height:24px;background:#D5A62A;border-radius:3px}
#whoami{display:flex;align-items:center;gap:9px;background:#f5f7fa;border:1px solid #e1e6ec;border-radius:20px;padding:8px 14px;color:#08244A;font-size:12px;font-weight:700}
#whoami:before{content:'W';display:grid;place-items:center;width:25px;height:25px;background:#08244A;color:#D5A62A;border-radius:50%;font-size:11px;font-weight:900}
@media(max-width:650px){.topbar{height:64px;padding:0 14px}.topbar-label{font-size:11px}.topbar-label:before{height:20px}#whoami{font-size:10px;padding:6px 10px}}


/* SETTINGS POLISH */
.settings-card{max-width:1100px;padding:24px;}.settings-card .formgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px;}.settings-card .settings-field label{display:block;margin-bottom:7px;font-size:12px;font-weight:700;color:#4f6072;}.settings-card .settings-textarea{min-height:120px;resize:vertical;}@media(max-width:800px){.settings-card .formgrid{grid-template-columns:1fr;}}
