/* Auth Pages CSS - Login & Register */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 40fr 60fr;
    background: var(--bg);
}

/* Left Visual Section */
.auth-visual {
    background: linear-gradient(
        135deg,
        rgba(229, 57, 53, 0.95) 0%,
        rgba(25, 118, 210, 0.92) 50%,
        rgba(253, 216, 53, 0.9) 100%
    );
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="rgba(255,255,255,0.05)"/><rect x="20" width="20" height="20" fill="rgba(255,255,255,0.03)"/><rect x="40" width="20" height="20" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.4;
}

.auth-visual-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.auth-cube {
    width: 200px;
    height: 200px;
    margin: 0 auto 32px;
    background:
        linear-gradient(90deg, rgba(229, 57, 53, 0.95), rgba(229, 57, 53, 0.95))
            0 0/33% 33%,
        linear-gradient(
                90deg,
                rgba(253, 216, 53, 0.95),
                rgba(253, 216, 53, 0.95)
            )
            33% 0/33% 33%,
        linear-gradient(
                90deg,
                rgba(25, 118, 210, 0.95),
                rgba(25, 118, 210, 0.95)
            )
            66% 0/33% 33%,
        linear-gradient(90deg, rgba(67, 160, 71, 0.95), rgba(67, 160, 71, 0.95))
            0 33%/33% 33%,
        linear-gradient(90deg, rgba(251, 140, 0, 0.95), rgba(251, 140, 0, 0.95))
            33% 33%/33% 33%,
        linear-gradient(90deg, rgba(229, 57, 53, 0.85), rgba(229, 57, 53, 0.85))
            66% 33%/33% 33%,
        linear-gradient(
                90deg,
                rgba(25, 118, 210, 0.85),
                rgba(25, 118, 210, 0.85)
            )
            0 66%/33% 33%,
        linear-gradient(90deg, rgba(67, 160, 71, 0.85), rgba(67, 160, 71, 0.85))
            33% 66%/33% 33%,
        linear-gradient(
                90deg,
                rgba(253, 216, 53, 0.85),
                rgba(253, 216, 53, 0.85)
            )
            66% 66%/33% 33%;
    background-repeat: no-repeat;
    border-radius: 24px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.auth-slogan {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.auth-desc {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0 0 28px;
}

.auth-features {
    display: grid;
    gap: 12px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.feature-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Right Form Section */
.auth-form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-form-card {
    width: 100%;
    max-width: 480px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.auth-logo img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.auth-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.auth-logo-text .highlight {
    color: var(--red);
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 32px;
}

/* Form */
.auth-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.form-label .required {
    color: var(--red);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: rgba(17, 24, 39, 0.15);
    pointer-events: none;
    transition: color 0.2s;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px 12px 44px;
    border: 1px solid rgba(17, 24, 39, 0.15);
    border-radius: 14px;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(210, 25, 25, 0.1);
}

.form-input:focus + .input-icon {
    color: var(--red);
}

.form-input.error {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.1);
}

.form-input.success {
    border-color: var(--green);
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: rgba(17, 24, 39, 0.15);
    padding: 4px;
}

/* Hilangkan spinner di Chrome, Safari, Edge */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Hilangkan spinner di Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

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

.form-helper {
    font-size: 12px;
    color: var(--muted);
    margin-top: -4px;
}

.form-error {
    font-size: 12px;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: -4px;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: rgba(17, 24, 39, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    transition:
        width 0.3s ease,
        background 0.3s;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33%;
    background: var(--red);
}

.strength-fill.medium {
    width: 66%;
    background: var(--warning);
}

.strength-fill.strong {
    width: 100%;
    background: var(--green);
}

.strength-text {
    font-size: 12px;
    font-weight: 600;
}

.strength-text.weak {
    color: var(--red);
}
.strength-text.medium {
    color: #8a6b00;
}
.strength-text.strong {
    color: var(--green);
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    height: 48px;
    padding: 0 24px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(25, 118, 210, 0.3);
}

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

.auth-btn:disabled {
    background: #e0e0e0;
    color: rgba(0, 0, 0, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-btn.loading {
    position: relative;
    color: transparent;
}

.auth-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Google Login Button */
.google-auth-btn {
    width: 100%;
    height: 48px;
    padding: 0 18px;
    background: #fff;
    color: var(--text);
    border: 1px solid rgba(17, 24, 39, 0.15);
    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.google-auth-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(17, 24, 39, 0.22);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.1);
    background: #fff;
}

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

.google-auth-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.google-auth-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Links */
.auth-link {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    margin-top: 16px;
}

.auth-link a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.forgot-link {
    text-align: center;
    margin-top: 12px;
}

.forgot-link a {
    color: var(--blue);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.forgot-link a:hover {
    text-decoration: underline;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(17, 24, 39, 0.15);
}

input[type="checkbox"] {
    accent-color: var(--red);
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-page {
        grid-template-columns: 35fr 65fr;
    }

    .auth-visual {
        padding: 40px 30px;
    }

    .auth-cube {
        width: 160px;
        height: 160px;
    }

    .auth-slogan {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }

    .auth-form-container {
        padding: 60px 20px;
    }

    .auth-logo {
        margin-bottom: 40px;
    }

    .auth-title {
        font-size: 24px;
    }
}

/* Mobile banner (alternative for hidden visual) */
@media (max-width: 768px) {
    .auth-page::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(
            90deg,
            var(--red),
            var(--blue),
            var(--yellow)
        );
        z-index: 100;
    }
}
