:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --ink: #13233a;
    --muted: #718096;

    --brand: #143d66;
    --brand2: #0a2946;
    --brand-light: #1d5f94;

    --accent: #e53935;
    --accent-dark: #c62828;
    --accent-soft: #fdeceb;

    --line: #e3e9f1;

    --danger: #c0392b;
    --warning: #c58b16;
    --info: #1f6fb2;
    --ok: #287a54;

    --shadow: 0 10px 30px rgba(20, 45, 80, .08);
    --shadow-hover: 0 14px 36px rgba(20, 45, 80, .13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* =========================================================
   ANA YAPI
========================================================= */

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.content {
    padding: 26px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* =========================================================
   SOL MENÜ
========================================================= */

.sidebar {
    background:
        linear-gradient(
            180deg,
            var(--brand2) 0%,
            var(--brand) 55%,
            #174b75 100%
        );
    color: #fff;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 5px 0 25px rgba(5, 30, 55, .08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .13);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--brand);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 18px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .12);
    position: relative;
    overflow: hidden;
}

.brand-mark::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 15px;
}

.brand small {
    opacity: .68;
    margin-top: 2px;
    font-size: 12px;
}

.sidebar nav {
    display: grid;
    gap: 7px;
    margin-top: 22px;
}

.sidebar nav a {
    position: relative;
    padding: 12px 13px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .83);
    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}

.sidebar nav a:hover {
    background: rgba(255, 255, 255, .10);
    color: #fff;
    transform: translateX(2px);
}

.sidebar nav a.active {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar nav a.active::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.sidebar-foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    padding: 16px 6px 0;
    border-top: 1px solid rgba(255, 255, 255, .13);
    font-size: 13px;
}

.sidebar-foot a {
    opacity: .8;
}

.sidebar-foot a:hover {
    opacity: 1;
    color: #fff;
}

/* =========================================================
   ÜST BAŞLIK
========================================================= */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 18px;
}

.topbar h1 {
    margin: 0;
    font-size: 25px;
    letter-spacing: -.4px;
}

.topbar p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            #0d3154 0%,
            #164d7b 55%,
            #1e679e 100%
        );
    color: #fff;
    border-radius: 18px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

.hero::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -65px;
    top: -100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 130px;
    height: 4px;
    background: var(--accent);
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 30px;
    margin: 7px 0;
    letter-spacing: -.5px;
}

.hero p {
    margin: 0;
    opacity: .78;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 1.6px;
    opacity: .75;
    font-weight: 700;
}

.hero-status {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(4px);
}

/* =========================================================
   KPI KARTLARI
========================================================= */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.kpi-grid article,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.kpi-grid article {
    position: relative;
    overflow: hidden;
    padding: 20px;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.kpi-grid article:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #d4dde8;
}

.kpi-grid article::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--brand-light);
    opacity: .75;
}

.kpi-grid article:first-child::before {
    background: var(--accent);
}

.kpi-grid span {
    font-size: 12px;
    color: var(--muted);
}

.kpi-grid strong {
    display: block;
    font-size: 28px;
    margin: 8px 0 2px;
    letter-spacing: -.5px;
}

.kpi-grid small {
    color: var(--muted);
}

/* =========================================================
   PANELLER
========================================================= */

.two-col {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.panel {
    padding: 18px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.panel-head h3 {
    margin: 0;
    font-size: 16px;
}

.panel-head a {
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
    transition: color .18s ease;
}

.panel-head a:hover {
    color: var(--accent-dark);
}

/* =========================================================
   AKSİYON / YENİLEME / TEKNİK SATIRLARI
========================================================= */

.action-row,
.renew-row,
.tech-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.action-row:first-of-type,
.renew-row:first-of-type,
.tech-row:first-of-type {
    border-top: 0;
}

.action-main,
.renew-row > div:first-child,
.tech-row > div:first-child {
    flex: 1;
    min-width: 0;
}

.action-main strong,
.action-main span,
.renew-row strong,
.renew-row span,
.tech-row strong,
.tech-row span {
    display: block;
}

.action-main strong,
.renew-row strong,
.tech-row strong {
    color: #0f2036;
}

.action-main span,
.renew-row span,
.tech-row span {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.money {
    font-weight: 850;
    white-space: nowrap;
}

/* =========================================================
   ROZETLER
========================================================= */

.prio {
    font-size: 10px;
    font-weight: 850;
    padding: 6px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    min-width: 58px;
    text-align: center;
}

.days,
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.danger {
    background: #fdeceb;
    color: #a1261b;
}

.warning {
    background: #fff4d8;
    color: #8b5b00;
}

.info {
    background: #e8f3ff;
    color: #165d9a;
}

.ok {
    background: #e7f7ef;
    color: #1d6b48;
}

.muted {
    background: #eef2f6;
    color: #5f6d7a;
}

/* =========================================================
   SAYILAR
========================================================= */

.big-number {
    font-size: 32px;
    font-weight: 900;
}

.big-number small {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    margin-left: 4px;
}

/* =========================================================
   TABLOLAR
========================================================= */

.table-panel {
    padding: 0;
    overflow: hidden;
}

.table-panel .panel-head {
    padding: 18px 18px 0;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    text-align: left;
    padding: 13px 14px;
    border-top: 1px solid var(--line);
    vertical-align: top;
}

th {
    background: #f6f9fc;
    color: #596a7d;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .45px;
    font-weight: 800;
}

tbody tr {
    transition: background .15s ease;
}

tbody tr:hover {
    background: #fafcff;
}

td strong {
    color: #10233b;
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

/* =========================================================
   FORMLAR
========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-grid label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    color: #536273;
    font-weight: 600;
}

.span-3 {
    grid-column: 1 / -1;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.login-card input,
.install-card input {
    width: 100%;
    border: 1px solid #d8e0ea;
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.login-card input:focus,
.install-card input:focus {
    border-color: #7ea9cf;
    box-shadow: 0 0 0 3px rgba(31, 111, 178, .10);
}

textarea {
    min-height: 82px;
    resize: vertical;
}

.check {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.check input {
    width: auto;
}

/* =========================================================
   BUTONLAR
========================================================= */

.btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 750;
    cursor: pointer;
    display: inline-block;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        filter .15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background:
        linear-gradient(
            135deg,
            var(--brand),
            var(--brand-light)
        );
    color: #fff;
    box-shadow: 0 5px 14px rgba(20, 61, 102, .18);
}

.btn.primary:hover {
    filter: brightness(1.06);
}

.btn.ghost {
    background: #eef3f8;
    color: var(--brand);
    font-size: 12px;
}

.btn.ghost:hover {
    background: #e2eaf3;
}

.btn.wide {
    width: 100%;
}

/* =========================================================
   UYARILAR
========================================================= */

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.alert.success {
    background: #e7f7ef;
    color: #1d6b48;
}

.alert.danger {
    background: #fdecea;
    color: #a1261b;
}

/* =========================================================
   LOGIN / INSTALL
========================================================= */

.auth-bg {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(255, 255, 255, .08),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #08253f 0%,
            #123f68 55%,
            #1d6094 100%
        );
    padding: 20px;
}

.login-card,
.install-card {
    background: #fff;
    width: min(440px, 100%);
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
    border-top: 4px solid var(--accent);
}

.install-card {
    width: min(720px, 100%);
}

.login-card .brand-mark {
    margin: auto;
}

.login-card h1,
.install-card h1 {
    text-align: center;
    margin-bottom: 6px;
}

.login-card > p,
.install-card > p {
    text-align: center;
    color: var(--muted);
}

.login-card form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.login-card label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    color: #536273;
    font-weight: 600;
}

.install-card hr {
    grid-column: 1 / -1;
    border: 0;
    border-top: 1px solid var(--line);
    width: 100%;
}

/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: #edf1f5;
}

::-webkit-scrollbar-thumb {
    background: #bdc9d6;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9eafc0;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 980px) {

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
    }

    .sidebar nav {
        grid-template-columns: repeat(3, 1fr);
    }

    .sidebar-foot {
        display: none;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .cols-3 {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================================
   MOBİL
========================================================= */

@media (max-width: 640px) {

    .content {
        padding: 14px;
    }

    .sidebar {
        padding: 16px 12px;
    }

    .sidebar nav {
        grid-template-columns: 1fr 1fr;
    }

    .hero {
        padding: 20px;
    }

    .hero h2 {
        font-size: 23px;
    }

    .hero-status {
        display: none;
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .kpi-grid article {
        padding: 16px;
    }

    .kpi-grid strong {
        font-size: 22px;
    }

    .form-grid,
    .cols-3 {
        grid-template-columns: 1fr;
    }

    .span-3 {
        grid-column: auto;
    }

    .action-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .money {
        margin-left: auto;
    }

    .login-card,
    .install-card {
        padding: 22px;
    }
}