/* DepEd GenSan — Admin Panel Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --g:    #1B6B35;
  --gm:   #27993F;
  --gold: #C9A020;
  --gdk:  #0E3D1E;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: #f0f4f1;
  color: #1f2937;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* ── TOP BAR ──────────────────────────────────── */
.a-top {
  background: linear-gradient(135deg, var(--gdk) 0%, var(--g) 100%);
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 100;
}
.a-top img { height: 38px; }
.a-top h1 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  flex: 1;
}
.a-top h1 small {
  display: block;
  font-size: 10.5px;
  color: #B8DCC4;
  font-weight: 400;
  letter-spacing: .5px;
}
.a-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.a-nav-links a {
  color: #B8DCC4;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background .18s, color .18s;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}
.a-nav-links a:hover,
.a-nav-links a.active { background: rgba(255,255,255,.15); color: #fff; }
.a-nav-links a.btn-logout {
  background: rgba(206,17,38,.2);
  color: #fca5a5;
  border: 1px solid rgba(206,17,38,.3);
}
.a-nav-links a.btn-logout:hover { background: #ce1126; color: #fff; border-color: #ce1126; }

/* ── MAIN CONTENT ─────────────────────────────── */
.a-main { padding: 28px 24px; max-width: 1100px; margin: 0 auto; }

.a-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.a-page-title h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gdk);
  display: flex;
  align-items: center;
  gap: 10px;
}
.a-page-title h2 .icon {
  width: 38px; height: 38px;
  background: var(--g);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 16px;
}

/* ── BUTTONS ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary { background: var(--g); color: #fff; }
.btn-primary:hover { background: var(--gdk); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #a07c10; }
.btn-edit { background: #2563eb; color: #fff; padding: 6px 12px; font-size: 12px; }
.btn-edit:hover { background: #1d4ed8; }
.btn-del  { background: #dc2626; color: #fff; padding: 6px 12px; font-size: 12px; }
.btn-del:hover { background: #b91c1c; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }

/* ── TABLE ────────────────────────────────────── */
.a-table-wrap {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead tr {
  background: var(--gdk);
  color: #fff;
}
thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid #f0f4f1; transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f0faf4; }
tbody td { padding: 12px 16px; color: #374151; vertical-align: middle; }
.td-title { font-weight: 600; color: var(--gdk); max-width: 320px; }
.td-date { white-space: nowrap; color: var(--g); font-weight: 600; }
.td-remarks { color: #6b7280; font-style: italic; max-width: 250px; }
.td-actions { white-space: nowrap; display: flex; gap: 6px; }
.td-file a {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #2563eb; font-weight: 600;
}
.td-file a:hover { color: var(--g); }
.no-records {
  text-align: center; padding: 48px 20px;
  color: #9ca3af; font-size: 14px;
}
.no-records i { font-size: 40px; display: block; margin-bottom: 12px; color: #d1d5db; }

/* ── FORM ─────────────────────────────────────── */
.a-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  padding: 28px 32px;
  max-width: 680px;
}
.form-row {
  margin-bottom: 20px;
}
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.form-row label span.req { color: #dc2626; }
.form-row input[type="text"],
.form-row input[type="date"],
.form-row textarea,
.form-row input[type="file"] {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2937;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  background: #fff;
}
.form-row input:focus,
.form-row textarea:focus { border-color: var(--g); box-shadow: 0 0 0 3px rgba(27,107,53,.1); }
.form-row textarea { min-height: 110px; resize: vertical; }
.form-row input[type="file"] {
  padding: 7px 10px;
  cursor: pointer;
  background: #f9fafb;
}
.form-hint { font-size: 12px; color: #9ca3af; margin-top: 5px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; align-items: center; }
.current-file {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0faf4; border: 1px solid #86efac;
  border-radius: 5px; padding: 6px 12px;
  font-size: 12.5px; color: var(--g); font-weight: 600;
  margin-top: 8px;
}
.current-file a { color: #2563eb; }
.current-file a:hover { text-decoration: underline; }

/* ── BADGE ────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.badge-count {
  background: var(--gold);
  color: #fff;
}

/* ── LINK / FILE BADGES (NOA dashboard) ──────── */
.link-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 4px;
  background: #fffbeb; border: 1px solid #fde68a;
  color: #b45309; font-size: 12px; font-weight: 700;
  transition: all .2s; white-space: nowrap;
}
.link-badge:hover { background: #b45309; color: #fff; border-color: #b45309; }
.file-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 4px;
  background: #f0faf4; border: 1px solid #86efac;
  color: var(--g); font-size: 12px; font-weight: 700;
  transition: all .2s; white-space: nowrap;
}
.file-badge:hover { background: var(--g); color: #fff; border-color: var(--g); }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 640px) {
  .a-main { padding: 16px 14px; }
  .a-card { padding: 20px 18px; }
  .a-top h1 small { display: none; }
  thead { display: none; }
  tbody tr {
    display: block; border: 1px solid #e5e7eb;
    border-radius: 8px; margin-bottom: 12px; padding: 12px;
  }
  tbody td { display: block; padding: 4px 0; border: none; }
  tbody td::before {
    content: attr(data-label) ': ';
    font-weight: 700; color: var(--g);
    font-size: 11px; text-transform: uppercase;
  }
  .td-actions { flex-wrap: wrap; }
}
