/* Main CSS for Indicia HR Screening System */
/* SB Admin Inspired Theme */

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

/* Root Variables */
:root {
    /* Primary Colors */
    --primary-color: #4e73df;
    --primary-dark: #2e59d9;
    --primary-light: #6e8efb;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --error-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;

    /* Sidebar Colors */
    --sidebar-bg: #1d3557;
    --sidebar-hover: #2c4f73;
    --sidebar-active: #457b9d;
    --sidebar-text: rgba(255, 255, 255, 0.8);
    --sidebar-active-text: #ffffff;

    /* Topbar Colors */
    --topbar-bg: #ffffff;
    --topbar-border: #e3e6f0;

    /* Background Colors */
    --body-bg: #f8f9fc;
    --card-bg: #ffffff;
    --border-color: #e3e6f0;

    /* Text Colors */
    --text-primary: #5a5c69;
    --text-secondary: #858796;
    --text-heading: #2c3e50;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-info: linear-gradient(135deg, #36b9cc 0%, #2c9faf 100%);
    --gradient-success: linear-gradient(135deg, #1cc88a 0%, #17a673 100%);
    --gradient-warning: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
    --gradient-danger: linear-gradient(135deg, #e74a3b 0%, #c92f1f 100%);

    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 70px;

    /* Border Radius */
    --border-radius: 0.5rem;
    --border-radius-sm: 0.25rem;
    --border-radius-lg: 1rem;

    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem 0 rgba(58, 59, 69, 0.2);
    --shadow-md: 0 0.25rem 0.5rem 0 rgba(58, 59, 69, 0.3);
    --shadow-lg: 0 0.5rem 1rem 0 rgba(58, 59, 69, 0.4);

    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* Base Styles */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ======================
   Layout Components
   ====================== */

/* Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    gap: 0.5rem;
}

.sidebar-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-brand-logo img {
    max-width: 220px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.sidebar-brand-logo img:hover {
    transform: scale(1.05);
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.sidebar-brand-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    color: var(--sidebar-active-text);
}

.sidebar-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sidebar-active-text);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-heading {
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.nav-item {
    margin-bottom: 0.125rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-active-text);
    padding-left: 1.75rem;
}

.nav-link.active {
    background: var(--sidebar-active);
    color: var(--sidebar-active-text);
    font-weight: 700;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
}

.nav-link i {
    margin-right: 0.75rem;
    font-size: 0.875rem;
    width: 20px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

/* Top Navigation Bar */
.topbar {
    height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.topbar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.topbar-toggle:hover {
    background: var(--body-bg);
    color: var(--text-primary);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-search {
    position: relative;
    width: 250px;
}

.topbar-search input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1);
}

.topbar-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-fast);
}

.topbar-user:hover {
    background: var(--body-bg);
}

.topbar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
}

.topbar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-heading);
}

.topbar-user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

/* User Dropdown */
.topbar-user-wrapper {
    position: relative;
}

.topbar-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

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

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.topbar-dropdown-item:hover {
    background: #f3f4f6;
}

.topbar-dropdown-item i {
    width: 1.25rem;
    font-size: 0.95rem;
}

.topbar-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.25rem 0;
}

.topbar-dropdown-logout {
    color: #dc2626;
}

.topbar-dropdown-logout:hover {
    background: #fee2e2;
}

.topbar-dropdown-logout i {
    color: #dc2626;
}

/* Content Container */
.content-container {
    flex: 1;
    padding: 1.5rem;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
    /* Prevent page movement on hover by establishing transform context */
    transform: translateY(0);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

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

.btn i {
    margin-right: 8px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: var(--light-surface);
    color: var(--light-text);
    border: 2px solid var(--dark-border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--light-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
}

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

.btn-outline:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

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

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--light-text);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e1e5e9;
    border-radius: var(--border-radius-sm);
    background: var(--light-surface);
    color: var(--light-text);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid,
.form-group textarea:invalid,
.form-group select:invalid {
    border-color: var(--error-color);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 12px;
    color: var(--light-text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Checkbox Styling */
.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    margin-bottom: 0 !important;
    font-weight: normal !important;
}

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

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: var(--light-surface);
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox-label:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.checkbox-label input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.alert i {
    margin-right: 12px;
    font-size: 18px;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.3);
    color: var(--success-color);
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: var(--error-color);
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    border-color: rgba(23, 162, 184, 0.3);
    color: var(--info-color);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #856404;
}

/* ======================
   Cards & Widgets
   ====================== */

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

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

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--body-bg);
}

/* Stat Cards */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.stat-card.stat-primary { border-left-color: var(--primary-color); }
.stat-card.stat-success { border-left-color: var(--success-color); }
.stat-card.stat-info { border-left-color: var(--info-color); }
.stat-card.stat-warning { border-left-color: var(--warning-color); }
.stat-card.stat-danger { border-left-color: var(--error-color); }

.stat-card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    float: right;
    margin-left: 1rem;
}

.stat-card.stat-primary .stat-card-icon { background: var(--gradient-primary); }
.stat-card.stat-success .stat-card-icon { background: var(--gradient-success); }
.stat-card.stat-info .stat-card-icon { background: var(--gradient-info); }
.stat-card.stat-warning .stat-card-icon { background: var(--gradient-warning); }
.stat-card.stat-danger .stat-card-icon { background: var(--gradient-danger); }

.stat-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.05rem;
    margin-bottom: 0.5rem;
}

.stat-card.stat-primary .stat-card-label { color: var(--primary-color); }
.stat-card.stat-success .stat-card-label { color: var(--success-color); }
.stat-card.stat-info .stat-card-label { color: var(--info-color); }
.stat-card.stat-warning .stat-card-label { color: var(--warning-color); }
.stat-card.stat-danger .stat-card-label { color: var(--error-color); }

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

.stat-card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--light-text-muted); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-error { color: var(--error-color); }
.text-warning { color: #856404; }
.text-info { color: var(--info-color); }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.d-inline-block { display: inline-block !important; }

/* Hidden utility - used to replace inline style="display: none" */
.hidden { display: none !important; }
.visible { display: block !important; }
.invisible { visibility: hidden !important; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Loading Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* ======================
   Responsive Design
   ====================== */

/* Mobile Sidebar Toggle */
.sidebar-toggled .sidebar {
    transform: translateX(-100%);
}

.sidebar-toggled .main-content {
    margin-left: 0;
}

/* Tablet and Below */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
        font-size: 14px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

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

    .topbar {
        padding: 0 1rem;
    }

    .topbar-search {
        display: none;
    }

    .content-container {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

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

    .profile-grid {
        grid-template-columns: 1fr !important;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .topbar-user-info {
        display: none;
    }

    .stat-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .card-body,
    .card-header {
        padding: 1rem;
    }
    
    .btn-full {
        padding: 14px 20px;
    }
}

/* Focus visible for accessibility */
@media (prefers-reduced-motion: no-preference) {
    :focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Print styles */
@media print {
    .btn,
    .alert {
        display: none;
    }

    body {
        color: black;
        background: white;
    }
}

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

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

/* Modal open state - controlled via JavaScript */
.modal.modal-open {
    display: block;
}

.modal.modal-open-flex {
    display: flex;
}

/* Reduced opacity state for disabled elements */
.opacity-50 {
    opacity: 0.5;
}

.opacity-100 {
    opacity: 1;
}

/* Body class when modal is active - prevents scrolling */
body.modal-active {
    overflow: hidden;
}

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

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    animation: slideDown 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--body-bg);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-heading);
    font-size: 1.25rem;
}

.modal .close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: var(--transition-fast);
}

.modal .close:hover,
.modal .close:focus {
    color: var(--text-heading);
    transform: scale(1.1);
}

.modal form {
    padding: 1.5rem;
}

/* ======================
   Button Color Variants
   ====================== */

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

.btn-warning {
    background: var(--gradient-warning);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

.btn-info {
    background: var(--gradient-info);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

/* ======================
   Checkbox Group Styles
   ====================== */

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: var(--body-bg);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.checkbox-item:hover {
    background: var(--border-color);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-item label {
    margin: 0 !important;
    font-weight: 500 !important;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* ======================
   Package Grid & Cards
   ====================== */

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 100%;
}

.package-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.package-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.package-header {
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-bottom: 3px solid var(--primary-dark);
}

.package-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.package-price {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.package-description {
    font-size: 0.875rem;
    opacity: 0.9;
    line-height: 1.4;
}

.package-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.package-features {
    margin-bottom: 1.5rem;
}

.package-features h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.package-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.package-features li {
    padding: 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.package-features li:before {
    content: "✓";
    display: inline-block;
    margin-right: 0.75rem;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1rem;
}

.package-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.package-turnaround {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-weight: 500;
}

.package-turnaround i {
    margin-right: 0.5rem;
    color: var(--info-color);
}

.package-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.package-status.active {
    background: rgba(28, 200, 138, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.package-status.inactive {
    background: rgba(133, 135, 150, 0.1);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.package-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.package-actions .btn {
    flex: 1;
}

/* Responsive adjustments for packages */
@media (max-width: 1024px) {
    .packages-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .packages-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Topbar user dropdown chevron */
.topbar-chevron {
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

/* ======================
   Tooltip Styles
   ====================== */

.tooltip {
    position: fixed;
    background: var(--text-heading);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    max-width: 200px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--text-heading) transparent transparent;
}

.tooltip.tooltip-bottom::after {
    bottom: auto;
    top: -6px;
    border-width: 0 6px 6px;
    border-color: transparent transparent var(--text-heading);
}

.tooltip.tooltip-visible {
    opacity: 1;
}

.tooltip.tooltip-positioned {
    left: var(--tooltip-left, 0);
    top: var(--tooltip-top, 0);
}

/* Apply positioning from data attributes */
.tooltip[data-pos-left][data-pos-top] {
    left: attr(data-pos-left px);
    top: attr(data-pos-top px);
}

/* ======================
   Button Animation States
   ====================== */

.btn-clicked {
    transform: scale(0.98) !important;
}

/* ======================
   Additional Utility Classes
   ====================== */

.mt-4 {
    margin-top: 4rem !important;
}

/* ======================
   CSP-Compliant Utility Classes
   ====================== */

/* Notification Toast */
@keyframes notificationSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.csp-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    min-width: 300px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: notificationSlideIn 0.3s ease;
}

.csp-notification-error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.csp-notification-warning {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

.csp-notification-info {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.csp-notification-success {
    background: linear-gradient(135deg, #1cc88a, #17a673);
}

.csp-notification-success-alt {
    background: #10b981;
}

.csp-notification-error-alt {
    background: #ef4444;
}

.csp-notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Grid Layouts */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.grid-auto-fit-sm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.grid-auto-fit-lg {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.grid-gap-sm {
    gap: 0.5rem;
}

.grid-gap-md {
    gap: 1rem;
}

.grid-gap-lg {
    gap: 1.5rem;
}

.grid-gap-xl {
    gap: 2rem;
}

/* Flex Utilities */
.d-flex {
    display: flex;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

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

.align-items-end {
    align-items: flex-end;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-end {
    justify-content: flex-end;
}

.justify-content-center {
    justify-content: center;
}

.gap-xs {
    gap: 0.25rem;
}

.gap-sm {
    gap: 0.5rem;
}

.gap-md {
    gap: 0.75rem;
}

.gap-lg {
    gap: 1rem;
}

.gap-xl {
    gap: 1.5rem;
}

.gap-xxl {
    gap: 2rem;
}

/* Spacing Utilities */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-sm {
    margin-bottom: 0.5rem;
}

.mb-md {
    margin-bottom: 1rem;
}

.mb-lg {
    margin-bottom: 1.5rem;
}

.mb-xl {
    margin-bottom: 2rem;
}

.mt-sm {
    margin-top: 0.5rem;
}

.mt-md {
    margin-top: 1rem;
}

.mt-lg {
    margin-top: 1.25rem;
}

.ml-xs {
    margin-left: 0.25rem;
}

.p-lg {
    padding: 3rem;
}

.pt-lg {
    padding-top: 1.5rem;
}

/* Typography Utilities */
.fw-medium {
    font-weight: 500;
}

.fw-bold {
    font-weight: 700;
}

.fs-xs {
    font-size: 0.65rem;
}

.fs-sm {
    font-size: 0.75rem;
}

.fs-md {
    font-size: 0.875rem;
}

.fs-lg {
    font-size: 1rem;
}

.fs-xl {
    font-size: 2rem;
}

.fs-xxl {
    font-size: 3rem;
}

.fs-xxxl {
    font-size: 4rem;
}

.text-uppercase {
    text-transform: uppercase;
}

.letter-spacing-sm {
    letter-spacing: 0.5px;
}

.whitespace-nowrap {
    white-space: nowrap;
}

/* Color Utilities */
.text-color-primary {
    color: #4e73df;
}

.text-color-muted {
    color: #858796;
}

.text-color-muted-dark {
    color: #666;
}

.text-color-muted-light {
    color: #999;
}

.text-color-placeholder {
    color: #d1d3e2;
}

.text-color-heading {
    color: var(--text-heading);
}

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

.text-color-body {
    color: var(--text-body, #5a5c69);
}

.text-color-danger {
    color: #dc3545;
}

.text-color-white {
    color: white;
}

.opacity-90 {
    opacity: 0.9;
}

/* Background Utilities */
.bg-light-gray {
    background: #f8f9fc;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

/* Empty State */
.empty-state-icon {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state-icon-lg {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state-title {
    color: #666;
}

.empty-state-text {
    color: #999;
}

/* Form Utilities */
.form-help-text {
    color: var(--text-secondary);
    display: block;
    margin-top: 0.25rem;
}

.form-input-full {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.form-group-inline {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.form-group-inline-lg {
    flex: 1;
    min-width: 250px;
    margin-bottom: 0;
}

/* Badge Utilities */
.screening-type-badge {
    background: #f8f9fc;
    color: #5a5c69;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* Card Utilities */
.card-body-flush {
    padding: 0;
}

/* Date/Table Utilities */
.date-cell {
    white-space: nowrap;
    color: #858796;
}

/* Misc Utilities */
.w-auto {
    width: auto;
}

.cursor-pointer {
    cursor: pointer;
}

.overflow-hidden {
    overflow: hidden !important;
}

.border-top-separator {
    border-top: 1px solid var(--border-color);
}

/* Alert Utilities */
.alert-error-inline {
    padding: 1rem;
    background: #fee2e2;
    border-radius: var(--border-radius);
    color: #dc2626;
}

/* Loading States */
.loading-spinner-lg {
    font-size: 2rem;
    color: var(--text-secondary);
}

/* Stat Card (shared) */
.stat-card-header {
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 150px;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-card-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Headings */
.section-heading-sm {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

/* QR Code */
.qr-placeholder {
    font-size: 8rem;
    color: #000;
}

/* Pagination */
.pagination-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-link-active {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
}

/* Status Badge (small inline) */
.status-badge-sm {
    padding: 0.25rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    text-transform: capitalize;
    background: #d4edda;
    color: #155724;
}

/* Search/Filter Form */
.filter-form-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Modal Footer */
.modal-footer-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Status Badge */
.status-badge-inline {
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge-inline[data-status="paid"] {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-inline[data-status="pending"] {
    background: #fef3c7;
    color: #92400e;
}

.status-badge-inline[data-status="overdue"] {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge-inline[data-status="cancelled"] {
    background: #e5e7eb;
    color: #374151;
}

/* Checkbox Inline */
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.checkbox-inline input[type="checkbox"] {
    width: auto;
}

.checkbox-inline label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* ======================
   Footer Styles
   ====================== */

.main-footer {
    background: var(--sidebar-bg);
    color: rgba(255, 255, 255, 0.7);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    margin-bottom: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.footer-brand i {
    color: var(--primary-light);
}

.footer-description {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.social-link:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.debug-indicator {
    background: var(--warning-color);
    color: #000;
    padding: 0.125rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content .footer-section:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem 1.5rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem 1.5rem;
    }
}