/* =============================================================
   NetGuard Auth Styles (Shared for User Login)
   ============================================================= */
:root {
    --surface-light: #f5f7fb;
    --surface-card: rgba(255, 255, 255, 0.92);
    --surface-border: rgba(15, 23, 42, 0.08);
    --gradient-primary-start: #2563eb;
    --gradient-primary-end: #7c3aed;
    --text-strong: #0f172a;
    --text-muted: #64748b;
    --accent-success: #0ea5e9;
    --accent-warning: #f97316;
    --accent-danger: #ef4444;
}

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

body.auth-layout {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.16) 0, transparent 45%),
        radial-gradient(circle at 80% 15%, rgba(124, 58, 237, 0.18) 0, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.12) 0, transparent 45%),
        var(--surface-light);
    color: var(--text-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 2.5vw, 4rem);
    padding-top: calc(clamp(1.5rem, 2.5vw, 4rem) + 80px);
}

.auth-wrapper {
    width: min(1150px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
    gap: clamp(2rem, 3vw, 3.5rem);
}

.auth-card {
    background: var(--surface-card);
    border-radius: 26px;
    border: 1px solid var(--surface-border);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px);
    padding: clamp(2.75rem, 3.5vw, 3.25rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.auth-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(124, 58, 237, 0.86));
    display: grid;
    place-items: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.auth-header-text {
    flex: 1;
    min-width: 0;
}

.auth-header h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.auth-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.4;
}

.language-switch {
    margin-left: auto;
}

.language-switch select {
    border-radius: 999px;
    padding: 0.45rem 1rem 0.45rem 2.2rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-strong);
    position: relative;
    min-width: 120px;
}

/* Türkçe seçiliyse bayrak göster */
.language-switch select.lang-tr {
    background-image: url("/assets/img/lang/turkey_lang.png");
    background-repeat: no-repeat;
    background-position: 0.5rem center;
    background-size: 1.5rem 1rem;
    padding-left: 2.2rem;
}

/* İngilizce seçiliyse bayrak göster */
.language-switch select.lang-en {
    background-image: url("/assets/img/lang/united_lang.png");
    background-repeat: no-repeat;
    background-position: 0.5rem center;
    background-size: 1.5rem 1rem;
    padding-left: 2.2rem;
}

.auth-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-body .desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.alert-message {
    border-radius: 16px;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.auth-form-group label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-strong);
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.1rem 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus-within {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.auth-input i {
    color: rgba(15, 23, 42, 0.32);
    font-size: 1.1rem;
    margin-right: 0.7rem;
}

.auth-input input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    padding: 0.75rem 0;
    color: var(--text-strong);
}

.auth-input input::placeholder {
    color: rgba(100, 116, 139, 0.6);
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-ghost {
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    padding: 0;
}

.btn-submit {
    border: none;
    border-radius: 16px;
    padding: 0.95rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(124, 58, 237, 0.92));
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.22);
}

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

.btn-submit .spinner {
    display: none;
    animation: spin 1s linear infinite;
}

.btn-submit.loading .label {
    opacity: 0;
}

.btn-submit.loading .spinner {
    display: inline-flex;
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.6);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-footer small {
    color: rgba(100, 116, 139, 0.75);
}

.auth-showcase {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(140deg, rgba(37, 99, 235, 0.55), rgba(124, 58, 237, 0.55));
    color: #f8fafc;
    padding: clamp(2.5rem, 4vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(30, 41, 59, 0.3));
    mix-blend-mode: multiply;
}

.showcase-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    height: 100%;
}

.showcase-heading {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.showcase-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
}

.showcase-heading p {
    margin: 0;
    color: rgba(226, 232, 240, 0.92);
    line-height: 1.6;
    font-size: 1.05rem;
}

.showcase-card {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 24px;
    padding: clamp(1.5rem, 2vw, 2rem);
    display: grid;
    gap: 1.2rem;
}

.showcase-card h3 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.9);
}

.highlight-grid {
    display: grid;
    gap: 1rem;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.highlight-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.22);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

.highlight-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.highlight-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.highlight-desc {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.8);
    line-height: 1.5;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
    .auth-wrapper {
        grid-template-columns: minmax(0, 520px);
    }

    .auth-showcase {
        order: -1;
        min-height: 240px;
    }
}

@media (max-width: 640px) {
    body.auth-layout {
        padding: 1.5rem;
    }

    .auth-wrapper {
        gap: 1.5rem;
    }

    .auth-card {
        padding: 2rem 1.75rem;
        border-radius: 22px;
    }

    .auth-header {
        gap: 0.85rem;
    }

    .auth-logo {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .auth-header h1 {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }

    .auth-header p {
        font-size: 0.8rem;
    }

    .auth-form {
        gap: 1.15rem;
    }

    .btn-submit {
        font-size: 0.95rem;
    }
}

/* =============================================================
   Dark Mode Styles
   ============================================================= */
body.auth-layout.dark-mode {
    --surface-light: #0f172a;
    --surface-card: rgba(15, 23, 42, 0.85);
    --surface-border: rgba(148, 163, 184, 0.15);
    --text-strong: #f1f5f9;
    --text-muted: #94a3b8;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.25) 0, transparent 45%),
        radial-gradient(circle at 80% 15%, rgba(124, 58, 237, 0.28) 0, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.18) 0, transparent 45%),
        var(--surface-light);
}

body.auth-layout.dark-mode .auth-card {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

body.auth-layout.dark-mode .language-switch select {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-strong);
}

body.auth-layout.dark-mode .auth-input {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.2);
}

body.auth-layout.dark-mode .auth-input:focus-within {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

body.auth-layout.dark-mode .auth-input i {
    color: rgba(148, 163, 184, 0.7);
}

body.auth-layout.dark-mode .auth-input input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

body.auth-layout.dark-mode .link-ghost:hover {
    color: var(--text-strong);
}

body.auth-layout.dark-mode .alert-message.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

body.auth-layout.dark-mode .alert-message.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

body.auth-layout.dark-mode .auth-footer {
    color: rgba(148, 163, 184, 0.7);
}

body.auth-layout.dark-mode .auth-footer small {
    color: rgba(148, 163, 184, 0.6);
}

/* Theme Toggle Button */
.theme-toggle-auth {
    margin-left: 0.5rem;
}

.theme-toggle-auth button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
    color: var(--text-strong);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    position: relative;
}

.theme-toggle-auth button i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.theme-toggle-auth button .sun-icon {
    opacity: 0;
}

.theme-toggle-auth button .moon-icon {
    opacity: 1;
}

body.auth-layout.dark-mode .theme-toggle-auth button {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-strong);
}

body.auth-layout.light-mode .theme-toggle-auth button .sun-icon {
    opacity: 1;
}

body.auth-layout.light-mode .theme-toggle-auth button .moon-icon {
    opacity: 0;
}

.theme-toggle-auth button:hover {
    background: rgba(15, 23, 42, 0.15);
    transform: scale(1.05);
}

body.auth-layout.dark-mode .theme-toggle-auth button:hover {
    background: rgba(148, 163, 184, 0.2);
}
