:root {
    --bey-primary: #3d75b9;
    --bey-primary-dark: #315f98;
    --bey-primary-deep: #17324d;
    --bey-primary-soft: #eaf3fb;
    --bey-cyan: #2ba8c6;
    --bey-surface: #ffffff;
    --bey-surface-soft: #f4f8fb;
    --bey-border: #dce7f0;
    --bey-text: #17324d;
    --bey-muted: #637b90;
    --bey-success: #18794e;
    --bey-warning: #8a5a00;
    --bey-danger: #b42318;
    --bey-radius-sm: .65rem;
    --bey-radius: 1rem;
    --bey-radius-lg: 1.4rem;
    --bey-shadow-sm: 0 6px 18px rgba(23, 50, 77, .07);
    --bey-shadow: 0 18px 45px rgba(23, 50, 77, .10);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--bey-text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.beykarsu-app {
    background:
        radial-gradient(circle at 85% 0, rgba(43, 168, 198, .09), transparent 24rem),
        var(--bey-surface-soft);
}

a,
button,
input,
select,
textarea,
[tabindex] {
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(61, 117, 185, .34) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

.beykarsu-header {
    border-bottom: 1px solid rgba(220, 231, 240, .9) !important;
    box-shadow: 0 4px 20px rgba(23, 50, 77, .06);
    backdrop-filter: blur(14px);
}

.beykarsu-header .navbar-nav-wrap {
    gap: .75rem;
}

.beykarsu-header .navbar-aside-toggler,
.beykarsu-header .btn-icon,
.beykarsu-sidebar .btn-icon {
    min-width: 2.75rem;
    min-height: 2.75rem;
}

.beykarsu-header .beykarsu-header-context {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--bey-primary-deep);
}

.beykarsu-header-context .beykarsu-header-mark {
    display: grid;
    width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    color: #fff;
    border-radius: .8rem;
    background: linear-gradient(145deg, var(--bey-cyan), var(--bey-primary));
    box-shadow: 0 8px 18px rgba(61, 117, 185, .24);
}

.beykarsu-header-context strong,
.beykarsu-header-context small {
    display: block;
    line-height: 1.15;
}

.beykarsu-header-context small {
    margin-top: .18rem;
    color: var(--bey-muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.beykarsu-avatar {
    display: grid;
    width: 2.55rem;
    height: 2.55rem;
    place-items: center;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--bey-primary), var(--bey-primary-deep));
    box-shadow: 0 5px 15px rgba(23, 50, 77, .18);
    font-weight: 700;
}

.beykarsu-sidebar {
    border-right: 0 !important;
    background:
        radial-gradient(circle at 12% 8%, rgba(43, 168, 198, .22), transparent 18rem),
        linear-gradient(175deg, #173f64 0%, #102f4d 52%, #0c263f 100%) !important;
    box-shadow: 12px 0 35px rgba(12, 38, 63, .14);
}

.beykarsu-sidebar .navbar-brand {
    min-height: 5.1rem;
    padding-inline: 1.35rem;
}

.beykarsu-sidebar .navbar-brand-logo {
    width: auto;
    max-width: 9.5rem;
    max-height: 3rem;
    object-fit: contain;
}

.beykarsu-sidebar .navbar-vertical-content {
    padding: .4rem .75rem 1rem;
}

.beykarsu-sidebar .dropdown-header {
    padding-inline: .8rem;
    color: rgba(255, 255, 255, .5) !important;
    font-size: .68rem;
    letter-spacing: .12em;
}

.beykarsu-sidebar .nav-link {
    min-height: 2.8rem;
    margin-block: .16rem;
    padding: .68rem .8rem;
    color: rgba(255, 255, 255, .76) !important;
    border-radius: .8rem;
    font-weight: 550;
}

.beykarsu-sidebar .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .09);
    transform: translateX(2px);
}

.beykarsu-sidebar .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(43, 168, 198, .92), rgba(61, 117, 185, .98)) !important;
    box-shadow: 0 10px 24px rgba(5, 24, 40, .22);
}

.beykarsu-sidebar .nav-icon {
    color: currentColor !important;
    opacity: .92;
}

.beykarsu-sidebar .nav-collapse .nav-link {
    min-height: 2.35rem;
    padding-block: .48rem;
    padding-left: 3.05rem;
    font-size: .86rem;
}

/*
 * The base theme keeps the full 16.25rem desktop offset because the aside also
 * has navbar-expand-xl. Override that more-specific rule when the persisted
 * mini state is active, otherwise a blank strip remains next to the 5.75rem
 * sidebar. The closed rule also covers the exact 1200px breakpoint.
 */
@media (min-width: 1200px) {
    .navbar-vertical-aside-show-xl.navbar-vertical-aside-mini-mode
    .navbar-vertical-aside.navbar-vertical-fixed ~ .main {
        padding-left: 5.75rem;
    }

    .has-navbar-vertical-aside.navbar-vertical-aside-closed-mode
    .navbar-vertical-aside.navbar-vertical-fixed ~ .main {
        padding-left: 0;
    }
}

.main .content.container-fluid {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    padding-top: 1.65rem;
    padding-bottom: 2.5rem;
}

.page-header {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.35rem !important;
    padding: 1.35rem 1.5rem;
    border: 1px solid rgba(61, 117, 185, .13);
    border-radius: var(--bey-radius-lg);
    background:
        radial-gradient(circle at 93% 15%, rgba(43, 168, 198, .16), transparent 12rem),
        linear-gradient(135deg, #fff, #f7fbff);
    box-shadow: var(--bey-shadow-sm);
}

.page-header::after {
    position: absolute;
    top: -4.5rem;
    right: -3rem;
    width: 10rem;
    height: 10rem;
    content: "";
    pointer-events: none;
    border: 1.4rem solid rgba(61, 117, 185, .055);
    border-radius: 50%;
}

.page-header-title {
    position: relative;
    z-index: 1;
    color: var(--bey-primary-deep) !important;
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 750;
    letter-spacing: -.035em;
}

.card {
    border: 1px solid var(--bey-border);
    border-radius: var(--bey-radius);
    box-shadow: var(--bey-shadow-sm);
}

.card-header {
    border-bottom-color: var(--bey-border);
    background: linear-gradient(180deg, rgba(244, 248, 251, .65), rgba(255, 255, 255, .25));
}

.card-header-title {
    color: var(--bey-primary-deep);
    font-weight: 700;
}

.btn {
    min-height: 2.6rem;
    border-radius: .72rem;
    font-weight: 650;
}

.btn-primary,
.bg-primary {
    border-color: var(--bey-primary) !important;
    background-color: var(--bey-primary) !important;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    border-color: var(--bey-primary-dark) !important;
    background-color: var(--bey-primary-dark) !important;
    box-shadow: 0 8px 20px rgba(61, 117, 185, .22) !important;
}

.btn-white {
    border-color: var(--bey-border);
    color: var(--bey-primary-deep);
    background: #fff;
}

.form-control,
.form-select,
.tom-select-custom .ts-control {
    min-height: 2.8rem;
    border-color: #cbdbe7;
    border-radius: .72rem;
    background-color: #fff;
}

.form-control:focus,
.form-select:focus,
.tom-select-custom .ts-control.focus {
    border-color: var(--bey-primary);
    box-shadow: 0 0 0 .2rem rgba(61, 117, 185, .13);
}

.form-label {
    margin-bottom: .45rem;
    color: var(--bey-primary-deep);
    font-weight: 650;
}

.table {
    --bs-table-hover-bg: rgba(61, 117, 185, .045);
}

.table thead th {
    color: #4e697f;
    border-bottom-color: var(--bey-border);
    background: #f7fafc;
    font-size: .71rem;
    font-weight: 750;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.table tbody td {
    border-bottom-color: #e8eff5;
    vertical-align: middle;
}

.badge {
    padding: .38rem .58rem;
    border-radius: 999px;
    font-weight: 700;
}

.badge.bg-success,
.bg-success {
    background-color: var(--bey-success) !important;
}

.badge.bg-warning,
.bg-warning {
    color: #fff !important;
    background-color: var(--bey-warning) !important;
}

.badge.bg-danger,
.bg-danger {
    background-color: var(--bey-danger) !important;
}

.alert {
    border: 0;
    border-left: 4px solid currentColor;
    border-radius: .8rem;
}

.dropdown-menu {
    border-color: var(--bey-border);
    border-radius: .9rem;
    box-shadow: var(--bey-shadow);
}

.footer {
    color: var(--bey-muted);
}

.beykarsu-login {
    min-height: 100vh;
    color: var(--bey-text);
    background: #eaf2f8;
}

.beykarsu-login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.15fr) minmax(28rem, .85fr);
}

.beykarsu-login-visual {
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: flex-end;
    padding: clamp(2.2rem, 5vw, 5.2rem);
    color: #fff;
    background-position: center;
    background-size: cover;
}

.beykarsu-login-visual::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(9, 35, 58, .08), rgba(10, 47, 78, .78));
}

.beykarsu-login-story {
    position: relative;
    z-index: 1;
    max-width: 39rem;
}

.beykarsu-login-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: .48rem .72rem;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.beykarsu-login-story h1 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 780;
    letter-spacing: -.055em;
    line-height: 1.02;
}

.beykarsu-login-story p {
    max-width: 32rem;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 1.05rem;
    line-height: 1.7;
}

.beykarsu-login-panel {
    display: grid;
    min-width: 0;
    padding: clamp(1.4rem, 4vw, 4rem);
    place-items: center;
    background:
        radial-gradient(circle at 100% 0, rgba(43, 168, 198, .12), transparent 22rem),
        #f8fbfd;
}

.beykarsu-login-card {
    width: min(100%, 30rem);
}

.beykarsu-login-brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 2.2rem;
    color: var(--bey-primary-deep);
}

.beykarsu-login-brand img {
    width: auto;
    max-width: 9.5rem;
    height: 3rem;
    object-fit: contain;
}

.beykarsu-login-form {
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border: 1px solid rgba(203, 219, 231, .9);
    border-radius: var(--bey-radius-lg);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--bey-shadow);
}

.beykarsu-login-form h2 {
    margin-bottom: .5rem;
    color: var(--bey-primary-deep);
    font-size: 1.75rem;
    font-weight: 750;
    letter-spacing: -.035em;
}

.beykarsu-login-form .login-help {
    margin-bottom: 1.7rem;
    color: var(--bey-muted);
    line-height: 1.6;
}

.beykarsu-password-toggle {
    min-width: 3rem;
    border-color: #cbdbe7;
    color: var(--bey-primary);
    background: #fff;
}

.beykarsu-notification-status {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--bey-border);
    border-radius: var(--bey-radius);
    background: var(--bey-surface-soft);
}

.beykarsu-notification-status .status-icon {
    display: grid;
    width: 2.7rem;
    height: 2.7rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: .85rem;
    color: #fff;
    background: var(--bey-primary);
}

.beykarsu-template-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--bey-border);
    border-radius: .9rem;
    background: #fff;
}

.beykarsu-template-card textarea {
    min-height: 8rem;
    resize: vertical;
}

.beykarsu-template-card .template-help {
    min-height: 2.4rem;
    color: var(--bey-muted);
    font-size: .78rem;
    line-height: 1.5;
}

.beykarsu-variable-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.beykarsu-variable-list code {
    padding: .22rem .42rem;
    color: var(--bey-primary-dark);
    border-radius: .4rem;
    background: var(--bey-primary-soft);
    font-size: .72rem;
}

[data-beykarsu-theme="dark"] {
    --bey-surface: #152331;
    --bey-surface-soft: #101c27;
    --bey-border: #2b4052;
    --bey-text: #e9f1f7;
    --bey-muted: #9db0bf;
    --bey-primary-deep: #e4f2fc;
}

[data-beykarsu-theme="dark"] .beykarsu-app,
[data-beykarsu-theme="dark"] .main {
    background: #101c27;
}

[data-beykarsu-theme="dark"] .page-header,
[data-beykarsu-theme="dark"] .card,
[data-beykarsu-theme="dark"] .beykarsu-template-card,
[data-beykarsu-theme="dark"] .beykarsu-notification-status {
    border-color: var(--bey-border);
    background: #152331;
}

[data-beykarsu-theme="dark"] .table thead th,
[data-beykarsu-theme="dark"] .card-header {
    background: #192b3a;
}

@media (max-width: 991.98px) {
    .beykarsu-login-shell {
        grid-template-columns: 1fr;
    }

    .beykarsu-login-visual {
        min-height: 18rem;
        padding: 2rem 1.4rem;
    }

    .beykarsu-login-story h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .beykarsu-login-panel {
        padding: 1.5rem 1rem 2.5rem;
    }
}

@media (max-width: 575.98px) {
    .main .content.container-fluid {
        padding: 1rem .8rem 2.25rem;
    }

    .page-header {
        padding: 1.1rem;
        border-radius: 1rem;
    }

    .card-body,
    .card-header {
        padding-inline: 1rem;
    }

    .position-fixed.bottom-0 .card {
        margin-bottom: env(safe-area-inset-bottom);
    }

    .dropdown-menu[style*="min-width"] {
        width: calc(100vw - 2rem) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 2rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

