/* ==========================================================================
   SSGD Portal - Modern Auth Stylesheet
   ========================================================================== */

:root {
    --ssgd-primary: #1e3a8a;
    --ssgd-primary-dark: #0f172a;
    --ssgd-primary-light: #3b82f6;
    --ssgd-accent: #f59e0b;
    --ssgd-accent-hover: #d97706;
    --ssgd-bg-grad-start: #0f172a;
    --ssgd-bg-grad-end: #1e293b;
    --ssgd-card-bg: rgba(255, 255, 255, 0.96);
    --ssgd-text-main: #0f172a;
    --ssgd-text-muted: #64748b;
    --ssgd-border-color: #e2e8f0;
    --ssgd-border-focus: #3b82f6;
    --ssgd-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --ssgd-shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.25);
    --ssgd-shadow-hover: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    --ssgd-radius-sm: 8px;
    --ssgd-radius-md: 14px;
    --ssgd-radius-lg: 22px;
}

/* Reset & Base Setup */
.ssgd-auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #0a1128 0%, #1c2541 50%, #0b132b 100%);
    color: var(--ssgd-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
}

.ssgd-auth-body * {
    box-sizing: border-box;
}

/* Background Ambient Orbs */
.ssgd-ambient-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(59, 130, 246, 0.1) 50%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.ssgd-ambient-glow.top-left {
    top: -200px;
    left: -200px;
}
.ssgd-ambient-glow.bottom-right {
    bottom: -200px;
    right: -200px;
}

/* Auth Page Wrapper */
.ssgd-auth-container {
    width: 100%;
    max-width: 1100px;
    margin: 24px auto;
    padding: 16px;
    position: relative;
    z-index: 10;
}

/* Split Card */
.ssgd-auth-card {
    display: flex;
    background: var(--ssgd-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--ssgd-radius-lg);
    box-shadow: var(--ssgd-shadow-hover);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    min-height: 620px;
    animation: ssgdFadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ssgdFadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Left Hero Pane */
.ssgd-auth-hero-pane {
    flex: 1.15;
    position: relative;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.78) 0%, rgba(30, 58, 138, 0.72) 100%), url('/images/ssgd_login_bg.jpg') center/cover no-repeat;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px;
    overflow: hidden;
}

.ssgd-auth-hero-pane::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.25), transparent 60%);
    pointer-events: none;
}

.ssgd-hero-header {
    position: relative;
    z-index: 2;
}

.ssgd-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
    margin-bottom: 24px;
}

.ssgd-brand-badge i,
.ssgd-brand-badge img {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.ssgd-hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 12px 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.ssgd-hero-subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 28px 0;
    max-width: 420px;
}

.ssgd-feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.ssgd-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

.ssgd-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 14px;
    flex-shrink: 0;
}

.ssgd-hero-footer {
    position: relative;
    z-index: 2;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ssgd-trust-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #93c5fd;
    font-weight: 600;
}

/* Right Form Pane */
.ssgd-auth-form-pane {
    flex: 1;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    position: relative;
}

.ssgd-form-header {
    margin-bottom: 30px;
}

.ssgd-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ssgd-text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.ssgd-back-home:hover {
    color: var(--ssgd-primary-light);
    transform: translateX(-3px);
    text-decoration: none;
}

.ssgd-form-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--ssgd-text-main);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.ssgd-form-desc {
    font-size: 14px;
    color: var(--ssgd-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Custom Alert / Validation Summary */
.ssgd-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: var(--ssgd-radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ssgd-alert-danger ul {
    margin: 0;
    padding-left: 18px;
}

.ssgd-alert-danger .validation-summary-errors {
    color: #991b1b;
    font-weight: 500;
}

/* Input Fields & Groups */
.ssgd-input-group {
    margin-bottom: 20px;
    position: relative;
}

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

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

.ssgd-input-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.ssgd-form-control {
    width: 100%;
    height: 48px;
    padding: 10px 16px 10px 46px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    background-color: #f8fafc;
    border: 1.5px solid var(--ssgd-border-color);
    border-radius: var(--ssgd-radius-md);
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.ssgd-form-control:focus {
    background-color: #ffffff;
    border-color: var(--ssgd-primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.ssgd-input-wrapper:focus-within .ssgd-input-icon {
    color: var(--ssgd-primary-light);
}

.ssgd-password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    transition: color 0.2s ease;
    z-index: 3;
}

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

.ssgd-field-error {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
    margin-top: 5px;
}

/* Form Options & Remember Me */
.ssgd-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}

.ssgd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #475569;
    user-select: none;
    margin: 0;
    font-weight: 500;
}

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

/* Submit Action Button */
.ssgd-btn-submit {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--ssgd-radius-md);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.4);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ssgd-btn-submit:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    box-shadow: 0 12px 25px -4px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

.ssgd-btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.4);
}

.ssgd-btn-submit i {
    font-size: 15px;
    transition: transform 0.2s ease;
}

.ssgd-btn-submit:hover i {
    transform: translateX(4px);
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 900px) {
    .ssgd-auth-card {
        flex-direction: column;
        min-height: auto;
    }

    .ssgd-auth-hero-pane {
        padding: 32px 24px;
        flex: unset;
    }

    .ssgd-hero-title {
        font-size: 24px;
    }

    .ssgd-hero-subtitle {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .ssgd-feature-list {
        display: none;
    }

    .ssgd-hero-footer {
        display: none;
    }

    .ssgd-auth-form-pane {
        padding: 32px 24px;
    }

    .ssgd-form-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .ssgd-auth-container {
        padding: 8px;
        margin: 12px auto;
    }

    .ssgd-auth-card {
        border-radius: 16px;
    }

    .ssgd-auth-hero-pane {
        padding: 24px 18px;
    }

    .ssgd-auth-form-pane {
        padding: 24px 18px;
    }

    .ssgd-form-control {
        height: 44px;
        font-size: 14px;
    }

    .ssgd-btn-submit {
        height: 46px;
        font-size: 14px;
    }
}
