/* Custom Overrides for Painting ERP */

:root {
  --primary: #0172ad;
  --primary-hover: #015f91;
  --nav-height: 60px;
}

body {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* Navigation */
nav.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: var(--pico-card-background-color);
  border-bottom: 1px solid var(--pico-muted-border-color);
  z-index: 999;
  padding: 0 1rem;
}

nav.top-nav ul li a {
  font-weight: 600;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .desktop-menu {
    display: none;
  }
  .menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
  }
}

/* Views & Containers */
.view-section {
  display: none; /* Hidden by default */
  animation: fadein 0.2s;
  padding: 1rem 0;
}

.view-section.active {
  display: block;
}

@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dashboard Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
  border-radius: var(--pico-border-radius);
  background: var(--pico-card-background-color);
  box-shadow: var(--pico-card-box-shadow);
  text-align: center;
}

.stat-card h3 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--pico-muted-color);
  text-transform: uppercase;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--pico-primary);
}

/* Tables */
.table-container {
  overflow-x: auto;
}

table th {
  white-space: nowrap;
}

/* Utilities */
.hidden { display: none !important; }
.text-red { color: #e53935; }
.text-green { color: #43a047; }
.flex-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

/* Login Screen Centering */
#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}
#login-card {
  width: 100%;
  max-width: 400px;
}