:root{
  --bg:#f3f6fb;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --primary:#2563eb;
  --primary-dark:#1d4ed8;
  --accent:#7c3aed;
  --hero-start:#0f172a;
  --hero-end:#1e3a8a;
  --success:#16a34a;
  --shadow:0 12px 40px rgba(15,23,42,.08);
  --radius:22px;
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  font-family:Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
}

img{
  max-width:100%;
  display:block;
}

a{
  text-decoration:none;
}

.container{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:16px;
}

/* top pills */
.topbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}

.topbar-left,
.topbar-right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  color:var(--text);
  font-size:13px;
  font-weight:700;
}

.admin-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:11px 16px;
  border-radius:14px;
  background:var(--primary);
  color:#fff;
  font-size:14px;
  font-weight:700;
  border:none;
}

.admin-link:hover{
  background:var(--primary-dark);
}

/* hero */
.hero{
  background:linear-gradient(135deg,var(--hero-start),var(--hero-end));
  color:#fff;
  border-radius:28px;
  padding:26px 20px;
  box-shadow:var(--shadow);
  margin-bottom:18px;
}

.hero-top{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.brand{
  display:flex;
  gap:14px;
  align-items:flex-start;
}

.brand-badge{
  width:54px;
  height:54px;
  min-width:54px;
  border-radius:16px;
  background:rgba(255,255,255,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  font-weight:800;
}

.brand-text h1{
  font-size:42px;
  line-height:1.05;
  font-weight:800;
  margin-bottom:10px;
}

.brand-text p{
  color:rgba(255,255,255,.86);
  font-size:16px;
  line-height:1.7;
  max-width:760px;
}

.hero-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}

.hero-stat{
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:14px;
}

.hero-stat strong{
  display:block;
  font-size:18px;
  margin-bottom:6px;
  font-weight:800;
}

.hero-stat span{
  color:rgba(255,255,255,.82);
  font-size:13px;
  line-height:1.5;
}

/* layout */
.app-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:18px;
  align-items:start;
}

.panel{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.panel-inner{
  padding:24px;
}

.panel-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:22px;
}

.panel-title h2{
  font-size:24px;
  font-weight:800;
  margin-bottom:8px;
}

.panel-title p{
  font-size:15px;
  color:var(--muted);
  line-height:1.7;
}

.tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  background:#eff6ff;
  color:var(--primary);
  border:1px solid #dbeafe;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

/* form */
.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.form-group{
  display:flex;
  flex-direction:column;
}

.form-group.full{
  grid-column:1 / -1;
}

label{
  font-size:15px;
  font-weight:800;
  margin-bottom:8px;
  color:var(--text);
}

input[type="file"],
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"]{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:16px;
  padding:14px 15px;
  font-size:15px;
  outline:none;
}

textarea{
  min-height:130px;
  resize:vertical;
}

input[type="file"]:focus,
select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

.upload-box{
  background:var(--surface-2);
  border:1px dashed #cbd5e1;
  border-radius:18px;
  padding:14px;
}

.upload-note,
.helper{
  margin-top:8px;
  font-size:13px;
  color:var(--muted);
  line-height:1.7;
}

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

button,
.btn-primary,
.btn-reset{
  border:none;
  cursor:pointer;
  border-radius:16px;
  padding:14px 18px;
  font-size:15px;
  font-weight:800;
}

button,
.btn-primary{
  background:var(--primary);
  color:#fff;
}

button:hover,
.btn-primary:hover{
  background:var(--primary-dark);
}

.btn-reset{
  background:#eef2f7;
  color:#334155;
}

/* preview */
.preview-card{
  overflow:hidden;
}

.preview-head{
  padding:22px 22px 14px;
  border-bottom:1px solid var(--line);
}

.preview-head h3{
  font-size:22px;
  font-weight:800;
  margin-bottom:8px;
}

.preview-head p{
  color:var(--muted);
  font-size:14px;
  line-height:1.7;
}

.preview-body{
  padding:22px;
}

.empty-state{
  min-height:420px;
  border:1px dashed #cbd5e1;
  border-radius:20px;
  background:var(--surface-2);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:24px;
}

.empty-state-icon{
  width:74px;
  height:74px;
  border-radius:20px;
  background:#e0e7ff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:32px;
  margin-bottom:16px;
}

.empty-state h4{
  font-size:22px;
  font-weight:800;
  margin-bottom:10px;
}

.empty-state p{
  max-width:320px;
  color:var(--muted);
  font-size:14px;
  line-height:1.7;
}

/* info cards */
.info-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-top:22px;
}

.info-card{
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
}

.info-card .icon{
  width:46px;
  height:46px;
  border-radius:14px;
  background:#e0e7ff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  margin-bottom:12px;
}

.info-card h3{
  font-size:17px;
  font-weight:800;
  margin-bottom:8px;
}

.info-card p{
  font-size:14px;
  color:var(--muted);
  line-height:1.7;
}

.site-footer{
  text-align:center;
  color:var(--muted);
  font-size:14px;
  padding:20px 0 8px;
}

/* admin */
.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.auth-card{
  width:100%;
  max-width:500px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.auth-top{
  padding:28px 22px 18px;
  background:linear-gradient(135deg,var(--hero-start),var(--hero-end));
  color:#fff;
}

.auth-top h1{
  font-size:30px;
  font-weight:800;
  margin-bottom:8px;
}

.auth-top p{
  font-size:14px;
  line-height:1.7;
  color:rgba(255,255,255,.84);
}

.auth-body{
  padding:22px;
}

.admin-shell{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:18px;
  min-height:100vh;
}

.sidebar{
  background:#0f172a;
  color:#fff;
  border-radius:24px;
  padding:20px;
}

.sidebar-brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:20px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.sidebar-brand .logo{
  width:44px;
  height:44px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--primary),var(--accent));
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
}

.sidebar-brand h2{
  font-size:21px;
  font-weight:800;
}

.sidebar-brand span{
  display:block;
  font-size:12px;
  color:rgba(255,255,255,.64);
  margin-top:3px;
}

.sidebar-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.sidebar-nav a{
  color:rgba(255,255,255,.86);
  padding:12px 14px;
  border-radius:14px;
  font-size:14px;
  font-weight:700;
}

.sidebar-nav a:hover,
.sidebar-nav a.active{
  background:rgba(255,255,255,.08);
  color:#fff;
}

.admin-header{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  box-shadow:var(--shadow);
  margin-bottom:18px;
}

.admin-header h1{
  font-size:28px;
  font-weight:800;
  margin-bottom:6px;
}

.admin-header p{
  font-size:14px;
  color:var(--muted);
  line-height:1.7;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-bottom:18px;
}

.stat-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow);
}

.stat-card span{
  display:block;
  font-size:13px;
  font-weight:700;
  color:var(--muted);
  margin-bottom:8px;
}

.stat-card strong{
  display:block;
  font-size:28px;
  font-weight:800;
  margin-bottom:8px;
}

.stat-card small{
  display:block;
  color:#475569;
  line-height:1.6;
  font-size:13px;
}

.admin-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
  margin-bottom:18px;
}

.admin-card-head{
  padding:18px 22px;
  border-bottom:1px solid var(--line);
}

.admin-card-head h2{
  font-size:20px;
  font-weight:800;
}

.admin-card-body{
  padding:22px;
}

.table-wrap{
  width:100%;
  overflow:auto;
}

table{
  width:100%;
  min-width:700px;
  border-collapse:collapse;
}

th,td{
  text-align:left;
  padding:14px;
  border-bottom:1px solid #edf2f7;
  font-size:14px;
}

th{
  background:#f8fafc;
  color:#475569;
  font-weight:800;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

.badge-success{
  background:#ecfdf3;
  color:#15803d;
}

.badge-pending{
  background:#fff7ed;
  color:#c2410c;
}

.badge-danger{
  background:#fef2f2;
  color:#b91c1c;
}

.alert{
  padding:14px 16px;
  border-radius:14px;
  margin-bottom:14px;
  font-size:14px;
  font-weight:700;
}

.alert-success{
  background:#ecfdf3;
  color:#166534;
  border:1px solid #bbf7d0;
}

.alert-error{
  background:#fef2f2;
  color:#991b1b;
  border:1px solid #fecaca;
}

/* mobile */
@media (max-width:1024px){
  .app-grid{
    grid-template-columns:1fr;
  }

  .info-grid{
    grid-template-columns:1fr;
  }

  .hero-stats{
    grid-template-columns:1fr;
  }

  .admin-shell{
    grid-template-columns:1fr;
  }

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

@media (max-width:768px){
  .container{
    padding:12px;
  }

  .hero{
    padding:20px 16px;
    border-radius:22px;
  }

  .brand{
    flex-direction:row;
  }

  .brand-text h1{
    font-size:32px;
  }

  .brand-text p{
    font-size:15px;
  }

  .panel-inner,
  .preview-head,
  .preview-body,
  .auth-top,
  .auth-body,
  .admin-header,
  .admin-card-body,
  .admin-card-head{
    padding:18px;
  }

  .panel-title{
    flex-direction:column;
  }

  .form-grid{
    grid-template-columns:1fr;
  }

  .actions{
    flex-direction:column;
  }

  button,
  .btn-primary,
  .btn-reset,
  .admin-link{
    width:100%;
    justify-content:center;
  }

  .topbar{
    flex-direction:column;
    align-items:stretch;
  }

  .topbar-left,
  .topbar-right{
    width:100%;
  }

  .pill{
    width:100%;
  }

  .empty-state{
    min-height:260px;
  }

  .stats-grid{
    grid-template-columns:1fr;
  }
}
/* Header */
.site-shell{
  min-height:100vh;
}

.site-header{
  position:sticky;
  top:0;
  z-index:100;
  backdrop-filter:blur(14px);
  background:rgba(243,246,251,.86);
  border-bottom:1px solid rgba(226,232,240,.9);
}

.site-header-row{
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.site-logo{
  display:flex;
  align-items:center;
  gap:12px;
}

.site-logo-badge{
  width:46px;
  height:46px;
  min-width:46px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#2563eb,#7c3aed);
  color:#fff;
  font-size:22px;
  font-weight:800;
  box-shadow:0 12px 30px rgba(37,99,235,.24);
}

.site-logo-text{
  display:flex;
  flex-direction:column;
}

.site-logo-text strong{
  color:#0f172a;
  font-size:17px;
  line-height:1.1;
  font-weight:800;
}

.site-logo-text small{
  color:#64748b;
  font-size:12px;
  margin-top:3px;
  font-weight:700;
}

.site-nav{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
}

.site-nav a{
  color:#334155;
  font-size:14px;
  font-weight:700;
}

.site-nav a:hover{
  color:#2563eb;
}

.site-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.btn-outline,
.btn-solid{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 16px;
  border-radius:14px;
  font-size:14px;
  font-weight:800;
  transition:.2s ease;
}

.btn-outline{
  background:#fff;
  color:#0f172a;
  border:1px solid #dbe3ee;
}

.btn-outline:hover{
  background:#f8fafc;
}

.btn-solid{
  background:#2563eb;
  color:#fff;
  box-shadow:0 12px 30px rgba(37,99,235,.22);
}

.btn-solid:hover{
  background:#1d4ed8;
}

/* Footer */
.site-footer-pro{
  margin-top:30px;
  background:#0f172a;
  color:#e2e8f0;
  border-top-left-radius:28px;
  border-top-right-radius:28px;
  overflow:hidden;
}

.footer-grid{
  display:grid;
  grid-template-columns:1.4fr .8fr .8fr 1fr;
  gap:24px;
  padding:34px 0 26px;
}

.footer-logo{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}

.footer-logo-badge{
  width:44px;
  height:44px;
  min-width:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#2563eb,#7c3aed);
  color:#fff;
  font-size:20px;
  font-weight:800;
}

.footer-logo-text{
  display:flex;
  flex-direction:column;
}

.footer-logo-text strong{
  color:#fff;
  font-size:17px;
  line-height:1.1;
  font-weight:800;
}

.footer-logo-text small{
  color:#94a3b8;
  font-size:12px;
  margin-top:3px;
  font-weight:700;
}

.footer-brand p,
.footer-meta p{
  color:#cbd5e1;
  font-size:14px;
  line-height:1.8;
}

.footer-links h3,
.footer-meta h3{
  color:#fff;
  font-size:16px;
  font-weight:800;
  margin-bottom:14px;
}

.footer-links{
  display:flex;
  flex-direction:column;
}

.footer-links a{
  color:#cbd5e1;
  font-size:14px;
  line-height:1.9;
  margin-bottom:4px;
}

.footer-links a:hover{
  color:#fff;
}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,.08);
  padding:16px 0 22px;
  text-align:center;
}

.footer-bottom p{
  color:#94a3b8;
  font-size:13px;
  line-height:1.7;
}

/* Responsive header/footer */
@media (max-width:1024px){
  .footer-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:768px){
  .site-header{
    position:relative;
  }

  .site-header-row{
    min-height:auto;
    padding:14px 0;
    flex-direction:column;
    align-items:stretch;
  }

  .site-logo{
    justify-content:flex-start;
  }

  .site-nav{
    justify-content:flex-start;
    gap:14px;
  }

  .site-header-actions{
    width:100%;
    flex-direction:column;
  }

  .btn-outline,
  .btn-solid{
    width:100%;
  }

  .footer-grid{
    grid-template-columns:1fr;
    gap:20px;
    padding:28px 0 20px;
  }

  .site-footer-pro{
    border-top-left-radius:22px;
    border-top-right-radius:22px;
  }
}