/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  background: #f4f6f9;
  color: #1f2937;
}

/* =========================
   LOGIN
========================= */
.login-page {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-card {
  width: 360px;
  background: #fff;
  padding: 28px;
  border-radius: 14px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

.login-logo {
  width: 50px;
  height: 50px;
  background: #0b1f3a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: bold;
  margin-bottom: 12px;
}

/* =========================
   SIDEBAR (NAVY ERP)
========================= */
.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  background: #0b1f3a;
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: #2563eb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar h2 {
  font-size: 15px;
}

.sidebar span {
  font-size: 12px;
  color: #cbd5e1;
}

/* NAV */
.nav-list {
  flex: 1;
}

.nav {
  width: 100%;
  padding: 10px;
  margin-bottom: 6px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.nav:hover {
  background: #1e3a5f;
  color: #fff;
}

.nav.active {
  background: #2563eb;
  color: #fff;
}

.admin-menu p {
  font-size: 11px;
  margin: 10px 0;
  color: #9ca3af;
}

/* LOGOUT */
.logout-btn {
  background: #dc2626;
  border: none;
  padding: 10px;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

/* =========================
   CONTENT
========================= */
.content {
  margin-left: 250px;
  padding: 20px;
}

/* TOPBAR */
.topbar {
  margin-bottom: 15px;
}

.topbar h1 {
  font-size: 20px;
}

.topbar p {
  font-size: 13px;
  color: #6b7280;
}

/* =========================
   PANELS
========================= */
.panel {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
}

.card {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
}

.card span {
  font-size: 12px;
  color: #6b7280;
}

/* =========================
   FORMS
========================= */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 12px;
  margin-bottom: 4px;
}

input, select, textarea {
  padding: 9px;
  border-radius: 7px;
  border: 1px solid #d1d5db;
  font-size: 13px;
}

textarea {
  resize: none;
}

/* GRID */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin-bottom: 12px;
}

/* =========================
   BUTTONS
========================= */
.primary-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.secondary-btn {
  background: #6b7280;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* =========================
   TABLE
========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th {
  text-align: left;
  font-size: 12px;
  color: #6b7280;
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
}

td {
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

/* STATUS */
.status {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
}

.status.APPROVED {
  background: #d1fae5;
  color: #065f46;
}

.status.PENDING {
  background: #fef3c7;
  color: #92400e;
}

.status.REJECTED {
  background: #fee2e2;
  color: #7f1d1d;
}

/* =========================
   BALANCE
========================= */
.balance-summary {
  margin-bottom: 12px;
}

.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
}

.mini-card {
  background: #f1f5f9;
  padding: 12px;
  border-radius: 10px;
}

.mini-card strong {
  font-size: 18px;
}

/* =========================
   LOADER (FIXED)
========================= */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.loader-box {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
}

/* 🔥 FIX */
.hidden {
  display: none !important;
}

.loader.hidden {
  display: none !important;
}

/* =========================
   TOAST
========================= */
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
  font-size: 12px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1000px) {
  .form-grid,
  .cards-grid,
  .mini-card-grid {
    grid-template-columns: 1fr;
  }

  .content {
    margin-left: 0;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }
}