/* Modern Clean Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }
.dark ::-webkit-scrollbar-thumb { background: #3f3f46; }
.dark ::-webkit-scrollbar-thumb:hover { background: #52525b; }

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

html { font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body,
button,
input,
select,
textarea {
    font-family: inherit;
}

html {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-wrap: break-word;
}

button,
input,
select,
textarea,
a {
    min-width: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
label,
button,
a,
th,
td {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
}

/* Türkçe başlıklar ve aksiyon etiketleri dar alanlarda daha dengeli kırılır. */
h1,
h2,
h3,
h4,
.route-tab,
button {
    text-wrap: balance;
}

table th,
table td {
    vertical-align: top;
}

input,
textarea,
select,
.toast,
[class*="rounded-"],
[class*="card"] {
    min-width: 0;
}

body { transition: background-color 0.4s ease, color 0.4s ease; }
body.dark { background-color: #09090b; color: #f4f4f5; }

.animate-fade-in { animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.toast-enter { animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.toast-exit { animation: slideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideIn { from { transform: translateX(100%) scale(0.9); opacity: 0; } to { transform: translateX(0) scale(1); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0) scale(1); opacity: 1; } to { transform: translateX(100%) scale(0.9); opacity: 0; } }

.loader { border: 3px solid #f3f3f3; border-top: 3px solid #4f46e5; border-radius: 50%; width: 20px; height: 20px; animation: spin 1s linear infinite; display: inline-block; vertical-align: middle; }
.dark .loader { border-color: #27272a; border-top-color: #6366f1; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.no-select { user-select: none; }

.bg-blob { position: fixed; filter: blur(80px); z-index: -1; opacity: 0.4; border-radius: 50%; pointer-events: none; }
.dark .bg-blob { opacity: 0.15; }

.slide-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.slide-panel.is-open {
    max-height: 320px;
    opacity: 1;
    margin-top: 0.75rem;
}

.skeleton {
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.toast-stack {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 130;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: #18181b;
    color: white;
    border: 1px solid #27272a;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    max-width: 360px;
    width: min(360px, calc(100vw - 2rem));
}

.toast__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.toast strong {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.toast__close {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.72;
    padding: 0;
    flex-shrink: 0;
}

.toast__close:hover {
    opacity: 1;
}

.toast > div {
    white-space: pre-wrap;
    line-height: 1.5;
}

.route-slider {
    --route-control-size: 2.5rem;
    --route-slider-gap: 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--route-slider-gap);
}

.route-slider::before,
.route-slider::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0.5rem;
    width: 3.5rem;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.route-slider::before {
    left: calc(var(--route-control-size) + var(--route-slider-gap));
    background: linear-gradient(90deg, rgba(244, 244, 245, 0.95), rgba(244, 244, 245, 0));
}

.route-slider::after {
    right: calc(var(--route-control-size) + var(--route-slider-gap));
    background: linear-gradient(270deg, rgba(244, 244, 245, 0.95), rgba(244, 244, 245, 0));
}

.dark .route-slider::before {
    background: linear-gradient(90deg, rgba(9, 9, 11, 0.92), rgba(9, 9, 11, 0));
}

.dark .route-slider::after {
    background: linear-gradient(270deg, rgba(9, 9, 11, 0.92), rgba(9, 9, 11, 0));
}

.route-slider.is-overflowing[data-can-scroll-left="true"]::before,
.route-slider.is-overflowing[data-can-scroll-right="true"]::after {
    opacity: 1;
}

.route-slider__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    min-width: 0;
    cursor: grab;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.route-slider__viewport.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.route-slider__track {
    min-width: max-content;
}

.route-tab {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: #52525b;
    padding: 0.7rem 1.1rem;
    border-radius: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.route-tab__icon {
    flex: 0 0 auto;
}

.route-tab__label {
    display: inline-block;
}

.route-tab:hover {
    background: rgba(244, 244, 245, 0.92);
    border-color: rgba(228, 228, 231, 0.95);
    color: #18181b;
    transform: translateY(-1px);
}

.route-tab--active {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.18);
    color: #4338ca;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.06);
}

.route-tab--active:hover {
    background: #ffffff;
    color: #3730a3;
}

.route-slider__control {
    width: var(--route-control-size);
    height: var(--route-control-size);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    border-radius: 999px;
    border: 1px solid rgba(228, 228, 231, 0.9);
    background: rgba(255, 255, 255, 0.96);
    color: #52525b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(24, 24, 27, 0.07);
    transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.route-slider__control:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(99, 102, 241, 0.18);
    color: #18181b;
}

.route-slider__control:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
}

.dark .route-slider__control {
    border-color: rgba(63, 63, 70, 0.9);
    background: rgba(24, 24, 27, 0.94);
    color: #d4d4d8;
}

.dark .route-slider__control:hover {
    background: rgba(39, 39, 42, 1);
    border-color: rgba(99, 102, 241, 0.22);
    color: #fafafa;
}

.dark .route-tab {
    color: #a1a1aa;
}

.dark .route-tab:hover {
    background: rgba(39, 39, 42, 0.96);
    border-color: rgba(63, 63, 70, 0.95);
    color: #fafafa;
}

.dark .route-tab--active {
    background: rgba(24, 24, 27, 0.98);
    border-color: rgba(99, 102, 241, 0.28);
    color: #818cf8;
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.08);
}

.dark .route-tab--active:hover {
    color: #a5b4fc;
}

@media (max-width: 640px) {
    .route-slider {
        --route-control-size: 2.2rem;
        --route-slider-gap: 0.4rem;
    }
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.brand-lockup__logo-shell {
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: #008080;
    border: 1px solid rgba(15, 118, 110, 0.35);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.dark .brand-lockup__logo-shell {
    background: #0a192f;
    border-color: rgba(56, 189, 248, 0.18);
}

.brand-lockup__logo {
    width: 2.2rem;
    height: 2.2rem;
    display: block;
    object-fit: contain;
    image-rendering: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
    filter: none;
}

.brand-lockup__logo-shell--hero {
    width: 5.25rem;
    height: 5.25rem;
    border-radius: 1.65rem;
}

.brand-lockup__logo--hero {
    width: 3.75rem;
    height: 3.75rem;
}

.brand-lockup__text {
    display: block;
    min-width: 0;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #18181b;
}

.dark .brand-lockup__text {
    color: #fafafa;
}

.shell-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.shell-nav__brand,
.shell-nav__actions {
    min-width: 0;
}

.shell-nav__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.shell-role-badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-action-button {
    flex-shrink: 0;
}

.shell-action-button--signout {
    gap: 0.45rem;
    white-space: nowrap;
}

.shell-action-button__label {
    display: inline-block;
    white-space: nowrap;
}

.shell-pagehead {
    align-items: stretch;
}

.shell-meta {
    min-width: 11rem;
}

.route-tab__label,
.shell-meta,
.shell-status,
.toast strong,
.toast > div {
    word-break: normal;
    overflow-wrap: break-word;
}

.dashboard-shortcut {
    min-height: 6rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    overflow: hidden;
}

.dashboard-shortcut__eyebrow {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: keep-all;
    line-height: 1.1;
}

.dashboard-shortcut__title {
    line-height: 1.3;
    text-wrap: pretty;
    word-break: keep-all;
    overflow-wrap: normal;
}

#app .boot-brand > h1,
#app .boot-brand > p {
    display: none;
}

@media (max-width: 768px) {
    main {
        padding-top: 1.25rem;
        padding-bottom: 1.5rem;
    }

    .toast-stack {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 1rem;
    }

    .toast {
        width: 100%;
        max-width: none;
    }

    .route-tab {
        padding: 0.62rem 0.9rem;
        font-size: 0.84rem;
        gap: 0.45rem;
    }

    .brand-lockup__logo-shell {
        width: 2.7rem;
        height: 2.7rem;
        border-radius: 0.9rem;
    }

    .brand-lockup__logo {
        width: 2rem;
        height: 2rem;
    }

    .brand-lockup__text {
        font-size: 1.05rem;
    }

    .shell-nav {
        align-items: stretch;
        flex-direction: column;
        gap: 0.85rem;
    }

    .shell-nav__brand {
        width: 100%;
    }

    .shell-nav__actions {
        width: 100%;
        gap: 0.4rem;
        justify-content: space-between;
    }

    .shell-role-badge {
        max-width: calc(100vw - 11rem);
        padding-inline: 0.8rem;
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    .shell-meta {
        min-width: 0;
        width: 100%;
    }

    .shell-pagehead {
        gap: 0.9rem;
    }

    .dashboard-shortcuts-grid {
        min-width: 0;
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-shortcuts-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .route-slider__control {
        display: none;
    }

    .route-slider::before,
    .route-slider::after {
        display: none;
    }

    .route-slider__viewport {
        margin-inline: 0;
        padding-inline: 0;
    }

    .brand-lockup {
        gap: 0.7rem;
    }

    .brand-lockup__text {
        font-size: 0.98rem;
        letter-spacing: -0.02em;
    }

    .shell-nav {
        padding: 0.85rem 0.9rem;
        gap: 0.75rem;
    }

    .shell-nav__actions {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.35rem;
    }

    .shell-role-badge {
        max-width: calc(100vw - 10.25rem);
        min-height: 2.25rem;
        display: inline-flex;
        align-items: center;
        padding-inline: 0.75rem;
        font-size: 0.64rem;
        letter-spacing: 0.08em;
    }

    .shell-action-button {
        min-width: 2.5rem;
        height: 2.5rem;
        border-radius: 0.9rem;
    }

    .shell-action-button--signout {
        padding-inline: 0.8rem;
    }

    .shell-action-button__label {
        font-size: 0.74rem;
    }

    .shell-pagehead h2 {
        font-size: 1.7rem;
        line-height: 1.08;
    }

    .dashboard-shortcuts-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-shortcut {
        min-height: 5.25rem;
        padding: 0.9rem 1rem;
    }

    .dashboard-shortcut__eyebrow {
        font-size: 0.68rem;
        letter-spacing: 0.14em;
        line-height: 1.25;
    }

    .dashboard-shortcut__title {
        font-size: 0.98rem;
        line-height: 1.28;
    }

    .route-tab__label,
    .dashboard-shortcut__title,
    .dashboard-shortcut__eyebrow,
    h1,
    h2,
    h3,
    h4,
    p,
    span,
    label,
    button,
    a,
    th,
    td {
        word-break: normal;
        overflow-wrap: break-word;
    }
}

@media (max-width: 420px) {
    .shell-nav__actions {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0.3rem;
    }

    .shell-role-badge {
        max-width: calc(100vw - 9.5rem);
        padding-inline: 0.7rem;
        font-size: 0.6rem;
    }

    .shell-action-button {
        min-width: 2.35rem;
        height: 2.35rem;
    }

    .shell-action-button--signout {
        padding-inline: 0.7rem;
    }

    .shell-action-button__label {
        display: none;
    }

    .shell-pagehead h2 {
        font-size: 1.55rem;
    }
}

.finance-receipt-overlay {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    isolation: isolate;
}

.finance-receipt-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.finance-receipt-modal {
    position: relative;
    z-index: 1;
    width: min(100%, 64rem);
    max-height: min(88vh, 920px);
    display: flex;
    flex-direction: column;
}

.finance-account-toggle {
    align-self: flex-start;
}

@media (max-width: 768px) {
    .shell-pagehead__title {
        font-size: 1.85rem;
        line-height: 1.08;
    }

    .shell-pagehead__meta {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .finance-account-section__header {
        gap: 1rem;
    }

    .finance-account-summary-card {
        padding: 0.85rem 0.95rem;
    }

    .finance-account-summary-card p:last-child {
        font-size: 0.98rem;
    }

    .finance-transaction-card {
        padding: 0.9rem;
    }

    .finance-receipt-modal {
        max-width: 100%;
        border-radius: 1.5rem;
    }

    .finance-receipt-modal iframe {
        min-height: 48vh;
    }
}

@media (max-width: 640px) {
    .finance-account-toggle {
        width: 100%;
    }

    .finance-account-preview {
        grid-template-columns: 1fr;
    }

    .finance-account-summary-card {
        min-height: 5.25rem;
    }

    .finance-receipt-modal {
        max-height: 92vh;
    }

    .finance-receipt-overlay {
        padding: 0.75rem;
        align-items: flex-start;
    }
}
