/* ==========================================================================
   Haber7 Geliştirici Konsolu — Giriş Sayfası
   ========================================================================== */

@property --h7-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    --h7-bg: #060a14;
    --h7-surface: rgba(13, 19, 36, 0.62);
    --h7-line: rgba(255, 255, 255, 0.08);
    --h7-line-strong: rgba(255, 255, 255, 0.16);
    --h7-text: #f4f4f7;
    --h7-muted: #8b8b9e;
    --h7-primary: #3b82f6;
    --h7-primary-deep: #1d4ed8;
    --h7-accent: #22d3ee;
    --h7-accent-2: #7dd3fc;
    --h7-green: #3ddc97;
    --h7-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --h7-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body.h7-auth {
    min-height: 100%;
}

body.h7-auth {
    margin: 0;
    background: var(--h7-bg) !important;
    color: var(--h7-text);
    font-family: var(--h7-sans);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Arka plan katmanları: aurora, grid zemin, noise
   -------------------------------------------------------------------------- */

.h7-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.h7-aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    mix-blend-mode: screen;
    will-change: transform;
}

.h7-aurora--1 {
    width: 46vw;
    height: 46vw;
    top: -14vw;
    left: -10vw;
    background: radial-gradient(circle, var(--h7-primary) 0%, transparent 65%);
    animation: h7-drift-1 18s ease-in-out infinite alternate;
}

.h7-aurora--2 {
    width: 38vw;
    height: 38vw;
    bottom: -16vw;
    left: 22vw;
    background: radial-gradient(circle, var(--h7-accent) 0%, transparent 65%);
    opacity: 0.35;
    animation: h7-drift-2 22s ease-in-out infinite alternate;
}

.h7-aurora--3 {
    width: 34vw;
    height: 34vw;
    top: 10vh;
    right: -12vw;
    background: radial-gradient(circle, #312e81 0%, transparent 65%);
    opacity: 0.5;
    animation: h7-drift-3 26s ease-in-out infinite alternate;
}

@keyframes h7-drift-1 {
    to { transform: translate(12vw, 10vh) scale(1.15); }
}
@keyframes h7-drift-2 {
    to { transform: translate(-8vw, -12vh) scale(1.2); }
}
@keyframes h7-drift-3 {
    to { transform: translate(-10vw, 14vh) scale(0.9); }
}

/* Nokta pattern */
.h7-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148, 178, 255, 0.34) 1.1px, transparent 1.8px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 85%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 85%);
    animation: h7-pattern-pulse 8s ease-in-out infinite alternate;
}

@keyframes h7-pattern-pulse {
    from { opacity: 0.45; }
    to   { opacity: 0.8; }
}

/* Grain */
.h7-noise {
    position: absolute;
    inset: -50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
    opacity: 0.06;
    animation: h7-grain 1s steps(4) infinite;
}

@keyframes h7-grain {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-3%, 2%); }
    50%  { transform: translate(2%, -3%); }
    75%  { transform: translate(-2%, -1%); }
    100% { transform: translate(0, 0); }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.h7-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
}

.h7-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px clamp(32px, 6vw, 96px);
}

.h7-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 24px;
}

.h7-main-inner {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Hero içerik
   -------------------------------------------------------------------------- */

.h7-logo img {
    height: 96px;
    width: auto;
    filter: drop-shadow(0 6px 24px rgba(59, 130, 246, 0.45));
}

.h7-title {
    margin: 56px 0 0;
    font-size: clamp(36px, 4.2vw, 64px);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--h7-text);
}

.h7-title-grad {
    background: linear-gradient(100deg, var(--h7-primary) 0%, var(--h7-accent) 45%, var(--h7-accent-2) 60%, var(--h7-primary) 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: h7-shimmer 6s linear infinite;
}

@keyframes h7-shimmer {
    to { background-position: 220% center; }
}

.h7-lead {
    margin: 18px 0 0;
    max-width: 520px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--h7-muted);
}

/* Pipeline */
.h7-pipeline {
    display: flex;
    align-items: center;
    margin-top: 40px;
    max-width: 560px;
}

.h7-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.h7-stage-dot {
    position: relative;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--h7-line-strong);
    background: rgba(255, 255, 255, 0.03);
    color: var(--h7-muted);
    animation: h7-stage-on 8s infinite;
}

.h7-stage-dot svg {
    width: 18px;
    height: 18px;
}

.h7-stage-label {
    font-family: var(--h7-mono);
    font-size: 12px;
    color: var(--h7-muted);
}

.h7-stage:nth-child(1) .h7-stage-dot { animation-delay: 0s; }
.h7-stage:nth-child(3) .h7-stage-dot { animation-delay: 2s; }
.h7-stage:nth-child(5) .h7-stage-dot { animation-delay: 4s; }
.h7-stage:nth-child(7) .h7-stage-dot { animation-delay: 6s; }

@keyframes h7-stage-on {
    0%, 4% {
        color: var(--h7-muted);
        border-color: var(--h7-line-strong);
        box-shadow: none;
        background: rgba(255, 255, 255, 0.03);
    }
    8%, 22% {
        color: #fff;
        border-color: rgba(34, 211, 238, 0.8);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.55), rgba(34, 211, 238, 0.35));
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), 0 8px 28px rgba(59, 130, 246, 0.45);
    }
    30%, 100% {
        color: var(--h7-green);
        border-color: rgba(61, 220, 151, 0.35);
        background: rgba(61, 220, 151, 0.06);
        box-shadow: none;
    }
}

.h7-link {
    position: relative;
    flex: 1;
    height: 2px;
    margin: 0 10px 22px;
    background: var(--h7-line-strong);
    border-radius: 2px;
    overflow: hidden;
}

.h7-link::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--h7-accent), transparent);
    transform: translateX(-120%);
    animation: h7-flow 8s infinite;
}

.h7-link:nth-child(2)::after { animation-delay: 1s; }
.h7-link:nth-child(4)::after { animation-delay: 3s; }
.h7-link:nth-child(6)::after { animation-delay: 5s; }

@keyframes h7-flow {
    0%   { transform: translateX(-120%); }
    12%  { transform: translateX(260%); }
    100% { transform: translateX(260%); }
}

/* Terminal */
.h7-term {
    margin-top: 40px;
    max-width: 560px;
    border-radius: 14px;
    border: 1px solid var(--h7-line);
    background: rgba(7, 11, 22, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transform: perspective(1200px) rotateY(6deg) rotateX(2deg);
    transform-origin: left center;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.h7-term:hover {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.h7-term-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--h7-line);
    background: rgba(255, 255, 255, 0.02);
}

.h7-term-bar i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #3a3a48;
}

.h7-term-bar i:nth-child(1) { background: #ff5f57; }
.h7-term-bar i:nth-child(2) { background: #febc2e; }
.h7-term-bar i:nth-child(3) { background: #28c840; }

.h7-term-bar span {
    margin-left: 10px;
    font-family: var(--h7-mono);
    font-size: 11.5px;
    color: var(--h7-muted);
}

.h7-term-body {
    min-height: 168px;
    padding: 16px 18px 18px;
    font-family: var(--h7-mono);
    font-size: 12.5px;
    line-height: 1.75;
    color: #c9c9d6;
    white-space: pre-wrap;
    word-break: break-word;
}

.h7-term-body .p  { color: var(--h7-accent); }
.h7-term-body .ok { color: var(--h7-green); }
.h7-term-body .dim { color: #5f5f72; }
.h7-term-body .hl { color: #fff; }

.h7-caret {
    display: inline-block;
    width: 8px;
    height: 15px;
    margin-left: 2px;
    vertical-align: -2px;
    background: var(--h7-accent);
    animation: h7-blink 1s steps(1) infinite;
}

@keyframes h7-blink {
    50% { opacity: 0; }
}

/* Metrikler */
.h7-stats {
    display: flex;
    gap: 28px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.h7-stat strong {
    display: block;
    font-family: var(--h7-mono);
    font-size: 20px;
    font-weight: 600;
    color: var(--h7-text);
}

.h7-stat span {
    font-size: 12px;
    color: var(--h7-muted);
}

/* --------------------------------------------------------------------------
   Login kartı
   -------------------------------------------------------------------------- */

.h7-card {
    --mx: 50%;
    --my: 0%;
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 44px 40px 40px;
    border-radius: 22px;
    background:
        radial-gradient(420px circle at var(--mx) var(--my), rgba(59, 130, 246, 0.12), transparent 45%),
        var(--h7-surface);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow:
        0 40px 120px -40px rgba(59, 130, 246, 0.45),
        0 20px 50px -20px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: h7-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    isolation: isolate;
}

/* Dönen gradient kenarlık */
.h7-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--h7-angle),
        rgba(255, 255, 255, 0.06) 0deg,
        rgba(255, 255, 255, 0.06) 200deg,
        var(--h7-primary) 260deg,
        var(--h7-accent-2) 300deg,
        rgba(255, 255, 255, 0.06) 340deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: h7-spin 5s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes h7-spin {
    to { --h7-angle: 360deg; }
}

@keyframes h7-rise {
    from { opacity: 0; transform: translateY(24px) scale(0.98); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: none; }
}

.h7-card-head {
    margin-bottom: 32px;
}

.h7-card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--h7-primary), var(--h7-accent));
    color: #fff;
    box-shadow: 0 10px 30px -6px rgba(59, 130, 246, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.h7-card-icon svg {
    width: 24px;
    height: 24px;
}

.h7-card h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--h7-text) !important;
}

.h7-card-sub {
    margin-top: 6px;
    font-size: 14px;
    color: var(--h7-muted);
}

.h7-card-sub code {
    font-family: var(--h7-mono);
    font-size: 12.5px;
    color: var(--h7-accent);
    background: rgba(34, 211, 238, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
}

/* Hata kutusu */
.h7-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(239, 68, 68, 0.04));
    color: #ff8a80;
    font-size: 13.5px;
    font-weight: 500;
    animation: h7-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.h7-alert .svg-icon svg [fill]:not(.permanent):not(g) {
    fill: #ff6b5e;
}

@keyframes h7-shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}

/* Alanlar (floating label) */
.h7-field {
    position: relative;
    margin-bottom: 18px;
}

.h7-field-wrap {
    position: relative;
}

.h7-field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: #5f5f72;
    transition: color 0.25s ease;
    pointer-events: none;
}

.h7-input {
    color-scheme: dark;
    display: block;
    width: 100%;
    height: 56px;
    padding: 20px 46px 6px 46px;
    border-radius: 14px;
    border: 1px solid var(--h7-line-strong);
    background: rgba(5, 9, 20, 0.55);
    color: var(--h7-text);
    font-family: var(--h7-sans);
    font-size: 15px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-sizing: border-box;
}

.h7-input:hover {
    border-color: rgba(255, 255, 255, 0.24);
}

.h7-input:focus {
    border-color: var(--h7-accent);
    background: rgba(5, 9, 20, 0.8);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14), 0 0 30px -6px rgba(59, 130, 246, 0.5);
}

/* Metronic'teki "input:-webkit-autofill { box-shadow: white inset !important }" kuralını ezer */
.h7-input:-webkit-autofill,
.h7-input:-webkit-autofill:hover,
.h7-input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--h7-text) !important;
    -webkit-box-shadow: 0 0 0 1000px #0a1020 inset !important;
    box-shadow: 0 0 0 1000px #0a1020 inset !important;
    caret-color: var(--h7-text);
    transition: background-color 600000s 0s, color 600000s 0s;
}

.h7-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--h7-text) !important;
    -webkit-box-shadow: 0 0 0 1000px #0a1020 inset, 0 0 0 4px rgba(34, 211, 238, 0.14) !important;
    box-shadow: 0 0 0 1000px #0a1020 inset, 0 0 0 4px rgba(34, 211, 238, 0.14) !important;
    transition: background-color 600000s 0s, color 600000s 0s;
}

.h7-label {
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--h7-muted);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.h7-field-wrap:focus-within .h7-label,
.h7-input:not(:placeholder-shown) ~ .h7-label,
.h7-input:-webkit-autofill ~ .h7-label {
    top: 16px;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--h7-accent);
}

.h7-field-wrap:focus-within .h7-field-icon {
    color: var(--h7-accent);
}

.h7-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #5f5f72;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.h7-toggle:hover {
    color: var(--h7-text);
    background: rgba(255, 255, 255, 0.05);
}

.h7-toggle svg {
    width: 18px;
    height: 18px;
}

.h7-toggle .h7-eye-off { display: none; }
.h7-toggle.is-on .h7-eye { display: none; }
.h7-toggle.is-on .h7-eye-off { display: block; }

/* FormValidation mesajları */
.h7-field .fv-plugins-message-container {
    margin-top: 6px;
    padding-left: 4px;
    font-size: 12.5px;
}

.h7-field .fv-plugins-message-container .invalid-feedback {
    display: block;
    color: #ff6b5e;
}

.h7-field.fv-plugins-bootstrap5-row-invalid .h7-input {
    border-color: rgba(255, 107, 94, 0.7);
}

/* Buton */
.h7-btn {
    position: relative;
    width: 100%;
    height: 54px;
    margin-top: 26px;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    color: #fff;
    font-family: var(--h7-sans);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: linear-gradient(110deg, var(--h7-primary-deep) 0%, var(--h7-primary) 35%, var(--h7-accent) 100%);
    background-size: 160% 100%;
    background-position: 0% 0;
    box-shadow:
        0 14px 34px -10px rgba(59, 130, 246, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    transition: background-position 0.5s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.h7-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: h7-sheen 4.5s ease-in-out infinite;
}

@keyframes h7-sheen {
    0%, 60% { left: -75%; }
    100% { left: 140%; }
}

.h7-btn:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow:
        0 20px 44px -10px rgba(34, 211, 238, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.h7-btn:active {
    transform: translateY(0) scale(0.99);
}

.h7-btn:focus-visible {
    outline: 2px solid var(--h7-accent-2);
    outline-offset: 3px;
}

.h7-btn:disabled {
    cursor: progress;
    opacity: 0.9;
}

.h7-btn .indicator-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.h7-btn .indicator-label svg {
    width: 18px;
    height: 18px;
    transition: transform 0.25s ease;
}

.h7-btn:hover .indicator-label svg {
    transform: translateX(4px);
}

.h7-btn .indicator-progress {
    position: relative;
}

.h7-footer {
    grid-column: 1 / -1;
    padding: 0 24px 24px;
    text-align: center;
    font-family: var(--h7-mono);
    font-size: 12px;
    color: #4f4f60;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1199.98px) {
    .h7-term { display: none; }
}

@media (max-width: 991.98px) {
    .h7-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .h7-hero {
        padding: 40px 24px 8px;
        align-items: center;
        text-align: center;
    }

    .h7-lead,
    .h7-pipeline,
    .h7-stats { display: none; }

    .h7-title { margin-top: 28px; font-size: 30px; }

    .h7-main { padding-top: 24px; }
}

@media (max-width: 479.98px) {
    .h7-card { padding: 34px 22px 28px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
