/* ============================================================
   สำนักงานบริหารงานทั่วไป — Main Stylesheet
   Bootstrap 5 + Custom Styles
   ============================================================ */

:root {
  --primary:    #0d6efd;
  --primary-dk: #0a58ca;
  --dark:       #0a192f;
  --text:       #212529;
  --muted:      #6c757d;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --radius:     12px;
  --transition: 0.3s ease;
}

/* ── Base ── */
body { font-family: 'Sarabun', 'Segoe UI', sans-serif; color: var(--text); }
a    { color: var(--primary); }
.hero-banner {
  background: linear-gradient(135deg, var(--dark) 0%, #0a3873 60%, #1565c0 100%);
  color: #2e2e2e;
}
.img-fluid { width: 150px;  }
/* ── Navbar ── */
.navbar-brand { letter-spacing: -.3px; font-weight: 700; }
.navbar-nav .nav-link { padding: .45rem .85rem; border-radius: 6px; transition: background var(--transition); }
.navbar-nav .nav-link:hover { background: rgba(255,255,255,.15); }
.navbar-nav .nav-link.active { background: rgba(255,255,255,.22); font-weight: 600; }

/* ── Page header bar ── */
.page-header-bar {
  background: linear-gradient(135deg, var(--dark) 0%, #1a3a6b 100%);
  color: #fff;
}
.page-header-bar .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
.page-header-bar .breadcrumb-item { color: rgba(255,255,255,.75); }
.page-header-bar .breadcrumb-item a { color: rgba(255,255,255,.85); }
.page-header-bar .breadcrumb-item.active { color: #fff; }

/* ── Hero ── */
.hero-section {
  background: linear-gradient(135deg, var(--dark) 0%, #0a3873 60%, #1565c0 100%);
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
@media (max-width:768px) { .hero-section { min-height: 200px; } }

/* ── Stats row ── */
.stat-card {
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.12) !important; }

/* ── Data cards ── */
.doc-card {
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
  border-left: 4px solid transparent;
}
.doc-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1) !important; }
.doc-card.border-primary-left { border-left-color: var(--primary); }
.doc-card.border-success-left { border-left-color: #198754; }

/* ── Tables ── */
.table th { font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .4px; }
.table td { font-size: .9rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f0f4ff; }

/* ── Calendar ── */
.fc-event { border-radius: 4px !important; }
.fc-toolbar-title { font-family: 'Sarabun', sans-serif !important; }

/* ── Badges ── */
.badge { font-weight: 500; letter-spacing: .3px; }

/* ── Footer ── */
footer a:hover { color: #fff !important; }

/* ── Utilities ── */
.btn-xs { padding: .2rem .45rem; font-size: .75rem; }
.text-white-75 { color: rgba(255,255,255,.75); }
.hover-lift:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1) !important; }

/* ── Cards ── */
.card { border-radius: var(--radius) !important; }
.card-header { border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0 !important; }

/* ── Responsive ── */
@media (max-width: 576px) {
  .table-responsive { font-size: .82rem; }
  .hero-section h1 { font-size: 1.4rem; }
}

/* ── Print ── */
@media print {
  .navbar, footer { display: none !important; }
  .col-lg-9 { width: 100% !important; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }
