:root {
    --primary-color: #004aad;
    --primary-dark: #003580;
    --secondary-color: #ffffff;
    --danger-color: #dc3545;
    --success-color: #198754;
    --info-bg: #eaf2ff;
    --text-dark: #222d3a;
    --text-light: #ffffff;
    --shadow-elevation: 0 5px 20px rgba(0, 64, 173, 0.10);
    --border-radius: 0.75rem;
    --input-bg: #f8fafc;
    --input-border: #c5d4e6;
}

/* ===== BASE RESET & TYPOGRAPHY ===== */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f5ff;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.18s;
}

    a:hover, a:focus {
        color: var(--primary-dark);
        text-decoration: underline;
        outline: none;
    }

::-webkit-scrollbar {
    display: none;
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--primary-color) !important;
    color: var(--text-light) !important;
    box-shadow: var(--shadow-elevation);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.navbar-brand,
.navbar-nav .nav-link,
.navbar-nav .nav-link:visited {
    color: var(--text-light) !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: 0.2s;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        background: var(--primary-dark);
        color: var(--text-light) !important;
        border-radius: var(--border-radius);
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

.navbar-toggler {
    border: 1px solid var(--primary-dark);
}

.navbar-brand img {
    height: 40px;
    margin-right: 12px;
    vertical-align: middle;
}

/* ===== LAYOUT ===== */
.container, .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

    .container-fluid.no-padding {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

.wrapper {
    flex: 1 1 auto;
    min-height: 0;
}

/* ===== FORMS ===== */
.form-control, .form-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border 0.2s, box-shadow 0.2s;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 8px rgba(0,74,173,.08);
        outline: none;
    }

.input-group-text {
    background: var(--info-bg);
    border: none;
    color: var(--primary-color);
    font-size: 1.1rem;
}

label {
    font-weight: 500;
    color: var(--primary-dark);
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-primary:focus {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background 0.2s;
    box-shadow: 0 3px 9px rgba(0,74,173,.08);
}

    .btn-primary:hover {
        background: var(--primary-dark);
        color: var(--text-light);
    }

.btn-success {
    background: var(--success-color);
    color: #fff;
    border-radius: var(--border-radius);
    font-weight: 600;
}

    .btn-success:hover {
        background: #157347;
    }

.btn-danger {
    background: var(--danger-color);
    color: #fff;
    border-radius: var(--border-radius);
    font-weight: 600;
}

    .btn-danger:hover {
        background: #b02a37;
    }

.btn-warning {
    background: #ffc107;
    color: #222;
    border-radius: var(--border-radius);
    font-weight: 600;
}

    .btn-warning:hover {
        background: #e0a800;
    }

/* ===== ALERTS ===== */
.alert {
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-info {
    background: var(--info-bg);
    color: var(--primary-color);
    border: 1px solid #b0c7e4;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* ===== TABLES & USER MANAGEMENT TABLE ===== */
.table-primary {
    background: linear-gradient(90deg, #003580 0%, #1860b9 90%) !important;
    color: var(--text-light) !important;
}

.table th, .table td {
    vertical-align: middle;
    padding: 0.75rem;
    font-size: 1rem;
}

.table .badge {
    font-size: 0.85rem;
    padding: 0.25em 0.7em;
    border-radius: 0.5em;
}

/* SCROLLABLE TABLE CONTAINER */
.table-container {
    width: 100%;
    overflow-x: auto;
    display: block;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
}

#user-table {
    min-width: 1100px;
    width: 100%;
    background: #fff;
    border-radius: 0.5em;
    box-shadow: var(--shadow-elevation);
}

    #user-table th, .table-primary {
        background: #003580 !important;
        color: #fff !important;
        font-weight: 600;
        font-size: 1.02rem;
        border-top: none;
        vertical-align: middle;
    }

    #user-table td {
        font-size: 0.98rem;
        background: #fff;
        vertical-align: middle;
    }

    #user-table tr:nth-child(even) td {
        background: #f5f8fc;
    }

.badge.bg-danger {
    background: var(--danger-color) !important;
}

.badge.bg-success {
    background: var(--success-color) !important;
}

.badge {
    font-size: 0.90rem;
    padding: 4px 12px;
    border-radius: 0.6em;
    font-weight: 600;
}

#user-table .btn, #user-table .btn-sm {
    font-size: 0.93rem;
    padding: 0.19rem 0.6rem;
    margin: 0 2px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* ===== PAGINATION ===== */
.pagination .page-link {
    color: var(--primary-color);
    border-radius: 0.35rem;
    margin: 0 1px;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-weight: 600;
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.12rem #0056b35e;
    outline: none;
}

/* ===== RESPONSIVE TABLE ===== */
@media (max-width: 1100px) {
    #user-table {
        min-width: 900px;
    }
}

@media (max-width: 900px) {
    #user-table {
        min-width: 800px;
    }

        #user-table th, #user-table td {
            font-size: 0.89rem;
        }
}

@media (max-width: 600px) {
    #user-table {
        min-width: 600px;
    }

        #user-table th, #user-table td {
            font-size: 0.80rem;
            padding: 0.3rem 0.5rem;
        }
}

/* ===== ACCESSIBILITY/UTILITY ===== */
a, button, .form-control, .btn, .form-select {
    transition: 0.2s;
    outline: none;
}

    a:focus, button:focus, .form-control:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}


/* ===== MODERN USER FORM CARD & GRID (EDIT/REGISTER) ===== */
.user-form-card {
    max-width: 1200px;
    width: 100%;
    margin: 48px auto 32px auto;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-elevation);
    padding: 2.2rem 2.4rem 2.1rem 2.4rem;
    border: none;
}

@media (max-width: 900px) {
    .user-form-card {
        max-width: 99vw;
        padding: 1.1rem 0.6rem 1.5rem 0.6rem;
    }
}

.user-form-card h2 {
    font-size: 2.1rem;
    margin-bottom: 2.3rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.edit-user-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem 2.2rem;
    margin-bottom: 1.2rem;
}

    .edit-user-grid > .edit-form-group {
        display: flex;
        flex-direction: column;
    }

        .edit-user-grid > .edit-form-group.full-width {
            grid-column: 1 / -1;
        }

.user-form-card label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.38rem;
    letter-spacing: 0.01em;
}

.user-form-card .form-control,
.user-form-card .form-select {
    height: 44px;
    font-size: 1.05rem;
    padding: 7px 14px;
    border-radius: var(--border-radius);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    box-shadow: 0 2px 8px rgba(0,74,173,.03);
    transition: border 0.18s, box-shadow 0.18s;
}

    .user-form-card .form-control:focus,
    .user-form-card .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 8px #0056b365;
        outline: none;
    }

.user-form-card .alert {
    margin-bottom: 1.6rem;
    font-size: 1rem;
}

.user-form-card .btn-success {
    padding: 0.7em 2.1em;
    font-size: 1.15rem;
    border-radius: 0.6em;
    font-weight: 700;
    margin-top: 0.7rem;
}

.user-form-card .btn-outline-primary {
    margin-top: 1.4em;
    font-size: 1rem;
    border-radius: 0.5em;
    padding: 0.7em 1.3em;
}

@media (max-width: 900px) {
    .edit-user-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem 0;
    }
}

@media (max-width: 1100px) {
    .user-form-card {
        max-width: 99vw;
    }

    .edit-user-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .user-form-card {
        padding: 0.7rem 0.13rem 1.2rem 0.13rem;
    }

    .edit-user-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .user-form-card h2 {
        font-size: 1.19rem;
    }

    .user-form-card {
        padding: 0.8rem 0.15rem 1.2rem 0.15rem;
    }
}

.what-we-do-section {
    padding-top: 2.2rem !important;
    padding-bottom: 2.2rem !important;
}

.about-listcat-block {
    background: #f8fafc;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0,74,173,0.05);
}

.about-listcat-block h2 {
    font-size: 2rem;
    margin-bottom: 0.4em;
}

.about-listcat-list {
    font-size: 1.02rem;
    line-height: 1.45;
    margin-bottom: 0;
}

.about-listcat-list li {
    margin-bottom: 0.45em;
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
}

.about-listcat-list i {
    font-size: 1.3em;
    margin-top: 1.5px;
}

.about-listcat-img {
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
    box-shadow: 0 3px 14px rgba(0,64,173,0.11);
    border-radius: 0.95rem;
}

@media (max-width: 900px) {
    .about-listcat-block { padding: 1.1rem 0.6rem !important; }
    .about-listcat-img { max-width: 99%; }
    .what-we-do-section { padding-top: 1.3rem !important; padding-bottom: 1.3rem !important; }
}

@media (max-width: 600px) {
    .about-listcat-block { padding: 0.7rem 0.1rem !important; }
    .about-listcat-block h2 { font-size: 1.18rem; }
    .about-listcat-img { margin-top: 1.2rem; }
}

.dropdown-menu {
    border-radius: 0.75rem;
    min-width: 220px;
    font-size: 1.05rem;
    padding: 0.5em 0.7em;
    box-shadow: 0 6px 24px rgba(0, 74, 173, 0.08);
}

.dropdown-item:active,
.dropdown-item:focus {
    background: #f0f5ff;
    color: #004aad;
}

.dropdown-item i {
    font-size: 1.1em;
    vertical-align: middle;
}

.navbar .btn-outline-light {
    color: #fff !important;
    border-color: #fff !important;
    background-color: transparent !important;
}

.navbar .btn-outline-light:hover,
.navbar .btn-outline-light:focus {
    color: #004aad !important;
    background-color: #fff !important;
    border-color: #fff !important;
}

.header-search-form .saas-search-input {
    flex: 1 1 320px;
    min-width: 220px;
    max-width: 100%;
}

.header-search-form input[type="date"] {
    flex: 0 0 170px;
    min-width: 120px;
    max-width: 200px;
}

.header-search-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 1.1rem !important;
    width: 100%;
    max-width: 700px;
    min-width: 300px;
    margin-left: auto;
    margin-right: 0;
}

    .header-search-form .form-control {
        border-radius: 0.7em !important;
        font-size: 1.08rem;
        height: 44px;
        margin-bottom: 0 !important;
    }

.saas-search-btn {
    border-radius: 0.7em !important;
    font-size: 1.22rem;
    padding: 0 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px !important;
}

@media (max-width: 700px) {
    .header-search-form {
        flex-direction: column !important;
        gap: 0.5rem !important;
        max-width: 100% !important;
    }

    .header-search-form .form-control,
    .header-search-form .saas-search-btn {
        width: 100% !important;
        max-width: unset !important;
    }
}

/* Replace inline styles */
.page-bg { background: #f0f5ff; }
.navbar-brand-size { font-size: 1.35rem; }
.navbar-bg { background: #004aad; }
.logo-icon { height: 38px; margin-right: 0.75rem; }
.btn-no-decoration { text-decoration: none; }

/* ===== PAGE HEADER (saas-page-header / page-header-saas) ===== */
.saas-page-header,
.page-header-saas {
    background: #ffffff;
    border-radius: var(--border-radius);
    border-bottom: 2.5px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 74, 173, 0.07);
    margin-bottom: 1.5rem;
}

.header-icon {
    font-size: 2rem;
    color: var(--primary-color);
    line-height: 1;
}

.header-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.01em;
    line-height: 1.2;
}

/* ===== CARD HEADERS (saas-card-header) ===== */
.saas-card-header {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    border-radius: calc(var(--border-radius) - 1px) calc(var(--border-radius) - 1px) 0 0;
}

/* ===== LOG / HISTORY TABLE CARD ===== */
.logs-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-elevation);
}

.logs-table thead th {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    border: none;
}