:root {
  --primary: #1a3a6e;
  --primary-light: #2351a3;
  --accent: #f5a623;
  --green: #059669;
  --red: #dc2626;
  --purple: #7c3aed;
  --bg: #f0f4fb;
  --white: #fff;
  --text: #1e2d45;
  --text-light: #6b7a99;
  --sidebar-w: 230px;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(26,58,110,0.10);
  --transition: 0.25s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ===== LOGIN ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d1b3e 0%, #1a3a6e 50%, #0d2248 100%);
  position: relative;
  overflow: hidden;
}

.login-bg-shapes .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
  background: var(--accent);
}
.shape.s1 { width: 400px; height: 400px; top:-100px; right:-80px; }
.shape.s2 { width: 250px; height: 250px; bottom:-60px; left:-50px; background:#fff; }
.shape.s3 { width: 120px; height: 120px; top:40%; left:10%; }

.login-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 44px 40px;
  width: 380px;
  position: relative;
  z-index: 2;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  margin-bottom: 12px;
}

.login-logo h2 {
  font-size: 18px; font-weight: 700;
  color: #fff;
}

.login-logo p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}

.form-group input::placeholder { color: rgba(255,255,255,0.3); }
.form-group input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}

.pwd-wrap { position: relative; }
.eye-btn {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: rgba(255,255,255,0.4); cursor: pointer;
  font-size: 14px;
  transition: color var(--transition);
}
.eye-btn:hover { color: var(--accent); }

.login-error {
  font-size: 12px; color: #ff6b6b;
  min-height: 18px; margin-bottom: 6px;
  text-align: center;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, var(--accent) 0%, #f7c859 100%);
  color: #1a2a50;
  font-size: 15px; font-weight: 700;
  border: none; border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 4px 18px rgba(245,166,35,0.35);
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,166,35,0.5); }
.login-btn:active { transform: translateY(0); }

.back-link {
  display: block; text-align: center;
  margin-top: 20px;
  font-size: 13px; color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }

/* ===== ADMIN WRAP ===== */
.admin-wrap {
  display: flex;
  min-height: 100vh;
}

/* ADMIN SIDEBAR */
.admin-sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(175deg, #1a3a6e 0%, #0d2248 70%, #091529 100%);
  position: fixed; left:0; top:0;
  height: 100vh;
  display: flex; flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  z-index: 50;
}

.as-header {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.as-logo {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.as-title { font-size: 13px; font-weight: 700; color: #fff; }
.as-sub   { font-size: 11px; color: rgba(255,255,255,0.4); }

.as-nav {
  flex: 1; padding: 14px 10px;
  display: flex; flex-direction: column; gap: 3px;
  overflow-y: auto;
}

.as-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px;
  border-radius: 9px;
  color: rgba(255,255,255,0.65);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  user-select: none;
}

.as-item i { width: 18px; text-align: center; font-size: 14px; }
.as-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.as-item.active {
  background: linear-gradient(90deg, var(--accent), #f7c859);
  color: #1a2a50; font-weight: 700;
  box-shadow: 0 3px 14px rgba(245,166,35,0.3);
}

.as-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.as-user-info {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}

.logout-btn {
  width: 100%;
  padding: 9px;
  background: rgba(220,38,38,0.15);
  color: #ff8080;
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all var(--transition);
}
.logout-btn:hover { background: rgba(220,38,38,0.3); color: #fff; }

/* ADMIN MAIN */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  background: var(--white);
  padding: 0 28px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #e5eaf3;
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 2px 10px rgba(26,58,110,0.05);
}

.topbar-title {
  font-size: 18px; font-weight: 700; color: var(--primary);
}

.view-site-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}
.view-site-btn:hover { background: var(--primary-light, #2351a3); }

/* TAB CONTENT */
.tab-content { display: none; padding: 28px; }
.tab-content.active { display: block; }

/* DASHBOARD */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.dash-card {
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
  transition: transform var(--transition);
  color: #fff;
}
.dash-card:hover { transform: translateY(-4px); }

.dash-card.blue   { background: linear-gradient(135deg,#1a3a6e,#2351a3); }
.dash-card.green  { background: linear-gradient(135deg,#059669,#10b981); }
.dash-card.gold   { background: linear-gradient(135deg,#d97706,#f5a623); }
.dash-card.purple { background: linear-gradient(135deg,#7c3aed,#a78bfa); }

.dash-card i    { font-size: 28px; opacity: 0.85; }
.dc-num  { font-size: 32px; font-weight: 800; }
.dc-label{ font-size: 13px; opacity: 0.85; }

.recent-activity {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.recent-activity h3 {
  font-size: 15px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5eaf3;
}

.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 13px;
}
.activity-item i { color: var(--accent); }
.activity-item .act-time { color: var(--text-light); font-size: 11px; margin-left: auto; }
.no-activity { font-size: 13px; color: var(--text-light); text-align: center; padding: 20px; }

/* TOOLBAR */
.tab-toolbar {
  margin-bottom: 18px;
}

.add-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none; border-radius: 9px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all var(--transition);
  box-shadow: 0 3px 12px rgba(26,58,110,0.2);
}
.add-btn:hover { background: var(--primary-light,#2351a3); transform: translateY(-1px); }

/* DATA TABLE */
.data-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: linear-gradient(90deg, #1a3a6e, #2351a3);
  color: #fff;
}

.data-table th {
  padding: 13px 16px;
  font-size: 12px; font-weight: 700;
  text-align: left; text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid #e5eaf3;
  color: var(--text);
}

.data-table tbody tr:hover { background: #f8fbff; }
.data-table tbody tr:last-child td { border-bottom: none; }

.empty-row td {
  text-align: center; color: var(--text-light);
  padding: 32px; font-size: 13px;
}

/* ACTION BUTTONS */
.action-btns { display: flex; gap: 6px; }

.edit-btn, .del-btn {
  padding: 6px 12px;
  border: none; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 5px;
  transition: all var(--transition);
}

.edit-btn { background: #dbeafe; color: #1d4ed8; }
.edit-btn:hover { background: #1d4ed8; color: #fff; }
.del-btn  { background: #fee2e2; color: var(--red); }
.del-btn:hover { background: var(--red); color: #fff; }

/* STATUS BADGE */
.status-badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 50px; font-size: 11px; font-weight: 700;
}
.status-badge.upcoming { background: #dbeafe; color: #1d4ed8; }
.status-badge.done     { background: #f3f4f6; color: #6b7280; }

/* STATS EDITOR */
.stats-editor {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-edit-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
}

.stat-edit-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a3a6e, #2351a3);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 20px;
}

.stat-edit-body { flex: 1; }
.stat-edit-body label { font-size: 12px; color: var(--text-light); display: block; margin-bottom: 6px; font-weight: 600; }
.stat-edit-body input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid #e5eaf3;
  border-radius: 8px;
  font-size: 15px; font-weight: 700;
  color: var(--primary);
  font-family: inherit; outline: none;
  transition: border-color var(--transition);
}
.stat-edit-body input:focus { border-color: var(--accent); }

.save-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(90deg, var(--accent), #f7c859);
  color: #1a2a50;
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 16px rgba(245,166,35,0.3);
  transition: all var(--transition);
}
.save-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(245,166,35,0.4); }

/* MODAL */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,20,50,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
}
.modal-overlay.show { display: block; }

.modal {
  display: none; position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  background: var(--white);
  border-radius: 16px;
  width: 520px; max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 201;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  opacity: 0;
  transition: all 0.25s ease;
}
.modal.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5eaf3;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--primary); }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--text-light);
  transition: color var(--transition);
}
.modal-close:hover { color: var(--red); }

.modal-body { padding: 24px; }

/* FORM INSIDE MODAL */
.mform-group { margin-bottom: 16px; }
.mform-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text-light); margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.mform-group input,
.mform-group select,
.mform-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #e5eaf3;
  border-radius: 9px;
  font-size: 14px; font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.mform-group input:focus,
.mform-group select:focus,
.mform-group textarea:focus { border-color: var(--accent); }
.mform-group textarea { resize: vertical; min-height: 90px; }

.mform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid #e5eaf3;
}

.modal-save-btn {
  padding: 10px 24px;
  background: var(--primary);
  color: #fff; border: none; border-radius: 9px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 7px;
  transition: all var(--transition);
}
.modal-save-btn:hover { background: var(--primary-light, #2351a3); }

.modal-cancel-btn {
  padding: 10px 20px;
  background: var(--bg);
  color: var(--text-light);
  border: 1.5px solid #e5eaf3;
  border-radius: 9px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.modal-cancel-btn:hover { border-color: #ccc; }

/* CONFIRM */
.confirm-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,20,50,0.5);
  z-index: 300;
}
.confirm-overlay.show { display: block; }

.confirm-box {
  display: none; position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px;
  width: 340px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  z-index: 301;
}
.confirm-box.show { display: block; }
.confirm-box i { font-size: 36px; color: #f59e0b; margin-bottom: 14px; display: block; }
.confirm-box p { font-size: 15px; color: var(--text); margin-bottom: 22px; font-weight: 500; }
.confirm-btns { display: flex; gap: 10px; justify-content: center; }
.confirm-yes {
  padding: 10px 24px;
  background: var(--red); color: #fff;
  border: none; border-radius: 9px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.confirm-yes:hover { background: #b91c1c; }
.confirm-no {
  padding: 10px 20px;
  background: #f3f4f6; color: var(--text-light);
  border: none; border-radius: 9px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}

/* TOAST */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 13px 20px;
  background: #1a3a6e;
  color: #fff;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.35s ease;
  z-index: 999;
  display: flex; align-items: center; gap: 10px;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success { background: #059669; }
.toast.error   { background: var(--red); }
