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

body {
    font-family: var(--font-sans);
    background: url('../storage/images/background.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.678);
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 0;
    pointer-events: none;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 720px;
    width: 82%;
    background: rgba(30, 30, 30, 0.3);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 1;
    position: relative;
    overflow: hidden;
}

/* Left Side */
.auth-left {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    opacity: 1;
}

.auth-brand {
    text-align: center;
    color: var(--color-gray-800);
    z-index: 2;
}

.brand-logo {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Georgia', cursive;
    color: var(--color-primary);
}

.auth-brand h1 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.auth-brand p {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

.auth-illustration {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-illustration img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* Right Side */
.auth-right {
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(80px) saturate(200%) brightness(110%);
    -webkit-backdrop-filter: blur(80px) saturate(200%) brightness(110%);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 8px 32px rgba(0, 0, 0, 0.1);
}

.auth-card {
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 12px;
}

.auth-logo img {
    width: 85px;
    height: auto;
    display: inline-block;
}

.auth-header {
    text-align: center;
    margin-bottom: 14px;
}

.auth-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert ul {
    list-style: none;
    margin: 0;
}

.alert li {
    margin-bottom: 4px;
}

.alert li:last-child {
    margin-bottom: 0;
}

.alert-success {
    background: rgba(12, 149, 30, 0.1);
    color: #006D00;
    border: 1px solid rgba(12, 149, 30, 0.3);
}

.alert-error {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

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

.input-wrapper.verification-input-wrapper input {
    padding-right: 40px;
}

.input-wrapper svg {
    position: absolute;
    left: 11px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 8px 10px 8px 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 12px;
    font-family: var(--font-sans);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Input dengan toggle password button perlu padding kanan lebih */
.input-wrapper:has(.toggle-password) input {
    padding-right: 40px;
}

.input-wrapper input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-wrapper input:focus {
    border-color: #0C951E;
    background: rgba(255, 255, 255, 0.15);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Password Toggle Button */
.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    z-index: 2;
    width: 26px;
    height: 26px;
}

.toggle-password svg {
    width: 18px;
    height: 18px;
    left: 4px;
    display: block;
    position: relative;
}

/* Verification Wrapper */
.verification-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.verification-wrapper .input-wrapper {
    flex: 1;
}

.btn-send-code {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    height: 34px;
}

.btn-send-code.active {
    background: var(--color-primary);
    color: white;
    cursor: pointer;
    border-color: transparent;
}

.btn-send-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-send-code svg {
    width: 14px;
    height: 14px;
}

/* Action Code Button - Dynamic button for Send/Verify - Inside Input */
.btn-action-inside {
    position: absolute;
    right: 10px;
    padding: 0;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    z-index: 2;
}

.btn-action-inside.active[data-action="send"] {
    color: var(--color-primary);
    cursor: pointer;
}

.btn-action-inside.active[data-action="verify"] {
    color: #3b82f6;
    cursor: pointer;
}

.btn-action-inside[data-status="success"] {
    color: #10b981;
    cursor: default;
}

.btn-action-inside[data-status="error"] {
    color: #ef4444;
    cursor: default;
}

.btn-action-inside:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-action-inside[data-status="success"],
.btn-action-inside[data-status="error"] {
    opacity: 1;
}

.btn-action-inside svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    transform: scale(0.75);
}

/* Action Code Button - Dynamic button for Send/Verify */
.btn-action-code {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    height: 34px;
}

.btn-action-code.active[data-action="send"] {
    background: var(--color-primary);
    color: white;
    cursor: pointer;
    border-color: transparent;
}

.btn-action-code.active[data-action="verify"] {
    background: #3b82f6;
    color: white;
    cursor: pointer;
    border-color: transparent;
}

.btn-action-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-action-code svg {
    width: 14px;
    height: 14px;
}

/* Verify Code Button */
.btn-verify-code {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    height: 34px;
}

.btn-verify-code.active {
    background: #3b82f6;
    color: white;
    cursor: pointer;
    border-color: transparent;
}

.btn-verify-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-verify-code svg {
    width: 14px;
    height: 14px;
}

/* Spinner for loading */
.spinner {
    width: 12px;
    height: 12px;
    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: rotate(360deg);
    }
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-gray-500);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

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

.terms-checkbox {
    width: 100%;
}

.terms-checkbox span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.back-home-link {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-home-link:hover {
    color: white;
}

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

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

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: 2px solid var(--color-primary);
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    
    margin-top: 14px;
}

.auth-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.auth-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
}

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

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 14px 0;
    color: var(--color-gray-400);
    font-size: 11px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-gray-200);
}

.divider span {
    padding: 0 16px;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.social-btn {
    background: var(--color-secondary);
    border: 2px solid var(--color-gray-200);
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.social-btn:hover {
    border-color: var(--color-primary);
}

/* Background */
.auth-background {
    display: none;
}

/* Responsive */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .auth-left {
        display: none;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-right {
        padding: 30px 20px;
    }

    .auth-header h2 {
        font-size: 26px;
    }

    .social-login {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}