/* 
==============================================================================
 BLACK ELM COFFEE - COMPONENT LIBRARY
 All reusable UI components consolidated from multiple files
==============================================================================
*/

/* 
 * ===== BUTTONS =====
 * Modern button system with clean black/white design
 */

/* Base button styles */
.btn,
button {
  background: var(--button-bg);
  color: var(--button-text);
  border: 2px solid var(--button-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-3) var(--spacing-6);
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  text-decoration: none;
  position: relative;
  min-height: 44px; /* Accessibility: minimum touch target */
}

.btn:hover,
button:hover {
  background: var(--button-hover-bg);
  border-color: var(--button-hover-border);
  color: var(--button-hover-text);
  transform: translateY(-1px);
}

.btn:active,
button:active {
  transform: translateY(0);
}

.btn:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.btn:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Button variants */
.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

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

.btn-secondary {
  background: var(--surface-1);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

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

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

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

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

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

.btn-outline:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* Button sizes */
.btn-sm {
  padding: var(--spacing-2) var(--spacing-4);
  font-size: var(--text-xs);
  min-height: 32px;
}

.btn-lg {
  padding: var(--spacing-4) var(--spacing-8);
  font-size: var(--text-base);
  min-height: 52px;
}

.btn-icon {
  padding: var(--spacing-2);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

.btn-icon.btn-lg {
  width: 52px;
  height: 52px;
}

/* 
 * ===== FORM ELEMENTS =====
 */

/* Form groups */
.form-group {
  margin-bottom: var(--spacing-4);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-2);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.form-label.required::after {
  content: " *";
  color: var(--danger);
}

/* Input fields */
.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  background: var(--surface-1);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-3);
  font-family: inherit;
  font-size: var(--text-base);
  transition: all var(--transition-base);
}

.form-input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: var(--surface-2);
}

.form-input:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--surface-2);
}

/* Textarea specific */
textarea {
  resize: vertical;
  min-height: 100px;
}

/* Select styling */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right var(--spacing-3) center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  padding-right: var(--spacing-10);
}

/* Checkbox and radio buttons */
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  background: var(--surface-1);
  border: 1px solid var(--border-medium);
  margin-right: var(--spacing-2);
  cursor: pointer;
}

input[type="checkbox"] {
  border-radius: var(--radius-base);
}

input[type="radio"] {
  border-radius: var(--radius-full);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin: 1px 0 0 4px;
}

/* 
 * ===== CUSTOM CHECKBOX WRAPPER =====
 * Modern styled checkboxes - use .custom-checkbox wrapper for consistent styling
 */
.custom-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}

.custom-checkbox .checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color, var(--border-medium, #444));
  border-radius: 4px;
  background: var(--bg-primary, var(--surface-1, #1a1a1a));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark {
  background: var(--accent-color, var(--accent-primary, #14b8a6));
  border-color: var(--accent-color, var(--accent-primary, #14b8a6));
}

.custom-checkbox .checkmark::after {
  content: '';
  display: none;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark::after {
  display: block;
}

.custom-checkbox:hover .checkmark {
  border-color: var(--accent-color, var(--accent-primary, #14b8a6));
}

/* Custom checkbox label - use with .custom-checkbox for inline labels */
.custom-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label:hover .checkmark {
  border-color: var(--accent-primary, #14b8a6);
}

/* Form sections and enhanced layouts */
.form-section {
  margin-bottom: var(--spacing-6);
  padding: var(--spacing-4);
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.form-section h3 {
  margin: 0 0 var(--spacing-4) 0;
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: var(--spacing-2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-4);
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-hint {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--spacing-1);
}

/* File upload styling */
input[type="file"] {
  width: 100%;
  padding: var(--spacing-3);
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--transition-base);
}

input[type="file"]:hover {
  border-color: var(--accent-primary);
  background: var(--surface-1);
}

input[type="file"]:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Uploaded documents display */
.uploaded-documents {
  margin-top: var(--spacing-3);
}

.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-3);
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-2);
}

.document-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}

.document-icon {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}

.document-details h4 {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.document-details p {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.document-actions {
  display: flex;
  gap: var(--spacing-2);
}

.document-actions .btn {
  padding: var(--spacing-1) var(--spacing-2);
  font-size: var(--text-xs);
}

input[type="radio"]:checked::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: white;
  margin: 3px;
}

/* 
 * ===== CARDS & PANELS =====
 */
.card,
.panel,
.widget {
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:hover,
.panel:hover,
.widget:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.card-header {
  margin-bottom: var(--spacing-4);
  padding-bottom: var(--spacing-3);
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
}

.card-subtitle {
  margin: var(--spacing-1) 0 0 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.card-body {
  margin-bottom: var(--spacing-4);
}

.card-footer {
  margin-top: var(--spacing-4);
  padding-top: var(--spacing-3);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: var(--spacing-3);
  justify-content: flex-end;
}

/* 
 * ===== MODALS =====
 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop);
  animation: fadeIn var(--transition-base) ease;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-base) ease;
}

.modal-content {
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideInUp var(--transition-base) ease;
}

.modal-content.modal-wide {
  max-width: 800px;
}

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

.modal-title {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--spacing-2);
  border-radius: var(--radius-base);
  font-size: var(--text-lg);
  transition: all var(--transition-base);
}

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

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

.modal-footer {
  display: flex;
  gap: var(--spacing-3);
  justify-content: flex-end;
  padding-top: var(--spacing-3);
  border-top: 1px solid var(--border-light);
}

/* 
 * ===== BADGES & STATUS INDICATORS =====
 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-1) var(--spacing-3);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  gap: var(--spacing-1);
}

.badge-default {
  background: var(--surface-2);
  color: var(--text-secondary);
}

.badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Status badges for job applications */
.badge-new {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.badge-reviewed {
  background: rgba(147, 51, 234, 0.1);
  color: #7c3aed;
}

.badge-interviewed {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-offered,
.badge-hired {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.badge-rejected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* Maintenance type badges */
.badge-daily {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-weekly {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-monthly {
  background: rgba(147, 51, 234, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(147, 51, 234, 0.2);
}

.badge-annual {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-repair {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 
 * ===== STANDARDIZED PAGE HEADER COMPONENT =====
 * Based on Applications Manager styling - clean, consistent across all pages
 */

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

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.5rem 0 1rem 0; /* Reduced top margin for "higher" appearance */
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem 0;
  font-weight: 400;
}

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

/* Combined header with title and actions */
.page-header-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.page-header-with-actions .page-title {
  margin-bottom: 0;
  flex: 1;
}

.page-header-with-actions .page-actions {
  flex-shrink: 0;
}

/* Page Header Icons */
.page-header-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-header-with-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .page-title {
    font-size: 1.75rem;
  }
  
  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 
 * ===== UNIVERSAL PAGE HEADER TRANSFORMATIONS =====
 * Automatically apply new styling to existing page patterns
 * No manual page editing required - works with any existing layout!
 */

/* Transform existing h1 elements in main-content to use new page-title styling */
.main-content > h1:first-child,
.main-content h1:first-of-type,
.main-content > div:first-child h1,
.main-content > div:first-child h2,
.main-content .page-title,
.dashboard-header .page-title,
.table-header h1,
.table-header h2 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin: 0.5rem 0 1rem 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

/* Auto-add icons to common page types using CSS content */
.main-content h1:first-of-type:before,
.table-header h1:before,
.table-header h2:before {
  content: '';
  width: 28px;
  height: 28px;
  background: var(--accent);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  flex-shrink: 0;
}

/* Icon assignments based on page title content */
.main-content h1:first-of-type:before {
  /* Employee/Directory pages */
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

/* Specific page type icons using CSS attribute selectors */
h1[class*="dashboard"]:before,
.main-content h1:first-of-type:before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9,22 9,12 15,12 15,22'/%3E%3C/svg%3E");
}

/* Smart icon detection based on page URL */
body[data-page*="employee"] .main-content h1:first-of-type:before,
body[data-page*="directory"] .main-content h1:first-of-type:before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

body[data-page*="cart"] .main-content h1:first-of-type:before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M9 17H7A5 5 0 0 1 7 7h2'/%3E%3Cpath d='M15 7h2a5 5 0 1 1 0 10h-2'/%3E%3Cline x1='8' y1='12' x2='16' y2='12'/%3E%3C/svg%3E");
}

body[data-page*="inventory"] .main-content h1:first-of-type:before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3C/svg%3E");
}

body[data-page*="applicant"] .main-content h1:first-of-type:before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14,2 14,8 20,8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10,9 9,9 8,9'/%3E%3C/svg%3E");
}

body[data-page*="analytics"] .main-content h1:first-of-type:before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m19 9-5 5-4-4-3 3'/%3E%3C/svg%3E");
}

body[data-page*="roast"] .main-content h1:first-of-type:before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 14 8-8'/%3E%3Cpath d='m8 10 4 4'/%3E%3Cpath d='m12 6 4 4'/%3E%3C/svg%3E");
}

/* Auto-set page data attribute for icon detection */
body {
  /* This will be set by a tiny inline script */
}

/* 
 * ===== OVERRIDE PAGE-SPECIFIC CSS CONFLICTS =====
 * Ensure universal system always takes precedence
 */

/* Force our "higher" content positioning over any page-specific CSS */
.main-content {
  padding: 1rem 2rem 2rem 2rem !important; /* Override any page-specific padding */
  margin-left: 240px !important; /* Ensure proper sidebar spacing */
  margin-top: 60px !important; /* Consistent top margin */
}

/* Force our universal header styling over page-specific styles */
.dashboard-header {
  margin-bottom: 1.5rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

/* Override any conflicting inline styles on common elements */
[style*="display: flex"] h1,
[style*="display: flex"] h2 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  margin: 0.5rem 0 1rem 0 !important;
}

/* Ensure our button enhancements take precedence */
.btn-primary,
.btn-secondary,
.action-btn,
button[class*="btn"] {
  border-radius: 6px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  min-height: 2.5rem !important;
  padding: 0.5rem 1rem !important;
}

/* Override any conflicting grid or flex layouts */
[style*="grid-template-columns"] {
  gap: 1.5rem !important;
  margin-bottom: 2rem !important;
}

[style*="display: flex"][style*="justify-content: space-between"] {
  align-items: center !important;
  margin-bottom: 1.5rem !important;
  gap: 1rem !important;
}

/* 
 * ===== INLINE STYLE OVERRIDES =====
 * Target common inline style patterns that break our uniform look
 */

/* Override common inline font-size patterns */
[style*="font-size: 1.75rem"],
[style*="font-size:1.75rem"] {
  font-size: 2rem !important; /* Force our universal header size */
}

/* Override inline margin patterns in headers */
h1[style*="margin"],
h2[style*="margin"] {
  margin: 0.5rem 0 1rem 0 !important;
}

/* Override inline display patterns for headers */
h1[style*="display"],
h2[style*="display"] {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

/* Override inline padding that affects main layout */
[style*="padding: 2rem"],
[style*="padding:2rem"] {
  padding: 1.5rem !important; /* Consistent with our tighter spacing */
}

/* Override specific style attributes that commonly conflict */
.main-content [style*="margin-bottom: 2rem"] {
  margin-bottom: 1.5rem !important;
}

.main-content [style*="padding-top"],
.main-content [style*="padding: 2rem"] {
  padding-top: 1rem !important;
}

/* Target specific problematic inline styles from employee directory */
[style*="display: flex; align-items: center; gap: 0.5rem"] {
  gap: 0.75rem !important; /* Consistent spacing */
}

[style*="font-size: 0.875rem"] {
  font-size: 0.9rem !important; /* Slightly larger for better readability */
}

/* Override any inline styles that break our card designs */
.card[style],
[class*="card"][style] {
  border-radius: 8px !important;
  padding: 1.5rem !important;
}

/* Ensure buttons maintain our styling regardless of inline styles */
button[style*="background"],
a[style*="background"] {
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}

/* Override problematic grid gaps */
[style*="grid-template-columns"][style*="gap"] {
  gap: 1.5rem !important;
}

/* Force our enhanced form styling over inline styles */
input[style],
select[style],
textarea[style] {
  border-radius: 6px !important;
  padding: 0.75rem !important;
}

/* 
 * ===== UNIVERSAL HEADER RESTRUCTURING =====
 * Automatically move headers outside containers for clean, uncontained look
 */

/* Force table-header inside table-container to look like it's outside */
.table-container > .table-header {
  margin: -1.5rem -1.5rem 1.5rem -1.5rem !important; /* Break out of container */
  padding: 1.5rem !important; /* Add back the padding */
  background: var(--bg) !important; /* Match page background */
  border: none !important; /* Remove any container styling */
  border-radius: 0 !important; /* Remove rounded corners */
  box-shadow: none !important; /* Remove any shadows */
}

/* Ensure all headers look uncontained regardless of structure */
.table-header,
.page-header,
.page-header-with-actions {
  background: var(--bg) !important; /* Match page background */
  border: none !important; /* No borders */
  border-radius: 0 !important; /* No rounded corners */
  box-shadow: none !important; /* No shadows */
  margin-bottom: 1.5rem !important; /* Consistent spacing */
  padding: 0 !important; /* Clean, no padding unless specified */
}

/* Universal header layout structure */
.table-header,
.page-header-with-actions {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
}

/* Ensure header h1/h2 elements are clean */
.table-header h1,
.table-header h2,
.page-header h1,
.page-header h2,
.page-header-with-actions h1,
.page-header-with-actions h2 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin: 0.5rem 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  flex: 1 !important; /* Take available space */
}

/* Universal action buttons styling */
.table-controls-right,
.page-actions {
  display: flex !important;
  gap: 0.5rem !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

/* Force any existing dashboard-header to use our clean style */
.dashboard-header {
  background: var(--bg) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-bottom: 1.5rem !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 1rem !important;
}

/* Auto-fix any existing section-header patterns */
.section-header {
  background: var(--bg) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 1rem !important;
  margin-bottom: 1.5rem !important;
}

/* Universal container spacing fix for clean headers */
.table-container,
.card,
.panel,
[class*="container"] {
  margin-top: 0 !important; /* Headers create their own spacing */
}

/* 
 * ===== RESPONSIVE HEADER BEHAVIOR =====
 */
@media (max-width: 768px) {
  .table-header,
  .page-header-with-actions,
  .dashboard-header,
  .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  
  .table-controls-right,
  .page-actions {
    width: 100% !important;
    justify-content: flex-start !important;
  }
}

/* Transform table-header structures to use new layout */
.table-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  margin-bottom: 1.5rem !important;
  gap: 1rem !important;
}

.table-header h1,
.table-header h2 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin: 0.5rem 0 0 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  flex: 1 !important;
}

/* Style table-controls as page-actions when in table-header */
.table-header .table-controls {
  flex-shrink: 0 !important;
  margin-bottom: 0 !important;
}

.table-header .table-controls-right {
  display: flex !important;
  gap: 0.75rem !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

/* Ensure existing header-action combinations look good */
.main-content > div:first-child {
  /* Style first div that contains headers and actions */
}

.main-content > div:first-child h1,
.main-content > div:first-child h2 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin: 0.5rem 0 1rem 0 !important;
}

/* Universal button styling improvements */
.btn-primary,
.btn-secondary,
.btn-table-action,
a.btn-primary,
a.btn-secondary {
  padding: 0.5rem 1rem !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  text-decoration: none !important;
  border: 2px solid transparent !important;
}

.btn-primary,
a.btn-primary {
  background: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

.btn-secondary,
a.btn-secondary {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.btn-table-action {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.btn-table-action.primary {
  background: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

/* Hover effects */
.btn-primary:hover,
a.btn-primary:hover,
.btn-table-action.primary:hover {
  background: var(--accent-hover, #2563eb) !important;
  transform: translateY(-1px) !important;
}

.btn-secondary:hover,
a.btn-secondary:hover,
.btn-table-action:hover {
  background: var(--surface-2, rgba(255,255,255,0.1)) !important;
  border-color: var(--accent) !important;
  transform: translateY(-1px) !important;
}

/* Make spacing more consistent */
.main-content > * {
  margin-bottom: 1.5rem;
}

.main-content > *:last-child {
  margin-bottom: 0;
}

/* 
 * ===== TABS =====
 */
.tabs {
  display: flex;
  gap: var(--spacing-2);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--spacing-4);
  overflow-x: auto;
}

.tab {
  padding: var(--spacing-3) var(--spacing-4);
  cursor: pointer;
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
  font-size: var(--text-sm);
}

.tab:hover {
  background: var(--surface-2);
  color: var(--text-primary);
  border-radius: var(--radius-base) var(--radius-base) 0 0;
}

.tab.active {
  border-bottom-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: var(--font-semibold);
}

/* 
 * ===== LOADING STATES =====
 */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--accent-primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

.loading-spinner.sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.loading-spinner.lg {
  width: 60px;
  height: 60px;
  border-width: 4px;
}

/* Skeleton loading states */
.skeleton {
  background: linear-gradient(90deg, 
    var(--surface-2) 25%, 
    var(--surface-3) 50%, 
    var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-base);
}

.skeleton-text {
  height: 1rem;
  margin-bottom: var(--spacing-2);
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.skeleton-button {
  height: 40px;
  width: 120px;
}

/* 
 * ===== DROPDOWNS =====
 */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: var(--z-dropdown);
}

.dropdown.active .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: var(--spacing-3) var(--spacing-4);
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--transition-base);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--surface-2);
}

.dropdown-item:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* 
 * ===== TOOLTIPS =====
 */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-base);
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: var(--z-tooltip);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text-primary);
}

.tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* 
 * ===== PROGRESS BARS =====
 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: inherit;
  transition: width var(--transition-slow);
}

.progress-bar.success .progress-fill {
  background: var(--success);
}

.progress-bar.warning .progress-fill {
  background: var(--warning);
}

.progress-bar.danger .progress-fill {
  background: var(--danger);
}

/* 
 * ===== TOAST NOTIFICATIONS =====
 */
.toast {
  position: fixed;
  bottom: var(--spacing-6);
  right: var(--spacing-6);
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-4);
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  z-index: var(--z-toast);
  animation: slideInUp var(--transition-base) ease;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-info {
  border-left: 4px solid var(--info);
}

/* 
 * ===== SWITCH/TOGGLE =====
 */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-medium);
  transition: var(--transition-base);
  border-radius: var(--radius-full);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background: var(--bg-primary);
  transition: var(--transition-base);
  border-radius: var(--radius-full);
}

input:checked + .slider {
  background: var(--accent-primary);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* 
 * ===== ANIMATIONS =====
 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 
 * ===== RESPONSIVE BEHAVIOR =====
 */
@media (max-width: 768px) {
  .modal {
    max-width: 95%;
    margin: var(--spacing-4);
  }
  
  .toast {
    left: var(--spacing-4);
    right: var(--spacing-4);
    bottom: var(--spacing-4);
  }
  
  .tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .tabs::-webkit-scrollbar {
    display: none;
  }
}

/* 
 * ===== COMPREHENSIVE BUTTON OUTLINE REMOVAL =====
 * Remove all button outlines and focus rings globally
 */
button,
input,
select,
textarea,
.nav-action-btn,
.user-profile-btn,
.sidebar-toggle-btn,
.quick-action-btn,
.btn {
  outline: none !important;
  -webkit-focus-ring-color: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
.nav-action-btn:focus,
.user-profile-btn:focus,
.sidebar-toggle-btn:focus,
.quick-action-btn:focus,
.btn:focus,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-action-btn:focus-visible,
.user-profile-btn:focus-visible,
.sidebar-toggle-btn:focus-visible,
.quick-action-btn:focus-visible,
.btn:focus-visible,
button:active,
.nav-action-btn:active,
.user-profile-btn:active,
.sidebar-toggle-btn:active,
.quick-action-btn:active,
.btn:active {
  outline: none !important;
  box-shadow: none !important;
}

/* Specific targeting for navigation buttons */
.nav-action-btn,
.user-profile-btn,
.sidebar-toggle-btn,
.theme-toggle-btn {
  outline: none !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Make sure no states have outlines */
.nav-action-btn:hover,
.nav-action-btn:focus,
.nav-action-btn:active,
.user-profile-btn:hover,
.user-profile-btn:focus,
.user-profile-btn:active,
.sidebar-toggle-btn:hover,
.sidebar-toggle-btn:focus,
.sidebar-toggle-btn:active,
.theme-toggle-btn:hover,
.theme-toggle-btn:focus,
.theme-toggle-btn:active {
  outline: none !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  box-shadow: none !important;
}

/* 
 * ===== SUPER AGGRESSIVE GLOBAL OUTLINE REMOVAL =====
 * This should remove ALL outlines from ALL buttons permanently
 */
*, *:before, *:after {
  outline: none !important;
  -webkit-focus-ring-color: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Remove outlines but don't force borders */
button, input, select, textarea, a {
  outline: none !important;
  box-shadow: none !important;
}

/* Remove any default browser styling that could cause outlines */
button:focus, button:active,
input:focus, input:active,
select:focus, select:active,
textarea:focus, textarea:active,
a:focus, a:active {
  outline: 0 !important;
  outline: none !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  box-shadow: none !important;
}

/* NUCLEAR OPTION - Remove ALL outlines from EVERYTHING */
html * {
  outline: none !important;
  outline-width: 0px !important;
  outline-style: none !important;
  outline-color: transparent !important;
  outline-offset: 0px !important;
}

html *:focus,
html *:active,
html *:hover {
  outline: none !important;
  outline-width: 0px !important;
  outline-style: none !important;
  outline-color: transparent !important;
  outline-offset: 0px !important;
  box-shadow: none !important;
}

/* Specifically target button elements with maximum specificity */
html body .top-nav button,
html body .top-nav .nav-action-btn,
html body .top-nav .user-profile-btn,
html body button[id*="toggle"],
html body button[id*="btn"] {
  outline: none !important;
  outline-width: 0px !important;
  outline-style: none !important;
  outline-color: transparent !important;
  outline-offset: 0px !important;
  box-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Location Access Indicator (replaces location selector) */
.location-access-indicator {
  padding: 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.location-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.location-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.location-details {
  flex: 1;
  min-width: 0;
}

.location-label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.2;
}

.remote-access {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 500;
  margin-top: 0.25rem;
}

.full-access {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Location badge in navigation items */
.location-badge {
  font-size: 0.7rem;
  background: var(--surface);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: auto;
  font-weight: 500;
}

/* 
 * ===== UNIVERSAL LAYOUT ENHANCEMENTS =====
 * Auto-improve existing page structures without manual editing
 */

/* Auto-enhance any existing page containers */
.dashboard-container,
.page-container {
  display: flex;
  min-height: 100vh;
}

/* Auto-enhance any existing flex header structures */
.main-content > div[style*="display: flex"],
.main-content > div[style*="justify-content: space-between"] {
  align-items: center !important;
  margin-bottom: 1.5rem !important;
  gap: 1rem !important;
}

/* Auto-enhance existing card structures */
.card {
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--surface-1);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Auto-enhance back buttons */
a[href*="back"],
a[style*="back"],
.btn-secondary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  color: var(--text-secondary) !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--border-medium) !important;
  transition: all 0.2s ease !important;
}

a[href*="back"]:hover,
a[style*="back"]:hover,
.btn-secondary:hover {
  background: var(--surface-3) !important;
  border-color: var(--border-strong) !important;
}

/* Auto-enhance form elements */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  padding: 0.75rem;
  background: var(--surface-1);
  color: var(--text);
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* Auto-enhance any buttons in page headers */
.table-header button,
.main-content > div:first-child button,
.page-actions button {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--border-medium);
}

/* Auto-enhance existing grid layouts */
.main-content > div[style*="grid-template-columns"] {
  gap: 1.5rem !important;
  margin-bottom: 2rem !important;
}

/* Auto-enhance any existing alerts or messages */
.alert,
.message,
.notice {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent);
}

/* Auto-enhance table containers */
.table-container {
  background: var(--surface-1);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  overflow: hidden;
}

/* Make sure all icons are properly sized */
svg {
  flex-shrink: 0;
}

/* Auto-enhance any existing loading states */
.loading,
[class*="loading"] {
  opacity: 0.7;
  pointer-events: none;
}

/* Auto-enhance any existing empty states */
.empty-state,
.no-data,
.no-results {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* Auto-enhance any existing success/error states */
.success,
.error,
.warning {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success);
}

.error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger);
}

.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning);
}

.nav-action-btn:active {
  transform: translateY(0);
}

.nav-action-btn i {
  font-size: 28px;
  line-height: 1;
}

/* Theme toggle button specific styling */
#theme-toggle-btn {
  background: var(--surface-1);
}

#theme-toggle-btn i {
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Force theme icon to be 20px - only for theme toggle button */
#theme-toggle-btn #theme-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

#theme-toggle-btn svg#theme-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

/* Force notification icon to be large - matching theme toggle approach */
#notifications-btn svg#notification-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
}

/* =====================================================================
   STANDARDIZED DASHBOARD WIDGET STYLES
   Applies globally so all widget cards share consistent layout/spacing
   ===================================================================== */
.widget-card {
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.widget-card:hover {
  background: var(--surface-2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Header */
.widget-card .widget-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface-1);
}

/* Title */
.widget-card .widget-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  text-transform: capitalize;
  line-height: 1.2;
}

/* Badges inside header */
.widget-card .widget-header .badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Widget content wrapper */
.widget-card .widget-content {
  padding: 1.25rem;
  flex: 1 1 auto;
}

/* Secondary subtitle text */
.widget-card .widget-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Generic summary stat blocks */
.widget-card .summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.summary-stat .stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-stat .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Action buttons inside widgets */
.widget-card .widget-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.widget-card .widget-actions .btn-primary,
.widget-card .widget-actions .btn-secondary {
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
}

/* 
 * ===== INLINE LOCATION MANAGER =====
 * Compact location selector in sidebar
 */

.location-manager-inline {
  margin-top: var(--spacing-3);
  padding-top: var(--spacing-3);
  border-top: 1px solid var(--border-subtle);
}

.location-selector-compact {
  display: flex;
  gap: var(--spacing-2);
  align-items: center;
}

.location-select-compact {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--spacing-2);
  font-size: var(--text-xs);
  color: var(--text-primary);
  min-height: 32px;
}

.location-select-compact:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-alpha);
}

.btn-location-update {
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-2);
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: var(--text-xs);
}

.btn-location-update:hover:not(:disabled) {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-location-update:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.btn-location-update i {
  font-size: 12px;
}