@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Open Sans", sans-serif; font-size: 14px; color: #202020; background: #f4f6f8; }

/* ─── AUTH ───────────────────────────────────────────────────── */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f0f4f0; }
.auth-wrap { width: 100%; max-width: 420px; padding: 20px; }
.auth-card { background: #fff; border-radius: 12px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo img { max-width: 180px; height: auto; }
.auth-title { font-size: 20px; font-weight: 700; color: #004e3b; text-align: center; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: #666; text-align: center; margin-bottom: 24px; }
.auth-links { text-align: center; margin-top: 20px; font-size: 13px; }
.auth-links a { color: #004e3b; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* ─── FORMS ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: #333; }
.form-input, .form-select { width: 100%; padding: 10px 14px; border: 1px solid #d0d0d0; border-radius: 8px; font-size: 14px; font-family: "Open Sans", sans-serif; color: #202020; outline: none; transition: border-color .2s; }
.form-input:focus, .form-select:focus { border-color: #004e3b; }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: none; border-radius: 8px; font-size: 13px; font-family: "Open Sans", sans-serif; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .2s, opacity .2s; }
.btn--primary { background: #004e3b; color: #fff; }
.btn--primary:hover { background: #017543; }
.btn--secondary { background: #f0f4f0; color: #004e3b; border: 1px solid #004e3b; }
.btn--secondary:hover { background: #e0ece6; }
.btn--danger { background: #e02229; color: #fff; }
.btn--danger:hover { background: #c0171d; }
.btn--sm { padding: 5px 12px; font-size: 12px; }
.btn--full { width: 100%; justify-content: center; }
.btn--export { background: #1d6f42; color: #fff; }
.btn--export:hover { background: #155032; }
.btn--export-csv { background: #2563eb; color: #fff; }
.btn--export-csv:hover { background: #1d4ed8; }

/* ─── ALERTS ─────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert--error { background: #fdf0f0; border: 1px solid #e02229; color: #c0171d; }
.alert--success { background: #e8f5ee; border: 1px solid #017543; color: #004e3b; }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar { width: 240px; background: #004e3b; flex-shrink: 0; display: flex; flex-direction: column; }
.dash-sidebar-logo { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.1); text-align: center; }
.dash-sidebar-logo img { max-width: 140px; height: auto; display: block; margin: 0 auto 8px; }
.dash-sidebar-logo span { font-size: 11px; color: rgba(255,255,255,.5); display: block; }
.dash-nav { padding: 16px 0; flex: 1; }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: rgba(255,255,255,.75); text-decoration: none; font-size: 13px; font-weight: 500; transition: background .15s, color .15s; }
.dash-nav a:hover, .dash-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.dash-nav a svg { flex-shrink: 0; }
.dash-nav-section { padding: 8px 20px 4px; font-size: 10px; font-weight: 700; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: 1px; }
.dash-sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.1); }
.dash-sidebar-user { font-size: 12px; color: rgba(255,255,255,.6); margin-bottom: 8px; }
.dash-sidebar-user strong { display: block; color: #fff; font-size: 13px; }
.dash-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.dash-header { background: #fff; border-bottom: 1px solid #e8e8e8; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; }
.dash-header h1 { font-size: 18px; font-weight: 700; color: #202020; }
.dash-content { padding: 28px; flex: 1; overflow-y: auto; }

/* ─── STATS CARDS ────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-card__label { font-size: 12px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.stat-card__value { font-size: 32px; font-weight: 700; color: #004e3b; }
.stat-card__sub { font-size: 12px; color: #aaa; margin-top: 4px; }

/* ─── TABLE ──────────────────────────────────────────────────── */
.table-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); overflow: hidden; }
.table-toolbar { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-toolbar-title { font-size: 15px; font-weight: 700; flex: 1; }
.table-search { padding: 8px 12px; border: 1px solid #d0d0d0; border-radius: 8px; font-size: 13px; font-family: "Open Sans", sans-serif; outline: none; width: 220px; }
.table-search:focus { border-color: #004e3b; }
.date-filter { display: flex; align-items: center; gap: 8px; }
.date-filter label { font-size: 12px; font-weight: 600; color: #666; }
.date-filter input { padding: 7px 10px; border: 1px solid #d0d0d0; border-radius: 8px; font-size: 13px; font-family: "Open Sans", sans-serif; outline: none; }
.date-filter input:focus { border-color: #004e3b; }
table { width: 100%; border-collapse: collapse; }
thead th { background: #f8f9fa; padding: 11px 16px; text-align: left; font-size: 12px; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid #eee; white-space: nowrap; }
tbody td { padding: 12px 16px; border-bottom: 1px solid #f4f4f4; font-size: 13px; color: #333; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafff9; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge--new { background: #e8f5ee; color: #004e3b; }
.table-empty { text-align: center; padding: 48px; color: #aaa; font-size: 14px; }
.table-pagination { padding: 14px 20px; border-top: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #666; }

/* ─── DETAIL PAGE ────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-card { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.detail-card h3 { font-size: 14px; font-weight: 700; color: #004e3b; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; text-transform: uppercase; letter-spacing: .5px; }
.detail-row { display: flex; gap: 12px; margin-bottom: 12px; font-size: 13px; }
.detail-row:last-child { margin-bottom: 0; }
.detail-key { font-weight: 600; color: #666; min-width: 140px; flex-shrink: 0; }
.detail-val { color: #202020; word-break: break-word; min-width: 0; }
.detail-val a { color: #004e3b; text-decoration: none; }
.detail-val a:hover { text-decoration: underline; }
.detail-full { grid-column: 1 / -1; }
.emp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
@media (max-width: 700px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-key { min-width: 110px; }
  .emp-grid { grid-template-columns: 1fr; }
  .detail-card { padding: 16px; }
}

/* ─── MOBILE TOGGLE ──────────────────────────────────────────── */
.dash-mobile-toggle { display: none; position: fixed; top: 12px; right: 16px; left: auto; z-index: 50; background: #004e3b; border: none; border-radius: 8px; padding: 8px; cursor: pointer; color: #fff; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .dash-mobile-toggle { display: flex; align-items: center; justify-content: center; }
  .dash-sidebar { display: flex; position: fixed; left: -260px; top: 0; height: 100vh; z-index: 100; transition: left .25s; box-shadow: 4px 0 20px rgba(0,0,0,.2); }
  .dash-sidebar--open { left: 0; }
  .dash-main { width: 100%; }
  .dash-header { padding: 20px 65px 20px 16px; flex-wrap: wrap; row-gap: 5px; }
  .dash-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .table-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .table-search { width: 100%; }
  .date-filter { flex-wrap: wrap; gap: 6px; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .detail-grid { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .dash-header h1 { font-size: 15px; }
}
.dt-processing { padding: 10px; color: #004e3b; font-size: 13px; }
