:root {
  --primary-navy: #0a2540;
  --secondary-navy: #133a63;
  --accent-blue: #1a56db;
  --accent-blue-light: #3b82f6;
  --accent-cyan: #0ea5e9;
  --accent-gold: #f59e0b;
  --success-green: #10b981;
  --warning-amber: #f59e0b;
  --danger-red: #ef4444;
  --surface-bg: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --sidebar-width: 270px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--surface-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar-custom {
  background: linear-gradient(135deg, #0a2540 0%, #1e3a8a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(10, 37, 64, 0.15);
}

.brand-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

/* Layout */
.app-container {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 120px);
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0,0,0,0.02);
}

.sidebar-nav .nav-item {
  margin-bottom: 4px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-nav .nav-link:hover {
  color: var(--accent-blue);
  background: #f8fafc;
}

.sidebar-nav .nav-link.active {
  color: var(--accent-blue);
  background: #eff6ff;
  border-left-color: var(--accent-blue);
  font-weight: 600;
}

.sidebar-section-title {
  padding: 12px 20px 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: #94a3b8;
}

/* Main Content */
.app-main {
  flex: 1;
  padding: 28px 36px;
  overflow-y: auto;
  max-width: 1600px;
}

/* Cards & Stats */
.stat-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.stat-card .stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-top: 6px;
  margin-bottom: 2px;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Tender Cards */
.tender-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tender-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

.tender-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  color: #334155;
}

/* Badges */
.badge-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-draft { background-color: #f1f5f9; color: #475569; }
.badge-published { background-color: #dbeafe; color: #1d4ed8; }
.badge-under_evaluation { background-color: #fef3c7; color: #b45309; }
.badge-awarded { background-color: #d1fae5; color: #047857; }
.badge-closed { background-color: #f3f4f6; color: #4b5563; }
.badge-cancelled { background-color: #fee2e2; color: #b91c1c; }

.badge-l1 {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Comparative Table */
.comparison-table th {
  background-color: #f8fafc;
  font-weight: 600;
  font-size: 0.85rem;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.comparison-table td {
  vertical-align: middle;
  font-size: 0.9rem;
}

.row-l1 {
  background-color: #f0fdf4 !important;
}

/* Modals */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal-header {
  border-bottom: 1px solid #f1f5f9;
  padding: 20px 24px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid #f1f5f9;
  padding: 16px 24px;
}

.btn-primary {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.btn-primary:hover {
  background-color: #1340b0;
  border-color: #1340b0;
}

/* Toast container */
.toast-container-custom {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1090;
}
