/* ============================================
   HO Portal - Modern Styling
   DEphoto Brand Colors
   ============================================ */

/* CSS Variables */
:root {
    /* Brand Colors */
    --ho-primary: #F7931E;
    --ho-primary-dark: #E0840A;
    --ho-primary-light: #FFB84D;
    --ho-secondary: #17B7BD;
    --ho-secondary-dark: #12959A;
    --ho-secondary-light: #4DD4DA;
    --ho-accent: #5B9BD5;
    --ho-accent-dark: #3D7BB3;
    --ho-accent-light: #7DB3E0;
    
    /* System Colors */
    --ho-success: #28a745;
    --ho-warning: #ffc107;
    --ho-danger: #dc3545;
    --ho-info: #17a2b8;
    
    /* Grays */
    --ho-gray-50: #f8f9fa;
    --ho-gray-100: #f1f3f5;
    --ho-gray-200: #e9ecef;
    --ho-gray-300: #dee2e6;
    --ho-gray-400: #ced4da;
    --ho-gray-500: #adb5bd;
    --ho-gray-600: #868e96;
    --ho-gray-700: #495057;
    --ho-gray-800: #343a40;
    --ho-gray-900: #212529;
    
    /* Spacing */
    --ho-spacing-xs: 0.25rem;
    --ho-spacing-sm: 0.5rem;
    --ho-spacing-md: 1rem;
    --ho-spacing-lg: 1.5rem;
    --ho-spacing-xl: 2rem;
    --ho-spacing-2xl: 3rem;
    
    /* Typography */
    --ho-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --ho-font-size-xs: 0.75rem;
    --ho-font-size-sm: 0.875rem;
    --ho-font-size-base: 1rem;
    --ho-font-size-lg: 1.125rem;
    --ho-font-size-xl: 1.25rem;
    --ho-font-size-2xl: 1.5rem;
    --ho-font-size-3xl: 1.875rem;
    
    /* Shadows */
    --ho-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ho-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --ho-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ho-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Border Radius */
    --ho-radius-sm: 4px;
    --ho-radius: 8px;
    --ho-radius-lg: 12px;
    
    /* Sidebar */
    --ho-sidebar-width-expanded: 240px;
    --ho-sidebar-width-collapsed: 70px;
    --ho-sidebar-bg: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    --ho-sidebar-text: #495057;
    --ho-sidebar-text-active: #212529;
    --ho-sidebar-hover-bg: rgba(247, 147, 30, 0.08);
    --ho-sidebar-active-bg: rgba(23, 183, 189, 0.12);
    --ho-sidebar-border: #e9ecef;
    
    /* Top Bar */
    --ho-topbar-height: 64px;
    --ho-topbar-bg: #ffffff;
}

/* ============================================
   Base & Typography
   ============================================ */

html, body {
    font-family: var(--ho-font-family);
    font-size: var(--ho-font-size-base);
    line-height: 1.6;
    color: var(--ho-gray-800);
    background-color: var(--ho-gray-50);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: var(--ho-spacing-md);
    color: var(--ho-gray-900);
    text-stroke: none !important;
    -webkit-text-stroke: none !important;
    -webkit-text-stroke-width: 0 !important;
    text-stroke-width: 0 !important;
    outline: none !important;
    border: none !important;
    text-shadow: none !important;
    -webkit-text-fill-color: var(--ho-gray-900) !important;
}

h1 { font-size: var(--ho-font-size-3xl); }
h2 { font-size: var(--ho-font-size-2xl); }
h3 { font-size: var(--ho-font-size-xl); }
h4 { font-size: var(--ho-font-size-lg); }
h5 { font-size: var(--ho-font-size-base); }
h6 { font-size: var(--ho-font-size-sm); }

p {
    margin-top: 0;
    margin-bottom: var(--ho-spacing-md);
}

/* ============================================
   Layout
   ============================================ */

.page {
    display: flex;
    min-height: 100vh;
    background-color: var(--ho-gray-50);
}

.sidebar {
    position: fixed;
    height: 100vh;
    overflow: hidden;
    z-index: 1000;
    font-family: var(--ho-font-family);
    padding: 0 !important;
    margin: 0 !important;
}

main {
    flex: 1;
    margin-left: var(--ho-sidebar-width-expanded);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed state for main content */
.page:has(.sidebar-container.collapsed) main {
    margin-left: var(--ho-sidebar-width-collapsed);
}

.top-row {
    background-color: var(--ho-topbar-bg);
    border-bottom: 1px solid var(--ho-gray-200);
    height: var(--ho-topbar-height);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 var(--ho-spacing-lg);
    box-shadow: var(--ho-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-row.auth {
    justify-content: flex-end;
    gap: var(--ho-spacing-md);
}

.top-row ::deep span {
    color: var(--ho-gray-600);
    font-size: 0.9rem;
}

.top-row ::deep a, .top-row ::deep .btn-link {
    white-space: nowrap;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Login button style */
.top-row ::deep a[href="/login"],
.top-row ::deep a[href="login"] {
    background: linear-gradient(135deg, var(--ho-secondary) 0%, var(--ho-secondary-dark) 100%);
    color: white !important;
    box-shadow: 0 2px 6px rgba(23, 183, 189, 0.3);
}

.top-row ::deep a[href="/login"]:hover,
.top-row ::deep a[href="login"]:hover {
    background: linear-gradient(135deg, var(--ho-secondary-dark) 0%, var(--ho-secondary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(23, 183, 189, 0.4);
}

/* Logout button style */
.top-row ::deep a[href="/logout"],
.top-row ::deep a[href="logout"] {
    background: var(--ho-gray-100);
    color: var(--ho-gray-700) !important;
    border: 1px solid var(--ho-gray-300);
}

.top-row ::deep a[href="/logout"]:hover,
.top-row ::deep a[href="logout"]:hover {
    background: var(--ho-gray-200);
    color: var(--ho-gray-900) !important;
    transform: translateY(-1px);
}

.top-row ::deep a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.content {
    flex: 1;
    padding: var(--ho-spacing-xl);
    background-color: var(--ho-gray-50);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
    }
    
    .top-row {
        justify-content: space-between;
    }
    
    .top-row ::deep a, .top-row ::deep .btn-link {
        margin-left: var(--ho-spacing-sm);
    }
}

/* ============================================
   Modern Collapsible Sidebar
   ============================================ */

/* Sidebar Container */
.sidebar-container {
    width: var(--ho-sidebar-width-expanded);
    height: 100vh;
    background: var(--ho-sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
    border-right: 1px solid var(--ho-sidebar-border);
    overflow: hidden;
}

.sidebar-container.collapsed {
    width: var(--ho-sidebar-width-collapsed);
}

/* Toggle Button */
.sidebar-toggle {
    position: absolute;
    right: 12px;
    top: 85px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ho-primary) 0%, var(--ho-primary-dark) 100%);
    border: 2px solid #ffffff;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(247, 147, 30, 0.4);
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, var(--ho-primary-dark) 0%, var(--ho-primary) 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(247, 147, 30, 0.5);
}

.sidebar-toggle .bi {
    font-size: 12px;
    line-height: 1;
}

.sidebar-container.collapsed .sidebar-toggle {
    right: 50%;
    transform: translateX(50%);
}

.sidebar-container.collapsed .sidebar-toggle:hover {
    transform: translateX(50%) scale(1.1);
}

/* Brand/Logo Section */
.sidebar-brand {
    padding: 16px 12px;
    border-bottom: 2px solid var(--ho-sidebar-border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    overflow: hidden;
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
}

.sidebar-brand .logo-full {
    max-width: 100%;
    width: 160px;
    height: auto;
    transition: opacity 0.2s ease;
}

.sidebar-brand .logo-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--ho-gray-300);
    border-radius: 2px;
}

.nav-section {
    margin-bottom: 4px;
}

/* Nav Link Items */
.nav-link-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--ho-sidebar-text);
    text-decoration: none !important;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    gap: 12px;
}

.nav-link-item:hover {
    background: var(--ho-sidebar-hover-bg);
    color: var(--ho-primary);
    text-decoration: none !important;
    transform: translateX(2px);
}

.nav-link-item.active {
    background: var(--ho-sidebar-active-bg);
    color: var(--ho-secondary-dark);
    font-weight: 600;
}

.nav-link-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: linear-gradient(180deg, var(--ho-secondary) 0%, var(--ho-secondary-dark) 100%);
    border-radius: 0 4px 4px 0;
}

/* Nav Icons */
.nav-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--ho-gray-100);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-link-item:hover .nav-icon {
    background: rgba(247, 147, 30, 0.15);
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(247, 147, 30, 0.2);
}

.nav-link-item.active .nav-icon {
    background: rgba(23, 183, 189, 0.2);
    box-shadow: 0 2px 6px rgba(23, 183, 189, 0.25);
}

.nav-icon .bi {
    font-size: 1.15rem;
    transition: all 0.2s ease;
}

/* Specific icon colors - DEphoto brand palette */
.nav-link-item .bi-grid-1x2-fill { color: var(--ho-accent); }
.nav-link-item .bi-building-fill { color: var(--ho-secondary); }
.nav-link-item .bi-box-seam-fill { color: var(--ho-primary); }
.nav-link-item .bi-cart-fill { color: var(--ho-secondary-light); }
.nav-link-item .bi-bug-fill { color: var(--ho-danger); }
.nav-link-item .bi-bar-chart-fill { color: var(--ho-accent-light); }
.nav-link-item .bi-cloud-arrow-down-fill { color: var(--ho-success); }
.nav-link-item .bi-gear-fill { color: var(--ho-gray-500); }

/* Hover icon color enhancement */
.nav-link-item:hover .bi-grid-1x2-fill { color: var(--ho-accent-dark); }
.nav-link-item:hover .bi-building-fill { color: var(--ho-secondary-dark); }
.nav-link-item:hover .bi-box-seam-fill { color: var(--ho-primary-dark); }
.nav-link-item:hover .bi-cart-fill { color: var(--ho-secondary); }
.nav-link-item:hover .bi-bug-fill { color: #c82333; }
.nav-link-item:hover .bi-bar-chart-fill { color: var(--ho-accent); }
.nav-link-item:hover .bi-cloud-arrow-down-fill { color: #218838; }
.nav-link-item:hover .bi-gear-fill { color: var(--ho-primary); }

/* Nav Text */
.nav-text {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease, width 0.2s ease;
    color: var(--ho-gray-700);
    flex: 1;
}

.nav-link-item:hover .nav-text {
    color: var(--ho-primary);
}

.nav-link-item.active .nav-text {
    color: var(--ho-secondary-dark);
    font-weight: 600;
}

/* Collapsed State */
.sidebar-container.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
}

.sidebar-container.collapsed .nav-link-item {
    justify-content: center;
    padding: 10px;
}

.sidebar-container.collapsed .nav-icon {
    margin: 0;
}

.sidebar-container.collapsed .sidebar-brand .logo-full {
    display: none;
}

.sidebar-container.collapsed .sidebar-brand .logo-icon {
    display: block;
}

/* Footer Section */
.sidebar-footer {
    padding: 12px;
    border-top: 2px solid var(--ho-sidebar-border);
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.sidebar-footer .nav-link-item {
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar-container {
        transform: translateX(-100%);
    }
    
    .sidebar-container.show {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        right: -40px;
    }
}

/* ============================================
   Cards
   ============================================ */

.card {
    background-color: #ffffff;
    border-radius: var(--ho-radius);
    box-shadow: var(--ho-shadow);
    border: 1px solid var(--ho-gray-200);
    margin-bottom: var(--ho-spacing-lg);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--ho-shadow-md);
}

.card-header {
    padding: var(--ho-spacing-lg);
    background-color: var(--ho-gray-50);
    border-bottom: 1px solid var(--ho-gray-200);
    font-weight: 600;
    font-size: var(--ho-font-size-lg);
}

.card-body {
    padding: var(--ho-spacing-lg);
}

.card-title {
    font-size: var(--ho-font-size-sm);
    font-weight: 600;
    color: var(--ho-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--ho-spacing-sm);
}

/* Dashboard Stats Grid - 2x2 Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: var(--ho-spacing-xl);
}

.stats-grid-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px;
    position: relative;
    transition: background-color 0.2s ease;
}

.stats-grid-item:hover {
    background-color: var(--ho-gray-50);
}

/* Grid separators */
.stats-grid-item:nth-child(1),
.stats-grid-item:nth-child(2) {
    border-bottom: 1px solid var(--ho-gray-200);
}

.stats-grid-item:nth-child(1),
.stats-grid-item:nth-child(3) {
    border-right: 1px solid var(--ho-gray-200);
}

/* Left accent bar */
.stats-grid-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    border-radius: 0 4px 4px 0;
}

.stats-grid-item.stats-primary::before { background: linear-gradient(180deg, var(--ho-primary) 0%, var(--ho-primary-dark) 100%); }
.stats-grid-item.stats-secondary::before { background: linear-gradient(180deg, var(--ho-secondary) 0%, var(--ho-secondary-dark) 100%); }
.stats-grid-item.stats-accent::before { background: linear-gradient(180deg, var(--ho-accent) 0%, var(--ho-accent-dark) 100%); }
.stats-grid-item.stats-success::before { background: linear-gradient(180deg, var(--ho-success) 0%, #1e7e34 100%); }

/* Stats Icon */
.stats-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-icon .bi {
    font-size: 1.6rem;
}

.stats-primary .stats-icon {
    background: rgba(247, 147, 30, 0.12);
    color: var(--ho-primary);
}

.stats-secondary .stats-icon {
    background: rgba(23, 183, 189, 0.12);
    color: var(--ho-secondary);
}

.stats-accent .stats-icon {
    background: rgba(91, 155, 213, 0.12);
    color: var(--ho-accent);
}

.stats-success .stats-icon {
    background: rgba(40, 167, 69, 0.12);
    color: var(--ho-success);
}

/* Stats Content */
.stats-content {
    flex: 1;
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ho-gray-900);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stats-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ho-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive - stack on small screens */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid-item:nth-child(1),
    .stats-grid-item:nth-child(3) {
        border-right: none;
    }
    
    .stats-grid-item:nth-child(3) {
        border-bottom: 1px solid var(--ho-gray-200);
    }
}

/* Legacy stat cards (keep for compatibility) */
.ho-stat-card {
    background-color: #ffffff;
    border-radius: var(--ho-radius);
    box-shadow: var(--ho-shadow);
    padding: var(--ho-spacing-lg);
    border-top: 4px solid var(--ho-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ho-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ho-shadow-md);
}

.ho-stat-card.ho-stat-primary { border-top-color: var(--ho-primary); }
.ho-stat-card.ho-stat-secondary { border-top-color: var(--ho-secondary); }
.ho-stat-card.ho-stat-accent { border-top-color: var(--ho-accent); }
.ho-stat-card.ho-stat-success { border-top-color: var(--ho-success); }

.ho-stat-card .ho-stat-icon {
    font-size: var(--ho-font-size-2xl);
    color: var(--ho-gray-400);
    margin-bottom: var(--ho-spacing-sm);
}

.ho-stat-card .ho-stat-value {
    font-size: var(--ho-font-size-3xl);
    font-weight: 700;
    color: var(--ho-gray-900);
    margin-bottom: var(--ho-spacing-xs);
}

.ho-stat-card .ho-stat-label {
    font-size: var(--ho-font-size-sm);
    color: var(--ho-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Tables
   ============================================ */

.table {
    width: 100%;
    margin-bottom: 0;
    background-color: #ffffff;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: var(--ho-gray-50);
    color: var(--ho-gray-700);
    font-weight: 600;
    font-size: var(--ho-font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--ho-spacing-md) var(--ho-spacing-lg);
    border-bottom: 2px solid var(--ho-gray-200);
    vertical-align: middle;
}

.table tbody td {
    padding: var(--ho-spacing-md) var(--ho-spacing-lg);
    border-bottom: 1px solid var(--ho-gray-200);
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: var(--ho-gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   Forms
   ============================================ */

.form-label {
    display: block;
    margin-bottom: var(--ho-spacing-sm);
    font-weight: 500;
    color: var(--ho-gray-700);
    font-size: var(--ho-font-size-sm);
}

.form-control, .form-select {
    display: block;
    width: 100%;
    padding: var(--ho-spacing-sm) var(--ho-spacing-md);
    font-size: var(--ho-font-size-base);
    font-weight: 400;
    line-height: 1.5;
    color: var(--ho-gray-900);
    background-color: #ffffff;
    border: 1px solid var(--ho-gray-300);
    border-radius: var(--ho-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    color: var(--ho-gray-900);
    background-color: #ffffff;
    border-color: var(--ho-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(247, 147, 30, 0.25);
}

.form-control::placeholder {
    color: var(--ho-gray-500);
    opacity: 1;
}

.form-check {
    display: flex;
    align-items: center;
    padding-left: 0;
    margin-bottom: var(--ho-spacing-md);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0;
    margin-right: var(--ho-spacing-sm);
    cursor: pointer;
    border: 2px solid var(--ho-gray-300);
    border-radius: var(--ho-radius-sm);
}

.form-check-input:checked {
    background-color: var(--ho-primary);
    border-color: var(--ho-primary);
}

.form-check-input:focus {
    border-color: var(--ho-primary);
    box-shadow: 0 0 0 0.2rem rgba(247, 147, 30, 0.25);
}

.form-check-label {
    margin-bottom: 0;
    cursor: pointer;
    color: var(--ho-gray-700);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: var(--ho-spacing-sm) var(--ho-spacing-lg);
    font-size: var(--ho-font-size-base);
    line-height: 1.5;
    border-radius: var(--ho-radius-sm);
    transition: all 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background-color: var(--ho-primary);
    border-color: var(--ho-primary);
}

.btn-primary:hover {
    background-color: var(--ho-primary-dark);
    border-color: var(--ho-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--ho-shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--ho-shadow-sm);
}

.btn-secondary {
    color: var(--ho-gray-700);
    background-color: var(--ho-gray-200);
    border-color: var(--ho-gray-300);
}

.btn-secondary:hover {
    background-color: var(--ho-gray-300);
    border-color: var(--ho-gray-400);
    color: var(--ho-gray-900);
}

.btn-success {
    color: #ffffff;
    background-color: var(--ho-success);
    border-color: var(--ho-success);
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    color: #ffffff;
    background-color: var(--ho-danger);
    border-color: var(--ho-danger);
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-info {
    color: #ffffff;
    background-color: var(--ho-info);
    border-color: var(--ho-info);
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-sm {
    padding: var(--ho-spacing-xs) var(--ho-spacing-md);
    font-size: var(--ho-font-size-sm);
}

.btn-lg {
    padding: var(--ho-spacing-md) var(--ho-spacing-xl);
    font-size: var(--ho-font-size-lg);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   Modals
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: var(--ho-spacing-lg);
}

.modal-dialog {
    position: relative;
    width: auto;
    max-width: 500px;
    margin: var(--ho-spacing-lg);
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #ffffff;
    background-clip: padding-box;
    border: 1px solid var(--ho-gray-200);
    border-radius: var(--ho-radius);
    box-shadow: var(--ho-shadow-lg);
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ho-spacing-lg);
    border-bottom: 1px solid var(--ho-gray-200);
    border-top-left-radius: var(--ho-radius);
    border-top-right-radius: var(--ho-radius);
}

.modal-title {
    margin: 0;
    font-size: var(--ho-font-size-xl);
    font-weight: 600;
    color: var(--ho-gray-900);
}

.btn-close {
    padding: var(--ho-spacing-sm);
    margin: calc(var(--ho-spacing-sm) * -1) calc(var(--ho-spacing-sm) * -1) calc(var(--ho-spacing-sm) * -1) auto;
    background: transparent;
    border: 0;
    border-radius: var(--ho-radius-sm);
    opacity: 0.5;
    cursor: pointer;
    font-size: var(--ho-font-size-xl);
    font-weight: 700;
    line-height: 1;
    color: var(--ho-gray-500);
    text-shadow: 0 1px 0 #ffffff;
}

.btn-close:hover {
    opacity: 0.75;
    color: var(--ho-gray-700);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: var(--ho-spacing-lg);
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: var(--ho-spacing-lg);
    border-top: 1px solid var(--ho-gray-200);
    border-bottom-right-radius: var(--ho-radius);
    border-bottom-left-radius: var(--ho-radius);
}

.modal-footer > * {
    margin: var(--ho-spacing-xs) var(--ho-spacing-xs) var(--ho-spacing-xs) 0;
}

/* ============================================
   Badges & Status
   ============================================ */

.badge {
    display: inline-block;
    padding: var(--ho-spacing-xs) var(--ho-spacing-sm);
    font-size: var(--ho-font-size-xs);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--ho-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-success {
    color: #ffffff;
    background-color: var(--ho-success);
}

.bg-warning {
    color: var(--ho-gray-900);
    background-color: var(--ho-warning);
}

.bg-danger {
    color: #ffffff;
    background-color: var(--ho-danger);
}

.bg-info {
    color: #ffffff;
    background-color: var(--ho-info);
}

.bg-secondary {
    color: #ffffff;
    background-color: var(--ho-gray-600);
}

.bg-primary {
    color: #ffffff;
    background-color: var(--ho-primary);
}

/* ============================================
   Utilities
   ============================================ */

.mb-3 { margin-bottom: var(--ho-spacing-md); }
.mb-4 { margin-bottom: var(--ho-spacing-lg); }
.mt-3 { margin-top: var(--ho-spacing-md); }
.mt-4 { margin-top: var(--ho-spacing-lg); }
.mt-5 { margin-top: var(--ho-spacing-xl); }

.w-100 { width: 100%; }

.text-muted {
    color: var(--ho-gray-600);
    font-size: var(--ho-font-size-sm);
}

.text-danger {
    color: var(--ho-danger);
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ho-spacing-2xl);
    color: var(--ho-gray-600);
}

/* ============================================
   Validation
   ============================================ */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--ho-success);
}

.invalid {
    outline: 1px solid var(--ho-danger);
}

.validation-message {
    color: var(--ho-danger);
    font-size: var(--ho-font-size-sm);
    margin-top: var(--ho-spacing-xs);
}

/* ============================================
   Blazor Error UI
   ============================================ */

#blazor-error-ui {
    background: #fff3cd;
    bottom: 0;
    box-shadow: var(--ho-shadow-lg);
    display: none;
    left: 0;
    padding: var(--ho-spacing-md) var(--ho-spacing-xl);
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 3px solid var(--ho-warning);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: var(--ho-spacing-lg);
    top: var(--ho-spacing-md);
    font-size: var(--ho-font-size-xl);
    font-weight: 700;
    color: var(--ho-gray-700);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHZpZXdCb3g9IjAgMCA1NiA0OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjUgNi41TDIwLjUgMTIuNUgyNkwxOS41IDYuNUgxMy41WiIgZmlsbD0iI0YwMCIvPgo8cGF0aCBkPSJNMjAgMTIuNUwyNiAxMi41TDIwLjUgNi41TDIwIDEyLjVaIiBmaWxsPSIjRkZGIi8+CjxwYXRoIGQ9Ik0yMCAxMi41TDI2IDEyLjVMMjAgMTguNUwyMCAxMi41WiIgZmlsbD0iI0YwMCIvPgo8cGF0aCBkPSJNMjAgMTIuNUwxMy41IDE4LjVMMjAgMTguNUwyMCAxMi41WiIgZmlsbD0iI0ZGRiIvPgo8L3N2Zz4K) no-repeat 1rem/1.8rem, var(--ho-danger);
    padding: var(--ho-spacing-md) var(--ho-spacing-md) var(--ho-spacing-md) 3.7rem;
    color: #ffffff;
    border-radius: var(--ho-radius);
    margin: var(--ho-spacing-md);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ============================================
   Filter Bar
   ============================================ */

.ho-filter-bar {
    display: flex;
    gap: var(--ho-spacing-md);
    align-items: center;
    margin-bottom: var(--ho-spacing-lg);
    flex-wrap: wrap;
}

.ho-filter-item {
    display: flex;
    align-items: center;
    gap: var(--ho-spacing-sm);
    padding: var(--ho-spacing-sm) var(--ho-spacing-md);
    background-color: #ffffff;
    border: 1px solid var(--ho-gray-300);
    border-radius: var(--ho-radius);
    box-shadow: var(--ho-shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--ho-font-size-base);
    color: var(--ho-gray-700);
    min-height: 40px;
}

.ho-filter-item:hover {
    border-color: var(--ho-gray-400);
    box-shadow: var(--ho-shadow);
}

.ho-filter-item .bi {
    font-size: 1.1rem;
    color: var(--ho-gray-600);
    flex-shrink: 0;
}

.ho-filter-item .bi-chevron-down {
    font-size: 0.875rem;
    margin-left: auto;
}

.ho-filter-text {
    white-space: nowrap;
    font-weight: 500;
}

.ho-filter-select {
    border: none;
    background: transparent;
    color: var(--ho-gray-700);
    font-size: var(--ho-font-size-base);
    font-weight: 500;
    cursor: pointer;
    outline: none;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 120px;
}

.ho-filter-select:focus {
    outline: none;
}

.ho-branch-filter {
    position: relative;
}

.ho-filter-btn {
    display: flex;
    align-items: center;
    gap: var(--ho-spacing-sm);
    padding: var(--ho-spacing-sm) var(--ho-spacing-lg);
    background-color: var(--ho-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--ho-radius);
    font-size: var(--ho-font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    box-shadow: var(--ho-shadow-sm);
}

.ho-filter-btn:hover {
    background-color: var(--ho-primary-dark);
    box-shadow: var(--ho-shadow);
    transform: translateY(-1px);
}

.ho-filter-btn .bi {
    font-size: 1rem;
}

/* ============================================
   Date Picker Popup
   ============================================ */

.ho-date-picker-wrapper {
    position: relative;
}

.ho-date-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1040;
}

.ho-date-popup {
    position: absolute;
    top: calc(100% + var(--ho-spacing-sm));
    left: 0;
    background-color: #ffffff;
    border-radius: var(--ho-radius-lg);
    box-shadow: var(--ho-shadow-lg);
    z-index: 1050;
    min-width: 600px;
    overflow: hidden;
}

.ho-branch-filter-wrapper {
    position: relative;
}

.ho-branch-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    z-index: 1030;
}

.ho-branch-dropdown {
    position: absolute;
    top: calc(100% + var(--ho-spacing-sm));
    left: 0;
    background-color: #ffffff;
    border-radius: var(--ho-radius);
    box-shadow: var(--ho-shadow-lg);
    z-index: 1040;
    min-width: 250px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--ho-gray-300);
}

.ho-branch-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--ho-spacing-sm);
    padding: var(--ho-spacing-sm) var(--ho-spacing-md);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ho-branch-dropdown-item:hover {
    background-color: var(--ho-gray-50);
}

.ho-branch-dropdown-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--ho-primary);
}

.ho-branch-dropdown-item span {
    flex: 1;
    font-size: var(--ho-font-size-base);
    color: var(--ho-gray-700);
}

.ho-branch-dropdown-item strong {
    font-weight: 600;
    color: var(--ho-gray-900);
}

.ho-branch-dropdown-divider {
    height: 1px;
    background-color: var(--ho-gray-200);
    margin: var(--ho-spacing-xs) 0;
}

.ho-date-popup-content {
    display: flex;
    padding: var(--ho-spacing-lg);
    gap: var(--ho-spacing-lg);
}

.ho-calendar-section {
    flex: 1;
}

.ho-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--ho-spacing-md);
}

.ho-calendar-month {
    font-weight: 600;
    font-size: var(--ho-font-size-lg);
    color: var(--ho-gray-900);
}

.ho-calendar-nav {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--ho-spacing-xs);
    color: var(--ho-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ho-radius-sm);
    transition: all 0.2s ease;
}

.ho-calendar-nav:hover {
    background-color: var(--ho-gray-100);
    color: var(--ho-gray-900);
}

.ho-calendar-nav .bi {
    font-size: 1.25rem;
}

.ho-calendar-grid {
    margin-bottom: var(--ho-spacing-md);
}

.ho-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--ho-spacing-xs);
    margin-bottom: var(--ho-spacing-xs);
}

.ho-calendar-weekday {
    text-align: center;
    font-size: var(--ho-font-size-xs);
    font-weight: 600;
    color: var(--ho-gray-600);
    text-transform: uppercase;
    padding: var(--ho-spacing-xs);
}

.ho-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--ho-spacing-xs);
}

.ho-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--ho-radius-sm);
    font-size: var(--ho-font-size-sm);
    color: var(--ho-gray-700);
    transition: all 0.15s ease;
    position: relative;
}

.ho-calendar-day:hover {
    background-color: var(--ho-gray-100);
}

.ho-calendar-day-other {
    color: var(--ho-gray-400);
}

.ho-calendar-day-today {
    font-weight: 600;
    color: var(--ho-primary);
}

.ho-calendar-day-range {
    background-color: rgba(23, 183, 189, 0.1);
}

.ho-calendar-day-start {
    background-color: var(--ho-secondary);
    color: #ffffff;
    font-weight: 600;
    border-top-left-radius: var(--ho-radius-sm);
    border-bottom-left-radius: var(--ho-radius-sm);
}

.ho-calendar-day-end {
    background-color: var(--ho-secondary);
    color: #ffffff;
    font-weight: 600;
    border-top-right-radius: var(--ho-radius-sm);
    border-bottom-right-radius: var(--ho-radius-sm);
}

.ho-calendar-day-start.ho-calendar-day-end {
    border-radius: var(--ho-radius-sm);
}

.ho-date-inputs {
    display: flex;
    gap: var(--ho-spacing-md);
    margin-top: var(--ho-spacing-md);
    padding-top: var(--ho-spacing-md);
    border-top: 1px solid var(--ho-gray-200);
}

.ho-date-input-group {
    flex: 1;
}

.ho-date-input-group label {
    display: block;
    font-size: var(--ho-font-size-xs);
    font-weight: 500;
    color: var(--ho-gray-600);
    margin-bottom: var(--ho-spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ho-date-input-group input {
    width: 100%;
    padding: var(--ho-spacing-sm);
    border: 1px solid var(--ho-gray-300);
    border-radius: var(--ho-radius-sm);
    font-size: var(--ho-font-size-base);
    color: var(--ho-gray-900);
    background-color: #ffffff;
}

.ho-date-presets {
    display: flex;
    flex-direction: column;
    gap: var(--ho-spacing-xs);
    min-width: 140px;
    padding-left: var(--ho-spacing-md);
    border-left: 1px solid var(--ho-gray-200);
}

.ho-date-preset {
    padding: var(--ho-spacing-sm) var(--ho-spacing-md);
    cursor: pointer;
    border-radius: var(--ho-radius-sm);
    font-size: var(--ho-font-size-sm);
    color: var(--ho-gray-700);
    transition: all 0.15s ease;
    font-weight: 500;
}

.ho-date-preset:hover {
    background-color: var(--ho-gray-100);
}

.ho-date-preset.active {
    background-color: var(--ho-secondary);
    color: #ffffff;
    font-weight: 600;
}

.ho-date-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--ho-spacing-md);
    padding: var(--ho-spacing-md) var(--ho-spacing-lg);
    border-top: 1px solid var(--ho-gray-200);
    background-color: var(--ho-gray-50);
}

.ho-date-btn {
    padding: var(--ho-spacing-sm) var(--ho-spacing-lg);
    border: none;
    border-radius: var(--ho-radius-sm);
    font-size: var(--ho-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ho-date-btn-cancel {
    background-color: transparent;
    color: var(--ho-gray-700);
}

.ho-date-btn-cancel:hover {
    background-color: var(--ho-gray-200);
}

.ho-date-btn-done {
    background-color: var(--ho-success);
    color: #ffffff;
}

.ho-date-btn-done:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: var(--ho-shadow);
}

/* ============================================
   Reseed Database Button
   ============================================ */

.ho-reseed-btn {
    background: linear-gradient(135deg, var(--ho-warning) 0%, #ff9800 100%);
    color: #ffffff;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--ho-radius);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ho-reseed-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    color: #ffffff;
}

.ho-reseed-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
}

.ho-reseed-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ho-reseed-btn .bi {
    font-size: 1rem;
}

.ho-reseed-btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ============================================
   Bug Report Modal
   ============================================ */

.modal-lg {
    max-width: 900px;
}

.modal-body h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ho-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.modal-body p {
    color: var(--ho-gray-800);
    margin-bottom: 0;
}

.modal-body img {
    transition: transform 0.2s ease;
}

.modal-body img:hover {
    transform: scale(1.02);
    cursor: pointer;
}

/* Screenshot container */
.modal-body .border {
    border-color: var(--ho-gray-300) !important;
    background-color: var(--ho-gray-50) !important;
}

/* Fullscreen screenshot modal */
.modal-fullscreen .modal-content {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.modal-fullscreen .modal-body {
    padding: 0;
}

.modal-fullscreen img {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.btn-close-white:hover {
    opacity: 1;
}
