/* ============================================
   Bulldog Pipe Portal - Shared Layout Styles
   ============================================ */

/* CSS Variables */
:root {
  /* Colors */
  --color-primary: #1976d2;
  --color-primary-dark: #1565c0;
  --color-primary-light: #e3f2fd;
  --color-brand-dark: #194081;
  --color-brand-red: #c62828;

  --color-bg-page: #d6dce8;
  --color-bg-white: #ffffff;
  --color-bg-content: #f5f5f5;

  --color-border: #e5e7eb;
  --color-border-light: #f0f0f0;

  --color-text-primary: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;

  /* Sizing */
  --sidebar-width: 250px;
  --header-height: 64px;
  --app-width: 90%;
  --app-max-width: 1600px;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Base Styles
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--color-bg-page);
  min-height: 100vh;
  color: var(--color-text-primary);
}

.hidden {
  display: none !important;
}

/* ============================================
   App Container (90% width centered)
   ============================================ */

.app-container {
  width: var(--app-width);
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  background: var(--color-bg-white);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   Login Page - Split Panel Layout
   ============================================ */

.login-container {
  width: var(--app-width);
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  background: var(--color-bg-white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.login-left {
  width: 35%;
  background: var(--color-brand-dark);
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  color: white;
}

.login-left .logo-area {
  margin-bottom: var(--spacing-xl);
}

.login-left .logo-icon {
  width: 50px;
  height: 50px;
  margin-bottom: var(--spacing-md);
}

.login-left .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-left .logo-text {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.login-left .logo-text .portal-name {
  font-size: 18px;
  font-weight: 500;
  margin-top: var(--spacing-xs);
  opacity: 0.9;
}

.login-features {
  margin-top: auto;
  padding-bottom: var(--spacing-xl);
}

.login-features h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: white;
}

.login-features ul {
  list-style: none;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.login-features li::before {
  content: '';
  width: 20px;
  height: 20px;
  background: #4ade80;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-features .check-icon {
  width: 20px;
  height: 20px;
  background: #4ade80;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-features .check-icon svg {
  width: 12px;
  height: 12px;
  fill: white;
}

.login-right {
  width: 65%;
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  background: white;
}

.login-right .signup-link {
  text-align: right;
  margin-bottom: var(--spacing-xl);
  font-size: 14px;
  color: var(--color-text-secondary);
}

.login-right .signup-link a {
  color: var(--color-text-primary);
  font-weight: 600;
  text-decoration: none;
}

.login-right .signup-link a:hover {
  text-decoration: underline;
}

.login-form-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.login-form-wrapper h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xl);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-group input::placeholder {
  color: var(--color-text-muted);
}

.btn-login {
  width: 100%;
  padding: 14px 24px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: var(--spacing-md);
}

.btn-login:hover {
  background: var(--color-primary-dark);
}

.btn-login:disabled {
  background: var(--color-text-muted);
  cursor: not-allowed;
}

.forgot-password {
  text-align: center;
  margin-top: var(--spacing-md);
}

.forgot-password a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 14px;
}

.forgot-password a:hover {
  text-decoration: underline;
}

/* ============================================
   Portal App Container
   ============================================ */

.portal-app {
  width: 100%;
  min-height: 100vh;
  display: flex;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--color-brand-dark);
  border-right: none;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
}

.sidebar-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.sidebar-logo .logo-icon {
  width: 50px;
  height: 50px;
}

.sidebar-logo .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-logo .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sidebar-logo .brand-title {
  font-size: 14px;
  font-weight: 700;
  color: white;
}

.sidebar-logo .brand-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #ff6b6b;
}

.sidebar-nav {
  flex: 1;
  padding: var(--spacing-md);
  overflow-y: auto;
}

.nav-section {
  margin-bottom: var(--spacing-md);
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-xs);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px var(--spacing-md);
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
  margin-bottom: 2px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: white;
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.sidebar-footer {
  padding: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   Main Wrapper (Header + Content)
   ============================================ */

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--color-bg-page);
}

/* ============================================
   Top Header
   ============================================ */

.top-header {
  height: var(--header-height);
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-lg);
  gap: var(--spacing-lg);
  flex-shrink: 0;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  padding: var(--spacing-sm);
  cursor: pointer;
  color: var(--color-text-secondary);
}

.hamburger-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.search-bar {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
  background: white;
}

.search-bar input::placeholder {
  color: var(--color-text-muted);
}

.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
}

.search-bar .search-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-left: auto;
}

.header-icon-btn {
  position: relative;
  background: none;
  border: none;
  padding: var(--spacing-sm);
  cursor: pointer;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s;
}

.header-icon-btn:hover {
  background: var(--color-bg-page);
  color: var(--color-text-primary);
}

.header-icon-btn.has-notifications {
  color: var(--color-primary);
}

.header-icon-btn.has-alerts {
  color: var(--color-primary);
  position: relative;
}

.header-icon-btn.has-alerts::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--color-brand-red);
  border-radius: 50%;
  border: 2px solid white;
}

.header-icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--color-brand-red);
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  z-index: 10;
}

/* When has-alerts is active, only show the badge with count - hide the ::after dot indicator */
.header-icon-btn.has-alerts::after {
  display: none;
}

.user-profile {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.user-profile-btn:hover {
  background: var(--color-bg-page);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  text-align: left;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.user-role {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.dropdown-arrow {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

.dropdown-arrow svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--spacing-sm);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px var(--spacing-md);
  text-align: left;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--color-text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: var(--color-bg-page);
}

.dropdown-item.logout {
  color: var(--color-brand-red);
  border-top: 1px solid var(--color-border);
}

/* ============================================
   Content Area
   ============================================ */

.content {
  flex: 1;
  padding: var(--spacing-lg);
  background: var(--color-bg-content);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-lg);
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.page-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: var(--spacing-xs);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-light);
}

/* Metric Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.metric-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.metric-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.metric-refresh {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.metric-refresh:hover {
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
}

.metric-refresh svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
}

.metric-trend {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: var(--spacing-xs);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
}

.btn-danger {
  background: var(--color-brand-red);
  color: white;
}

.btn-danger:hover {
  background: #b71c1c;
}

/* Modal Footer Button Styling */
.modal-footer .btn {
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.modal-footer .btn i,
.modal-footer .btn svg {
    width: 16px;
    height: 16px;
}

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

.btn svg,
.btn i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn svg {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ============================================
   Tables
   ============================================ */

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--color-bg-page);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 14px;
  color: var(--color-text-primary);
}

tbody tr:hover {
  background: var(--color-bg-page);
}

/* ============================================
   Status Badges
   ============================================ */

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-pending,
.status-pending-review {
  background: #fff3e0;
  color: #ef6c00;
}

.status-approved {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-ordered {
  background: #e3f2fd;
  color: #1565c0;
}

.status-rejected {
  background: #ffebee;
  color: #c62828;
}

.status-closed {
  background: #f3e5f5;
  color: #7b1fa2;
}

/* ============================================
   Mobile Responsive
   ============================================ */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

@media (max-width: 768px) {
  .app-container,
  .login-container {
    width: 100%;
    border-radius: 0;
  }

  .login-container {
    flex-direction: column;
  }

  .login-left {
    width: 100%;
    padding: var(--spacing-lg);
  }

  .login-features {
    display: none;
  }

  .login-right {
    width: 100%;
    padding: var(--spacing-lg);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .hamburger-btn {
    display: flex;
  }

  .main-wrapper {
    width: 100%;
  }

  .search-bar {
    display: none;
  }

  .user-info {
    display: none;
  }

  .content {
    padding: var(--spacing-md);
  }

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

/* ============================================
   Dashboard Styles
   ============================================ */

.dashboard-welcome {
  padding: 0;
  margin-bottom: var(--spacing-lg);
  text-align: left;
}

.greeting-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.greeting-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* Colored stats for dashboard cards - color applies to strong element */
.stat-active strong {
  color: #16a34a !important;
}

.stat-pending strong {
  color: #dc2626 !important;
}

.stat-approved strong {
  color: #16a34a !important;
}

.stat-ordered strong {
  color: #2563eb !important;
}

/* My Tasks Card - full width above other cards */
.my-tasks-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.my-tasks-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.my-tasks-card .card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.my-tasks-card .card-header .task-count {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.task-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
}

a.task-item:hover {
  text-decoration: none;
}

a.task-item:hover .task-title {
  color: var(--color-primary);
}

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

.task-item .task-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
}

.task-item .task-content {
  flex: 1;
  min-width: 0;
}

.task-item .task-assignee {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.task-item .task-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.task-item .task-title a {
  color: var(--color-text-primary);
  text-decoration: none;
}

.task-item .task-title a:hover {
  color: var(--color-primary);
}

.task-item .task-due {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.task-item .task-due.due-today {
  color: #dc2626;
}

.task-item .task-due.due-tomorrow {
  color: #0891b2;
}

.task-item .task-due.due-later {
  color: var(--color-text-secondary);
}

.tasks-footer {
  margin-top: var(--spacing-md);
  text-align: center;
}

.tasks-footer a {
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: none;
}

.tasks-footer a:hover {
  text-decoration: none;
  color: var(--color-primary-dark);
}

.tasks-empty {
  padding: var(--spacing-lg);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 14px;
}

/* Dashboard Cards Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.dashboard-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.dashboard-card:hover {
  box-shadow: var(--shadow-md);
}

.dashboard-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.dashboard-card p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.dashboard-card .card-stats {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.dashboard-card .card-stats .stat {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.dashboard-card .card-stats .stat strong {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 18px;
  margin-right: 4px;
}

/* ============================================
   Shared Filter Styles
   ============================================ */

.filters {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.filter-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--color-bg-white);
  min-width: 120px;
}

.filter-group select {
  cursor: pointer;
}

.filter-group input {
  min-width: 140px;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* ============================================
   Shared Modal Styles
   ============================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--color-border-light);
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-text-primary);
}

.modal-body {
  margin-bottom: var(--spacing-md);
}

/* ============================================
   Additional Button Styles
   ============================================ */

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn-success {
  background: #16a34a;
  color: white;
}

.btn-success:hover {
  background: #15803d;
}

.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

/* Action buttons in tables */
.action-buttons {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.action-buttons .btn {
  padding: 6px 12px;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .sidebar,
  .top-header,
  .sidebar-overlay,
  .hamburger-btn {
    display: none !important;
  }

  .app-container {
    width: 100%;
    box-shadow: none;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .content {
    padding: 0;
  }
}

/* ============================================
   Search Autocomplete Styles
   ============================================ */

.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 4px;
}

.search-autocomplete.hidden {
  display: none;
}

.search-autocomplete-section {
  padding: 8px 0;
}

.search-autocomplete-section:not(:last-child) {
  border-bottom: 1px solid #eee;
}

.search-autocomplete-header {
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-autocomplete-item:hover,
.search-autocomplete-item.active {
  background: #f0f7ff;
}

.search-autocomplete-item .item-title {
  font-weight: 500;
  color: #333;
  margin-bottom: 2px;
}

.search-autocomplete-item .item-subtitle {
  font-size: 12px;
  color: #666;
}

.search-autocomplete-item .item-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  margin-left: 8px;
}

.search-autocomplete-empty {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 13px;
}
