* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', Arial, sans-serif; background: #f0f4f8; }

/* ── LOGIN ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b4a6f 0%, #0d6e9a 100%);
}

.login-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  text-align: center;
}

.login-logo { font-size: 28px; font-weight: 700; color: #0b4a6f; margin-bottom: 6px; }
.login-logo span { color: #6bb23f; }
.login-sub { font-size: 13px; color: #888; margin-bottom: 28px; }
.login-box label { display: block; text-align: left; font-size: 13px; color: #444; font-weight: 500; margin-bottom: 5px; margin-top: 16px; }
.login-box input { width: 100%; padding: 11px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; transition: border 0.2s; }
.login-box input:focus { border-color: #6bb23f; }
.login-btn { width: 100%; margin-top: 24px; padding: 12px; background: #0b4a6f; color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.login-btn:hover { background: #6bb23f; }
.login-error { color: #e63946; font-size: 13px; margin-top: 10px; display: none; }

/* ── ADMIN LAYOUT ── */
.admin-page { display: none; min-height: 100vh; }
.admin-sidebar {
  position: fixed; top: 0; left: 0;
  width: 240px; height: 100vh;
  background: #0b4a6f; color: #fff;
  display: flex; flex-direction: column; z-index: 100;
}

.sidebar-brand { padding: 24px 20px; font-size: 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-brand span { color: #6bb23f; }
.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; cursor: pointer; font-size: 14px; color: rgba(255,255,255,0.75); transition: all 0.2s; border-left: 3px solid transparent; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,0.1); color: #fff; border-left-color: #6bb23f; }
.nav-item i { width: 18px; text-align: center; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.logout-btn { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.7); cursor: pointer; font-size: 14px; }
.logout-btn:hover { color: #e63946; }

/* ── MAIN CONTENT ── */
.admin-main { margin-left: 240px; padding: 24px; }
.admin-topbar { background: #fff; border-radius: 12px; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.topbar-title { font-size: 18px; font-weight: 600; color: #0b4a6f; }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #555; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: #0b4a6f; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }

/* ── PAGES ── */
.admin-page-section { display: none; }
.admin-page-section.active { display: block; }

/* ── STAT CARDS ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.stat-icon.blue   { background: #e6f1fb; color: #0b4a6f; }
.stat-icon.green  { background: #e9f9d9; color: #6bb23f; }
.stat-icon.orange { background: #fff3e0; color: #f57c00; }
.stat-icon.red    { background: #fdecea; color: #e63946; }
.stat-info h3 { font-size: 22px; font-weight: 700; color: #0b4a6f; }
.stat-info p  { font-size: 12px; color: #888; margin-top: 2px; }

/* ── TABLE ── */
.table-box { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 24px; overflow-x: auto; }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.table-header h3 { font-size: 16px; font-weight: 600; color: #0b4a6f; }
.search-input { padding: 8px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; outline: none; width: 220px; }
.search-input:focus { border-color: #6bb23f; }
table { width: 100%; border-collapse: collapse; }
th { background: #f8f9fa; color: #555; font-size: 12px; font-weight: 600; padding: 10px 14px; text-align: left; border-bottom: 1px solid #eee; }
td { padding: 12px 14px; font-size: 13px; color: #444; border-bottom: 1px solid #f0f0f0; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9fffe; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-new      { background: #e9f9d9; color: #3a7d1e; }
.badge-read     { background: #e6f1fb; color: #185fa5; }
.badge-replied  { background: #fff3e0; color: #f57c00; }
.badge-web      { background: #e6f1fb; color: #0b4a6f; }
.badge-digital  { background: #fff3e0; color: #f57c00; }
.badge-staffing { background: #e9f9d9; color: #3a7d1e; }

/* ── ACTION BUTTONS ── */
.action-btn { background: none; border: none; cursor: pointer; font-size: 15px; padding: 4px 6px; border-radius: 6px; transition: background 0.2s; }
.action-btn.view   { color: #0b4a6f; }
.action-btn.delete { color: #e63946; }
.action-btn:hover  { background: #f0f4f8; }

.admin-notice {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  display: none;
  max-width: 460px;
}
.admin-notice.success { background: #e9f9d9; color: #176b0c; border: 1px solid #c7eac5; }
.admin-notice.error   { background: #fdecea; color: #9d2626; border: 1px solid #f1c6c5; }

/* ── FORM ── */
.form-box { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 24px; }
.form-box h3 { font-size: 16px; font-weight: 600; color: #0b4a6f; margin-bottom: 20px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.form-group { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; color: #555; font-weight: 500; }
.form-group input,
.form-group select,
.form-group textarea { padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; font-family: inherit; outline: none; transition: border 0.2s; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #6bb23f; }
.form-group textarea { resize: vertical; }
.save-btn { background: #0b4a6f; color: #fff; border: none; padding: 11px 28px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.save-btn:hover { background: #6bb23f; }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 14px; padding: 28px; width: 90%; max-width: 480px; position: relative; }
.modal h3 { font-size: 16px; font-weight: 600; color: #0b4a6f; margin-bottom: 16px; }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 20px; cursor: pointer; color: #888; }
.modal-row { display: flex; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.modal-row strong { color: #333; min-width: 90px; }
.modal-row span { color: #555; }
.modal-msg { background: #f8f9fa; border-radius: 8px; padding: 12px; font-size: 13px; color: #444; line-height: 1.7; margin-top: 10px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .admin-sidebar { width: 200px; }
  .admin-main    { margin-left: 200px; padding: 16px; }
}

@media (max-width: 580px) {
  .admin-sidebar { display: none; }
  .admin-main    { margin-left: 0; }
}