/* area-restrita/style.css — Premium Light */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a3a5c;
  --primary-mid: #2356891a;
  --primary-light: #e8f0f8;
  --accent: #c8922a;
  --accent-light: #fdf3e3;
  --green: #1e6b4a;
  --green-light: #e6f4ee;
  --red: #a8282a;
  --red-light: #fceaea;
  --text: #0f1d2e;
  --text-2: #3a4f66;
  --text-light: #7a92a8;
  --bg: #f4f6f9;
  --bg-2: #edf0f5;
  --white: #ffffff;
  --border: #dce4ee;
  --border-light: #edf0f5;
  --shadow-sm: 0 1px 4px rgba(15,29,46,0.06);
  --shadow: 0 4px 20px rgba(15,29,46,0.08);
  --shadow-lg: 0 12px 40px rgba(15,29,46,0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --sidebar-w: 272px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font: 'DM Sans', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(26,58,92,0.07) 0%, transparent 70%);
  border-radius: 50%;
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: -150px; left: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(200,146,42,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.login-card {
  background: var(--white);
  border-radius: 24px;
  padding: 52px 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(15,29,46,0.04);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.login-logo strong { font-weight: 700; }
.login-logo em { font-style: normal; color: var(--accent); }

.login-card h2 {
  text-align: center;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 4px;
}

.login-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 0.88rem;
  margin-bottom: 36px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-group label i { margin-right: 6px; opacity: .6; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.08);
}

.input-icon { position: relative; }
.input-icon input { padding-right: 46px; }
.input-icon button {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-light); transition: color .2s;
}
.input-icon button:hover { color: var(--primary); }

.btn-login {
  width: 100%; padding: 14px;
  background: var(--primary); color: white;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600;
  font-family: var(--font);
  cursor: pointer; margin-top: 8px;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: 0.3px;
}
.btn-login:hover {
  background: #0f2540;
  box-shadow: 0 4px 16px rgba(26,58,92,0.25);
  transform: translateY(-1px);
}

.back-link {
  display: block; text-align: center;
  margin-top: 22px; font-size: 0.87rem;
  color: var(--text-light); text-decoration: none;
  transition: color .2s;
}
.back-link:hover { color: var(--primary); }

.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 20px; font-size: 0.88rem;
  display: flex; align-items: center; gap: 8px;
}
.alert-error { background: var(--red-light); color: var(--red); border: 1px solid rgba(168,40,42,0.15); }
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid rgba(30,107,74,0.15); }

/* ===== DASHBOARD LAYOUT ===== */
.admin-layout { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  position: fixed; top: 0; left: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  z-index: 100;
  overflow: hidden;
  transition: transform .3s;
  box-shadow: 4px 0 24px rgba(15,29,46,0.12);
}

.sidebar__logo {
  padding: 30px 28px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: white;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}
.sidebar__logo strong { font-weight: 700; }
.sidebar__logo em { font-style: normal; color: #f0c060; }

.sidebar__menu {
  flex: 1; overflow-y: auto;
  padding: 20px 0;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar__menu::-webkit-scrollbar { width: 4px; }
.sidebar__menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.sidebar__menu::-webkit-scrollbar-track { background: transparent; }

.sidebar__item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 28px;
  color: rgba(255,255,255,0.65);
  cursor: pointer; transition: all .2s;
  border-left: 3px solid transparent;
  text-decoration: none; font-size: 0.9rem;
  font-weight: 400;
}
.sidebar__item:hover {
  color: white;
  background: rgba(255,255,255,0.08);
}
.sidebar__item.active {
  color: white;
  background: rgba(255,255,255,0.12);
  border-left-color: #f0c060;
  font-weight: 600;
}
.sidebar__item i { width: 20px; text-align: center; font-size: 0.95rem; }

.sidebar__section {
  padding: 16px 28px 6px;
  font-size: 0.67rem;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  pointer-events: none;
  user-select: none;
}

.sidebar__footer {
  padding: 20px 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.sidebar__user { display: flex; align-items: center; gap: 12px; }
.sidebar__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,0.2);
}
.sidebar__user-info small { display: block; color: rgba(255,255,255,0.4); font-size: 0.72rem; }
.sidebar__user-name { color: white; font-size: 0.87rem; font-weight: 600; }
.btn-logout {
  background: none; border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer; font-size: 1rem; margin-left: auto;
  transition: color .2s; padding: 4px;
}
.btn-logout:hover { color: #ff8080; }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column;
  min-width: 0;
}

.topbar {
  background: var(--white);
  padding: 16px 36px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 0 var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar__title {
  font-size: 1.05rem; font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.topbar__right { display: flex; align-items: center; gap: 14px; }

.page-content { padding: 36px; flex: 1; }

/* ===== STATS CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px; margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 18px;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: white; flex-shrink: 0;
}

.stat-info h3 {
  font-size: 1.9rem; font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.1; letter-spacing: -0.5px;
}
.stat-info p { font-size: 0.82rem; color: var(--text-light); margin-top: 2px; font-weight: 500; }

/* ===== CARD ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  margin-bottom: 24px;
}

.card__header {
  padding: 20px 26px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}
.card__header h3 {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text);
}
.card__body { padding: 0; }

/* ===== DATA TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  padding: 13px 22px;
  text-align: left; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-light); font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}

.data-table td {
  padding: 15px 22px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-2);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafd; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 20px;
  font-size: 0.73rem; font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-green { background: var(--green-light); color: var(--green); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-orange { background: var(--accent-light); color: var(--accent); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 0.87rem; font-weight: 600;
  font-family: var(--font);
  cursor: pointer; border: none;
  transition: all .2s; letter-spacing: 0.2px;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 6px 13px; font-size: 0.8rem; border-radius: 7px; }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #0f2540; box-shadow: 0 4px 14px rgba(26,58,92,0.22); }

.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #8c1a1c; box-shadow: 0 4px 14px rgba(168,40,42,0.25); }

.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #155236; box-shadow: 0 4px 14px rgba(30,107,74,0.25); }

.btn-warning { background: var(--accent); color: white; }
.btn-warning:hover { background: #a87520; box-shadow: 0 4px 14px rgba(200,146,42,0.25); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-2);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: none;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,29,46,0.45);
  backdrop-filter: blur(4px);
  z-index: 500; display: none;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: 20px;
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.modal__header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.modal__header h3 { font-size: 1.05rem; font-weight: 700; }
.modal__body { padding: 28px; }
.modal__footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: flex-end; gap: 12px;
}

.btn-close {
  background: var(--bg); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  color: var(--text-light); transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.btn-close:hover { background: var(--border); color: var(--text); }

.row { display: flex; gap: 16px; }
.row .form-group { flex: 1; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; gap: 6px;
  align-items: center; justify-content: center; padding: 24px;
}
.page-btn {
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white); cursor: pointer;
  font-size: 0.85rem; font-family: var(--font);
  color: var(--text-2); transition: all .2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
  background: var(--primary); color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(26,58,92,0.2);
}

/* ===== TABS ===== */
.tab-nav {
  display: flex; gap: 2px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 26px;
}
.tab-btn {
  padding: 11px 22px; border: none;
  background: none; font-size: 0.9rem;
  font-family: var(--font); font-weight: 500;
  cursor: pointer; color: var(--text-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: all .2s;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

/* ===== SEARCH BAR ===== */
.search-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search-bar input {
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: var(--font);
  min-width: 240px; transition: all .2s;
  background: var(--white);
}
.search-bar input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.08);
}

/* ===== STATUS SELECT ===== */
select.status-sel {
  padding: 7px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 0.83rem; font-family: var(--font);
  color: var(--text-2); background: var(--white);
  cursor: pointer; transition: border-color .2s;
}
select.status-sel:focus { outline: none; border-color: var(--primary); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-light); }
.empty-state i { font-size: 2.8rem; margin-bottom: 16px; display: block; opacity: .25; }
.empty-state p { font-size: 0.95rem; }

/* ===== TOGGLE ===== */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border); border-radius: 24px;
  cursor: pointer; transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px;
  background: white; border-radius: 50%;
  transition: .3s; box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.toggle input:checked + .toggle-slider { background: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 16px; }
  .topbar { padding: 14px 20px; }
}