/* ==========================================================================
   CekGan Modern Auth Page Stylesheet (Login & Register OTP)
   Brand Theme: #00d66f (Neon Mint Green) & #000000 (Pure Obsidian)
   ========================================================================== */

:root {
    --cg-primary: #00d66f;
    --cg-primary-hover: #00bf63;
    --cg-blue-500: #00d66f;
    --cg-blue-600: #00bf63;
    --cg-text-main: #0f172a;
    --cg-text-muted: #64748b;
    --cg-card-bg: #ffffff;
    --cg-border-light: #e2e8f0;
}

.cg-auth-page-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    background-image: 
        radial-gradient(at 10% 20%, rgba(0, 214, 111, 0.15) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(0, 214, 111, 0.1) 0px, transparent 50%);
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--cg-text-main);
}

/* Ambient Floating Glow Blobs */
.cg-auth-glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.cg-auth-glow-blob.blob-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 214, 111, 0.25) 0%, transparent 70%);
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
}

.cg-auth-glow-blob.blob-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(0, 214, 111, 0.2) 0%, transparent 70%);
    bottom: -60px;
    right: 10%;
}

.cg-auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

/* Top Bar: Back to Home */
.cg-auth-top-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
}

.cg-auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(18, 18, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 30px;
    color: #a1a1aa;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cg-auth-back-link:hover {
    color: #00d66f;
    border-color: rgba(0, 214, 111, 0.4);
    transform: translateX(-3px);
    background: #141414;
    box-shadow: 0 4px 12px rgba(0, 214, 111, 0.15);
}

/* Main Card */
.cg-auth-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 214, 111, 0.15);
    position: relative;
}

/* Brand & Header */
.cg-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.cg-auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 16px;
}

.cg-auth-logo-img {
    height: 38px;
    width: auto;
    display: block;
    margin: 0 auto 12px;
    object-fit: contain;
}

.cg-auth-logo .cg-brand-icon {
    width: 40px;
    height: 40px;
    background: #00d66f;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-size: 18px;
    box-shadow: 0 6px 16px -2px rgba(0, 214, 111, 0.35);
}

.cg-auth-logo .cg-brand-text {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--cg-text-main);
    letter-spacing: -0.02em;
}

.cg-auth-title {
    font-family: 'Outfit', sans-serif;
    font-size: 23px;
    font-weight: 800;
    color: var(--cg-text-main);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

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

/* Segmented Tabs */
.cg-auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 14px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.cg-auth-tab {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--cg-text-muted);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.cg-auth-tab.active {
    background: #ffffff;
    color: #000000;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cg-auth-tab.active i {
    color: #000000;
}

.cg-auth-tab i {
    font-size: 14px;
}

/* Forms & Inputs */
.cg-auth-form {
    display: flex;
    flex-direction: column;
}

.cg-form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.cg-form-group label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cg-form-group label i {
    color: var(--cg-primary);
    font-size: 13px;
    width: 16px;
}

.cg-form-group label .req {
    color: #ef4444;
}

.cg-input {
    width: 100%;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: var(--cg-text-main);
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.cg-input:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.cg-input:focus {
    outline: none;
    border-color: var(--cg-blue-500);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.cg-input-password-wrap {
    position: relative;
    width: 100%;
}

.cg-input-password-wrap .cg-input {
    padding-right: 44px;
}

.cg-btn-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    z-index: 15;
    pointer-events: auto;
}

.cg-btn-toggle-pass:hover {
    color: var(--cg-primary, #2563eb);
}

.cg-btn-toggle-pass i {
    pointer-events: none;
}

.cg-input-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 5px;
    line-height: 1.4;
}

.cg-input-hint strong {
    color: var(--cg-primary);
    font-weight: 700;
}

.cg-user-hint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.cg-user-check-badge {
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cg-user-check-badge.valid {
    color: #16a34a;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 12px;
}

.cg-user-check-badge.invalid {
    color: #dc2626;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Remember Me Row */
.cg-auth-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13px;
    color: #64748b;
}

.cg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

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

/* Primary Auth Button */
.cg-btn-auth-primary {
    width: 100%;
    padding: 14px 20px;
    background: #00d66f;
    color: #000000;
    border: none;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 15.5px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 24px -4px rgba(0, 214, 111, 0.35);
}

.cg-btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(0, 214, 111, 0.45);
    background: #00bf63;
}

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

.cg-btn-auth-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Switch Footer */
.cg-auth-switch-footer {
    text-align: center;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cg-link-switch {
    background: none;
    border: none;
    color: var(--cg-primary);
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    text-decoration: underline;
    font-family: inherit;
    transition: color 0.15s;
}

.cg-link-switch:hover {
    color: var(--cg-primary-hover);
}

/* OTP Banner & Controls */
.cg-otp-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cg-otp-icon-wrap {
    width: 40px;
    height: 40px;
    background: #dcfce7;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    font-size: 20px;
    flex-shrink: 0;
}

.cg-otp-banner h4 {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 700;
    color: #166534;
}

.cg-otp-banner p {
    font-size: 12.5px;
    color: #15803d;
    margin: 0;
}

.cg-dev-box {
    background: #fefce8;
    border: 1px dashed #eab308;
    color: #854d0e;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12.5px;
    text-align: center;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cg-input-otp {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 14px;
    padding: 12px;
    background: #f8fafc;
    border-color: #cbd5e1;
    font-family: 'Outfit', sans-serif;
}

.cg-otp-countdown {
    text-align: center;
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 16px;
}

.cg-btn-resend {
    background: none;
    border: none;
    color: var(--cg-primary);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 16px;
    text-align: center;
    font-family: inherit;
    display: block;
    width: 100%;
}

.cg-btn-resend:hover {
    text-decoration: underline;
}

.cg-btn-back-step {
    background: none;
    border: none;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    text-align: center;
    display: block;
    width: 100%;
    font-family: inherit;
    transition: color 0.15s;
}

.cg-btn-back-step:hover {
    color: var(--cg-text-main);
}

.cg-auth-otp-label {
    text-align: center;
    display: block;
    justify-content: center;
}

/* Alert Boxes */
.cg-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.cg-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.cg-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Trust Badges Under Form */
.cg-auth-trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    flex-wrap: wrap;
}

.cg-auth-trust-row span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cg-auth-trust-row i {
    color: #16a34a;
}

.cg-d-none {
    display: none;
}

@media (max-width: 480px) {
    .cg-auth-page-wrap {
        padding: 20px 12px 30px;
        min-height: 100dvh;
    }
    .cg-auth-top-bar {
        margin-bottom: 14px;
    }
    .cg-auth-back-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    .cg-auth-card {
        padding: 24px 18px;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    }
    .cg-auth-header {
        margin-bottom: 20px;
    }
    .cg-auth-logo .cg-brand-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .cg-auth-logo .cg-brand-text {
        font-size: 22px;
    }
    .cg-auth-title {
        font-size: 20px;
        line-height: 1.3;
    }
    .cg-auth-subtitle {
        font-size: 12.5px;
    }
    .cg-auth-tabs {
        padding: 4px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    .cg-auth-tab {
        padding: 9px 6px;
        font-size: 12.5px;
        gap: 6px;
    }
    .cg-form-group {
        margin-bottom: 15px;
    }
    .cg-input {
        padding: 11px 12px;
        font-size: 14px;
        border-radius: 10px;
    }
    .cg-input-otp {
        font-size: 22px;
        letter-spacing: 8px;
        padding: 10px;
    }
    .cg-btn-auth-primary {
        padding: 13px 16px;
        font-size: 14.5px;
        border-radius: 12px;
    }
    .cg-user-hint-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .cg-auth-switch-footer {
        margin-top: 18px;
        padding-top: 16px;
        font-size: 12.5px;
    }
    .cg-auth-trust-row {
        gap: 12px;
        font-size: 11.5px;
        margin-top: 18px;
    }
}
