/* ===== GLOBAL LAYOUT FIX ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background-color: #f8f9fa;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
}

/* ===== NAVBAR ===== */
.custom-navbar {
    background-color: #0b3b8c;
    padding: 1rem;
}

.custom-navbar-inner {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 1rem;
}

.nav-top-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}

.nav-links-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    width: 100%;
    gap: 1rem;
}

.nav-links {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 1.25rem;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
}

.nav-links a,
.nav-right a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

.nav-right a {
    color: #ffffff;
    margin-left: 10px;
}

.nav-right a:hover {
    color: #10b981;
}

.navbar {
    width: 100%;
    max-width: 100%;
}

.app-logo {
    width: 120px;
    height: auto;
}

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

/* ===== DASHBOARD / CARDS ===== */
.dashboard-logo {
    max-width: 180px;
}

.dashboard-card {
    border-radius: 12px;
}

.card {
    padding: 20px;
    border: none;
    -webkit-box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

input, select, textarea {
    max-width: 100%;
}

.dashboard-actions .btn {
    min-width: 200px;
}

/* ===== CONTENT ===== */
.container {
    margin-top: 30px;
}

.chart-container {
    max-width: 600px;
    margin: 0 auto;
}

/* ===== MENU TOGGLE ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* ===== TABLE SWITCH (DESKTOP vs MOBILE) ===== */
.desktop-table {
    display: block;
}

.mobile-transactions {
    display: none;
}

/* ===== FOOTER ===== */
.app-footer {
    font-size: 0.95rem;
}

.app-footer small {
    display: block;
    margin-top: 0.25rem;
}

/* ===== TABLET ===== */
@media (max-width: 768px) {

    .custom-navbar-inner {
        -webkit-box-align: start;
            -ms-flex-align: start;
                align-items: flex-start;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links-wrapper {
        display: none;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .nav-links-wrapper.show {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
    }

    .nav-links {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .nav-right {
        width: 100%;
    }

    .app-logo {
        width: 90px;
    }

    .dashboard-logo {
        max-width: 120px;
    }

    h1 {
        font-size: 2rem;
        text-align: center;
    }

    .card {
        margin-bottom: 1rem;
        padding: 16px;
    }

    .table-responsive {
        font-size: 0.9rem;
    }
}

/* ===== SMALL PHONES ===== */
@media (max-width: 576px) {

    .custom-navbar {
        padding: 0.75rem;
    }

    .app-logo {
        width: 75px;
    }

    .nav-links a,
    .nav-right a {
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .container {
        margin-top: 20px;
    }

    .card {
        padding: 14px;
    }

    .chart-container {
        max-width: 100%;
    }

    /* switch to mobile cards */
    .desktop-table {
        display: none;
    }

    .mobile-transactions {
        display: block;
    }

    .app-footer {
        font-size: 0.9rem;
    }

       .table .btn,
    .mobile-transactions .btn {
        min-width: auto;
        width: auto;
        padding: 0.375rem 0.75rem;
    }
}