/* ========================================
   LOGIN ADMIN - CENTERED CARD DESIGN
   Standalone CSS untuk halaman login admin
   ======================================== */

/* ===== BASE RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BODY & BACKGROUND ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #2F327D 0%, #4a4d9f 50%, #2F327D 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== ANIMATED BACKGROUND PATTERN ===== */
body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(244, 140, 6, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ===== FLOATING BACKGROUND ELEMENTS ===== */
.bg-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.bg-element-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation: float-slow 15s ease-in-out infinite;
}

.bg-element-2 {
    width: 200px;
    height: 200px;
    bottom: 15%;
    right: 10%;
    animation: float-slow 18s ease-in-out infinite reverse;
}

.bg-element-3 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 20%;
    animation: float-slow 12s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-30px, 30px); }
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

/* ===== LOGO SECTION ===== */
.logo-section {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 16px;
}

.logo-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    opacity: 0.95;
}

/* ===== LOGIN CARD ===== */
.login-card {
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CARD HEADER ===== */
.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.card-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 15px;
    color: #64748b;
    line-height: 1.5;
}

/* ===== ACCENT BAR ===== */
.accent-bar {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2F327D, #F48C06);
    border-radius: 2px;
    margin: 24px auto;
}

/* ===== ALERTS ===== */
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s;
    outline: none;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.form-input:focus {
    background: white;
    border-color: #2F327D;
    box-shadow: 0 0 0 4px rgba(47, 50, 125, 0.1);
}

/* ===== PASSWORD WRAPPER ===== */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    border-radius: 8px;
    font-size: 18px;
}

.password-toggle:hover {
    color: #2F327D;
    background: #f1f5f9;
}

/* ===== FORM FOOTER ===== */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}

.remember-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: #2F327D;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 14px;
    color: #F48C06;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #d67805;
    text-decoration: underline;
}

/* ===== SUBMIT BUTTON ===== */
.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #2F327D 0%, #1a1d4a 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(47, 50, 125, 0.3);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 50, 125, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== LOADING STATE ===== */
.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ===== CARD FOOTER ===== */
.card-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.footer-text {
    font-size: 13px;
    color: #64748b;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .card-title {
        font-size: 24px;
    }

    .card-subtitle {
        font-size: 14px;
    }

    .logo {
        height: 40px;
    }

    .logo-text {
        font-size: 16px;
    }

    .form-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .forgot-link {
        margin-left: 0;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 28px 20px;
    }

    .card-title {
        font-size: 22px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
    }

    .bg-element {
        display: none;
    }

    .login-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

/* ===== ACCESSIBILITY ===== */
.form-input:focus-visible,
.submit-btn:focus-visible,
.checkbox-input:focus-visible {
    outline: 2px solid #2F327D;
    outline-offset: 2px;
}

/* ===== SELECTION ===== */
::selection {
    background-color: #2F327D;
    color: white;
}

::-moz-selection {
    background-color: #2F327D;
    color: white;
}