:root {
    --navy: #14213d;
    --navy-deep: #0d1730;
    --navy-light: #1f2f52;
    --navy-lighter: #2a3d63;
    --gold: #c9973d;
    --gold-light: #e0b563;
    --gold-dark: #a97b2e;
    --bg: #f5f6fa;
    --surface: #ffffff;
    --border: #e9eaf0;
    --text: #161c2d;
    --text-soft: #5c6273;
    --text-mute: #666b7d;
    --radius: 1rem;
    --shadow-sm: 0 1px 2px rgba(20, 33, 61, .04), 0 1px 1px rgba(20, 33, 61, .03);
    --shadow-md: 0 6px 20px rgba(20, 33, 61, .07), 0 2px 6px rgba(20, 33, 61, .05);
    --shadow-lg: 0 24px 60px rgba(13, 23, 48, .16);
}

* {
    -webkit-tap-highlight-color: transparent;
}

html, body {
    overflow-x: hidden;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: .95rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -.01em;
}

.icon {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    vertical-align: -.15em;
}

svg {
    width: 20px;
    height: 20px;
}

/* ================= App shell / sidebar ================= */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 264px;
    flex-shrink: 0;
    background: linear-gradient(190deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: rgba(255, 255, 255, .82);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 4px 0 24px rgba(13, 23, 48, .1);
}

.sidebar-brand {
    padding: 1.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand img {
    max-width: 150px;
    width: 100%;
    display: block;
}

.sidebar-close {
    position: absolute;
    right: 1rem;
    top: 1.25rem;
    background: rgba(20, 33, 61, .06);
    border: none;
    color: var(--navy);
    width: 32px;
    height: 32px;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav {
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    flex: 1;
    margin-top: .5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem .9rem;
    border-radius: .65rem;
    color: rgba(255, 255, 255, .68);
    text-decoration: none;
    font-weight: 500;
    font-size: .92rem;
    position: relative;
    transition: background-color .15s ease, color .15s ease;
}

.sidebar-icon {
    display: flex;
    flex-shrink: 0;
    color: currentColor;
}

.sidebar-icon svg {
    width: 19px;
    height: 19px;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, .06);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(201, 151, 61, .18), rgba(201, 151, 61, .05));
    color: var(--gold-light);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    border-radius: 0 4px 4px 0;
    background: var(--gold);
}

.sidebar-badge {
    background: var(--gold);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    padding: .3rem .5rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem .75rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .5rem .9rem .9rem;
}

.sidebar-user-link {
    text-decoration: none;
    border-radius: .6rem;
    transition: background .15s ease;
}

.sidebar-user-link:hover,
.sidebar-user-link.active {
    background: rgba(255, 255, 255, .06);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    flex-shrink: 0;
}

.sidebar-user-avatar svg {
    width: 18px;
    height: 18px;
}

.sidebar-user-name {
    color: #fff;
    font-weight: 600;
    font-size: .87rem;
    line-height: 1.2;
}

.sidebar-user-role {
    color: rgba(255, 255, 255, .45);
    font-size: .76rem;
}

.sidebar-logout {
    color: rgba(255, 255, 255, .55);
}

.sidebar-logout:hover {
    background-color: rgba(217, 83, 79, .12);
    color: #e6928d;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 23, 48, .5);
    backdrop-filter: blur(2px);
    z-index: 1035;
}

.app-main {
    flex: 1;
    margin-left: 264px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.topbar {
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.sidebar-toggle {
    background: var(--bg);
    border: 1px solid var(--border);
    width: 38px;
    height: 38px;
    border-radius: .6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    flex-shrink: 0;
}

.topbar-logo {
    height: 30px;
}

.app-content {
    flex: 1;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
}

@media (min-width: 992px) {
    .topbar {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .app-content {
        padding: 1.25rem 1rem 2.5rem;
    }
}

/* ================= Buttons ================= */
.btn {
    border-radius: .6rem;
    font-weight: 600;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}

.btn svg {
    width: 17px;
    height: 17px;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-color: var(--gold);
    color: #fff;
    box-shadow: 0 6px 16px rgba(201, 151, 61, .3);
}

.btn-gold:hover,
.btn-gold:focus,
.btn-gold:active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: var(--gold-dark);
    color: #fff;
    box-shadow: 0 8px 20px rgba(201, 151, 61, .38);
}

.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text-soft);
}

.btn-outline-secondary:hover {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.btn-outline-danger {
    --bs-btn-color: #c05353;
    --bs-btn-border-color: #f0d3d3;
}

@media (max-width: 575.98px) {
    .btn {
        min-height: 44px;
    }
}

/* ================= Cards ================= */
.card-stat {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}

.stat-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 1.35rem 1.4rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    transition: box-shadow .2s ease, transform .2s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.05;
    letter-spacing: -.02em;
}

.stat-label {
    font-size: .78rem;
    color: var(--text-mute);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .5rem;
}

.stat-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(201, 151, 61, .28);
}

.stat-icon-wrap svg {
    width: 22px;
    height: 22px;
}

.stat-icon-wrap.navy {
    background: linear-gradient(135deg, var(--navy-lighter), var(--navy));
    box-shadow: 0 6px 14px rgba(20, 33, 61, .28);
}

/* ================= Dashboard header ================= */
.dash-greeting h4 {
    color: var(--navy);
    font-weight: 800;
    letter-spacing: -.02em;
}

.dash-greeting p {
    color: var(--text-mute);
}

.section-title {
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -.01em;
}

/* ================= Tables ================= */
.table thead {
    background-color: var(--navy);
    color: #fff;
}

.table thead th {
    border: none;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-top: .8rem;
    padding-bottom: .8rem;
}

.table td {
    vertical-align: middle;
}

.table-responsive {
    border-radius: .7rem;
    overflow: hidden;
}

.card-stat .table-responsive {
    border-radius: 0;
}

/* Mobile card-style list */
.mobile-list .mobile-list-item {
    display: block;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: .8rem;
    padding: .9rem 1.05rem;
    margin-bottom: .6rem;
    transition: border-color .15s ease, background-color .15s ease;
}

.mobile-list .mobile-list-item:last-child {
    margin-bottom: 0;
}

.mobile-list a.mobile-list-item:hover,
.mobile-list a.mobile-list-item:active {
    border-color: var(--gold);
    background-color: #fdfaf4;
    color: inherit;
}

.mobile-list .mli-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .25rem;
}

.mobile-list .mli-title {
    font-weight: 700;
    color: var(--navy);
}

.mobile-list .mli-total {
    font-weight: 700;
    color: var(--navy);
}

.mobile-list .mli-meta {
    font-size: .82rem;
    color: var(--text-mute);
}

/* ================= Forms ================= */
.form-label {
    font-weight: 600;
    font-size: .84rem;
    color: var(--navy);
}

.form-control, .form-select {
    border-radius: .6rem;
    border-color: var(--border);
    padding: .55rem .8rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 .2rem rgba(201, 151, 61, .15);
}

/* ================= Login (split screen) ================= */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    background: var(--surface);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.login-visual {
    flex: 1.1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    background:
        radial-gradient(circle at 15% 15%, rgba(201, 151, 61, .18), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(255, 255, 255, .06), transparent 40%),
        linear-gradient(160deg, var(--navy-lighter) 0%, var(--navy) 55%, var(--navy-deep) 100%);
    color: #fff;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, transparent, rgba(0, 0, 0, .8) 40%, transparent 90%);
}

.login-visual-top {
    position: relative;
}

.login-visual-top img {
    max-width: 190px;
    display: block;
    background: #fff;
    padding: .85rem 1.1rem;
    border-radius: .8rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.login-visual-mid {
    position: relative;
    max-width: 420px;
}

.login-visual-mid h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    margin-bottom: .9rem;
}

.login-visual-mid p {
    color: rgba(255, 255, 255, .6);
    font-size: .95rem;
    line-height: 1.6;
}

.login-features {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: .85rem;
    color: rgba(255, 255, 255, .82);
    font-size: .88rem;
    font-weight: 500;
}

.login-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: .6rem;
    background: rgba(201, 151, 61, .16);
    border: 1px solid rgba(201, 151, 61, .3);
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-feature-icon svg {
    width: 17px;
    height: 17px;
}

.login-visual-foot {
    position: relative;
    color: rgba(255, 255, 255, .38);
    font-size: .78rem;
}

.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--surface);
}

.login-form-wrap {
    max-width: 360px;
    width: 100%;
}

.login-form-wrap .login-mobile-logo {
    display: none;
    width: 108px;
    max-width: 108px;
    margin: 0 auto 1.75rem;
    background: #fff;
    padding: .5rem .65rem;
    border-radius: .6rem;
    box-shadow: var(--shadow-sm);
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--text-mute);
    text-decoration: none;
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 1.5rem;
    transition: color .15s ease;
}

.login-back-link svg {
    width: 16px;
    height: 16px;
}

.login-back-link:hover {
    color: var(--gold-dark);
}

.login-heading {
    margin-bottom: 2rem;
}

.login-heading h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -.02em;
    margin-bottom: .35rem;
}

.login-heading p {
    color: var(--text-mute);
    font-size: .9rem;
}

.login-form-wrap .form-label {
    font-size: .85rem;
}

.login-form-wrap .form-control {
    padding: .75rem .9rem;
    border-radius: .7rem;
}

.login-form-wrap .btn-gold {
    padding: .75rem;
    font-weight: 700;
    border-radius: .7rem;
    letter-spacing: .01em;
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: .65rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--text-mute);
    display: flex;
    align-items: center;
    padding: .35rem;
    border-radius: .4rem;
}

.password-toggle:hover {
    color: var(--navy);
    background: var(--bg);
}

.login-footnote {
    margin-top: 2rem;
    text-align: center;
    font-size: .78rem;
    color: var(--text-mute);
}

.talep-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caf7d, #2e8b57);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 10px 24px rgba(46, 139, 87, .3);
}

.talep-success-icon svg {
    width: 30px;
    height: 30px;
}

.talep-badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    flex-shrink: 0;
}

.talep-badge-yeni {
    background: rgba(201, 151, 61, .15);
    color: var(--gold-dark);
}

.talep-badge-islemde {
    background: rgba(45, 108, 223, .12);
    color: #2d6cdf;
}

.talep-badge-tamamlandi {
    background: rgba(46, 139, 87, .13);
    color: #2e8b57;
}

.talep-durum-select {
    border: none;
    font-weight: 700;
    font-size: .78rem;
    padding: .35rem 1.9rem .35rem .7rem;
    border-radius: 999px;
    width: auto;
}

.talep-durum-select.talep-badge-yeni {
    background-color: rgba(201, 151, 61, .15);
    color: var(--gold-dark);
}

.talep-durum-select.talep-badge-islemde {
    background-color: rgba(45, 108, 223, .12);
    color: #2d6cdf;
}

.talep-durum-select.talep-badge-tamamlandi {
    background-color: rgba(46, 139, 87, .13);
    color: #2e8b57;
}

@media (max-width: 991.98px) {
    .login-visual {
        display: none;
    }

    .login-form-wrap .login-mobile-logo {
        display: block;
    }

    .login-form-side {
        background: var(--bg);
    }
}

/* ================= Push bildirim banner ================= */
.push-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--navy-lighter), var(--navy));
    color: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.push-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: .7rem;
    background: rgba(201, 151, 61, .22);
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.push-banner-title {
    font-weight: 700;
    font-size: .92rem;
    margin-bottom: .15rem;
}

.push-banner-text {
    font-size: .82rem;
    color: rgba(255, 255, 255, .7);
}

.push-banner .btn-outline-secondary {
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
}

.push-banner .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, .12);
    color: #fff;
}

@media (max-width: 767.98px) {
    .push-banner {
        flex-wrap: wrap;
    }

    .push-banner .d-flex.gap-2 {
        width: 100%;
    }

    .push-banner .d-flex.gap-2 #pushEnableBtn {
        flex: 1;
    }
}

/* ================= Print ================= */
@media print {
    .sidebar, .topbar, .sidebar-backdrop, .push-banner {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .app-main {
        margin-left: 0 !important;
    }

    .app-content {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .card-stat {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
