/* ================================================================
   Login Page — Opsicar Admin Dashboard
   by: ganiputras
 ================================================================ */

/* Reset body for login page */
body:has(.login-wrapper) {
    background: #fff;
    overflow: hidden;
}

/* ----------------------------------------------------------------
   WRAPPER
 ---------------------------------------------------------------- */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ================================================================
   LEFT PANEL — SLIDESHOW
 ================================================================ */
.login-left {
    flex: 0 0 62%;
    position: relative;
    overflow: hidden;
    background: #0d1b2a;
}

/* Slides */
.ls-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 56px 52px;
    opacity: 0;
}

.ls-slide-1 {
    background: linear-gradient(145deg, #0d1b2a 0%, #1a3a5c 50%, #0078d4 100%);
    animation: lsFade 18s 0s infinite;
}

.ls-slide-2 {
    background: linear-gradient(145deg, #0f1923 0%, #1e3a2f 50%, #107c10 100%);
    animation: lsFade 18s 6s infinite;
}

.ls-slide-3 {
    background: linear-gradient(145deg, #1a0a2e 0%, #2d1657 50%, #5c2d91 100%);
    animation: lsFade 18s 12s infinite;
}

@keyframes lsFade {
    0%   { opacity: 0; transform: scale(1.04); }
    8%   { opacity: 1; transform: scale(1);    }
    28%  { opacity: 1; transform: scale(1);    }
    36%  { opacity: 0; transform: scale(0.97); }
    100% { opacity: 0; transform: scale(1.04); }
}

/* Overlay gradient bottom */
.ls-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.1) 0%,
        rgba(0,0,0,0.05) 40%,
        rgba(0,0,0,0.6) 100%
    );
    z-index: 0;
}

/* Decorative background icon */
.ls-slide::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    z-index: 0;
}

/* Slide content */
.ls-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.ls-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.ls-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 14px;
}

.ls-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.ls-desc {
    font-size: 13px;
    opacity: 0.7;
    max-width: 400px;
    line-height: 1.7;
    font-weight: 400;
}

/* Stats row */
.ls-stats {
    display: flex;
    gap: 32px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.ls-stat-num {
    font-size: 22px;
    font-weight: 800;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.ls-stat-lbl {
    font-size: 11px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Brand on top-left */
.ls-brand {
    position: absolute;
    top: 28px;
    left: 36px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.ls-brand-icon {
    width: 36px;
    height: 36px;
    background: #0078d4;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,120,212,0.5);
}

.ls-brand-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.ls-brand-sub {
    font-size: 10px;
    opacity: 0.6;
    display: block;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Slide indicators */
.ls-dots {
    position: absolute;
    bottom: 52px;
    right: 36px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.ls-dot {
    width: 4px;
    height: 20px;
    border-radius: 3px;
    background: rgba(255,255,255,0.3);
    transition: all 0.4s ease;
}

.ls-dot-1 { animation: dotActive 18s 0s infinite;  }
.ls-dot-2 { animation: dotActive 18s 6s infinite;  }
.ls-dot-3 { animation: dotActive 18s 12s infinite; }

@keyframes dotActive {
    0%   { background: rgba(255,255,255,0.3); height: 20px; }
    8%   { background: rgba(255,255,255,0.9); height: 32px; }
    28%  { background: rgba(255,255,255,0.9); height: 32px; }
    36%  { background: rgba(255,255,255,0.3); height: 20px; }
    100% { background: rgba(255,255,255,0.3); height: 20px; }
}

/* ================================================================
   RIGHT PANEL — FORM
 ================================================================ */
.login-right {
    flex: 0 0 38%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 48px 52px;
    overflow-y: auto;
}

.lr-box {
    width: 100%;
    max-width: 360px;
}

/* Logo top */
.lr-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 36px;
}

.lr-logo-icon {
    width: 40px;
    height: 40px;
    background: #0078d4;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 19px;
    box-shadow: 0 4px 14px rgba(0,120,212,0.35);
    flex-shrink: 0;
}

.lr-logo-name {
    font-size: 17px;
    font-weight: 800;
    color: #1b1a19;
    line-height: 1.1;
    letter-spacing: -0.3px;
}

.lr-logo-sub {
    font-size: 10px;
    color: #8a8886;
    font-weight: 400;
    display: block;
    letter-spacing: 0.3px;
}

/* Heading */
.lr-heading {
    font-size: 21px;
    font-weight: 800;
    color: #1b1a19;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.lr-sub {
    font-size: 13px;
    color: #8a8886;
    margin-bottom: 28px;
}

/* Error message */
.lr-error {
    background: #fde7e9;
    border: 1px solid #f1707a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #a4262c;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form group */
.lr-group {
    margin-bottom: 16px;
}

.lr-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #605e5c;
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.lr-group .form-control {
    width: 100%;
    border: 1.5px solid #e1dfdd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    background: #faf9f8;
    color: #1b1a19;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
    font-family: inherit;
}

.lr-group .form-control::placeholder {
    color: #c8c6c4;
}

.lr-group .form-control:focus {
    border-color: #0078d4;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,120,212,0.12);
}

.lr-group .form-control.input-validation-error {
    border-color: #d13438;
    background: #fff8f8;
}

/* Password wrapper */
.lr-pw {
    position: relative;
}

.lr-pw .form-control {
    padding-right: 44px;
}

.lr-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #a19f9d;
    font-size: 15px;
    line-height: 1;
    transition: color 0.15s;
    z-index: 2;
}

.lr-pw-toggle:hover {
    color: #0078d4;
}

/* Validation message */
.lr-group .text-danger {
    font-size: 12px;
    color: #d13438;
    margin-top: 4px;
    display: block;
}

/* Remember + forgot row */
.lr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.lr-remember {
    display: flex;
    align-items: center;
    gap: 7px;
}

.lr-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #0078d4;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.lr-remember label {
    font-size: 12px;
    color: #605e5c;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.lr-forgot {
    font-size: 12px;
    color: #0078d4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.lr-forgot:hover {
    color: #106ebe;
    text-decoration: underline;
}

/* Submit button */
.lr-btn-submit {
    width: 100%;
    padding: 11px 16px;
    background: #0078d4;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    letter-spacing: 0.1px;
    margin-bottom: 16px;
    font-family: inherit;
}

.lr-btn-submit:hover {
    background: #106ebe;
    box-shadow: 0 4px 14px rgba(0,120,212,0.35);
}

.lr-btn-submit:active {
    transform: scale(0.99);
}

/* Divider */
.lr-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 14px;
    color: #a19f9d;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.lr-divider::before,
.lr-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e1dfdd;
}

/* Passkey button */
.lr-btn-passkey {
    width: 100%;
    padding: 10px 16px;
    background: #f3f2f1;
    color: #323130;
    border: 1.5px solid #e1dfdd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    text-decoration: none;
    margin-bottom: 20px;
}

.lr-btn-passkey:hover {
    background: #edebe9;
    border-color: #c8c6c4;
    color: #323130;
}

/* Footer links */
.lr-links {
    padding-top: 16px;
    border-top: 1px solid #f3f2f1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lr-links a {
    font-size: 12px;
    color: #605e5c;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
}

.lr-links a:hover {
    color: #0078d4;
}

.lr-links a i {
    font-size: 13px;
    opacity: 0.6;
}

/* Version badge */
.versioning {
    position: absolute;
    bottom: 18px;
    right: 24px;
    font-size: 11px;
    color: #aba9a8;
  /*  background: #f3f2f1;
    border: 1px solid #e1dfdd;
    border-radius: 20px;*/
    padding: 3px 10px;
    letter-spacing: 0.3px;
    user-select: none;
    white-space: nowrap;
}

/* Validation summary */
.validation-errors {
    background: #fde7e9;
    border: 1px solid #f1707a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #a4262c;
    margin-bottom: 16px;
    list-style: none;
    padding-left: 14px;
}

/* ================================================================
   RESPONSIVE
 ================================================================ */

/* Tablet landscape (992px–1199px) */
@media (max-width: 1199px) {
    .login-left  { flex: 0 0 55%; }
    .login-right { flex: 0 0 45%; padding: 40px 40px; }
    .ls-title    { font-size: 26px; }
}

/* Tablet portrait (768px–991px) */
@media (max-width: 991px) {
    .login-left  { flex: 0 0 48%; }
    .login-right { flex: 0 0 52%; padding: 36px 32px; }
    .ls-title    { font-size: 22px; }
    .ls-stats    { gap: 20px; }
    .ls-stat-num { font-size: 18px; }
    .lr-box      { max-width: 100%; }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    body:has(.login-wrapper) {
        overflow: auto;
    }

    .login-wrapper {
        flex-direction: column;
        min-height: 100dvh;
    }

    .login-left {
        display: none;
    }

    .login-right {
        flex: 1;
        padding: 48px 24px 40px;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .lr-box {
        max-width: 100%;
        width: 100%;
    }

    .lr-logo {
        margin-bottom: 28px;
    }

    .lr-heading {
        font-size: 19px;
    }
}

/* Small mobile (< 400px) */
@media (max-width: 399px) {
    .login-right { padding: 40px 20px 32px; }
    .lr-heading  { font-size: 17px; }
}
