:root {
  --theme-color: #0f4c81;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --border: #dde4ee;
  --text: #152033;
  --muted: #6c7a91;
  --success: #157347;
  --danger: #bb2d3b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--theme-color); color: #fff; border: 0; border-radius: 10px; padding: .75rem 1rem; cursor: pointer;
}
.btn.secondary { background: #eef3f9; color: var(--text); }
.btn.small { padding: .55rem .8rem; font-size: .875rem; }
.link-btn { color: var(--theme-color); font-weight: 700; margin-right: .5rem; }
.link-btn.danger { color: var(--danger); }
.alert { padding: 1rem; border-radius: 12px; margin-bottom: 1rem; }
.alert.success { background: #e7f7ef; color: #0f5132; }
.alert.error { background: #fdecec; color: #842029; }
.badge { display: inline-block; border-radius: 999px; padding: .3rem .7rem; font-size: .75rem; }
.badge.success { background: #e7f7ef; color: var(--success); }
.badge.muted { background: #edf2f7; color: var(--muted); }
.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(460px, 92vw); background: var(--surface); padding: 2rem; border-radius: 20px; box-shadow: 0 16px 36px rgba(10, 20, 40, .12); }
.stack { display: grid; gap: 1rem; }
.helper-box { margin-top: 1rem; background: #f4f7fb; border-radius: 12px; padding: 1rem; }
label { display: grid; gap: .45rem; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text);
}
.admin-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { background: #132238; color: #fff; padding: 1.2rem; }
.brand-block { display: flex; gap: 1rem; align-items: center; }
.brand-logo { width: 80px; height: 80px; object-fit: cover; background: #fff; border-radius: 12px; padding: .35rem; }
.brand-logo.large { width: 100px; height: 100px; }
.brand-title { font-weight: 700; line-height: 1.25; }
.brand-subtitle { font-size: .9rem; color: #b4c2d5; }
.menu { display: grid; gap: .4rem; margin-top: 1.5rem; }
.menu a { padding: .85rem 1rem; border-radius: 10px; color: #e5eef9; }
.menu a:hover { background: rgba(255,255,255,.08); }
.content { padding: 1.5rem; }
.topbar { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1rem; }
.user-badge { background: #fff; border: 1px solid var(--border); padding: .9rem 1rem; border-radius: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.stat-card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1rem; }
.stat-card strong { display: block; font-size: 2rem; margin-top: .5rem; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-two-col { grid-template-columns: 420px 1fr; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.form-grid { display: grid; gap: 1rem; }
.inline-form { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.actions-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.checkbox { display: flex; align-items: center; gap: .5rem; }
.checkbox input { width: auto; }
.table-responsive { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: .8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.data-table.compact th, .data-table.compact td { padding: .6rem; font-size: .92rem; }
.avatar { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; background: #eef3f9; }
.preview-block { padding: 1rem; border: 1px dashed var(--border); border-radius: 14px; background: #f9fbfe; }
.narrow { max-width: 760px; }
.public-shell { max-width: 1320px; max-height: 100px; margin: 0 auto; padding: 1.25rem; }
.public-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--surface); padding: 1rem 1.2rem; border-radius: 20px; border: 1px solid var(--border); }
.header-actions { display: flex; gap: .75rem; }
.public-content { padding-top: 1rem; }
.hero-panel { background: linear-gradient(135deg, var(--theme-color), #275d8f); color: #fff; border-radius: 20px; padding: 1.4rem; display: grid; gap: 1rem; margin-bottom: 1rem; }
.search-panel { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: .75rem; }
.search-panel input, .search-panel select { border: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: 0 12px 24px rgba(10, 20, 40, .05); }
.profile-photo { width: 100%; height: 240px; object-fit: cover; background: #edf2f7; }
.profile-body { padding: 1rem; }
.profile-body h2 { margin: 0 0 .35rem 0; font-size: 1.2rem; }
.position { color: var(--theme-color); font-weight: 700; margin-top: 0; }
@media (max-width: 1024px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { padding-bottom: .5rem; }
  .stats-grid, .panel-grid, .admin-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .public-header, .topbar { flex-direction: column; align-items: stretch; }
  .search-panel { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .header-actions, .search-panel, .btn, .menu, .link-btn { display: none !important; }
  .public-shell, .content { max-width: none; padding: 0; }
  body { background: #fff; }
  .panel, .profile-card, .public-header, .hero-panel { box-shadow: none; border: 1px solid #ccc; }
}
