/**
 * Instan Panel - Modern Premium Authentication Styling
 * Clean SaaS, White-labeled, Responsive, and Completely Free of WP Branding
 */

:root {
    --instan-primary: #2563eb;
    --instan-primary-hover: #1d4ed8;
    --instan-primary-light: #eff6ff;
    --instan-bg: #0f172a;
    --instan-card-bg: #ffffff;
    --instan-text: #0f172a;
    --instan-text-muted: #64748b;
    --instan-border: #e2e8f0;
    --instan-border-focus: #3b82f6;
    --instan-radius: 14px;
    --instan-radius-sm: 8px;
    --instan-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

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

body.instan-auth-page {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--instan-text);
    background-color: var(--instan-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Gradients & Glows */
.instan-auth-bg-gradient {
    background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.18) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.18) 0%, transparent 45%),
                #0b0f19;
}

.instan-auth-bg-custom-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.instan-auth-bg-custom-image::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 0;
}

/* Container */
.instan-auth-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    margin: auto;
    animation: instanFadeUp 0.4s ease-out;
}

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

/* Auth Card */
.instan-auth-card {
    background: var(--instan-card-bg);
    border-radius: var(--instan-radius);
    padding: 38px 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
}

/* Header Area */
.instan-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.instan-auth-logo-link {
    display: inline-block;
    margin-bottom: 18px;
    text-decoration: none;
    transition: transform 0.2s;
}

.instan-auth-logo-link:hover {
    transform: scale(1.02);
}

.instan-auth-logo-img {
    max-height: 52px;
    max-width: 220px;
    width: auto;
    object-fit: contain;
    display: inline-block;
}

.instan-auth-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.instan-auth-subtitle {
    font-size: 13.5px;
    color: var(--instan-text-muted);
    line-height: 1.5;
}

/* Alerts / Notifikasi */
.instan-alert {
    padding: 12px 16px;
    border-radius: var(--instan-radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

.instan-alert-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

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

.instan-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.instan-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Form Elements */
.instan-form-group {
    margin-bottom: 18px;
}

.instan-form-row {
    display: flex;
    gap: 12px;
}

.instan-form-row .instan-form-group {
    flex: 1;
}

.instan-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

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

.instan-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.instan-input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid var(--instan-border);
    border-radius: var(--instan-radius-sm);
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.instan-input:focus {
    border-color: var(--instan-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.instan-input:focus ~ .instan-input-icon {
    color: var(--instan-primary);
}

.instan-input::placeholder {
    color: #94a3b8;
}

/* Input Password Toggle */
.instan-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s;
}

.instan-toggle-password:hover {
    color: #334155;
}

.instan-toggle-password svg {
    width: 18px;
    height: 18px;
}

/* Options Row (Remember Me & Forgot Password) */
.instan-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13px;
}

.instan-remember-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #475569;
    font-weight: 500;
    user-select: none;
}

.instan-remember-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--instan-primary);
    border-radius: 4px;
    cursor: pointer;
}

.instan-forgot-link,
.instan-inline-link {
    color: var(--instan-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.instan-forgot-link:hover,
.instan-inline-link:hover {
    color: var(--instan-primary-hover);
    text-decoration: underline;
}

/* Submit Button */
.instan-btn-submit {
    width: 100%;
    padding: 12px 20px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    color: #ffffff;
    background-color: var(--instan-primary);
    border: none;
    border-radius: var(--instan-radius-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.instan-btn-submit:hover {
    background-color: var(--instan-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

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

.instan-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Footer / Switch Mode */
.instan-auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--instan-border);
    text-align: center;
    font-size: 13.5px;
    color: var(--instan-text-muted);
}

.instan-auth-copyright {
    text-align: center;
    margin-top: 22px;
    font-size: 12px;
    color: #94a3b8;
}

.instan-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #94a3b8;
    text-decoration: none;
    margin-top: 14px;
    transition: color 0.2s;
}

.instan-back-home:hover {
    color: #ffffff;
}

.instan-back-home svg {
    width: 14px;
    height: 14px;
}

/* Responsive */
@media (max-width: 480px) {
    body.instan-auth-page {
        padding: 15px;
        align-items: flex-start;
    }

    .instan-auth-card {
        padding: 26px 20px;
        border-radius: 12px;
    }

    .instan-form-row {
        flex-direction: column;
        gap: 0;
    }

    .instan-auth-title {
        font-size: 20px;
    }
}
