/* ============================================
   Modern Login - Teras Kita
   Clean single-card design
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8edf5 0%, #d5dce8 50%, #c8d5e0 100%);
    position: relative;
}

/* ---- Animated Background ---- */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.login-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: floatOrb 14s ease-in-out infinite alternate;
}

.login-bg .orb-1 {
    width: 700px;
    height: 700px;
    background: linear-gradient(135deg, #0d2744, #1a4b8c);
    top: -250px;
    right: -200px;
    animation-duration: 16s;
}

.login-bg .orb-2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #059669, #34d399);
    bottom: -200px;
    left: -150px;
    animation-duration: 12s;
    animation-delay: -3s;
}

@keyframes floatOrb {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(40px, -30px) scale(1.04); }
    100% { transform: translate(-20px, 40px) scale(0.96); }
}

.login-bg .dayak-motif {
    position: absolute;
    inset: 0;
    background: url('../assets/images/dayak-removebg-preview.png') center/contain no-repeat;
    opacity: 0.25;
    pointer-events: none;
}

/* ---- Page Layout ---- */
.login-page {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    flex-shrink: 0;
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Card ---- */
.login-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(240,245,250,0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 24px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 12px 40px rgba(13, 39, 68, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(135deg, #0d2744 0%, #1a4b8c 50%, #059669 100%);
    opacity: 0.06;
    border-radius: 24px 24px 50% 50%;
    pointer-events: none;
}

.card-top-bar {
    height: 4px;
    background: linear-gradient(90deg, #0d2744, #1a4b8c, #059669);
}

/* ---- Brand ---- */
.card-brand {
    padding: 36px 36px 0;
    text-align: center;
}

.brand-logo {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.brand-logo img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.card-brand h1 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.3px;
}

.brand-tagline {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 4px;
}

/* ---- Alert ---- */
.login-alert {
    margin: 20px 36px 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeUp 0.3s both;
}

.login-alert.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.login-alert.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-alert .alert-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    background: none;
    border: none;
    font-size: 16px;
    color: inherit;
    line-height: 1;
}

.login-alert .alert-close:hover {
    opacity: 1;
}

/* ---- Form ---- */
.login-form {
    padding: 28px 36px 0;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper svg {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    stroke: #9ca3af;
    pointer-events: none;
    transition: stroke 0.2s;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
}

.input-wrapper input::placeholder {
    color: #b0b8c4;
}

.input-wrapper input:focus {
    border-color: #059669;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

.input-wrapper input:focus + svg,
.input-wrapper:focus-within svg {
    stroke: #059669;
}

/* ---- Captcha Row ---- */
.captcha-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.captcha-input {
    flex: 1;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px 10px;
    flex-shrink: 0;
}

.captcha-box img {
    height: 32px;
    border-radius: 6px;
}

.captcha-box a {
    color: #6b7280;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.captcha-box a:hover {
    color: #059669;
}

/* ---- Submit Button ---- */
.btn-submit {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #0d2744, #1a4b8c);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #059669, #10b981);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn-submit span,
.btn-submit svg {
    position: relative;
    z-index: 1;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13, 39, 68, 0.3);
}

.btn-submit:hover::after {
    opacity: 1;
}

.btn-submit:active {
    transform: translateY(0);
}

/* ---- Footer ---- */
.card-footer {
    padding: 24px 36px 28px;
    text-align: center;
    margin-top: 4px;
}

.card-footer p {
    font-size: 11px;
    color: #b0b8c4;
    line-height: 1.6;
}

.card-footer strong {
    color: #6b7280;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    body {
        align-items: stretch;
        overflow-y: auto;
    }

    .login-page {
        padding: 12px;
        max-width: 100%;
    }

    .login-card {
        border-radius: 16px;
    }

    .card-brand {
        padding: 28px 24px 0;
    }

    .login-form {
        padding: 24px 24px 0;
    }

    .login-alert {
        margin: 16px 24px 0;
    }

    .card-footer {
        padding: 20px 24px 24px;
    }
}
