:root {
    --brand-ink: #111827;
    --brand-accent: #0f766e;
    --brand-wash: #f0fdfb;
}

body {
    font-family: "Space Grotesk", sans-serif;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.app-badge {
    background: var(--brand-wash);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    color: var(--brand-accent);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .content-wrapper {
        padding: 0 1rem;
    }

    .content-header {
        padding: 1.5rem 0.75rem 0;
    }

    .content-wrapper > .content {
        padding: 1rem 0.75rem 2rem;
    }
}

@media (min-width: 1200px) {
    .content-wrapper {
        padding: 0 2rem;
    }

    .module-card .card-body {
        padding: 2rem;
    }
}

.content-wrapper {
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    min-height: calc(100vh - 120px);
}

.module-card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.module-card .card-body {
    padding: 1.5rem;
}

.quick-actions .btn {
    border-radius: 999px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gap-2 {
    gap: 0.5rem;
}

#analyticsRange {
    min-width: 150px;
}

@media (max-width: 768px) {
    .content-header h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .main-header.navbar {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .content-header {
        padding: 0.75rem 0.5rem;
    }

    .content-wrapper > .content {
        padding: 0.5rem;
    }

    .content-header .container-fluid,
    .content .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .module-card .card-body {
        padding: 1rem;
    }

    .module-card .card-body h3 {
        font-size: 1.6rem;
    }

    .main-header .navbar-nav {
        flex-wrap: wrap;
    }

    .main-header .navbar-nav.ml-auto {
        align-items: center;
    }

    .main-header .navbar-nav .nav-link {
        padding: 0.35rem 0.5rem;
        font-size: 0.85rem;
    }

    .app-badge {
        display: none;
    }

    .auth-shell {
        padding: 1rem;
    }

    .main-footer {
        text-align: center;
    }

    .main-footer .float-right {
        float: none !important;
        display: block;
        margin-top: 0.25rem;
    }
}

/* Table Responsive Styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
}

.table-responsive-noheight {
    max-height: none;
    overflow-y: visible;
}

.dataTables_wrapper,
.dataTables_wrapper .dataTables_scroll,
.dataTables_wrapper .dataTables_scrollBody,
.dataTables_wrapper table.dataTable {
    width: 100% !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.25rem 0.5rem;
}

@media (max-width: 576px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: center;
        margin-bottom: 1rem;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        margin-top: 1rem;
    }

    .table-responsive {
        max-height: none;
    }
}

/* Modal Responsive Styles */
.modal-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap4 .select2-selection,
.select2-container .select2-selection--single {
    min-height: calc(2.25rem + 2px);
}

.select2-container--open {
    z-index: 2050;
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* Action buttons */
.btn-action {
    min-width: 70px;
    margin: 0 2px;
}

@media (max-width: 576px) {
    .btn-action {
        font-size: 0.8rem;
        min-width: 60px;
        padding: 0.25rem 0.5rem;
    }
}

/* Status badges */
.badge-status {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Card action toolbar */
.card-tools .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}
