/* =====================
   THEME VARIABLES
===================== */
:root {
  --primary: #2563eb;          /* Professional Blue */
  --primary-hover: #1d4ed8;
  --bg: #f8fafc;               /* Page background */
  --card: #ffffff;             /* Cards */
  --text-main: #0f172a;        /* Main text */
  --text-muted: #64748b;       /* Muted text */
  --border: #e2e8f0;           /* Light border */
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* =====================
   GLOBAL
===================== */
* {
  box-sizing: border-box;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-main);
}

/* =====================
   HEADER
===================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.1rem;
}

/* =====================
   NAVIGATION
===================== */
.nav-tabs button {
  background: none;
  border: none;
  color: var(--text-muted);
  margin-left: 1.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  padding-bottom: 4px;
}

.nav-tabs button:hover {
  color: var(--primary);
}

.nav-tabs .active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

/* =====================
   PAGES
===================== */
.page {
  display: none;
  padding: 2.5rem;
}

.page.active {
  display: block;
}

/* =====================
   CARDS
===================== */
.card {
  background: var(--card);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* =====================
   GRID
===================== */
.entry-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

/* =====================
   FORMS
===================== */
.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.2rem;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input,
select,
textarea {
  padding: 11px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* =====================
   BUTTONS
===================== */
.btn-submit,
.btn-excel {
  background: var(--primary);
  border: none;
  padding: 11px 14px;
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}

.btn-submit:hover,
.btn-excel:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* =====================
   LOGIN MODAL
===================== */
#loginModal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 18px;
  width: 320px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-box input {
  margin-bottom: 1rem;
}

/* =====================
   TABLE
===================== */
.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

/* =====================
   DASHBOARD STATS
===================== */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =====================
   CHARTS
===================== */
.charts-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.chart-box {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* =====================
   UTILITIES
===================== */
.hidden {
  display: none;
}