/* ============================================================
   Evrak Yönetim — Auth / Giriş Sayfası
   Ultra Profesyonel & Kullanıcı Odaklı Tasarım | idrissancar.net
   ============================================================ */

:root {
    --auth-font-display: 'Instrument Serif', Georgia, serif;
    --auth-font-body: 'DM Sans', system-ui, sans-serif;
    --auth-accent: #0d9488;
    --auth-accent-hover: #0f766e;
    --auth-accent-dim: rgba(13, 148, 136, 0.12);
    --auth-accent-glow: rgba(13, 148, 136, 0.25);
    --auth-surface: #ffffff;
    --auth-surface-elevated: #f8fafc;
    --auth-border: #e2e8f0;
    --auth-text: #0f172a;
    --auth-text-muted: #64748b;
    --auth-input-bg: #ffffff;
    --auth-input-border: #cbd5e1;
    --auth-radius: 16px;
    --auth-radius-lg: 20px;
    --auth-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.06), 0 8px 32px -8px rgba(0, 0, 0, 0.04);
    --auth-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
    --auth-surface: #0f172a;
    --auth-surface-elevated: #1e293b;
    --auth-border: #334155;
    --auth-text: #f8fafc;
    --auth-text-muted: #94a3b8;
    --auth-input-bg: #0f172a;
    --auth-input-border: #475569;
    --auth-accent: #14b8a6;
    --auth-accent-hover: #2dd4bf;
    --auth-accent-dim: rgba(20, 184, 166, 0.15);
}

/* ── Wrapper: Split layout ── */
.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--auth-font-body);
    font-size: 15.5px;
    color: var(--auth-text);
    background: var(--auth-surface);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 992px) {
    .auth-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 991.98px) {
    .auth-form-panel {
        padding: 0.75rem 0;
        align-items: stretch;
        min-height: 100svh;
    }

    .auth-form-container {
        width: 100%;
        max-width: 100%;
        padding: 0.75rem 0.75rem 1rem;
        display: flex;
        flex-direction: column;
    }

    .auth-theme-toggle {
        position: absolute;
        top: 0.25rem;
        right: 0.25rem;
        z-index: 10;
    }

    .auth-card {
        width: 100%;
        max-width: 100%;
        border-radius: var(--auth-radius-lg);
        box-shadow: var(--auth-shadow);
        border: 1px solid var(--auth-border);
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .auth-card::before {
        display: block;
    }

    .auth-card-body {
        padding: 1.5rem 1.25rem 1.75rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-mobile-brand {
        display: flex !important;
    }

    .auth-card-footer {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }

    .auth-form-group {
        margin-bottom: 1.25rem;
    }

    .auth-form-group:last-of-type {
        margin-bottom: 1.5rem;
    }
}

/* ── Sol panel: Marka ── */
.auth-brand-panel {
    display: none;
    position: relative;
    padding: 6rem 7rem;
    overflow: hidden;
}

@media (min-width: 992px) {
    .auth-brand-panel {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 1200px) {
    .auth-brand-panel {
        padding: 6rem 8rem;
    }
}

@media (min-width: 1400px) {
    .auth-brand-panel {
        padding: 7rem 11rem;
    }
}

@media (min-width: 1600px) {
    .auth-brand-panel {
        padding: 8rem 14rem;
    }
}

.auth-brand-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.auth-brand-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0c1222 0%, #0f172a 40%, #0d1b2a 100%);
}

[data-theme="light"] .auth-brand-gradient {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #0c4a4e 100%);
}

.auth-brand-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z' fill='%23ffffff' fill-opacity='0.04'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.8;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.auth-brand-logo {
    margin-bottom: 4rem;
}

.auth-brand-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #5eead4;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.auth-brand-title {
    font-family: var(--auth-font-display);
    font-weight: 400;
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 0.6rem 0;
    line-height: 1.25;
}

.auth-brand-subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 500;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0 0 3.5rem 0;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
}

.auth-features li i {
    color: #5eead4;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.auth-brand-footer {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.auth-footer-name {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.9);
}

.auth-footer-link {
    font-size: 0.8125rem;
    color: #5eead4;
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}

.auth-footer-link:hover {
    color: #99f6e4;
    opacity: 0.95;
}

.auth-footer-info {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.35rem;
    font-style: italic;
}

/* ── Sağ panel: Form ── */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 2rem;
    background: var(--auth-surface);
    min-height: 100vh;
}

@media (min-width: 992px) {
    .auth-form-panel {
        padding: 4rem 2.5rem;
        background: var(--auth-surface-elevated);
        background-image:
            radial-gradient(ellipse 80% 50% at 100% 0%, var(--auth-accent-dim) 0%, transparent 50%),
            var(--auth-surface-elevated);
    }
}

@media (min-width: 1200px) {
    .auth-form-panel {
        padding: 5rem 3rem;
    }
}

@media (min-width: 1400px) {
    .auth-form-panel {
        padding: 6rem 3.5rem;
    }
}

@media (min-width: 1600px) {
    .auth-form-panel {
        padding: 8rem 4rem;
    }
}

.auth-form-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: relative;
    padding-top: 3.5rem; /* Tema butonu için alan */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Mobil marka */
.auth-mobile-brand {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 1.5rem;
    position: relative;
    padding-right: 3.5rem;
}

.auth-mobile-logo {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-accent-dim);
    border-radius: 12px;
    color: var(--auth-accent);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.auth-mobile-brand h2 {
    font-family: var(--auth-font-display);
    font-weight: 400;
    font-size: 1.35rem;
    color: var(--auth-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 4rem);
}

/* Tema butonu */
.auth-theme-toggle {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.auth-theme-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    color: var(--auth-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-theme-btn:hover {
    color: var(--auth-accent);
    border-color: var(--auth-accent);
    background: var(--auth-accent-dim);
}

.auth-theme-btn i {
    font-size: 1.25rem;
}

/* ── Login Card ── */
.auth-card {
    width: 100%;
    max-width: 100%;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    animation: authCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transition: box-shadow 0.3s ease;
}

.auth-card:hover {
    box-shadow: var(--auth-shadow-lg);
}

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

.auth-card::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, var(--auth-accent), #2dd4bf);
}

.auth-card-body {
    padding: 3rem 3.5rem 3.25rem;
}

@media (min-width: 768px) {
    .auth-card-body {
        padding: 4rem 4.5rem 4rem;
    }
}

@media (min-width: 1200px) {
    .auth-card-body {
        padding: 4.5rem 5rem 4.5rem;
    }
}

@media (min-width: 1400px) {
    .auth-card-body {
        padding: 5rem 5.5rem 5rem;
    }
}

@media (max-width: 575px) {
    .auth-card-body {
        padding: 2.25rem 2rem 2.5rem;
    }
}

/* Form karşılama metni */
.auth-welcome-text {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--auth-border);
}

.auth-form-title {
    font-family: var(--auth-font-display);
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--auth-text);
    margin: 0 0 0.5rem 0;
}

.auth-form-desc {
    font-size: 0.9375rem;
    color: var(--auth-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Form başlığı (masaüstünde gizli, mobilde auth-mobile-brand kullanılıyor) */
.auth-card .auth-card-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-card .auth-card-brand .auth-card-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-accent-dim);
    border-radius: 14px;
    color: var(--auth-accent);
    font-size: 1.6rem;
}

.auth-card .auth-card-brand h3 {
    font-family: var(--auth-font-display);
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--auth-text);
    margin: 0 0 0.25rem 0;
}

.auth-card .auth-card-brand p {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
    margin: 0;
}

/* Form */
.auth-card-body form {
    width: 100%;
}

/* Form grupları */
.auth-form-group {
    margin-bottom: 2rem;
    width: 100%;
}

.auth-form-group:last-of-type {
    margin-bottom: 2.25rem;
}

.auth-form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--auth-text);
    margin-bottom: 0.75rem;
}

.auth-form-label i {
    color: var(--auth-text-muted);
    font-size: 1rem;
}

.auth-form-control {
    width: 100%;
    padding: 1.05rem 1.35rem 1.05rem 2.9rem;
    font-size: 1.0625rem;
    font-family: var(--auth-font-body);
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: var(--auth-radius);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-control::placeholder {
    color: var(--auth-text-muted);
    opacity: 0.8;
}

.auth-form-control:hover {
    border-color: #94a3b8;
}

.auth-form-control:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-glow);
}

.auth-form-control:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

/* Input wrapper (ikon ile) */
.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .auth-form-control {
    padding-left: 2.9rem;
}

.auth-input-wrap .auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
}

.auth-input-wrap .auth-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    padding: 0.35rem;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1.1rem;
    z-index: 2;
    transition: color 0.2s;
}

.auth-input-wrap .auth-password-toggle:hover {
    color: var(--auth-accent);
}

@media (max-width: 991.98px) {
    .auth-form-control {
        padding: 1rem 1rem 1rem 2.75rem;
        font-size: 1rem;
    }
    
    .auth-input-wrap .auth-input-icon {
        left: 0.85rem;
    }
}

/* Submit butonu */
.auth-btn-submit {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--auth-font-body);
    color: #ffffff;
    background: var(--auth-accent);
    border: none;
    border-radius: var(--auth-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn-submit:hover {
    background: var(--auth-accent-hover);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--auth-accent-glow);
    transform: translateY(-1px);
}

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

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

.auth-btn-submit .spinner-border {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 2px;
}

/* Footer link */
.auth-card-footer {
    margin-top: 2.25rem;
    padding-top: 2rem;
    border-top: 1px solid var(--auth-border);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
}

.auth-card-footer a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-card-footer a:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

/* ========== Auth sayfası — app.css'ten taşınan stiller (Bootstrap/legacy uyumluluk) ========== */
body.auth-page {
    background: var(--auth-surface) !important;
    overflow-x: hidden;
}

body.auth-page > .auth-wrapper {
    width: 100%;
    min-width: 0;
}

body.auth-page::before {
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, var(--auth-accent-dim) 0%, transparent 50%),
        linear-gradient(180deg, #0c1222 0%, #0f172a 50%, #0c1222 100%);
}

.auth-page .card {
    border: 1px solid var(--auth-border);
    box-shadow: var(--auth-shadow-lg);
    border-radius: var(--auth-radius-lg);
    overflow: hidden;
}

.auth-page .card-body {
    background: var(--auth-surface);
}

.auth-page .text-primary {
    color: var(--auth-accent) !important;
}

.auth-page .btn-primary {
    background: var(--auth-accent);
    border-color: var(--auth-accent);
    font-weight: 600;
}

.auth-page .btn-primary:hover {
    background: var(--auth-accent-hover);
    border-color: var(--auth-accent-hover);
}

.auth-page .form-control:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-glow);
}

.auth-page .form-label {
    font-weight: 600;
    color: var(--auth-text);
}

/* Mobilde formun gereksiz daralmasını önle (dosya sonu override) */
@media (max-width: 991.98px) {
    .auth-form-panel {
        padding: 0.75rem 0;
        min-height: 100svh;
    }

    .auth-form-container {
        padding: 0.75rem 0.75rem 1rem;
    }

    .auth-card-body {
        padding: 1.5rem 1.25rem 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .auth-form-container {
        padding: 0.5rem 0.5rem 0.75rem;
    }

    .auth-card-body {
        padding: 1.25rem 1rem 1.5rem;
    }

    .auth-form-group {
        margin-bottom: 1.25rem;
    }

    .auth-card-footer {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
        font-size: 0.75rem;
    }

    .auth-mobile-brand h2 {
        font-size: 1.2rem;
    }

    .auth-form-title {
        font-size: 1.35rem;
    }

    .auth-form-desc {
        font-size: 0.875rem;
    }

    .auth-form-control {
        padding: 0.9rem 0.85rem 0.9rem 2.6rem;
        font-size: 0.95rem;
    }

    .auth-input-wrap .auth-input-icon {
        left: 0.8rem;
        font-size: 1rem;
    }

    .auth-btn-submit {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}
