/* ============================================
   Подряд PRO — Design System
   Dark Professional Theme + Glassmorphism
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-glass: rgba(17, 24, 39, 0.7);
  --bg-glass-hover: rgba(17, 24, 39, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-green: linear-gradient(135deg, #10b981, #059669);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #60a5fa;
}

::selection {
  background: rgba(59, 130, 246, 0.3);
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
}

.nav-link svg, .nav-link i {
  width: 18px;
  height: 18px;
}

/* --- Layout --- */
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  min-width: 0;
  overflow-x: hidden;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Glass Card --- */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.glass:hover {
  border-color: var(--border-hover);
}

/* --- Form Elements --- */
.form-panel {
  padding: 1.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input, select, textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  min-height: 42px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  -webkit-tap-highlight-color: transparent;
}

select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.5rem;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap input {
  width: 100%;
  padding-left: 2.5rem;
  font-size: 1rem;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrap .search-icon svg {
  width: 18px;
  height: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
}

.form-row-2 {
  grid-template-columns: 1fr 1fr;
}

.form-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* --- Autocomplete Dropdown --- */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.1);
  transform-origin: top center;
  animation: dropdownIn 0.15s ease-out;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.autocomplete-dropdown::-webkit-scrollbar {
  width: 5px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.autocomplete-item {
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--text-primary);
}

.autocomplete-item.active {
  background: rgba(59, 130, 246, 0.2);
}

/* --- Advanced Filters --- */
.advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 0.75rem;
}

.advanced-toggle:hover {
  color: var(--accent-blue);
}

.advanced-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.advanced-toggle.open svg {
  transform: rotate(180deg);
}

.advanced-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.advanced-body.open {
  max-height: 300px;
  opacity: 1;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.btn-green {
  background: var(--gradient-green);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.btn-green:hover {
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.btn-danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: #fca5a5;
}

.btn-ghost {
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* --- Favorite Button --- */
.btn-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.btn-fav:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.btn-fav.active {
  color: #ef4444;
}

.btn-fav svg {
  width: 18px;
  height: 18px;
}

.tender-header-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-shrink: 0;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* --- Results Toolbar --- */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.results-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.results-count span {
  color: var(--accent-blue);
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.sort-group select {
  width: auto;
  min-width: 140px;
  padding: 0.35rem 2rem 0.35rem 0.6rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

/* --- Tender Cards --- */
.results-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tender-card {
  padding: 1.25rem 1.5rem;
  transition: var(--transition);
  cursor: default;
}

.tender-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.tender-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.tender-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.tender-badges {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.tender-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
}

.tender-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tender-field svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}

.tender-nmck {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-green);
  font-variant-numeric: tabular-nums;
}

.tender-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.tender-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-blue);
}

.tender-link:hover {
  color: #60a5fa;
}

.tender-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-44fz {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.badge-223fz {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.badge-commercial {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-niche {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.badge-platform {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.badge-method {
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
}

.badge-status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-status-expired {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
}

.badge-status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.badge-status-completed {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

/* --- Deadline Colors --- */
.deadline-danger {
  color: var(--danger) !important;
  font-weight: 600;
}

.deadline-warning {
  color: var(--accent-amber) !important;
  font-weight: 600;
}

/* --- Pagination --- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.pager .page-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

/* --- Status Messages --- */
.status-msg {
  min-height: 1.5rem;
  margin: 1rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.status-msg.error {
  color: var(--danger);
}

.status-msg.ok {
  color: var(--accent-green);
}

/* --- Summary --- */
.summary {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* --- Spinner --- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 140px;
  margin-bottom: 1rem;
}

/* --- KPI Cards (Stats page) --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.kpi-card {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.kpi-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.kpi-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.kpi-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.kpi-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.kpi-icon svg {
  width: 22px;
  height: 22px;
}

.kpi-content {
  display: flex;
  flex-direction: column;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.kpi-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: help;
  vertical-align: middle;
  margin-left: 0.25rem;
}

/* --- Charts Grid --- */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-panel {
  padding: 1.5rem;
  min-width: 0;
  overflow: hidden;
}

.chart-panel h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.chart-panel canvas {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  min-height: 200px;
  max-height: 300px;
}

/* --- Subscription Cards --- */
.sub-card {
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.sub-card:hover {
  border-color: var(--border-hover);
}

.sub-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.sub-head strong {
  font-size: 0.95rem;
}

.sub-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
}

.sub-card dt {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.sub-card dd {
  color: var(--text-secondary);
}

/* --- Panel Sections (Subscribe) --- */
.panel {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.95rem;
}

/* --- Utilities --- */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* --- Responsive: Tablet --- */
@media (max-width: 768px) {
  .navbar {
    padding: 0 0.75rem;
    height: 52px;
  }

  .navbar-brand {
    font-size: 1rem;
    gap: 0.4rem;
  }

  .navbar-brand > span {
    display: none;
  }

  .logo-img {
    width: 28px;
    height: 28px;
  }

  .navbar-links {
    gap: 0.15rem;
  }

  .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    gap: 0.3rem;
  }

  .nav-link svg {
    width: 16px;
    height: 16px;
  }

  .container {
    padding: 1rem 0.75rem 3rem;
  }

  .page-header {
    margin-bottom: 1.25rem;
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .page-header .subtitle {
    font-size: 0.85rem;
  }

  .form-panel {
    padding: 1rem;
    margin-bottom: 1.25rem;
  }

  .form-row,
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .field {
    margin-bottom: 0.75rem;
  }

  input, select, textarea {
    padding: 0.55rem 0.75rem;
    font-size: 16px;
  }

  .btn {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    width: 100%;
  }

  .actions {
    flex-direction: column;
  }

  .tender-card {
    padding: 1rem;
  }

  .tender-card-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tender-badges {
    order: -1;
  }

  .tender-title {
    font-size: 0.95rem;
  }

  .tender-body {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .tender-field {
    font-size: 0.85rem;
  }

  .tender-nmck {
    font-size: 1rem;
  }

  .tender-footer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .kpi-card {
    padding: 1rem;
    gap: 0.75rem;
  }

  .kpi-icon {
    width: 36px;
    height: 36px;
  }

  .kpi-icon svg {
    width: 18px;
    height: 18px;
  }

  .kpi-value {
    font-size: 1.35rem;
  }

  .kpi-label {
    font-size: 0.7rem;
  }

  .chart-panel {
    padding: 1rem;
  }

  .panel {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .panel h2 {
    font-size: 1rem;
  }

  .sub-card {
    padding: 1rem;
  }

  .sub-card dl {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .sub-card dt {
    margin-top: 0.4rem;
  }

  .pager {
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .pager .btn {
    width: auto;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }

  .empty-state {
    padding: 2rem 0.75rem;
  }

  .results-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .sort-group {
    width: 100%;
  }

  .sort-group select {
    flex: 1;
  }
}

/* --- Responsive: Small phone --- */
@media (max-width: 480px) {
  .navbar {
    height: 48px;
    padding: 0 0.5rem;
  }

  .nav-link span {
    display: none;
  }

  .nav-link {
    padding: 0.35rem 0.5rem;
  }

  .container {
    padding: 0.75rem 0.5rem 2.5rem;
  }

  .page-header h1 {
    font-size: 1.2rem;
  }

  .form-panel {
    padding: 0.75rem;
    border-radius: var(--radius-sm);
  }

  .glass {
    border-radius: var(--radius-sm);
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .kpi-card {
    flex-direction: row;
    align-items: center;
    padding: 0.75rem 1rem;
  }

  .kpi-value {
    font-size: 1.15rem;
  }

  .search-input-wrap input {
    font-size: 16px;
  }

  .badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }

  .tender-card {
    padding: 0.75rem;
  }

  .sub-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .sub-head .btn-danger {
    width: 100%;
  }
}
