﻿:root {
    --bg: #170c07;
    --bg-2: #261108;
    --panel: rgba(255, 246, 230, .92);
    --panel-dark: rgba(42, 20, 10, .82);
    --ink: #2a160c;
    --cream: #fff3df;
    --muted: #8d7662;
    --accent: #ff7a1a;
    --accent-2: #ffc44d;
    --ember: #d63b16;
    --line: rgba(255, 207, 148, .28);
    --ok: #22c55e;
    --warn: #f5a524;
    --danger: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, .32);
    --radius: 24px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    min-height: 100%;
    margin: 0;
    color: var(--cream);
    font-family: "Trebuchet MS", "Aptos", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 122, 26, .42), transparent 28rem),
        radial-gradient(circle at 100% 12%, rgba(255, 196, 77, .18), transparent 26rem),
        linear-gradient(135deg, var(--bg), var(--bg-2) 52%, #0b0705);
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(120deg, rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(30deg, rgba(255,122,26,.08) 1px, transparent 1px);
    background-size: 44px 44px, 78px 78px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}
a { color: inherit; }

.app-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-content: center;
    gap: 1rem;
    text-align: center;
    background: radial-gradient(circle, rgba(255,122,26,.24), transparent 18rem), #160904;
    transition: opacity .45s ease, visibility .45s ease;
}
body.ready .app-loader { opacity: 0; visibility: hidden; }
.loader-mark { display: flex; justify-content: center; gap: .45rem; }
.loader-mark span {
    width: .85rem;
    height: 2.6rem;
    border-radius: 999px;
    background: linear-gradient(var(--accent-2), var(--ember));
    animation: flame 1s ease-in-out infinite;
    box-shadow: 0 0 24px rgba(255, 122, 26, .7);
}
.loader-mark span:nth-child(2) { animation-delay: .12s; height: 3.2rem; }
.loader-mark span:nth-child(3) { animation-delay: .24s; }
@keyframes flame { 0%,100% { transform: scaleY(.78); opacity: .68; } 50% { transform: scaleY(1.08); opacity: 1; } }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: max(.9rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 2rem) .9rem;
    background: rgba(18, 8, 4, .76);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(22px);
}
.brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    text-decoration: none;
    min-width: 210px;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: conic-gradient(from 220deg, var(--ember), var(--accent), var(--accent-2), var(--ember));
    color: #2b0e04;
    font-weight: 900;
    box-shadow: 0 12px 34px rgba(255, 122, 26, .34);
}
.brand strong { display: block; line-height: 1.05; letter-spacing: -.02em; }
.brand small { display: block; color: #d8b99a; margin-top: .2rem; }
nav { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .15rem; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav a {
    flex: 0 0 auto;
    color: #ffe9ce;
    text-decoration: none;
    padding: .72rem .92rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
nav a.active, nav a:hover { background: rgba(255, 122, 26, .24); border-color: rgba(255, 196, 77, .55); transform: translateY(-1px); }

.container { width: min(1180px, 100%); margin: 0 auto; padding: clamp(1rem, 4vw, 2rem) clamp(1rem, 4vw, 2rem) 6.5rem; }
.hero-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    align-items: flex-end;
    margin-bottom: 1.2rem;
    padding: clamp(1.2rem, 4vw, 2rem);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 8px);
    background:
        linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.04)),
        radial-gradient(circle at 88% 8%, rgba(255,196,77,.28), transparent 14rem),
        rgba(255,255,255,.05);
    box-shadow: var(--shadow);
}
.hero-panel::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -70px;
    bottom: -80px;
    border-radius: 42px;
    rotate: 18deg;
    background: linear-gradient(135deg, rgba(255,122,26,.32), transparent);
}
.eyebrow { color: var(--accent-2); text-transform: uppercase; font-size: .78rem; letter-spacing: .16em; font-weight: 900; }
h1 { margin: .35rem 0 .35rem; font-size: clamp(2rem, 7vw, 4.25rem); line-height: .92; letter-spacing: -.065em; }
h2 { margin: 1.4rem 0 .8rem; letter-spacing: -.035em; }
p { color: #e6ccb0; line-height: 1.6; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; position: relative; z-index: 1; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.card, form, table {
    background: var(--panel);
    color: var(--ink);
    border: 1px solid rgba(255,255,255,.38);
    border-radius: var(--radius);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .2);
}
.card {
    position: relative;
    overflow: hidden;
    padding: 1.05rem;
    min-height: 126px;
    isolation: isolate;
}
.card::before {
    content: "";
    position: absolute;
    inset: auto -20% -50% auto;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(255,122,26,.18);
    z-index: -1;
}
.card strong { display: block; font-size: clamp(1.5rem, 6vw, 2.25rem); letter-spacing: -.05em; margin-top: .7rem; }
form { padding: clamp(1rem, 3vw, 1.35rem); margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; }
label { display: grid; gap: .4rem; font-weight: 900; color: #73523d; }
input, select, textarea {
    width: 100%;
    min-height: 48px;
    padding: .85rem .9rem;
    border-radius: 16px;
    border: 1px solid #ead3ba;
    background: #fffaf2;
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,122,26,.16); transform: translateY(-1px); }
textarea { min-height: 92px; resize: vertical; }
button, .button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--ember));
    color: #fff9ef;
    padding: .85rem 1.1rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(214, 59, 22, .28);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
button:hover, .button:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(214, 59, 22, .36); }
button:active, .button:active { transform: translateY(0) scale(.98); }
button.loading, .button.loading { color: transparent; pointer-events: none; }
button.loading::after, .button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 3px solid rgba(255,255,255,.45);
    border-top-color: white;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.button.ghost { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: var(--cream); box-shadow: none; }
.button.pulse { animation: pulseGlow 2.4s ease-in-out infinite; }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 12px 28px rgba(255,122,26,.26); } 50% { box-shadow: 0 12px 44px rgba(255,196,77,.48); } }

table { width: 100%; border-collapse: collapse; overflow: hidden; display: table; }
th, td { padding: .92rem; border-bottom: 1px solid #efd9bf; text-align: left; vertical-align: top; }
th { background: #ffe9ce; color: #7d4b2b; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.actions a { color: #a93613; font-weight: 900; text-decoration: none; }
.flash, .notice {
    padding: .9rem 1rem;
    border-radius: 18px;
    margin-bottom: 1rem;
    color: var(--ink);
    box-shadow: 0 12px 30px rgba(0,0,0,.14);
}
.flash { background: #daf9e8; border: 1px solid #9ee8bd; }
.notice { background: #fff1bd; border: 1px solid #f8d875; }
.status { border-radius: 999px; padding: .32rem .65rem; background: #eee0d3; display: inline-block; font-weight: 900; }
.status.done { background: #d9f2e4; color: #146c43; }
.mobile-dock {
    position: fixed;
    left: 50%;
    bottom: max(.85rem, env(safe-area-inset-bottom));
    z-index: 30;
    transform: translateX(-50%);
    display: flex;
    gap: .35rem;
    width: min(94vw, 520px);
    padding: .45rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 22px;
    background: rgba(23, 10, 5, .78);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 54px rgba(0,0,0,.38);
}
.mobile-dock a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: #fff2df;
    padding: .75rem .4rem;
    border-radius: 16px;
    background: rgba(255,255,255,.07);
    font-weight: 900;
    font-size: .88rem;
}
.toast {
    position: fixed;
    right: 1rem;
    bottom: 5.8rem;
    z-index: 40;
    width: min(360px, calc(100vw - 2rem));
    padding: 1rem;
    border-radius: 18px;
    background: #fff4df;
    color: var(--ink);
    border: 1px solid #ffd08d;
    box-shadow: var(--shadow);
    transform: translateY(12px);
    opacity: 0;
    animation: toastIn .3s ease forwards;
}
@keyframes toastIn { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 780px) {
    .topbar { align-items: stretch; flex-direction: column; padding-inline: 1rem; }
    .brand { min-width: 0; }
    nav { margin-inline: -.15rem; }
    .hero-panel { align-items: stretch; flex-direction: column; }
    .hero-actions .button, .hero-actions button { flex: 1; }
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    tr { padding: .75rem; border-bottom: 1px solid #efd9bf; }
    td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .42rem 0; }
    td::before { content: attr(data-label); color: #80563d; font-weight: 900; }
}

@media (min-width: 900px) {
    .mobile-dock { display: none; }
    .container { padding-bottom: 2rem; }
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .9rem;
    margin: 1rem 0 1.4rem;
}
.quick-card {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    padding: 1rem;
    border-radius: 22px;
    text-decoration: none;
    color: #fff7ec;
    border: 1px solid rgba(255,255,255,.16);
    background: linear-gradient(135deg, rgba(255,122,26,.22), rgba(255,255,255,.06));
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
    transition: transform .2s ease, border-color .2s ease;
}
.quick-card:hover { transform: translateY(-3px); border-color: rgba(255,196,77,.55); }
.quick-card span { color: var(--accent-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 900; }
.quick-card strong { display: block; margin-top: .55rem; font-size: 1.2rem; letter-spacing: -.035em; }
.action-strip {
    display: flex;
    align-items: center;
    gap: .9rem;
    flex-wrap: wrap;
    margin: 0 0 1rem;
    padding: .9rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.07);
}
.action-strip span { color: #e6ccb0; }
@media (max-width: 780px) {
    .action-strip .button { width: 100%; }
}

/* Kurumsal sade görünüm katmanı */
.gov-topbar {
    background: rgba(10, 31, 68, .88);
    border-bottom-color: rgba(219, 230, 244, .24);
}
.gov-panel {
    background:
        linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.05)),
        radial-gradient(circle at 90% 10%, rgba(85, 132, 190, .28), transparent 16rem),
        rgba(10, 31, 68, .42);
}
.user-chip {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .55rem .45rem .8rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #eef6ff;
    white-space: nowrap;
}
.user-chip a {
    text-decoration: none;
    border-radius: 999px;
    padding: .42rem .65rem;
    background: rgba(255,255,255,.12);
    font-weight: 900;
}
.login-card {
    width: min(520px, 100%);
    margin: 0 auto;
}
.form-grid.single { grid-template-columns: 1fr; }
.help-text {
    color: #6f5a48;
    background: rgba(255,255,255,.55);
    border: 1px solid #ead3ba;
    border-radius: 14px;
    padding: .75rem;
}
.audit-form h2 { color: #18345e; }
.audit-lines {
    display: grid;
    gap: .65rem;
    margin-bottom: 1rem;
}
.audit-line {
    display: grid;
    grid-template-columns: minmax(160px, 1.2fr) minmax(90px, .55fr) minmax(90px, .55fr) minmax(110px, .55fr);
    gap: .6rem;
    align-items: center;
    padding: .55rem;
    border: 1px solid #ead3ba;
    border-radius: 16px;
    background: #fffaf2;
}
.audit-line output {
    color: #18345e;
    font-weight: 900;
    text-align: right;
}
.result-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .7rem;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #eaf2ff, #fffaf2);
    border: 1px solid #c8d8ef;
    color: #18345e;
}
.result-panel div {
    padding: .75rem;
    border-radius: 16px;
    background: rgba(255,255,255,.72);
}
.result-panel strong { display: block; margin-top: .35rem; font-size: 1.25rem; }
@media (max-width: 780px) {
    .user-chip { justify-content: space-between; width: 100%; }
    .audit-line { grid-template-columns: 1fr 1fr; }
    .audit-line output { text-align: left; }
}
