/* ==================== CSS VARIABLES ==================== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

/* ==================== BASE STYLES ==================== */
html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    font-family: 'Heebo', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

main {
    flex: 1;
    padding-bottom: 2rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ==================== RTL FIXES ==================== */
.bi {
    margin-left: 0.25rem;
}

.btn i.bi {
    margin-left: 0.35rem;
    margin-right: 0;
}

.dropdown-item i.bi {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* ==================== NAVIGATION ==================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    margin: 0 0.25rem;
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.15);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    min-width: 200px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.dropdown-item i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
    color: var(--secondary-color);
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-item:hover i {
    color: white;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    color: var(--secondary-color);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.btn-outline-danger {
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-group-sm .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.875rem;
}

/* ==================== CARDS ==================== */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    background: var(--white);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

/* ==================== TABLES ==================== */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.04);
}

/* ==================== BADGES ==================== */
.badge {
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 50rem;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.badge.bg-primary { background: var(--primary-color) !important; }
.badge.bg-success { background: var(--success-color) !important; }
.badge.bg-danger { background: var(--danger-color) !important; }
.badge.bg-warning { background: var(--warning-color) !important; color: var(--dark-color) !important; }
.badge.bg-info { background: var(--info-color) !important; }
.badge.bg-secondary { background: var(--secondary-color) !important; }

/* ==================== FORMS ==================== */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.input-group-text {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-right: none;
}

/* ==================== ALERTS ==================== */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: #0e7490;
    border-left: 4px solid var(--info-color);
}

/* ==================== MODALS ==================== */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

/* ==================== ACCORDION ==================== */
.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg) !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    padding: 1rem 1.25rem;
    background: var(--white);
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

.accordion-body {
    padding: 1.25rem;
    background: var(--light-bg);
}

/* ==================== PROGRESS BARS ==================== */
.progress {
    height: 8px;
    border-radius: 50rem;
    background: var(--border-color);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 50rem;
    transition: width 0.5s ease;
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, var(--success-color) 0%, #34d399 100%);
}

/* ==================== LIST GROUPS ==================== */
.list-group-item {
    border: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.list-group-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.list-group-item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.list-group-item-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.list-group-item-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-color: rgba(245, 158, 11, 0.2);
}

/* ==================== CUSTOM COMPONENTS ==================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #1e3a8a 100%);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(15deg);
    pointer-events: none;
}

.hero-section h1,
.hero-section h2 {
    font-weight: 800;
    letter-spacing: -0.025em;
    color: white;
}

/* Stats Cards */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-card .stat-icon.primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: var(--primary-color);
}

.stat-card .stat-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--success-color);
}

.stat-card .stat-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: var(--warning-color);
}

.stat-card .stat-icon.info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: var(--info-color);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card .feature-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card .feature-icon.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.feature-card .feature-icon.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
}

.feature-card .feature-icon.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
}

.feature-card .feature-icon.info {
    background: linear-gradient(135deg, var(--info-color) 0%, #0891b2 100%);
    color: white;
}

.feature-card h5 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h2 i {
    color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    color: var(--dark-color);
    font-weight: 600;
}

.empty-state p {
    max-width: 400px;
    margin: 0.5rem auto 1.5rem;
}

/* Status Indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.active { background: var(--success-color); }
.status-dot.inactive { background: var(--danger-color); }
.status-dot.pending { background: var(--warning-color); }

/* Quick Actions */
.quick-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--dark-color);
}

.quick-action:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.quick-action i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: auto;
}

footer p {
    margin: 0;
    color: var(--text-muted);
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-dashed {
    border-style: dashed !important;
}

.hover-shadow:hover {
    box-shadow: var(--shadow-lg) !important;
}

/* Responsive - base */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-section {
        padding: 2rem 1.5rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .feature-card {
        padding: 1.5rem 1rem;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
    background-color: var(--secondary-color);
    border: none;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.6rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.card-header {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table {
    background-color: white;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 0.6rem;
    overflow: hidden;
}

.table thead {
    background-color: var(--light-bg);
    font-weight: 600;
    color: #333;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table th {
    padding: 1rem;
    font-size: 0.95rem;
    color: #495057;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Forms */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    padding: 0.6rem 0.8rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Badges */
.badge {
    padding: 0.5rem 0.8rem;
    font-weight: 500;
    border-radius: 0.3rem;
}

.badge.bg-info {
    background-color: var(--info-color) !important;
}

.badge.bg-warning {
    background-color: var(--warning-color) !important;
    color: #333;
}

.badge.bg-danger {
    background-color: var(--danger-color) !important;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.6rem;
    padding: 1rem 1.25rem;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Footer */
footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

footer h5 {
    color: var(--primary-color);
    font-weight: 700;
}

/* Page Headers */
h1 {
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
}

h2 {
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
}

h3 {
    font-weight: 600;
    color: #495057;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* Validation */
.text-danger {
    color: var(--danger-color) !important;
    font-weight: 500;
    font-size: 0.9rem;
}

.is-invalid {
    border-color: var(--danger-color) !important;
}

.invalid-feedback {
    display: block;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Spacing Utilities */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 0.6rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ==================== MOBILE RESPONSIVE ==================== */

/* Tablet and below - navbar collapse */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        margin: 0.15rem 0;
        padding: 0.6rem 1rem !important;
    }

    .navbar .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-right: 1rem;
        background: rgba(255, 255, 255, 0.08);
        border-radius: var(--radius);
    }

    .navbar .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
    }

    .navbar .dropdown-menu .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    .navbar .dropdown-menu .dropdown-item i {
        color: rgba(255, 255, 255, 0.7);
    }

    .navbar .dropdown-menu .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.15);
    }
}

/* Mobile screens */
@media (max-width: 767.98px) {
    /* Reduce main padding */
    main.py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .container-fluid.px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Page headers - stack vertically */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.75rem;
    }

    .page-header h2 {
        font-size: 1.25rem;
    }

    /* Title + button rows (used across many views) */
    .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* Hero section */
    .hero-section {
        padding: 1.5rem 1rem;
    }

    .hero-section h1,
    .hero-section .display-4 {
        font-size: 1.5rem !important;
    }

    .hero-section h2 {
        font-size: 1.25rem;
    }

    .hero-section .lead {
        font-size: 0.95rem;
    }

    /* Cards */
    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-header h5 {
        font-size: 1rem;
    }

    /* Stat cards */
    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    /* Feature cards */
    .feature-card {
        padding: 1.25rem 1rem;
    }

    .feature-card .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Tables - tighter on mobile */
    .table thead th {
        padding: 0.65rem 0.5rem;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .table tbody td {
        padding: 0.65rem 0.5rem;
        font-size: 0.85rem;
    }

    /* Filter buttons - wrap */
    .card-body .d-flex.align-items-center.gap-2 {
        flex-wrap: wrap;
    }

    /* Form submit rows - stack on mobile */
    .d-flex.justify-content-between.mt-4 {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    .d-flex.justify-content-between.mt-4 > .btn,
    .d-flex.justify-content-between.mt-4 > a.btn {
        width: 100%;
        justify-content: center;
    }

    /* Inline filter bar row (Invoices, etc.) */
    .d-flex.gap-2 {
        flex-wrap: wrap;
    }

    /* btn-group - keep inline */
    .btn-group.btn-group-sm .btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Empty state */
    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state i {
        font-size: 3rem;
    }

    /* Display font sizes */
    .display-4 {
        font-size: 1.75rem !important;
    }

    .display-5 {
        font-size: 1.5rem !important;
    }

    .display-6 {
        font-size: 1.25rem !important;
    }

    /* Heading sizes */
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* Footer */
    footer {
        padding: 1rem 0;
        text-align: center;
    }

    footer .row > [class*="col-"] {
        text-align: center !important;
    }

    /* Quick action links */
    .quick-action {
        padding: 0.75rem;
    }

    /* dl description lists (Project Details) */
    dl.row dt,
    dl.row dd {
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    /* Clock card (TimeTracking) */
    .clock-card {
        padding: 1.5rem !important;
    }

    .clock-time {
        font-size: 2.5rem !important;
    }

    .btn-clock {
        padding: 0.6rem 1.5rem !important;
        font-size: 1rem !important;
    }

    .summary-number {
        font-size: 1.5rem !important;
    }

    /* Report header */
    .report-header {
        padding: 1.25rem !important;
    }

    .report-header h3 {
        font-size: 1.1rem;
    }

    /* Month navigation (AdminReport) */
    .month-nav {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .month-nav .btn {
        width: auto;
    }

    /* Accordion */
    .accordion-button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .accordion-body {
        padding: 0.75rem;
    }

    /* Step row - stack on mobile */
    .step-row-container {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }

    .step-info {
        flex: 1 1 100% !important;
        min-width: 0;
    }

    .step-info .step-name {
        max-width: none !important;
        white-space: normal !important;
    }

    .step-user {
        flex: 0 0 auto !important;
        min-width: auto !important;
    }

    .step-missions {
        flex: 0 0 auto !important;
        min-width: auto !important;
    }

    .step-status {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    /* Mission row - wrap on mobile */
    .mission-row {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }

    .mission-info {
        flex: 1 1 100% !important;
        min-width: 0;
    }

    .mission-info .mission-name {
        max-width: none !important;
        white-space: normal !important;
    }

    .mission-user {
        flex: 0 0 auto !important;
        min-width: auto !important;
    }

    .mission-status {
        flex: 0 0 auto !important;
        min-width: auto !important;
    }

    /* Step inline add form */
    #addStepInline .row > [class*="col-"] {
        margin-bottom: 0.5rem;
    }

    #addStepInline .col-md-2.d-flex {
        flex-direction: row;
        gap: 0.5rem;
    }

    /* Entry rows (TimeTracking) */
    .entry-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Registration step indicator */
    .step-indicator {
        gap: 0.25rem;
    }

    .step-indicator .step-item {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }

    .step-indicator .step-item span:not(.step-num) {
        display: none;
    }

    .step-connector {
        width: 24px;
    }

    /* Plan cards in registration */
    .plan-card .display-6 {
        font-size: 1.5rem !important;
    }

    /* Modal */
    .modal-dialog {
        margin: 0.5rem;
    }

    /* File drop zone */
    .file-drop-zone {
        padding: 1rem !important;
    }

    /* Today summary */
    .today-summary {
        padding: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 575.98px) {
    .container-fluid.px-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .hero-section h1,
    .hero-section .display-4 {
        font-size: 1.25rem !important;
    }

    .hero-section .btn-lg {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .clock-time {
        font-size: 2rem !important;
    }

    .btn-clock {
        padding: 0.5rem 1.25rem !important;
        font-size: 0.9rem !important;
    }

    /* Stack col-md-3 stats as 2-column grid */
    .row > .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Project details - full width columns */
    .col-md-4,
    .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Table actions - keep tight */
    .action-icon {
        padding: 0.2rem 0.3rem;
        font-size: 0.85rem;
    }

    /* Navbar brand */
    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-brand i {
        font-size: 1.2rem;
    }
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Cursor Styles */
.cursor-pointer {
    cursor: pointer;
}

/* Loading Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}