@import url('../theme-vars.css');

/* Yalnızca admin_login.php ve admin_setup.php — tam style.css yüklenmez */
* {
    box-sizing: border-box;
}
body.admin-auth-page {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg2);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
}
body.admin-auth-page--setup {
    display: grid;
    place-items: center;
}
.admin-auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(64px, 10vh, 112px);
    padding: clamp(20px, 5vh, 56px) 16px 32px;
    box-sizing: border-box;
}
/* Giriş kartı çerçevesi (yalnızca admin_login — .admin-auth-login-card-wrap) */
.admin-auth-login-card-wrap {
    position: relative;
    margin-top: clamp(40px, 8vh, 96px);
    z-index: 2;
}
.admin-auth-login-card-wrap::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 22px;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse 95% 85% at 50% 8%,
        rgba(77, 159, 255, 0.42),
        rgba(77, 159, 255, 0.12) 42%,
        transparent 72%
    );
    filter: blur(14px);
    opacity: 0.75;
    animation: admin-login-halo-pulse 6s ease-in-out infinite;
}
.admin-auth-login-card-wrap::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    z-index: 0;
    pointer-events: none;
    padding: 1.5px;
    background: linear-gradient(
        135deg,
        rgba(77, 159, 255, 0.55),
        rgba(255, 255, 255, 0.12) 38%,
        rgba(77, 159, 255, 0.35) 52%,
        rgba(37, 99, 201, 0.4) 100%
    );
    background-size: 220% 220%;
    animation: admin-login-border-shimmer 9s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.85;
}
.admin-auth-login-card-wrap .admin-auth-card {
    position: relative;
    z-index: 1;
    animation: admin-login-card-glow 5s ease-in-out infinite;
}

@keyframes admin-login-card-glow {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(77, 159, 255, 0.22),
            0 0 32px rgba(77, 159, 255, 0.14),
            0 24px 48px rgba(0, 0, 0, 0.35);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(77, 159, 255, 0.42),
            0 0 52px rgba(77, 159, 255, 0.26),
            0 24px 48px rgba(0, 0, 0, 0.35);
    }
}

@keyframes admin-login-halo-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.97);
    }
    50% {
        opacity: 0.9;
        transform: scale(1);
    }
}

@keyframes admin-login-border-shimmer {
    0%, 100% {
        background-position: 0% 40%;
    }
    50% {
        background-position: 100% 60%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-auth-login-card-wrap::before,
    .admin-auth-login-card-wrap::after,
    .admin-auth-login-card-wrap .admin-auth-card {
        animation: none !important;
    }
    .admin-auth-login-card-wrap::after {
        opacity: 0.55;
        background-position: 50% 50%;
    }
    .admin-auth-login-card-wrap::before {
        opacity: 0.55;
        transform: none;
    }
    .admin-auth-login-card-wrap .admin-auth-card {
        box-shadow:
            0 0 0 1px rgba(77, 159, 255, 0.28),
            0 0 36px rgba(77, 159, 255, 0.16),
            0 24px 48px rgba(0, 0, 0, 0.35);
    }
}

.admin-auth-card {
    width: min(420px, 92vw);
    position: relative;
    z-index: 2;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
.admin-auth-card--setup {
    width: min(440px, 92vw);
}
.admin-auth-card h1 {
    margin: 0 0 10px;
    font-size: 26px;
    color: var(--text);
}
.admin-auth-card--setup h1 {
    font-size: 24px;
}
.admin-auth-card > p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
}
.admin-auth-card label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--muted);
    font-size: 13px;
}
.admin-auth-card input:not([type="hidden"]) {
    width: 100%;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: var(--panel2);
    color: var(--text);
    position: relative;
    z-index: 1;
}
.admin-auth-card input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 159, 255, 0.25);
}
.admin-auth-card button[type="submit"] {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #2563c9);
    cursor: pointer;
}
.admin-auth-card button[type="submit"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.admin-auth-err {
    margin: 0 0 12px;
    color: #fca5a5;
    background: rgba(232, 93, 93, 0.12);
    border: 1px solid rgba(232, 93, 93, 0.35);
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
}
.admin-auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
}
.admin-auth-links a {
    color: var(--muted);
    text-decoration: none;
}
.admin-auth-links a:hover {
    color: var(--accent);
}
.admin-auth-pre {
    text-align: center;
    margin: 0;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    max-width: 100%;
}
.admin-auth-selam {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 600;
}
.admin-auth-pre .logo-glow-wrap {
    margin: 0 auto;
}
.admin-auth-logo {
    width: min(400px, 100%);
    aspect-ratio: 1;
    height: auto;
    max-height: min(220px, 40vh);
    object-fit: contain;
    display: block;
    margin: 0;
}
@media (min-width: 600px) {
    .admin-auth-logo {
        max-height: min(320px, 35vh);
    }
}
