* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
}


/* =========================================
   LOGIN PAGE
   ========================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    background:
        linear-gradient(
            135deg,
            #0f172a 0%,
            #1e293b 50%,
            #0f172a 100%
        );
}


.login-container {
    width: 100%;
    max-width: 420px;
}


.login-card {
    background: #ffffff;

    border-radius: 18px;

    padding: 42px 38px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.30);
}


.login-header {
    text-align: center;
    margin-bottom: 32px;
}


.login-logo {
    width: 140px;
    height: 140px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border-radius: 0;
}

.login-logo img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;
}


.login-header h1 {
    color: #0f172a;

    font-size: 25px;
    font-weight: 700;

    margin-bottom: 9px;
}


.login-header p {
    color: #64748b;
    font-size: 14px;
}


.form-group {
    margin-bottom: 20px;
}


.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #334155;

    font-size: 14px;
    font-weight: 600;
}


.form-group input {
    width: 100%;
    height: 50px;

    padding: 0 15px;

    border: 1px solid #cbd5e1;
    border-radius: 9px;

    background: #ffffff;

    color: #0f172a;

    font-size: 16px;

    outline: none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}


.form-group input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


.login-button {
    width: 100%;
    height: 52px;

    margin-top: 5px;

    border: none;
    border-radius: 9px;

    background: #2563eb;
    color: #ffffff;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s,
        transform 0.1s;
}


.login-button:hover {
    background: #1d4ed8;
}


.login-button:active {
    transform: scale(0.99);
}


.login-error {
    margin-bottom: 22px;

    padding: 12px 14px;

    border-radius: 8px;

    background: #fef2f2;
    border: 1px solid #fecaca;

    color: #b91c1c;

    font-size: 14px;
    text-align: center;
}


.login-footer {
    margin-top: 20px;

    color: #94a3b8;

    text-align: center;

    font-size: 12px;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 500px) {

    .login-page {
        min-height: 100vh;

        display: flex;
        align-items: center;
        justify-content: center;

        padding: 20px 14px;
    }

    .login-container {
        width: 100%;
        max-width: none;
    }

    .login-card {
        width: 100%;

        padding: 40px 24px;

        border-radius: 16px;
    }

    .login-logo {
        width: 120px;
        height: 120px;

        margin: 0 auto 22px;
    }

    .login-header {
        margin-bottom: 35px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .login-header p {
        margin-top: 8px;
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 24px;
    }

    .form-group label {
        margin-bottom: 9px;

        font-size: 15px;
    }

    .form-group input {
        height: 58px;

        padding: 0 16px;

        font-size: 16px;

        border-radius: 10px;
    }

    .login-button {
        height: 58px;

        margin-top: 4px;

        font-size: 16px;

        border-radius: 10px;
    }

    .login-footer {
        margin-top: 18px;

        font-size: 11px;
    }

}
/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-page {
    min-height: 100vh;
    background: #f1f5f9;
    color: #0f172a;
}


/* =========================================================
   HEADER
   ========================================================= */

.dashboard-header {
    height: 82px;

    display: flex;
    align-items: center;

    background: #0f172a;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.12);
}


.header-container {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;
    padding: 0 35px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.brand {
    display: flex;
    align-items: center;

    gap: 18px;
}


/* COMPANY LOGO */

.company-logo {
    display: block;

    max-width: 150px;
    max-height: 52px;

    width: auto;
    height: auto;

    object-fit: contain;
}


.brand-text {
    display: flex;
    flex-direction: column;
}


.brand-text strong {
    color: #ffffff;

    font-size: 16px;
    font-weight: 600;
}


.brand-text span {
    margin-top: 4px;

    color: #94a3b8;

    font-size: 12px;
}


/* HEADER RIGHT */

.header-actions {
    display: flex;
    align-items: center;
}


.logout-button {
    padding: 10px 16px;

    border: 1px solid #334155;
    border-radius: 8px;

    color: #e2e8f0;
	background:#FF0000;

    font-size: 13px;
    font-weight: 500;

    text-decoration: none;

    transition:
        background 0.2s,
        border-color 0.2s;
}


.logout-button:hover {
    background: #990033;
    border-color: #FFFFFF;
}



/* =========================================================
   MAIN
   ========================================================= */

.dashboard-main {
    min-height: calc(100vh - 82px);

    display: flex;
    align-items: center;

    padding: 40px 35px;
}


.dashboard-container {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;
}



/* =========================================================
   TITLE
   ========================================================= */

.dashboard-title {
    margin-bottom: 35px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}


.dashboard-eyebrow {
    margin-bottom: 7px;

    color: #2563eb;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 1.5px;
}


.dashboard-title h1 {
    margin: 0;

    color: #0f172a;

    font-size: 34px;
    font-weight: 700;
}


.dashboard-subtitle {
    margin-top: 7px;

    color: #64748b;

    font-size: 14px;
}


.dashboard-date {
    display: flex;
    flex-direction: column;

    text-align: right;
}


.dashboard-date span {
    margin-bottom: 4px;

    color: #94a3b8;

    font-size: 11px;

    text-transform: uppercase;
}


.dashboard-date strong {
    color: #334155;

    font-size: 15px;
}



/* =========================================================
   KPI GRID
   ========================================================= */

.kpi-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 22px;
}



/* =========================================================
   KPI CARD
   ========================================================= */

.kpi-card {
    min-width: 0;

    padding: 28px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    box-shadow:
        0 4px 15px rgba(15, 23, 42, 0.05);

    transition:
        transform 0.2s,
        box-shadow 0.2s;
}


.kpi-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.09);
}



/* KPI TITLES */

.kpi-heading {
    min-height: 65px;
}


.kpi-label {
    display: block;

    color: #0f172a;

    font-size: 16px;
    font-weight: 800;

    letter-spacing: 0.5px;
}


.kpi-heading h2 {
    margin-top: 6px;

    color: #334155;


    font-size: 18px;
    font-weight: 700;
}



/* =========================================================
   KPI VALUE
   ========================================================= */

.kpi-value {
    margin: 0;

    width: 100%;
    text-align: left;

    font-size: clamp(30px, 2.3vw, 40px);
    font-weight: 800;
    color: #0f172a;

    line-height: 1.1;
    white-space: nowrap;
}

.currency-symbol {
    margin-left: 4px;

    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}


/* =========================================================
   KPI FOOTER
   ========================================================= */

.kpi-footer {
    margin: 0;
    padding-top: 25px;

    border-top: 1px solid #e2e8f0;

    text-align: left;
}


.status-dot {
    width: 7px;
    height: 7px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #22c55e;
}



/* =========================================================
   BOTTOM
   ========================================================= */

.dashboard-bottom {
    margin-top: 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.update-info {
    display: flex;
    align-items: center;

    gap: 7px;

    color: #94a3b8;

    font-size: 12px;
}


.update-info strong {
    color: #64748b;
}


.refresh-button {
    padding: 10px 17px;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    background: #ffffff;
    color: #334155;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s,
        border-color 0.2s;
}


.refresh-button:hover {
    background: #f8fafc;

    border-color: #94a3b8;
}



/* =========================================================
   FULL SCREEN LOADER
   ========================================================= */

.page-loader {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(15, 23, 42, 0.92);

    z-index: 99999;

    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


.page-loader.hidden {
    opacity: 0;
    visibility: hidden;

    pointer-events: none;
}


.loader-content {
    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 18px;
}


.loader-spinner {
    width: 52px;
    height: 52px;

    border: 5px solid rgba(255, 255, 255, 0.18);
    border-top-color: #ffffff;

    border-radius: 50%;

    animation:
        loaderSpin 0.8s linear infinite;
}


.loader-text {
    color: #ffffff;

    font-size: 14px;
    font-weight: 500;

    letter-spacing: 0.3px;
}


@keyframes loaderSpin {

    to {
        transform: rotate(360deg);
    }

}



/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 950px) {

    .kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}



/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .dashboard-header {
        height: 70px;
    }


    .header-container {
        padding: 0 18px;
    }


    .brand {
        gap: 10px;
    }


    .company-logo {
        max-width: 90px;
        max-height: 42px;
    }


    .brand-text strong {
        font-size: 13px;
    }


    .brand-text span {
        display: none;
    }


    .logout-button {
        padding: 8px 10px;

        font-size: 12px;
    }


    .dashboard-main {
           min-height: auto;

    display: block;

    padding: 28px 12px;
    }


    .dashboard-title {
        margin-bottom: 25px;

        align-items: flex-start;
    }


    .dashboard-title h1 {
        font-size: 28px;
    }


    .dashboard-subtitle {
        max-width: 230px;

        font-size: 13px;

        line-height: 1.5;
    }


    .dashboard-date {
        padding-top: 3px;
    }


    .dashboard-date span {
        display: none;
    }


    .dashboard-date strong {
        font-size: 12px;
    }


    .kpi-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    .kpi-card {
        padding: 22px;
    }


    .kpi-heading {
        min-height: auto;
    }


    .kpi-label {
        font-size: 15px;
    }


    .kpi-value {
        margin-top: 0px;

        font-size: 31px;
    }


    .dashboard-bottom {
        align-items: flex-start;

        gap: 15px;
    }


    .update-info {
        flex-direction: column;

        align-items: flex-start;

        gap: 3px;
    }


    .loader-spinner {
        width: 45px;
        height: 45px;
    }

}
/* =========================================================
   KPI CARD - FINAL LAYOUT
   ========================================================= */

.kpi-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: auto;
    margin: 0 0 25px 0;
}

.kpi-label {
    color: #0f172a;

    font-size: 16px;
    font-weight: 800;

    letter-spacing: 0.3px;
}

.kpi-period {
    color: #64748b;

    font-size: 13px;
    font-weight: 500;

    white-space: nowrap;
    text-align: right;
}

.kpi-footer {
    margin: 0;
    padding-top: 25px;

    border-top: 1px solid #e2e8f0;

    text-align: left;
}

.kpi-value {
    width: 100%;
    margin: 0;

    color: #0f172a;

    font-size: clamp(30px, 2.3vw, 40px);
    font-weight: 800;

    line-height: 1.1;
    white-space: nowrap;
    text-align: left;
}

.currency-symbol {
    margin-left: 2px;

    color: inherit;

    font-size: inherit;
    font-weight: inherit;
}