/* ============================================================
   LOGIN PAGE STYLE - SISTEM INVENTARIS LABORATORIUM
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F1B3D 0%, #1a2d5e 40%, #162855 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Decorations */
.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    background: #ffffff;
}
.bg-circle-1 { width: 500px; height: 500px; top: -200px; right: -150px; }
.bg-circle-2 { width: 300px; height: 300px; bottom: -100px; left: -100px; }
.bg-circle-3 { width: 200px; height: 200px; top: 50%; left: 60%; }

/* Grid Dots */
.bg-dots {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* Main Container */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

/* Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 32px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(67, 103, 238, 0.25);
}

.login-icon-fallback {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4367ee, #3451c7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(67, 103, 238, 0.25);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e2a4a;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.login-subtitle {
    font-size: 13px;
    color: #8892a0;
    font-weight: 400;
}

/* Form */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #5a6270;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #a0a8b7;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color 0.3s ease;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #1e2a4a;
    background: #fafbfc;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #4367ee;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(67, 103, 238, 0.08);
}

.input-wrapper:focus-within .input-icon {
    color: #4367ee;
}

.form-input::placeholder {
    color: #c0c7d0;
}

/* Select */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 48px;
}

.select-arrow {
    position: absolute;
    right: 16px;
    color: #a0a8b7;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .select-arrow {
    color: #4367ee;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #a0a8b7;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
    z-index: 1;
}

.toggle-password:hover {
    color: #4367ee;
}

input[type="password"],
input[type="text"][name="password"] {
    padding-right: 46px;
}

/* Button */
.btn-login-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4367ee 0%, #3451c7 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #3451c7 0%, #2541a8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 103, 238, 0.35);
}

.btn-login-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(67, 103, 238, 0.2);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f0f2f5;
}

.register-text {
    font-size: 13px;
    color: #8892a0;
}

.register-link {
    color: #4367ee;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.register-link:hover {
    color: #3451c7;
    text-decoration: underline;
}

/* Back Link Inside Card */
.back-link-inner {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f2f5;
}

.btn-back-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #4367ee;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 20px;
    background: #f0f3ff;
    border: 1px solid #d0d8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
    width: auto;
}

.btn-back-inner:hover {
    background: #4367ee;
    color: #ffffff;
    border-color: #4367ee;
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.popup-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 28px 24px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.popup-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
}

.popup-success { background: #28a745; }
.popup-error   { background: #dc3545; }
.popup-warning { background: #f59e0b; }
.popup-info    { background: #3b82f6; }

.popup-message {
    font-size: 14px;
    color: #3a3d4a;
    margin-bottom: 20px;
    line-height: 1.6;
}

.popup-btn {
    padding: 10px 36px;
    background: #4367ee;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.popup-btn:hover {
    background: #3451c7;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px 24px;
    }
    .login-title {
        font-size: 21px;
    }
    .form-input {
        padding: 12px 14px 12px 42px;
        font-size: 13px;
    }
}

/* ============================================================
   REGISTER PAGE ADDITIONAL STYLE
   ============================================================ */

/* Info Box */
.info-box {
    background: #f0f3ff;
    border-left: 4px solid #4367ee;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #4a5a8a;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.info-box svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Strength Bar */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
    background: #e8ecf1;
    margin-bottom: 4px;
}

.strength-bar.fill {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 11px;
    font-weight: 500;
}

.strength-weak { color: #dc3545; }
.strength-fair { color: #f59e0b; }
.strength-good { color: #3b82f6; }
.strength-strong { color: #28a745; }

/* Register Icon */
.register-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f0fe, #d4e2fc);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(67, 103, 238, 0.15);
}

/* Already have account */
.login-link-text {
    font-size: 13px;
    color: #8892a0;
}

.login-link {
    color: #4367ee;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.login-link:hover {
    color: #3451c7;
    text-decoration: underline;
}