/**
 * Girit ERP — Auth UI (login.php referans)
 * Login, Register, Forgot Password, Reset Password
 */

:root {
    --auth-bg-start: #0f172a;
    --auth-bg-mid: #1e293b;
    --auth-bg-end: #2563eb;
    --auth-glass-bg: rgba(255, 255, 255, 0.08);
    --auth-glass-border: rgba(255, 255, 255, 0.12);
    --auth-glass-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    --auth-primary: #2563eb;
    --auth-primary-light: #3b82f6;
    --auth-primary-glow: rgba(59, 130, 246, 0.12);
    --auth-text-dark: #0f172a;
    --auth-text-muted: #64748b;
    --auth-text-label: #334155;
    --auth-white: #ffffff;
    --auth-input-bg: #f8fafc;
    --auth-input-border: #e2e8f0;
    --auth-danger: #dc2626;
    --auth-danger-bg: rgba(239, 68, 68, 0.08);
    --auth-danger-border: rgba(239, 68, 68, 0.18);
    --auth-success: #16a34a;
    --auth-success-bg: rgba(34, 197, 94, 0.08);
    --auth-success-border: rgba(34, 197, 94, 0.18);
    --auth-font: 'Inter', sans-serif;
    --auth-radius-card: 30px;
    --auth-radius-input: 18px;
    --auth-radius-btn: 18px;
    --auth-transition: 0.25s ease;
}

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

body.auth-page {
    font-family: var(--auth-font);
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--auth-bg-start), var(--auth-bg-mid), var(--auth-bg-end));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

body.auth-page-register {
    overflow: auto;
    padding: 20px 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
}

.bg1 {
    width: 400px;
    height: 400px;
    background: var(--auth-primary-light);
    top: -100px;
    left: -100px;
}

.bg2 {
    width: 350px;
    height: 350px;
    background: #8b5cf6;
    bottom: -100px;
    right: -100px;
}

.login-container {
    width: 1100px;
    min-height: 650px;
    background: var(--auth-glass-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--auth-glass-border);
    border-radius: var(--auth-radius-card);
    overflow: hidden;
    display: flex;
    box-shadow: var(--auth-glass-shadow);
    position: relative;
    z-index: 2;
}

.login-left {
    flex: 1;
    padding: 70px;
    color: var(--auth-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-logo {
    width: 90px;
    margin-bottom: 25px;
    object-fit: contain;
}

.login-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.login-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    line-height: 1.6;
    max-width: 520px;
}

.stats-container {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.stat-card {
    flex: 1;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
}

.stat-card .value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #60a5fa;
    margin-bottom: 4px;
    text-shadow: 0 2px 10px rgba(96, 165, 250, 0.4);
}

.stat-card .label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.features {
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.feature {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.3s;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.1);
}

.feature i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
    color: #93c5fd;
    flex-shrink: 0;
}

.install-note {
    margin-top: 25px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 15px;
    line-height: 1.6;
}

.install-note i {
    font-size: 24px;
    color: var(--auth-primary-light);
    flex-shrink: 0;
}

.login-right {
    width: 430px;
    background: var(--auth-white);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--auth-text-dark);
    margin-bottom: 8px;
}

.form-subtitle {
    color: var(--auth-text-muted);
    margin-bottom: 25px;
}

.login-alert {
    background: var(--auth-danger-bg);
    border: 1px solid var(--auth-danger-border);
    color: var(--auth-danger);
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.login-alert span,
.login-success span {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.login-success {
    background: var(--auth-success-bg);
    border: 1px solid var(--auth-success-border);
    color: var(--auth-success);
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.auth-form-messages {
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    margin-bottom: 16px;
}

.auth-form-messages .login-alert,
.auth-form-messages .login-success {
    margin-bottom: 0;
}

.auth-page-register .login-left .auth-form-messages {
    margin-bottom: 12px;
}

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text-label);
}

.input-box {
    position: relative;
}

.input-box i {
    position: absolute;
    left: 18px;
    top: 20px;
    color: #94a3b8;
    font-size: 15px;
}

.input-box input {
    width: 100%;
    height: 58px;
    border: none;
    outline: none;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: var(--auth-radius-input);
    padding: 0 18px 0 52px;
    font-size: 15px;
    transition: var(--auth-transition);
}

.input-box input:focus {
    background: var(--auth-white);
    border-color: var(--auth-primary-light);
    box-shadow: 0 0 0 5px var(--auth-primary-glow);
}

.remember {
    margin-top: 5px;
    margin-bottom: 25px;
}

.remember label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--auth-text-muted);
    cursor: pointer;
}

.login-btn {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: var(--auth-radius-btn);
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-light));
    color: var(--auth-white);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--auth-transition);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    gap: 10px;
    flex-wrap: wrap;
}

.login-links a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
    color: var(--auth-primary);
}

.login-links a:hover {
    opacity: 0.7;
}

.login-links .forgot-link {
    color: #ef4444;
}

.login-links-muted {
    color: #94a3b8;
    font-size: 14px;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.auth-flash-outside {
    position: relative;
    z-index: 3;
    width: 1100px;
    max-width: 96%;
    margin: 0 auto 12px auto;
}

/* ── Register layout ── */
.auth-page-register .login-container {
    width: 1250px;
    min-height: 750px;
}

.auth-page-register .login-left {
    width: 450px;
    flex: none;
    padding: 40px 50px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
    overflow: hidden;
}

.auth-page-register .login-logo {
    width: 70px;
    margin-bottom: 15px;
}

.auth-page-register .login-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.auth-page-register .login-desc {
    font-size: 13px;
    line-height: 20px;
    margin-bottom: 20px;
}

.auth-page-register .login-left .input-group {
    margin-bottom: 15px;
}

.auth-page-register .login-left .input-group label {
    margin-bottom: 6px;
    font-size: 13px;
    color: #cbd5e1;
}

.auth-page-register .login-left .input-box i {
    left: 16px;
    top: 15px;
    font-size: 14px;
}

.auth-page-register .login-left .input-box input {
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0 18px 0 42px;
    font-size: 14px;
    color: var(--auth-white);
}

.auth-page-register .login-left .input-box input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-page-register .login-left .input-box input:focus {
    border-color: var(--auth-primary-light);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.auth-page-register .login-right {
    flex: 1;
    width: auto;
    background: #f8fafc;
    padding: 0;
    min-width: 0;
}

.auth-page-register .right-footer .auth-form-messages {
    margin-bottom: 12px;
}

.right-header {
    padding: 30px 40px 15px 40px;
    border-bottom: 1px solid var(--auth-input-border);
}

.auth-page-register .form-title {
    font-size: 26px;
    margin-bottom: 5px;
}

.auth-page-register .form-subtitle {
    font-size: 14px;
    margin-bottom: 0;
}

.package-container {
    display: flex;
    gap: 15px;
    padding: 20px 40px 10px 40px;
}

.package-card {
    flex: 1;
    border: 2px solid var(--auth-input-border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--auth-white);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.package-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.package-card input {
    display: none;
}

.package-card.active {
    border-color: var(--auth-primary);
    background: #eff6ff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15);
    transform: translateY(-3px);
}

.package-card.active::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--auth-primary);
    font-size: 22px;
}

.package-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--auth-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
    transition: 0.3s;
}

.package-card.active .package-icon {
    background: var(--auth-primary);
    color: var(--auth-white);
}

.package-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--auth-text-dark);
    margin-bottom: 5px;
}

.package-desc {
    font-size: 13px;
    color: var(--auth-text-muted);
    line-height: 1.4;
    margin-bottom: 15px;
}

.package-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--auth-primary-light);
}

.warning-box {
    margin: 10px 40px;
    padding: 15px 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.warning-box i {
    color: #f59e0b;
    font-size: 20px;
    margin-top: 2px;
}

.warning-box h4 {
    color: #d97706;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.warning-box p {
    color: #92400e;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.warning-box a {
    color: #d97706;
    font-weight: bold;
    text-decoration: underline;
}

.modules-scroll-area {
    padding: 10px 40px 20px 40px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 450px);
}

.modules-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.modules-scroll-area::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modules-scroll-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.auth-page-register details {
    background: var(--auth-white);
    border: 1px solid var(--auth-input-border);
    border-radius: 14px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: 0.2s;
}

.auth-page-register details[open] {
    border-color: var(--auth-primary-light);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.08);
}

.auth-page-register summary {
    padding: 18px 20px;
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.auth-page-register summary::-webkit-details-marker {
    display: none;
}

.auth-page-register summary::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #94a3b8;
    transition: 0.3s;
}

.auth-page-register details[open] summary::after {
    transform: rotate(180deg);
    color: var(--auth-primary-light);
}

.category-content {
    padding: 0 20px 20px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.modul-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border: 1px solid var(--auth-input-border);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    background: var(--auth-input-bg);
}

.modul-label:hover {
    border-color: #cbd5e1;
    background: var(--auth-white);
}

.modul-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modul-info input {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.modul-name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modul-name i {
    color: #94a3b8;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.modul-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--auth-primary-light);
}

.modul-label.selected {
    border-color: var(--auth-primary);
    background: #eff6ff;
}

.modul-label.selected .modul-name i {
    color: var(--auth-primary);
}

.modul-label.free {
    border-color: #10b981;
    background: #ecfdf5;
    cursor: not-allowed;
}

.modul-label.free .modul-price {
    color: #10b981;
}

.modul-label.free .modul-name i {
    color: #10b981;
}

.right-footer {
    background: var(--auth-white);
    padding: 25px 40px;
    border-top: 1px solid var(--auth-input-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0 0 var(--auth-radius-card) 0;
}

.total-text {
    font-size: 14px;
    color: var(--auth-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--auth-text-dark);
    margin-top: 5px;
    line-height: 1;
}

.auth-page-register .right-footer .login-btn {
    width: auto;
    padding: 0 35px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    body.auth-page {
        overflow: auto;
        padding: 20px;
    }

    .login-container {
        width: 100%;
        flex-direction: column;
    }

    .login-left {
        padding: 40px;
    }

    .login-right {
        width: 100%;
    }

    .login-title {
        font-size: 34px;
    }

    .stats-container {
        flex-direction: column;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .auth-page-register {
        padding: 0;
    }

    .auth-page-register .login-container {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }

    .auth-page-register .login-left {
        width: 100%;
        border-right: none;
    }

    .package-container {
        flex-direction: column;
        padding: 20px;
    }

    .modules-scroll-area {
        max-height: none;
        padding: 0 20px 20px 20px;
    }

    .right-header,
    .right-footer {
        padding: 20px;
    }

    .right-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .auth-page-register .right-footer .login-btn {
        width: 100%;
        justify-content: center;
    }

    .warning-box {
        margin: 10px 20px;
    }

    .auth-flash-outside {
        width: 100%;
    }
}

@media (max-width: 1100px) {
    .auth-page-register .login-container {
        width: 100%;
    }
}
