/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {
    --primary: #502A21;
    --secondary: #924444;
    --third: #C17171;
    --dark: #24100c;
    --cream: #f8f5f3;
    --text: #241d1b;
    --muted: #7e7370;
    --border: #ece3e0;

    --left-padding: 60px;
    --right-padding: 60px;
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
}

body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;

    font-family: "Manrope", sans-serif;

    color: var(--text);

    background: #f5f1ef;
}


/* =========================================================
   MAIN LOGIN PAGE
========================================================= */

.login-page {
    width: 100%;
    height: 100vh;
    min-height: 100vh;

    display: flex;
    align-items: stretch;

    overflow: hidden;
}


/* =========================================================
   LEFT VISUAL PANEL
========================================================= */

.visual-panel {
    width: 52%;
    min-height: 100vh;
    display: flex;              /* add */
    align-items: center;        /* add */
    position: relative;
    overflow: hidden;
    padding: 52px 64px;
    color: #fff;
    background: /* unchanged */
        radial-gradient(circle at 86% 16%, rgba(193, 113, 113, 0.42), transparent 25%),
        radial-gradient(circle at 12% 93%, rgba(146, 68, 68, 0.45), transparent 30%),
        linear-gradient(145deg, #2e1610 0%, #502A21 52%, #733b36 100%);
}


/* =========================================================
   LEFT DECORATIVE CIRCLE
========================================================= */

.visual-panel::before {
    content: "";

    width: 440px;
    height: 440px;

    position: absolute;

    top: -220px;
    right: -150px;

    border: 1px solid rgba(255, 255, 255, 0.11);

    border-radius: 50%;

    box-shadow:
        0 0 0 52px rgba(255, 255, 255, 0.035),
        0 0 0 104px rgba(255, 255, 255, 0.025),
        0 0 0 156px rgba(255, 255, 255, 0.015);

    pointer-events: none;
}


/* =========================================================
   LEFT BOTTOM DECORATION
========================================================= */

.visual-panel::after {
    content: "";

    position: absolute;

    width: 380px;
    height: 380px;

    bottom: -220px;
    left: -120px;

    border-radius: 50%;

    background:
        rgba(193, 113, 113, 0.15);

    filter: blur(5px);

    pointer-events: none;
}


/* =========================================================
   LEFT CONTENT
========================================================= */

.panel-content {
    width: 100%;                /* was height: 100% */
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    /* remove reliance on height:100% + margin-top:auto for footer */
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    width: 100%;

    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.brand img {
    width: 143px;
    height: auto;
    display: block;
    border-radius: 6px;
}


/* =========================================================
   LEFT HEADING
========================================================= */

.panel-heading {
    width: 100%;

    margin-top: 48px;

    flex-shrink: 0;
}


/* =========================================================
   PORTAL TAG
========================================================= */

.portal-tag {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 8px 12px;

    border:
        1px solid rgba(255, 255, 255, 0.14);

    border-radius: 30px;

    background:
        rgba(255, 255, 255, 0.08);

    color:
        rgba(255, 255, 255, 0.86);

    font-size: 12px;

    font-weight: 600;

    backdrop-filter: blur(8px);
}

.portal-tag span {
    width: 7px;
    height: 7px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #8ee5b3;

    box-shadow:
        0 0 0 4px rgba(142, 229, 179, 0.14);
}


/* =========================================================
   LEFT TITLE
========================================================= */

.panel-heading h2 {
    max-width: 550px;

    margin: 22px 0 16px;

    color: #fff;

    font-size:
        clamp(2.2rem, 3.2vw, 3.5rem);

    font-weight: 800;

    line-height: 1.16;

    letter-spacing: -1.8px;
}


/* =========================================================
   LEFT DESCRIPTION
========================================================= */

.panel-heading p {
    max-width: 500px;

    margin: 0;

    color:
        rgba(255, 255, 255, 0.70);

    font-size: 15px;

    line-height: 1.8;
}


/* =========================================================
   DASHBOARD PREVIEW
========================================================= */

.dashboard-preview {
    width: 100%;

    margin-top: auto;
    margin-bottom: 0;

    padding: 20px;

    position: relative;

    overflow: hidden;

    flex-shrink: 0;

    border:
        1px solid rgba(255, 255, 255, 0.10);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.055);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 24px 50px rgba(14, 5, 2, 0.24);
}


/* Glass shine */

.dashboard-preview::before {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.06),
            transparent 60%
        );

    pointer-events: none;
}


/* =========================================================
   DASHBOARD TOP
========================================================= */

.preview-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 16px;

    padding-bottom: 12px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
}


/* =========================================================
   DASHBOARD TITLE
========================================================= */

.preview-title {
    display: flex;

    align-items: center;

    gap: 7px;

    color:
        rgba(255, 255, 255, 0.85);

    font-size: 0.78rem;

    font-weight: 600;
}

.preview-title i {
    color: #f4c3c3;
}


/* =========================================================
   DASHBOARD STATUS
========================================================= */

.preview-status {
    display: flex;

    align-items: center;

    gap: 6px;

    color: #7eeaa0;

    font-size: 0.62rem;

    font-weight: 500;

    letter-spacing: 0.3px;
}


/* =========================================================
   STATUS DOT
========================================================= */

.status-dot {
    width: 7px;
    height: 7px;

    display: inline-block;

    border-radius: 50%;

    background: #7eeaa0;

    animation:
        dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 1;

        transform: scale(1);

        box-shadow:
            0 0 0 0
            rgba(126, 234, 160, 0.5);
    }

    50% {
        opacity: 0.7;

        transform: scale(1.1);

        box-shadow:
            0 0 0 4px
            rgba(126, 234, 160, 0);
    }
}


/* =========================================================
   METRIC LIST
========================================================= */

.metric-list {
    display: flex;

    flex-direction: column;

    gap: 11px;

    margin-bottom: 16px;
}


/* =========================================================
   METRIC ROW
========================================================= */

.metric-row {
    display: flex;

    align-items: center;

    gap: 10px;
}


/* =========================================================
   METRIC LABEL
========================================================= */

.metric-label {
    min-width: 130px;

    display: flex;

    align-items: center;

    gap: 6px;

    flex-shrink: 0;

    color:
        rgba(255, 255, 255, 0.60);

    font-size: 0.68rem;
}

.metric-label i {
    color:
        rgba(255, 255, 255, 0.40);

    font-size: 0.75rem;
}


/* =========================================================
   METRIC BAR
========================================================= */

.metric-bar-wrap {
    flex: 1;

    height: 5px;

    overflow: hidden;

    border-radius: 99px;

    background:
        rgba(255, 255, 255, 0.08);
}

.metric-bar {
    width: 0;

    height: 100%;

    border-radius: 99px;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.25),
            rgba(255, 255, 255, 0.55)
        );

    animation:
        barFill 1.8s
        cubic-bezier(.4, 0, .2, 1)
        forwards;
}

.metric-row:nth-child(1) .metric-bar {
    --fill: 82%;

    animation-delay: 0.3s;
}

.metric-row:nth-child(2) .metric-bar {
    --fill: 45%;

    animation-delay: 0.5s;
}

.metric-row:nth-child(3) .metric-bar {
    --fill: 92%;

    animation-delay: 0.7s;
}

.metric-row:nth-child(4) .metric-bar {
    --fill: 76%;

    animation-delay: 0.9s;
}

@keyframes barFill {

    from {
        width: 0;
    }

    to {
        width: var(--fill);
    }
}


/* =========================================================
   METRIC BADGES
========================================================= */

.metric-badge {
    flex-shrink: 0;

    padding: 2px 8px;

    border-radius: 99px;

    font-size: 0.55rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}

.metric-badge.good {
    color: #7eeaa0;

    background:
        rgba(126, 234, 160, 0.12);

    border:
        1px solid rgba(126, 234, 160, 0.25);
}

.metric-badge.warn {
    color: #ffc164;

    background:
        rgba(255, 193, 100, 0.12);

    border:
        1px solid rgba(255, 193, 100, 0.25);
}


/* =========================================================
   CHART
========================================================= */

.chart-box {
    width: 100%;
    height: 72px;

    position: relative;

    overflow: hidden;

    margin-bottom: 14px;

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.02);
}

.chart-lines {
    position: absolute;

    inset: 0;

    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 17px,
            rgba(255, 255, 255, 0.03) 17px,
            rgba(255, 255, 255, 0.03) 18px
        );
}

.chart-path {
    position: absolute;

    inset: 0;
}

.chart-path svg {
    width: 100%;
    height: 100%;

    display: block;
}

.chart-path svg path[stroke] {
    stroke-dasharray: 900;

    stroke-dashoffset: 900;

    animation:
        drawLine 2.5s ease forwards;

    animation-delay: 0.5s;
}

@keyframes drawLine {

    to {
        stroke-dashoffset: 0;
    }
}


/* =========================================================
   DASHBOARD FOOTER
========================================================= */

.preview-footer {
    display: flex;

    justify-content: space-between;

    padding-top: 12px;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);
}

.preview-footer span {
    display: flex;

    align-items: center;

    gap: 5px;

    color:
        rgba(255, 255, 255, 0.35);

    font-size: 0.6rem;
}

.preview-footer i {
    font-size: 0.65rem;
}


/* =========================================================
   LEFT COPYRIGHT
========================================================= */

.panel-footer {
    margin-top: 40px;   /* was: padding-top: 30px (relying on margin-top:auto elsewhere) */
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}


/* =========================================================
   RIGHT LOGIN PANEL
========================================================= */

.login-panel {
    width: 50%;
    height: 100vh;
    min-height: 100vh;

    position: relative;

    padding:
        0 var(--right-padding);

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        radial-gradient(
            circle at top right,
            rgba(193, 113, 113, 0.11),
            transparent 26%
        ),
        #fff;

    overflow: hidden;
}


/* =========================================================
   RIGHT DECORATION
========================================================= */

.login-panel::before {
    content: "";

    width: 300px;
    height: 300px;

    position: absolute;

    right: -130px;
    bottom: -130px;

    border-radius: 50%;

    background:
        rgba(193, 113, 113, 0.08);

    pointer-events: none;
}


/* =========================================================
   LOGIN BOX
========================================================= */

.login-box {
    width: 100%;
    max-width: 430px;

    position: relative;

    z-index: 2;

    margin: 0 auto;

    animation:
        riseIn 0.7s ease both;
}

@keyframes riseIn {

    from {
        opacity: 0;

        transform:
            translateY(22px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =========================================================
   MOBILE BRAND
========================================================= */

.mobile-brand {
    display: none;

    align-items: center;

    gap: 11px;

    margin-bottom: 40px;
}

.mobile-brand img {
    width: 120px;
    height: auto;
}


/* =========================================================
   LOGIN HEADER
========================================================= */

.login-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 14px;
}

/* =========================================================
   LOGIN LOGO
========================================================= */

.login-badge-lg {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0px;
}

.login-badge-lg img {
    width: 128px;

    height: auto;

    display: block;

    margin: 0;
}


/* =========================================================
   LOGIN TITLE
========================================================= */

.login-title {
    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: flex-start;
}

.login-box h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0px;
    margin-bottom: 3px;
}

.login-box .subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}


/* =========================================================
   FORM LABEL
========================================================= */

.form-label {
    margin-bottom: 8px;
    color: #4e4240;
    font-size: 12px;
    font-weight: 700;
}

/* =========================================================
   FIELD
========================================================= */

.field-wrapper {
    width: 100%;

    position: relative;
}

.field-wrapper .field-icon {
    position: absolute;

    top: 50%;
    left: 16px;

    z-index: 2;

    color: var(--third);

    font-size: 16px;

    transform:
        translateY(-50%);
}


/* =========================================================
   INPUT
========================================================= */

.form-control {
    width: 100%;
    height: 49px;
    padding: 0 45px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 13px;
    background: #fdfcfc;
    transition: 0.25s ease;
}

.form-control::placeholder {
    color: #a59a97;
}

.form-control:focus {
    border-color:
        var(--secondary);

    background: #fff;

    box-shadow:
        0 0 0 4px
        rgba(146, 68, 68, 0.10);

    outline: none;
}


/* =========================================================
   PASSWORD TOGGLE
========================================================= */

.password-toggle {
    position: absolute;

    top: 50%;
    right: 14px;

    z-index: 2;

    padding: 5px;

    border: 0;

    color: #948986;

    background: transparent;

    transform:
        translateY(-50%);

    cursor: pointer;
}

.password-toggle:hover {
    color: var(--primary);
}

.password-toggle i {
    transition: 0.25s ease;
}

.password-toggle:hover i {
    transform: scale(1.05);
}


/* =========================================================
   CHECKBOX
========================================================= */

.form-check-input {
    width: 17px;
    height: 17px;

    cursor: pointer;

    border-color: #d9cccc;
}

.form-check-input:checked {
    border-color:
        var(--primary);

    background-color:
        var(--primary) !important;
}

.form-check-label {
    color: var(--muted);

    font-size: 13px;

    cursor: pointer;
}


/* =========================================================
   FORGOT PASSWORD
========================================================= */

.forgot-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.forgot-link:hover {
    color: var(--primary);

    text-decoration: underline;
}


/* =========================================================
   SUBMIT BUTTON
========================================================= */

.btn-cims {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );
    box-shadow: 0 13px 22px
        rgba(80, 42, 33, 0.20);
    transition: 0.25s ease;
}

.btn-cims:hover {
    color: #fff;

    transform:
        translateY(-2px);

    box-shadow:
        0 18px 28px
        rgba(80, 42, 33, 0.28);
}

.btn-cims:disabled {
    opacity: 0.75;

    transform: none;
}


/* =========================================================
   ERRORS
========================================================= */

.field-error {
    display: block;

    margin-top: 6px;

    font-size: 12px;
}


/* =========================================================
   ALERTS
========================================================= */

.alert {
    border-radius: 10px;

    font-size: 13px;
}


/* =========================================================
   DESKTOP — EXACT 50 / 50
========================================================= */

@media (min-width: 992px) {

    .login-page {
        width: 100%;
        height: 100vh;
        min-height: 100vh;

        display: flex;

        align-items: stretch;
    }

    .visual-panel {
        width: 50%;
        height: 100vh;
        min-height: 100vh;
    }

    .login-panel {
        width: 50%;
        height: 100vh;
        min-height: 100vh;
    }
}


/* =========================================================
   LARGE PC
========================================================= */

@media (min-width: 1600px) {

    :root {
        --left-padding: 80px;
        --right-padding: 80px;
    }

    .panel-content {
        max-width: 650px;
    }

    .login-box {
        max-width: 450px;
    }
}


/* =========================================================
   NORMAL LAPTOP / PC
========================================================= */

@media (min-width: 992px) and (max-width: 1599px) {

    :root {
        --left-padding: 45px;
        --right-padding: 45px;
    }

    .panel-content {
        max-width: 570px;
    }

    .login-box {
        max-width: 410px;
    }

    .panel-heading h2 {
        font-size: clamp(
            2rem,
            3vw,
            3rem
        );
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991px) {

    html,
    body {
        height: auto;

        min-height: 100%;
    }

    .login-page {
        width: 100%;

        height: auto;

        min-height: 100vh;

        display: block;

        overflow: visible;
    }

    .visual-panel {
        display: none;
    }

    .login-panel {
        width: 100%;

        height: auto;

        min-height: 100vh;

        padding:
            40px 24px;

        display: flex;

        align-items: flex-start;

        justify-content: center;

        overflow: visible;
    }

    .login-box {
        width: 100%;

        max-width: 430px;

        margin: 0 auto;
    }

    .mobile-brand {
        display: flex;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 480px) {

    .login-panel {
        padding:
            30px 20px;
    }

    .login-box h3 {
        font-size: 26px;
    }

    .login-box .subtitle {
        font-size: 13px;
    }

    .login-badge-lg img {
        width: 110px;
    }

    .form-control {
        height: 54px;
    }

    .btn-cims {
        height: 54px;
    }

    .check {
        gap: 10px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 360px) {

    .login-panel {
        padding:
            25px 16px;
    }

    .login-box h3 {
        font-size: 24px;
    }

    .check {
        flex-direction: column;

        align-items: flex-start !important;

        gap: 12px;
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}

