@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
/* ==========================================
   AYKAR BUSINESS MANAGEMENT
   DASHBOARD STYLES
========================================== */

:root {
    --navy: #101b38;
    --navy-dark: #0b142b;
    --blue: #1769ff;
    --background: #faf6f0;
    --white: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--background);
    overflow-x: hidden !important;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
}

/* ==========================================
   APPLICATION LAYOUT
========================================== */

.app-layout {
    min-height: 100vh;
}

/* ==========================================
   SIDEBAR
========================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: var(--aykar-vh, 100vh);
    height: var(--aykar-vh, 100dvh);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 240px;
    background: #faf6f0;
    color: #1e293b;
    border-right: 1px solid #e7e2d9;
    transition: width 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.05);
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 88px;
    padding: 14px 16px;
    border-bottom: 0;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.sidebar-brand .brand-lockup {
    display: block;
    width: 100%;
    height: 62px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.sidebar-brand .brand-mark {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.sidebar-brand .brand-lockup {
    display: none;
}

.sidebar-brand > div {
    display: block;
}

.sidebar-brand strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    line-height: 1.1;
}

.sidebar-brand strong span {
    display: inline;
    color: #2563eb;
    font-size: inherit;
    font-weight: 800;
    margin-left: 4px;
}

.sidebar-brand > div > span {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    letter-spacing: normal;
}

.sidebar-nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
    padding: 10px 8px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.45);
}

.nav-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 40px;
    padding: 6px 12px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
    transition: all 0.18s ease-in-out;
}

/* Sidebar Layout Stability: Zero Cumulative Layout Shift (CLS) */
#companiesNav,
#systemHealthNav {
    display: none;
}

#branchesNav {
    display: none !important;
}

html.is-platform-admin #companiesNav,
html.is-platform-admin #systemHealthNav {
    display: flex !important;
}

html.has-branches-nav #branchesNav {
    display: flex !important;
}

.nav-item:hover {
    background: #f1f5f9 !important;
    border-left: 3px solid transparent !important;
    color: #0f172a !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.nav-item:hover .nav-icon svg,
.nav-item.active .nav-icon svg {
    stroke: #ffffff !important;
    color: #ffffff !important;
}

.nav-item:hover .nav-arrow {
    color: #0f172a !important;
    opacity: 1 !important;
}

.nav-item.active .nav-arrow {
    color: #2563eb !important;
    opacity: 1 !important;
}

.nav-item.active {
    background: #eff6ff !important;
    border-left: 3px solid #2563eb !important;
    border-radius: 0 8px 8px 0 !important;
    color: #1d4ed8 !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-weight: 700;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.12);
    border: none;
}

.nav-icon svg {
    width: 14px;
    height: 14px;
    display: block;
    stroke: #ffffff !important;
    color: #ffffff !important;
}

/* Odoo Stili Canlı Gradient Rozetleri (Vitrin ile Birebir Aynı) */
.nav-icon.icon-companies {
    background: linear-gradient(135deg, #22d3ee 0%, #2563eb 100%) !important;
}
.nav-icon.icon-health {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%) !important;
}
.nav-icon.icon-branches {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
}
.nav-icon.icon-sales {
    background: linear-gradient(135deg, #34d399 0%, #0d9488 100%) !important;
}
.nav-icon.icon-purchases {
    background: linear-gradient(135deg, #fbbf24 0%, #ea580c 100%) !important;
}
.nav-icon.icon-inventory {
    background: linear-gradient(135deg, #6366f1 0%, #9333ea 100%) !important;
}
.nav-icon.icon-customers {
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%) !important;
}
.nav-icon.icon-tracking {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%) !important;
}
.nav-icon.icon-suppliers {
    background: linear-gradient(135deg, #d946ef 0%, #e11d48 100%) !important;
}
.nav-icon.icon-finance {
    background: linear-gradient(135deg, #2dd4bf 0%, #16a34a 100%) !important;
}
.nav-icon.icon-hr {
    background: linear-gradient(135deg, #fb7185 0%, #dc2626 100%) !important;
}
.nav-icon.icon-reports {
    background: linear-gradient(135deg, #60a5fa 0%, #4f46e5 100%) !important;
}
.nav-icon.icon-settings {
    background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important;
}

/* Hover Efekti */
.nav-item:hover .nav-icon {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

.nav-arrow {
    margin-left: auto;
    font-size: 13px;
    opacity: 0.65;
    transition: transform 0.2s;
}

.nav-toggle.open .nav-arrow {
    transform: rotate(90deg);
}

.nav-toggle .nav-arrow {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 10px 0 42px;
    margin: 0;
    pointer-events: none;
    transition: max-height 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.05),
                opacity 0.18s ease,
                padding 0.22s ease;
}

.nav-submenu.open {
    max-height: 850px;
    opacity: 1;
    padding: 4px 10px 8px 42px;
    pointer-events: auto;
}

.nav-submenu .submenu-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-submenu .submenu-col:not(:first-child) {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(226, 232, 240, 0.6);
}

.nav-submenu .submenu-heading {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
    padding: 4px 6px 2px 6px;
    user-select: none;
    display: flex;
    align-items: center;
}

.nav-submenu a .sub-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
    margin-right: 6px;
}

.nav-submenu a .sub-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-submenu a.action-highlight {
    background: rgba(37, 99, 235, 0.05) !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
    border: 1px dashed rgba(37, 99, 235, 0.3) !important;
    margin: 2px 0 !important;
}

.nav-submenu a.action-highlight:hover {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    color: #1d4ed8 !important;
}

.sidebar .nav-submenu a,
.nav-submenu a {
    display: flex;
    align-items: center;
    min-height: 30px !important;
    padding: 6px 12px !important;
    border-radius: 6px;
    border-left: none !important;
    color: #cbd5e1 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: none !important;
    transition: all 0.18s ease-in-out;
}

.nav-submenu a.active {
    background: rgba(0, 240, 255, 0.18) !important;
    border-left: 3px solid #00f0ff !important;
    border-radius: 0 6px 6px 0 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: none !important;
    padding-left: 9px !important;
}

.nav-submenu a:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

#branchMenuList {
    display: contents;
}

#menu-branches a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}

#menu-branches .branch-nav-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#menu-branches .branch-nav-code {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

/* ==========================================
   SIDEBAR BOTTOM
========================================== */

.sidebar-bottom {
    flex-shrink: 0;
    margin-top: auto;
    padding: 14px;
    border-top: 0;
}

.sidebar-company,
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.company-avatar,
.sidebar-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    border-radius: 9px;
    background: #f3f4f6;
    color: #17233d;
    font-size: 16px;
}

.sidebar-user-avatar {
    border-radius: 50%;
    background: #2854c7;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-company-info,
.sidebar-user-info {
    min-width: 0;
}

.sidebar-company-info strong,
.sidebar-user-info strong {
    display: block;
    overflow: hidden;
    color: #17233d;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-company-info span,
.sidebar-user-info span {
    display: block;
    margin-top: 4px;
    color: #77839a;
    font-size: 11px;
}

.bottom-action {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #d5deec;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.bottom-action:hover {
    background: rgba(126, 182, 255, 0.16);
    color: #ffffff;
}

.bottom-action.active {
    background: rgba(126, 182, 255, 0.22);
    color: #ffffff;
    box-shadow: inset 3px 0 0 #7eb6ff, inset -3px 0 0 #7eb6ff;
}

.bottom-action svg {
    flex: 0 0 auto;
}

.app-credit {
    margin: 10px 2px 4px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-credit strong,
.app-credit span {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-credit strong {
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
    line-height: 1.35;
    white-space: nowrap;
}

.app-credit span {
    margin-top: 0;
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    font-family: ui-monospace, monospace;
}

.sidebar-user {
    padding-top: 13px;
    border-top: 1px solid #e6e8ee;
}

/* ==========================================
   MAIN AREA
========================================== */

.main-area {
    min-width: 0;
    min-height: 100vh;
    margin-left: 240px;
    transition: margin-left 0.22s ease;
    overflow-x: hidden !important;
    max-width: 100%;
}

/* ==========================================
   TOPBAR
========================================== */

.topbar {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 76px;
    padding: 14px 24px 14px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    overflow: visible !important;
    max-width: 100%;
    box-sizing: border-box;
}


/* ==========================================
   MODERN ERP TOPBAR SEARCH PILL (CAPSULE)
========================================== */
.topbar-search-wrap {
    position: relative;
    flex: 0 1 400px;
    max-width: 440px;
    min-width: 240px;
    margin-right: auto;
    margin-left: 6px;
}

@media (max-width: 760px) {
    .topbar-search-wrap {
        flex: 1;
        max-width: 100%;
        margin-left: 4px;
        margin-right: 0;
    }
}

.topbar-search-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0 16px;
    height: 40px;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-search-pill:hover {
    background: #e9eef5;
    border-color: #cbd5e1;
}

.topbar-search-pill:focus-within {
    background: #f8fafc;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.topbar-search-pill .search-pill-icon {
    color: #64748b;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.topbar-search-pill:focus-within .search-pill-icon {
    color: #2563eb;
}


.topbar-search-input,
input.topbar-search-input,
html:not([data-theme="dark"]) input.topbar-search-input,
html body input.topbar-search-input {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
}

.topbar-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #0f172a;
    font-size: 13.5px;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    padding: 0;
    margin: 0;
    width: 100%;
}

.topbar-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    font-size: 13px;
}

.topbar-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: #cbd5e1;
    color: #475569;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.15s ease;
}
.topbar-search-clear:hover {
    background: #94a3b8;
    color: #ffffff;
}

/* Floating Results Dropdown (Opens ONLY on 3+ characters) */
.topbar-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.05);
    z-index: 999999;
    overflow: hidden;
    animation: searchDropSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 400px;
}

@keyframes searchDropSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-dropdown-list {
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a;
    transition: background 0.15s ease;
    cursor: pointer;
}

.search-dropdown-item:hover,
.search-dropdown-item.active {
    background: #f1f5f9;
}

.search-dropdown-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.search-dropdown-item-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.search-dropdown-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.search-dropdown-item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-item-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* Dark Theme Support */
html[data-theme="dark"] .topbar-search-pill {
    background: #1e293b;
    border-color: #334155;
}
html[data-theme="dark"] .topbar-search-pill:hover {
    background: #24344d;
    border-color: #475569;
}
html[data-theme="dark"] .topbar-search-pill:focus-within {
    background: #16203a;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.2);
}
html[data-theme="dark"] .topbar-search-input {
    color: #f8fafc;
}
html[data-theme="dark"] .topbar-search-input::placeholder {
    color: #64748b;
}
html[data-theme="dark"] .topbar-search-clear {
    background: #334155;
    color: #cbd5e1;
}
html[data-theme="dark"] .topbar-search-clear:hover {
    background: #475569;
    color: #ffffff;
}
html[data-theme="dark"] .topbar-search-dropdown {
    background: #16203a;
    border-color: #233154;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .search-dropdown-item:hover,
html[data-theme="dark"] .search-dropdown-item.active {
    background: #1c294a;
}
html[data-theme="dark"] .search-dropdown-item-title {
    color: #f8fafc;
}

/* Permanently hide legacy robot animation, runner & thought bubble */
.guide-lane,
.guide-robot,
.guide-bubble,
.guide-runner,
img[src*="aykar-robot"] {
    display: none !important;
}

.guide-lane {
    position: relative;
    flex: 1;
    min-width: 0 !important;
    height: 70px;
    display: flex;
    align-items: center;
    container-type: inline-size;
    overflow: hidden !important;
}

@media (max-width: 1100px) {
    .guide-lane {
        display: none !important;
    }
}

.guide-runner {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    animation: guide-walk 60s ease-in-out infinite;
    cursor: pointer;
    user-select: none;
}

.guide-lane.stopped .guide-runner,
.guide-lane.stopped .guide-robot,
.guide-runner:hover,
.guide-runner:hover .guide-robot,
.guide-runner.is-facing-screen,
.guide-runner.is-facing-screen .guide-robot {
    animation-play-state: paused;
}

@keyframes guide-walk {
    /* 0% - 44%: Walk Right slowly and smoothly (~26s) */
    0% {
        transform: translateY(-50%) translateX(0);
    }
    22% {
        transform: translateY(calc(-50% + 10px)) translateX(calc((100cqi - 100%) * 0.48));
    }
    44% {
        transform: translateY(-50%) translateX(calc(100cqi - 100%));
    }
    /* 44% - 54%: Pause at Right edge (turns to face screen & turns around) */
    54% {
        transform: translateY(-50%) translateX(calc(100cqi - 100%));
    }
    /* 54% - 94%: Walk Left slowly and smoothly (~24s) */
    74% {
        transform: translateY(calc(-50% + 10px)) translateX(calc((100cqi - 100%) * 0.48));
    }
    94% {
        transform: translateY(-50%) translateX(0);
    }
    /* 94% - 100%: Pause at Left edge (turns to face screen & turns around) */
    100% {
        transform: translateY(-50%) translateX(0);
    }
}

.guide-bubble {
    position: relative;
    order: 2;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #101b38;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(16, 27, 56, 0.1);
    border: 1.5px solid rgba(8, 159, 186, 0.32);
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease;
    z-index: 10;
}

/* Two mini thought bubbles trailing to the robot */
.guide-bubble::before {
    content: '';
    position: absolute;
    left: -7px;
    bottom: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid rgba(8, 159, 186, 0.32);
    box-shadow: 0 1px 3px rgba(16, 27, 56, 0.08);
}

.guide-bubble::after {
    content: '';
    position: absolute;
    left: -13px;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid rgba(8, 159, 186, 0.32);
}

.guide-bubble.bubble-fade {
    opacity: 0;
    transform: scale(0.9);
}

.guide-runner:hover .guide-bubble {
    border-color: #2563eb;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.24);
}

.guide-robot {
    position: relative;
    order: 1;
    width: 68px;
    height: 72px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: guide-bot-flip 60s ease-in-out infinite;
    transition: filter 0.25s ease;
}

@keyframes guide-bot-flip {
    /* 0% - 48%: Facing Right while traveling right */
    0%, 48% {
        transform: scaleX(1);
    }
    /* 51%: Cleanly flip to Left while front/pivot pose is transitioning */
    51% {
        transform: scaleX(-1);
    }
    /* 51% - 96%: Facing Left while traveling left */
    52%, 96% {
        transform: scaleX(-1);
    }
    /* 99%: Cleanly flip back to Right */
    99%, 100% {
        transform: scaleX(1);
    }
}

/* 1. Walk Cycle (moving legs and swinging arms) */
.guide-robot .bot-pose-walk {
    position: absolute;
    top: 0;
    left: 0;
    width: 68px;
    height: 72px;
    background-image: url('images/aykar-robot-walkcycle.png');
    background-size: 272px 72px;
    background-repeat: no-repeat;
    filter: drop-shadow(0 6px 14px rgba(16, 27, 56, 0.22));
    animation: bot-walk-cycle 0.85s steps(4) infinite, guide-pose-walk 60s ease-in-out infinite;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes bot-walk-cycle {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -272px 0;
    }
}

/* 2. Pivot Pose (3/4 human turn angle) */
.guide-robot .bot-pose-pivot {
    position: absolute;
    top: 0;
    left: 0;
    width: 68px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(16, 27, 56, 0.22));
    animation: bot-float 3.5s ease-in-out infinite, guide-pose-pivot 60s ease-in-out infinite;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 3. Front Pose (facing user / screen) */
.guide-robot .bot-pose-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 68px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(16, 27, 56, 0.22));
    animation: bot-float 3.5s ease-in-out infinite, guide-pose-front 60s ease-in-out infinite;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Timings for natural human turn */
@keyframes guide-pose-walk {
    0%, 42% {
        opacity: 1;
    }
    43%, 54% {
        opacity: 0;
    }
    55%, 92% {
        opacity: 1;
    }
    93%, 100% {
        opacity: 0;
    }
}

@keyframes guide-pose-pivot {
    0%, 42% {
        opacity: 0;
    }
    43%, 46% {
        opacity: 1;
    }
    47%, 50% {
        opacity: 0;
    }
    51%, 54% {
        opacity: 1;
    }
    55%, 92% {
        opacity: 0;
    }
    93%, 95.5% {
        opacity: 1;
    }
    96%, 98% {
        opacity: 0;
    }
    98.5%, 100% {
        opacity: 1;
    }
}

@keyframes guide-pose-front {
    0%, 46% {
        opacity: 0;
    }
    47%, 50% {
        opacity: 1;
    }
    51%, 95% {
        opacity: 0;
    }
    96%, 98% {
        opacity: 1;
    }
    99%, 100% {
        opacity: 0;
    }
}

/* When runner is hovered or clicked/active (turns directly to face screen) */
.guide-runner:hover .guide-robot,
.guide-runner.is-facing-screen .guide-robot {
    animation-play-state: paused !important;
    transform: scaleX(1) !important;
}

.guide-runner:hover .bot-pose-walk,
.guide-runner.is-facing-screen .bot-pose-walk,
.guide-runner:hover .bot-pose-pivot,
.guide-runner.is-facing-screen .bot-pose-pivot {
    opacity: 0 !important;
    animation-play-state: paused !important;
}

.guide-runner:hover .bot-pose-front,
.guide-runner.is-facing-screen .bot-pose-front {
    opacity: 1 !important;
    transform: scale(1.12) !important;
    filter: drop-shadow(0 10px 24px rgba(8, 159, 186, 0.65)) !important;
    animation-play-state: paused !important;
}

@keyframes bot-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.bot-floor-shadow {
    animation: bot-shadow-scale 3s ease-in-out infinite;
    transform-origin: 50px 104px;
}

@keyframes bot-shadow-scale {
    0%, 100% {
        transform: scale(1);
        opacity: 0.24;
    }
    50% {
        transform: scale(0.78);
        opacity: 0.12;
    }
}

.bot-eyes {
    transform-origin: 50px 38px;
    animation: bot-blink 4.5s ease-in-out infinite;
}

@keyframes bot-blink {
    0%, 93%, 100% {
        transform: scaleY(1);
    }
    96% {
        transform: scaleY(0.12);
    }
}

.bot-reactor-core {
    animation: bot-core-pulse 2s ease-in-out infinite alternate;
    transform-origin: 50px 74px;
}

@keyframes bot-core-pulse {
    0% {
        opacity: 0.75;
        transform: scale(0.85);
    }
    100% {
        opacity: 1;
        transform: scale(1.15);
    }
}

.bot-thruster-flame {
    animation: bot-flame-pulse 1.4s ease-in-out infinite alternate;
    transform-origin: 50px 93px;
}

@keyframes bot-flame-pulse {
    0% {
        opacity: 0.7;
        transform: scaleY(0.85);
    }
    100% {
        opacity: 1;
        transform: scaleY(1.3);
    }
}

.bot-arm-left {
    animation: bot-arm-sway 2.6s ease-in-out infinite alternate;
    transform-origin: 19px 65px;
}

.bot-arm-right {
    animation: bot-arm-sway 2.6s ease-in-out infinite alternate-reverse;
    transform-origin: 81px 65px;
}

@keyframes bot-arm-sway {
    0% {
        transform: rotate(3deg);
    }
    100% {
        transform: rotate(-3deg);
    }
}

.guide-ask {
    display: none !important;
}

/* ========================================
   AYKAR ASSISTANT DRAWER (GLASSMORPHISM)
   ======================================== */

.assistant-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 18, 35, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.assistant-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.assistant-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(440px, 92vw);
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(215, 228, 255, 0.85);
    box-shadow: -12px 0 40px rgba(16, 27, 56, 0.16);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    color: #101b38;
}

.assistant-drawer.open {
    transform: translateX(0);
}

.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.assistant-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.assistant-avatar-box {
    position: relative;
    width: 48px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(18, 217, 160, 0.14), rgba(49, 88, 237, 0.14));
    border-radius: 14px;
    padding: 3px;
    border: 1px solid rgba(8, 159, 186, 0.25);
}

.assistant-avatar-svg,
.assistant-avatar-3d {
    width: 42px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(16, 27, 56, 0.2));
}

.assistant-online-ping {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #059669;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.6);
}

.assistant-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.assistant-name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #101b38;
    letter-spacing: -0.2px;
}

.assistant-sub {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

.assistant-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: #ffffff;
    color: #64748b;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.assistant-close-btn:hover {
    background: #f1f5f9;
    color: #101b38;
    transform: scale(1.05);
}

.assistant-search-container {
    padding: 16px 20px 12px;
}

.assistant-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff !important;
    border: 1.5px solid #dce6f6;
    border-radius: 14px;
    padding: 6px 14px;
    box-shadow: 0 2px 8px rgba(16, 27, 56, 0.04);
    transition: all 0.2s ease;
}

.assistant-search-box:focus-within {
    border-color: #2563eb;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), 0 4px 14px rgba(37, 99, 235, 0.12);
}

.assistant-search-icon {
    font-size: 15px;
    color: #2563eb;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.assistant-search-box input,
.assistant-search-box input[type="search"] {
    flex: 1;
    border: 0 !important;
    outline: none !important;
    font-size: 13.5px;
    font-family: inherit;
    color: #101b38;
    padding: 6px 0;
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
}

/* Chrome / Edge autofill sarı/bej arka planını engelleme */
.assistant-search-box input:-webkit-autofill,
.assistant-search-box input:-webkit-autofill:hover, 
.assistant-search-box input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #101b38 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.assistant-search-box input::placeholder {
    color: #8fa0b8;
    font-size: 13px;
}

.assistant-kbd {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 3px 7px;
    border-radius: 6px;
    border: 1px solid #d8e2ef;
    letter-spacing: 0.3px;
}

.assistant-scroll-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 20px;
}

.assistant-scroll-body::-webkit-scrollbar {
    width: 5px;
}

.assistant-scroll-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}

.assistant-widget-group {
    margin-bottom: 22px;
}

.assistant-widget-header {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.assistant-chips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}

.assistant-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.assistant-chip:hover {
    border-color: #2563eb;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(5, 150, 105, 0.06));
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.1);
}

.chip-emoji {
    font-size: 16px;
}

.assistant-card-tip {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(5, 150, 105, 0.06));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 14px;
}

.tip-sparkle {
    font-size: 18px;
    flex-shrink: 0;
}

.tip-text-wrap strong {
    display: block;
    font-size: 12.5px;
    color: #2563eb;
    margin-bottom: 4px;
}

.tip-text-wrap p {
    margin: 0;
    font-size: 12px;
    color: #334155;
    line-height: 1.45;
}

.assistant-link-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.assistant-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.assistant-link-card:hover {
    border-color: #3158ed;
    background: #f8fafc;
    transform: translateX(3px);
}

.link-card-left {
    display: flex;
    align-items: center;
    gap: 11px;
}

.link-card-icon {
    font-size: 16px;
}

.link-card-left strong {
    display: block;
    font-size: 12.5px;
    color: #0f172a;
}

.link-card-left span {
    display: block;
    font-size: 11px;
    color: #64748b;
}

.link-card-chevron {
    font-size: 16px;
    color: #94a3b8;
    font-weight: 700;
}

.assistant-search-results {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.assistant-search-results button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #101b38;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.assistant-search-results button:hover,
.assistant-search-results button.active {
    border-color: #2563eb;
    background: linear-gradient(115deg, rgba(37, 99, 235, 0.1), rgba(5, 150, 105, 0.06));
    transform: translateX(3px);
}

.assistant-kind-badge {
    flex-shrink: 0;
    min-width: 66px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3158ed;
    font-size: 10.5px;
    font-weight: 700;
    text-align: center;
}

.assistant-res-copy {
    min-width: 0;
    flex: 1;
}

.assistant-res-copy strong {
    display: block;
    font-size: 13px;
    color: #0f172a;
}

.assistant-res-copy span {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-drawer-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    font-size: 11.5px;
    color: #64748b;
    text-align: center;
    background: rgba(248, 250, 252, 0.8);
}

/* Dark mode overrides */
html[data-theme="dark"] .assistant-drawer {
    background: rgba(15, 23, 42, 0.95);
    border-left-color: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .assistant-header,
html[data-theme="dark"] .assistant-drawer-footer {
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .assistant-name,
html[data-theme="dark"] .link-card-left strong,
html[data-theme="dark"] .assistant-res-copy strong {
    color: #f8fafc;
}

html[data-theme="dark"] .assistant-search-box {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .assistant-search-box input {
    color: #f8fafc;
}

html[data-theme="dark"] .assistant-chip,
html[data-theme="dark"] .assistant-link-card,
html[data-theme="dark"] .assistant-search-results button,
html[data-theme="dark"] .assistant-close-btn {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

html[data-theme="dark"] .assistant-card-tip {
    background: linear-gradient(135deg, rgba(8, 159, 186, 0.15), rgba(49, 88, 237, 0.12));
    border-color: rgba(8, 159, 186, 0.3);
}

html[data-theme="dark"] .tip-text-wrap p {
    color: #cbd5e1;
}

html[data-theme="dark"] .assistant-drawer-footer {
    background: rgba(15, 23, 42, 0.8);
}

html[data-theme="dark"] .guide-bubble {
    background: rgba(30, 41, 59, 0.96);
    color: #f1f5f9;
    border-color: rgba(8, 159, 186, 0.4);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .guide-bubble::after {
    border-color: rgba(30, 41, 59, 0.96) transparent;
}

.guide-results {
    max-height: 360px;
    margin-top: 8px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #d7e4ff;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(49, 88, 237, 0.16);
}

.guide-results button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.guide-results button:hover,
.guide-results button.active {
    background: linear-gradient(115deg, rgba(18, 217, 160, 0.18), rgba(49, 88, 237, 0.12));
}

.guide-kind {
    flex-shrink: 0;
    min-width: 72px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3158ed;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.guide-copy {
    min-width: 0;
}

.guide-copy strong,
.guide-copy span {
    display: block;
}

.guide-copy span {
    color: var(--muted);
    font-size: 12px;
}

.guide-empty {
    margin: 0;
    padding: 12px;
    color: var(--muted);
    font-size: 13px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(380px, 100%);
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #f7f9fc;
    color: var(--muted);
}

.search-container input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 12px;
}

.search-shortcut {
    flex-shrink: 0;
    padding: 3px 5px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 10px;
}

.topbar-right {
    position: relative;
    z-index: 101;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #475569;
    box-shadow: 0 1px 3px rgba(16, 27, 56, 0.04);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.notification-button:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Kırmızı radar dalgası (Pulse Wave Effect) */
.notification-button.has-unread {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fff5f5;
}

.notification-button.has-unread::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 16px;
    border: 2px solid rgba(239, 68, 68, 0.7);
    animation: aykar-bell-ripple 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    pointer-events: none;
}

.notification-button.has-unread::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 20px;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    animation: aykar-bell-ripple 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite 0.45s;
    pointer-events: none;
}

@keyframes aykar-bell-ripple {
    0% {
        transform: scale(0.92);
        opacity: 0.9;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid white;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}

.notification-badge[hidden] {
    display: none;
}

.notification-menu {
    position: relative;
}

.notification-panel {
    position: absolute;
    top: 48px;
    right: 0;
    z-index: 40;
    width: min(360px, 86vw);
    padding: 14px;
    border: 1px solid #d7f3ee;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(49, 88, 237, 0.16);
}

.notification-panel[hidden] {
    display: none;
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.notification-panel-header strong {
    margin: 0 !important;
    font-size: 14px;
    font-weight: 700;
    color: #101b38;
}

.btn-mark-all-read {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: none;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-mark-all-read:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.notification-panel strong {
    display: block;
    margin-bottom: 10px;
    color: #101b38;
    font-size: 14px;
}

.notification-empty {
    margin: 0;
    color: #77839a;
    font-size: 13px;
}

.notification-item {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: #f4fbfa;
    color: #101b38;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.notification-item.unread {
    background: linear-gradient(115deg, rgba(18, 217, 160, 0.18), rgba(49, 88, 237, 0.12));
}

.notification-item strong,
.notification-item span {
    display: block;
}

.notification-item span {
    margin-top: 3px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 700;
}

.topbar-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(16, 27, 56, 0.04);
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.topbar-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #2563eb);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
    overflow: hidden;
}

.topbar-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ==========================================
   DASHBOARD CONTENT
========================================== */

.dashboard-content {
    max-width: 1600px;
    margin: 0;
    padding: 8px 24px 20px;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.dashboard-heading > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dashboard-heading h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #0f172a;
    -webkit-text-fill-color: #0f172a;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: block;
    width: -moz-fit-content;
    width: fit-content;
}

.dashboard-heading p {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: #64748b;
    -webkit-text-fill-color: #64748b;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: block;
    width: -moz-fit-content;
    width: fit-content;
}

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

.dashboard-grid[hidden] {
    display: none;
}

.dashboard-panel[hidden] {
    display: none;
}

.kpi-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: -4px 0 22px;
    padding: 16px 20px;
    border: 1px solid #dce4f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 24px rgba(16, 27, 56, 0.06);
    animation: kpi-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-picker-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.kpi-picker-top strong {
    font-size: 14px;
    color: #1e293b;
}

.kpi-picker-btn {
    padding: 6px 12px;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.kpi-picker-btn:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.kpi-picker-close-btn {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    margin-left: 4px;
}

.kpi-picker-close-btn:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
}

.kpi-picker-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

@keyframes kpi-pop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.kpi-picker[hidden] {
    display: none !important;
}

.kpi-picker label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.kpi-picker label:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.kpi-picker label:has(input:checked) {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.kpi-picker input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #2563eb;
    margin: 0;
    cursor: pointer;
}

.kpi-empty {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.dashboard-heading > span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

/* ==========================================
   KPI CARDS & VIBRANT COLOR THEMES
========================================== */

/* THE MASTER KPI GRID - Clean 4-Column Auto-Stretching Flex Grid (Scoped to Dashboard #kpiGrid) */
#kpiGrid.kpi-grid,
#kpiGrid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    width: 100% !important;
    margin-bottom: 24px !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

.kpi-grid[hidden],
#kpiGrid[hidden],
.dashboard-grid[hidden],
#dashboardPanels[hidden],
.dashboard-panel[hidden],
#pendingPanel[hidden],
#deliveryPanel[hidden],
.kpi-card[hidden] {
    display: none !important;
}

/* SLEEK FLOATING EXECUTIVE KPI TILE - Wide, uncompressed, breathing comfortably */
#kpiGrid .kpi-card {
    flex: 1 1 calc(25% - 16px) !important;
    min-width: 220px !important;
    max-width: 100% !important;
    background: #ffffff !important;
    border: none !important;
    border-top: none !important;
    border-radius: 14px !important;
    /* Geniş ve ferah nefes alan iç boşluk */
    padding: 22px 24px !important;
    height: auto !important;
    min-height: 126px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;

    /* PAMUK GİBİ YUMUŞAK, ÇOK ŞEFFAF STRIPE HAVADA SÜZÜLME GÖLGESİ - Sıfır sert gri çizgi */
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.04), 0 5px 15px rgba(15, 23, 42, 0.02) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.kpi-card::before {
    display: none !important;
    content: none !important;
}

.kpi-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.07), 0 8px 20px rgba(15, 23, 42, 0.03) !important;
}

@media (max-width: 1023px) and (min-width: 641px) {
    .kpi-card {
        flex: 1 1 calc(50% - 16px) !important;
    }
}

@media (max-width: 640px) {
    .kpi-card {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
}

.kpi-card-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.kpi-title-group {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    gap: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* TYPOGRAPHY HIERARCHY */
.kpi-card-title,
.kpi-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.kpi-icon-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.2s ease !important;
}

.kpi-icon-badge svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}

.kpi-card:hover .kpi-icon-badge {
    transform: scale(1.05);
}

.kpi-card-value,
.kpi-value {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.025em !important;
    margin: 10px 0 6px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    min-height: 0 !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow-wrap: anywhere !important;
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.kpi-card-bottom {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    font-size: 11.5px !important;
    color: #94a3b8 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.kpi-note {
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- EXECUTIVE PASTEL COLOR THEMES --- */

/* Fix the executive pastel color badges */
.kpi-badge-sales,
.kpi-card.kpi-card-sales .kpi-icon-badge {
    background: rgba(14, 165, 233, 0.08) !important;
    color: #0ea5e9 !important;
}

.kpi-badge-balance,
.kpi-card.kpi-card-due .kpi-icon-badge {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
}

.kpi-badge-expenses,
.kpi-card.kpi-card-expenses .kpi-icon-badge {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}

.kpi-badge-profit,
.kpi-card.kpi-card-netprofit .kpi-icon-badge {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
}

/* Negative Net Profit State (Flipped downward, executive pastel red) */
.kpi-card.kpi-card-netprofit.is-negative .kpi-icon-badge,
.kpi-card.is-negative .kpi-icon-badge,
.kpi-card.is-negative .kpi-badge-profit {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}
.kpi-card.kpi-card-netprofit.is-negative .kpi-value,
.kpi-card.is-negative .kpi-value {
    color: #ef4444 !important;
}

/* 5. PRODUCTS (Mor) */
.kpi-card.kpi-card-products .kpi-icon-badge {
    background: rgba(139, 92, 246, 0.08) !important;
    color: #8b5cf6 !important;
}

/* 6. CUSTOMERS (Camgöbeği) */
.kpi-card.kpi-card-customers .kpi-icon-badge {
    background: rgba(6, 182, 212, 0.08) !important;
    color: #06b6d4 !important;
}

/* 7. BANKS & RESERVES (Teal) */
.kpi-card.kpi-card-banks .kpi-icon-badge {
    background: rgba(20, 184, 166, 0.08) !important;
    color: #14b8a6 !important;
}

/* 8. TODAY'S COLLECTIONS (Altın Amber) */
.kpi-card.kpi-card-todaycol .kpi-icon-badge {
    background: rgba(234, 179, 8, 0.08) !important;
    color: #eab308 !important;
}

/* ==========================================
   DASHBOARD PANELS
========================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 22px;
    margin-bottom: 22px;
}

.dashboard-panel {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--white);
    box-shadow: 0 4px 18px rgba(16, 27, 56, 0.035);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.panel-header h2 {
    margin: 0;
    font-size: 16px;
}

.panel-header p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.panel-header a {
    color: var(--blue);
    font-size: 12px;
    white-space: nowrap;
}

.panel-header a:hover {
    text-decoration: underline;
}

.panel-header select {
    max-width: 140px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--white);
    color: var(--text);
    font-size: 12px;
}

/* ==========================================
   SALES OVERVIEW CHART
========================================== */

.chart-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 250px;
    padding-top: 12px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    height: 205px;
    padding: 0 8px;
    border-bottom: 1px solid var(--border);
    background: repeating-linear-gradient(
        to top,
        transparent 0,
        transparent 49px,
        #edf1f8 50px,
        transparent 51px
    );
}

.chart-bars > div {
    flex: 1;
    min-width: 0;
    max-width: 42px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #1769ff, #7b8dff);
    transition: opacity 0.2s;
}

.chart-bars > div:hover {
    opacity: 0.75;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 13px 0 0;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.chart-labels span {
    flex: 1;
    min-width: 0;
}

/* ==========================================
   TOP SELLING PRODUCTS
========================================== */

.product-list {
    display: flex;
    flex-direction: column;
}

.product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.product-row:last-child {
    border-bottom: 0;
}

.product-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #f1f5ff;
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-info strong,
.product-info span {
    display: block;
}

.product-info strong {
    color: var(--text);
    font-size: 12px;
    line-height: 1.5;
}

.product-info span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.product-row > strong {
    flex-shrink: 0;
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
}

/* ==========================================
   RECENT SALES TABLE
========================================== */

.table-container {
    width: 100%;
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-container th {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.table-container td {
    padding: 16px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
}

.table-container tbody tr:last-child td {
    border-bottom: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

.status-badge.completed {
    background: #e6f8ef;
    color: #168558;
}

.status-badge.pending {
    background: #fff3dc;
    color: #b67a16;
}

/* ==========================================
   LOW STOCK ALERTS
========================================== */

.stock-list {
    display: flex;
    flex-direction: column;
}

.stock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.stock-row:last-child {
    border-bottom: 0;
}

.stock-row > div {
    min-width: 0;
}

.stock-row strong,
.stock-row span {
    display: block;
}

.stock-row strong {
    color: var(--text);
    font-size: 12px;
}

.stock-row > div > span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.stock-count {
    flex-shrink: 0;
    padding: 7px 9px;
    border-radius: 6px;
    background: #fff0ed;
    color: #d65a44;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* ==========================================
   RESPONSIVE LAYOUT
========================================== */

@media (max-width: 1250px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    }
}

@media (max-width: 1050px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 14px 22px;
    }

    .dashboard-content {
        padding: 24px;
    }
}

@media (max-width: 760px) {
    .sidebar {
        width: 240px;
    }

    .nav-item {
        font-size: 13px;
    }

    .nav-submenu a {
        font-size: 14px;
    }

    .sidebar-brand {
        padding: 18px 14px;
    }

    .sidebar-brand strong {
        font-size: 19px;
    }

    .sidebar-nav {
        padding: 18px 10px;
    }

    .main-area {
        margin-left: 210px;
    }

    .topbar {
        gap: 12px;
    }

    .topbar-right {
        gap: 10px;
    }

    .topbar-date {
        display: none;
    }

    .dashboard-content {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .app-layout {
        display: block;
    }

    /* Mobile sidebar hidden / handled by drawer */

    .main-area {
        min-height: 0;
        margin-left: 0;
    }

    .topbar {
        min-height: 64px;
        padding: 12px 16px;
    }

    .search-container {
        flex: 1;
        width: auto;
    }

    .search-shortcut {
        display: none;
    }

    .topbar-right {
        gap: 8px;
    }

    .topbar-user > span {
        display: none;
    }

    .dashboard-content {
        padding: 20px 16px;
    }

    .dashboard-heading {
        align-items: flex-start;
    }

    .dashboard-heading h1 {
        font-size: 22px;
    }

    .dashboard-heading > span {
        display: none;
    }

    .kpi-grid {
        gap: 12px;
    }

    .kpi-card {
        min-height: 0 !important;
        height: auto !important;
        padding: 16px;
    }

    .kpi-value {
        font-size: 22px;
    }

    .dashboard-grid {
        gap: 14px;
        margin-bottom: 14px;
    }

    .dashboard-panel {
        padding: 18px;
    }

    .chart-bars {
        gap: 5px;
    }

    .chart-labels {
        font-size: 9px;
    }
}

@media (max-width: 380px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-card {
        min-height: 0 !important;
        height: auto !important;
    }

    .panel-header {
        flex-wrap: wrap;
    }
}
/* TOPBAR: UNDERLINED SEARCH */

.search-container {
  border: 1px solid #dce6f3;
  border-radius: 12px;
  background: #f4f8fb;
  padding: 10px 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-container:focus-within {
    border-bottom-color: var(--blue);
}

.search-container input {
    background: transparent;
}

/* TOPBAR: USER NAME AND ROLE */

.topbar-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.topbar-user-info strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.topbar-user-info span {
    color: var(--muted);
    font-size: 11px;
}

/* Sol alttaki şirket bilgisinin konumu */
.sidebar-bottom {
    padding: 14px 14px 8px;
}

/* SEARCH BAR — MOVING LED EFFECT */

.search-container {
  position: relative;
}

.search-container::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;

  width: 100%;
  height: 2px;

  background: linear-gradient(
    90deg,
    transparent 0%,
    #6c3cff 40%,
    #ffffff 50%,
    #6c3cff 60%,
    transparent 100%
  );

  background-size: 200% 100%;
  animation: searchLed 2.5s linear infinite;

  pointer-events: none;
}

@keyframes searchLed {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

/* RESPONSIVE SIDEBAR */

.mobile-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #e9e5ff;
  border-radius: 10px;
  background: #f5f3ff;
  color: #6c3cff;
  font-size: 21px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(108, 60, 255, 0.08);
  transition: all 0.2s ease;
}

.mobile-menu-button:hover {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #ddd6fe;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(108, 60, 255, 0.15);
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 900px) {
  .mobile-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: #f0edff;
    color: #6c3cff;
    font-size: 23px;
    cursor: pointer;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1001;
    width: 250px;
    max-width: 85vw;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

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

  .sidebar-overlay.mobile-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(7, 12, 32, 0.55);
  }

  .sidebar-nav {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .nav-item {
    width: 100%;
    white-space: normal;
  }

  .nav-arrow {
    display: inline;
  }

  .nav-submenu {
    display: none !important;
  }

  .nav-submenu.open {
    display: flex !important;
  }

  .sidebar-bottom {
    display: block;
  }

  .main-area {
    margin-left: 0;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .topbar {
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .topbar-date {
    display: none;
  }

  .search-container {
    min-width: 0;
    flex: 1;
  }

  .dashboard-content {
    padding: 20px 14px;
  }

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

  .table-container {
    overflow-x: auto;
  }
}
/* USER ROLE COLORS */
#topbarUserName {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

#topbarUserRole {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.1;
}

#topbarUserRole.role-super-admin {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #7c3aed;
    font-weight: 750;
    letter-spacing: 0.1px;
}
#topbarUserRole.role-super-admin::before {
    content: "👑";
    font-size: 11px;
}

#topbarUserRole.role-company-admin {
    color: #2563eb;
}

#topbarUserRole.role-manager {
    color: #16a34a;
}

#topbarUserRole.role-sales-rep {
    color: #64748b;
}
/* ========================================
   PROFILE DROPDOWN
======================================== */

.profile-menu-container {
  position: relative;
}

.profile-menu-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  box-sizing: border-box;
  padding: 0 12px 0 6px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 1px 3px rgba(16, 27, 56, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-menu-trigger:hover {
  background: #f8faff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(23, 42, 77, 0.08);
}

.profile-menu-trigger .topbar-user-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
}

.profile-chevron {
  margin-left: 2px;
  color: #94a3b8;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.profile-menu-trigger:hover .profile-chevron {
  color: #1e293b;
}

.profile-menu-trigger[aria-expanded="true"] .profile-chevron {
  transform: rotate(180deg);
}

.profile-dropdown[hidden] {
  display: none !important;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 99999 !important;
  width: 275px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.22);
}

.profile-dropdown-header {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
}

.profile-dropdown-header strong {
  color: #17233d;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.profile-dropdown-header span {
  color: #64748b;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.profile-dropdown > button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1e293b;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.profile-dropdown > button svg {
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.profile-dropdown > button:hover {
  background: #f1f5f9;
  color: #2563eb;
}

.profile-dropdown > button:hover svg {
  color: #2563eb;
}

.profile-dropdown > button[hidden] {
  display: none !important;
}

.profile-dropdown-divider {
  height: 1px;
  margin: 6px 4px;
  background: #e2e8f0;
}

.profile-dropdown > .profile-logout {
  color: #dc2626;
}

.profile-dropdown > .profile-logout:hover {
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 768px) {
  .profile-menu-trigger {
    padding: 6px;
  }

  .profile-menu-trigger .topbar-user-info,
  .profile-chevron {
    display: none;
  }

  .profile-dropdown {
    width: min(275px, 88vw);
  }
}
/* AYKAR — Canonical Dashboard Theme */

:root {
  --aykar-aurora: linear-gradient(
    135deg,
    #1e40af 0%,
    #2563eb 45%,
    #059669 100%
  );
}

.sidebar .active,
.sidebar a.active {
  background: transparent;
  color: #17233d;
  box-shadow: none;
}

/* Dashboard başlığı - Solid Corporate Executive */
.dashboard-heading h1 {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
  font-size: 18px !important;
  letter-spacing: -0.02em !important;
  font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

[data-theme="dark"] .dashboard-heading h1 {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #f8fafc !important;
  color: #f8fafc !important;
}

.dashboard-heading p {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #64748b !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

[data-theme="dark"] .dashboard-heading p {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #94a3b8 !important;
  color: #94a3b8 !important;
}

.panel-header h2,
.dashboard-panel h2 {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 45%, #059669 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  display: inline-block !important;
}

[data-theme="dark"] .panel-header h2,
[data-theme="dark"] .dashboard-panel h2 {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #34d399 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* Profil avatarı */
.topbar-avatar {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
  color: #fff !important;
}

/* Butonlarda hafif hareket */
.topbar button,
.sidebar a {
  transition:
    transform 0.25s ease,
    filter 0.25s ease,
    box-shadow 0.25s ease;
}

.topbar button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

/* AYKAR — Canonical Dashboard Cards */

.dashboard-content .card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.kpi-card::before {
  display: none !important;
}

.dashboard-content .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    #1e40af 0%,
    #2563eb 45%,
    #059669 100%
  ) !important;
}

.dashboard-content .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15, 40, 85, 0.12);
  border-color: #93c5fd;
}
/* AYKAR — Alt kartlara efekt */

/* AYKAR — Bağımsız alt kart hareketi */
.dashboard-grid > .dashboard-panel {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-grid > .dashboard-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15, 40, 85, 0.12);
}
/* AYKAR — Tüm sol menülerde hafif hareket */
.sidebar .nav-item {
  transition: transform 0.22s ease, background 0.22s ease;
}

.sidebar .nav-item:hover,
.sidebar .nav-submenu a:hover {
  background: rgba(0, 240, 255, 0.22) !important;
  color: #ffffff !important;
  border-left: 3px solid #00f0ff !important;
  box-shadow: 0 0 25px 5px rgba(0, 240, 255, 0.4) !important;
}
/* Profil menüsündeki tüm seçenekler */
.nav-entry {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

html.sidebar-collapsed .sidebar {
  width: 76px;
}

html.sidebar-collapsed .main-area {
  margin-left: 76px;
}

html.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

html.sidebar-collapsed .sidebar-brand .brand-lockup {
  display: none;
}

html.sidebar-collapsed .sidebar-brand .brand-mark {
  display: block;
  width: 42px;
  height: 42px;
}

html.sidebar-collapsed .sidebar-brand > div,
html.sidebar-collapsed .nav-item > span:not(.nav-icon),
html.sidebar-collapsed .sidebar-company-info,
html.sidebar-collapsed .app-credit strong,
html.sidebar-collapsed .bottom-action > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html.sidebar-collapsed .sidebar-nav {
  padding-left: 10px;
  padding-right: 10px;
  overflow: visible;
}

html.sidebar-collapsed .nav-item,
html.sidebar-collapsed .bottom-action,
html.sidebar-collapsed .sidebar-company {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

html.sidebar-collapsed .nav-entry {
  position: relative;
}

html.sidebar-collapsed .nav-entry::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 16px;
  height: 100%;
  pointer-events: none;
}

html.sidebar-collapsed .nav-entry:hover::after,
html.sidebar-collapsed .nav-entry:focus-within::after {
  height: 240px;
  pointer-events: auto;
}

html.sidebar-collapsed .sidebar,
html:not([data-theme="dark"]).sidebar-collapsed .sidebar,
html[data-theme="dark"].sidebar-collapsed .sidebar {
  width: 76px !important;
  overflow: visible !important;
}

html.sidebar-collapsed .sidebar-nav,
html:not([data-theme="dark"]).sidebar-collapsed .sidebar-nav,
html[data-theme="dark"].sidebar-collapsed .sidebar-nav {
  padding-left: 10px !important;
  padding-right: 10px !important;
  overflow: visible !important;
}

html.sidebar-collapsed .nav-submenu {
  display: none !important;
  position: absolute !important;
  left: calc(100% + 10px) !important;
  top: 0 !important;
  z-index: 99999 !important;
  min-width: 220px !important;
  max-height: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  overflow: visible !important;
  padding: 8px 6px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
  flex-direction: column !important;
  gap: 3px !important;
}

/* Dual-Column Mega-Menu in Collapsed Mode (Model 3) */
html.sidebar-collapsed .nav-submenu.mega-submenu {
  min-width: 440px !important;
  max-width: 500px !important;
  width: max-content !important;
  flex-direction: row !important;
  gap: 14px !important;
  padding: 12px 14px !important;
}

html.sidebar-collapsed .nav-submenu.mega-submenu .submenu-col {
  flex: 1 !important;
  min-width: 195px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

html.sidebar-collapsed .nav-submenu.mega-submenu .submenu-col:first-child {
  border-right: 1px solid #f1f5f9 !important;
  padding-right: 14px !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}

html.sidebar-collapsed .nav-submenu.mega-submenu .submenu-col:not(:first-child) {
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html.sidebar-collapsed .nav-submenu.mega-submenu .submenu-heading {
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  color: #94a3b8 !important;
  padding: 2px 8px 6px 8px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 4px !important;
}

html.sidebar-collapsed .nav-submenu::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  right: 100% !important;
  bottom: 0 !important;
  width: 14px !important;
}

html.sidebar-collapsed .nav-entry:hover .nav-submenu,
html.sidebar-collapsed .nav-entry.flyout-open .nav-submenu,
html.sidebar-collapsed .nav-entry:focus-within .nav-submenu,
html.sidebar-collapsed .nav-toggle.open + .nav-submenu {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

html.sidebar-collapsed .nav-submenu a {
  display: flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  color: #475569 !important;
  background: transparent !important;
  white-space: nowrap !important;
  transform: none !important;
  border-left: none !important;
}

html:not([data-theme="dark"]).sidebar-collapsed .sidebar .nav-submenu a,
html:not([data-theme="dark"]).sidebar-collapsed .sidebar .nav-submenu button {
  color: #475569 !important;
  background: transparent !important;
}

html:not([data-theme="dark"]).sidebar-collapsed .sidebar .nav-submenu a:hover,
html:not([data-theme="dark"]).sidebar-collapsed .sidebar .nav-submenu button:hover,
html.sidebar-collapsed .nav-submenu a:hover {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

html.sidebar-collapsed .nav-submenu a.active {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 700 !important;
  border-left: 3px solid #2563eb !important;
  border-radius: 0 6px 6px 0 !important;
}

html[data-theme="dark"].sidebar-collapsed .nav-submenu {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"].sidebar-collapsed .nav-submenu a {
  color: #94a3b8 !important;
}

html[data-theme="dark"].sidebar-collapsed .nav-submenu a:hover {
  background: rgba(37, 99, 235, 0.2) !important;
  color: #93c5fd !important;
}

html.sidebar-collapsed .nav-item,
html.sidebar-collapsed .bottom-action,
html.sidebar-collapsed .app-credit,
html.sidebar-collapsed .sidebar-company {
  position: relative;
}

html.sidebar-collapsed .app-credit {
  text-align: center;
}

html.sidebar-collapsed .nav-item[data-label]::after,
html.sidebar-collapsed .bottom-action[data-label]::after,
html.sidebar-collapsed .app-credit[data-label]::after,
html.sidebar-collapsed .sidebar-company[data-label]::after {
  content: attr(data-label) !important;
  position: absolute !important;
  left: calc(100% + 12px) !important;
  top: 50% !important;
  z-index: 99999 !important;
  padding: 6px 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(-50%) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
  transition: opacity 0.15s ease, visibility 0.15s ease !important;
}

html.sidebar-collapsed .nav-item[data-label]:hover::after,
html.sidebar-collapsed .nav-item[data-label]:focus-visible::after,
html.sidebar-collapsed .bottom-action[data-label]:hover::after,
html.sidebar-collapsed .bottom-action[data-label]:focus-visible::after,
html.sidebar-collapsed .app-credit[data-label]:hover::after,
html.sidebar-collapsed .sidebar-company[data-label]:hover::after {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Items inside nav-entry that have flyout submenu should never show text tooltip */
html.sidebar-collapsed .nav-entry .nav-toggle[data-label]::after,
html.sidebar-collapsed .nav-entry:hover .nav-toggle::after,
html.sidebar-collapsed .nav-toggle.open::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .main-area {
    transition: none;
  }
}

.profile-dropdown > button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.profile-dropdown .profile-theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin: 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  color: #1e293b;
}

.profile-dropdown .profile-theme-toggle-row:hover {
  background: #f1f5f9;
}

html[data-theme="dark"] .profile-dropdown .profile-theme-toggle-row {
  color: #e2e8f0;
}

html[data-theme="dark"] .profile-dropdown .profile-theme-toggle-row:hover {
  background: #1e293b;
}

html[data-theme="dark"] .sidebar {
  background: #0b142b;
  color: #eef3fb;
  border-right-color: #2c3b56;
}

html[data-theme="dark"] .sidebar-brand {
  border-bottom: 0;
}

html[data-theme="dark"] .sidebar-brand span,
html[data-theme="dark"] .sidebar-company-info span,
html[data-theme="dark"] .sidebar-user-info span {
  color: #9aabc6;
}

html[data-theme="dark"] .sidebar .nav-item,
html[data-theme="dark"] .nav-submenu a,
html[data-theme="dark"] .sidebar-company-info strong,
html[data-theme="dark"] .sidebar-user-info strong,
html[data-theme="dark"] .bottom-action {
  color: #e8eef8;
}

html[data-theme="dark"] .bottom-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

html[data-theme="dark"] .sidebar .active,
html[data-theme="dark"] .sidebar a.active,
html[data-theme="dark"] .nav-item.active {
  background: rgba(0, 240, 255, 0.28) !important;
  color: #ffffff !important;
  border-left: 3px solid #00f0ff !important;
  box-shadow: 0 0 25px 5px rgba(0, 240, 255, 0.45) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

html[data-theme="dark"] .sidebar .nav-item:hover,
html[data-theme="dark"] .nav-submenu a:hover,
html[data-theme="dark"].sidebar-collapsed .nav-submenu a:hover {
  background: rgba(0, 240, 255, 0.22) !important;
  color: #ffffff !important;
  border-left: 3px solid #00f0ff !important;
  box-shadow: 0 0 25px 5px rgba(0, 240, 255, 0.4) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

html[data-theme="dark"] .company-avatar,
html[data-theme="dark"] .bottom-action {
  background: #1d2b46;
}

html[data-theme="dark"] .sidebar-bottom,
html[data-theme="dark"] .sidebar-user {
  border-top: 0;
}

html[data-theme="dark"].sidebar-collapsed .nav-submenu {
  background: #0b142b;
  border-color: #2c3b56;
}

html[data-theme="dark"].sidebar-collapsed .nav-item[data-label]::after,
html[data-theme="dark"].sidebar-collapsed .app-credit[data-label]::after,
html[data-theme="dark"].sidebar-collapsed .bottom-action[data-label]::after,
html[data-theme="dark"].sidebar-collapsed .sidebar-company[data-label]::after {
  background: #0b142b;
  color: #ffffff;
  border-color: #2c3b56;
}

/* ==============================================================================
   AYKAR BUSINESS MANAGEMENT - UNIVERSAL PRINT RESET FOR DASHBOARD LAYOUTS
   ============================================================================== */
@media print {
  .sidebar,
  #dashboardSidebar,
  aside.sidebar,
  .sidebar-overlay,
  #sidebarOverlay,
  .sidebar-bottom,
  .app-credit,
  #appCredit,
  .mobile-menu-button,
  #mobileMenuButton,
  .topbar,
  header.topbar,
  #topbar,
  .topbar-right,
  .topbar-date,
  #topbarDate,
  .notification-menu,
  #notificationMenu,
  .notification-button,
  #notificationButton,
  .notification-panel,
  #notificationPanel,
  .notification-badge,
  #notificationBadge,
  .guide-lane,
  #guideLane,
  .guide-runner,
  #guideRunner,
  .guide-robot,
  #guideRobot,
  .guide-bubble,
  #guideBubble,
  .guide-ask,
  #guideAsk,
  img[src*="aykar-robot"],
  .profile-menu-container,
  #profileMenuTrigger,
  .profile-dropdown,
  #profileDropdown,
  .theme-fab,
  .theme-switch,
  .chat-dock,
  .chat-panel,
  #chatDock,
  #chatPanel,
  .chat-toggle {
    display: none !important;
    visibility: hidden !important;
  }

  .app-layout {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
    height: auto !important;
  }

  .main-area {
    display: block !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page,
  main.page,
  .dashboard-content,
  .main-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
}



/* ==========================================
   TOPBAR SUPPORT BUTTON & SLIDE-OVER DRAWER
========================================== */

/* Hide legacy sidebar bottom support button completely */
#supportNav,
.bottom-action[data-label="Support"],
.bottom-action[data-label="Destek"] {
    display: none !important;
}

/* Topbar Support Button */
.topbar-support-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 13px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    text-decoration: none;
    user-select: none;
}

.topbar-support-button:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.topbar-support-button:active {
    transform: translateY(0);
}

.topbar-support-button .support-icon {
    font-size: 15px;
    line-height: 1;
}

/* When an error is diagnosed (Alert Mode) */
.topbar-support-button.has-diagnosed-error {
    background: #fff1f2 !important;
    border-color: #f43f5e !important;
    color: #be123c !important;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18) !important;
    animation: aykar-support-pulse 2s infinite ease-in-out;
}

@keyframes aykar-support-pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18) !important;
    }
    50% {
        box-shadow: 0 0 0 6px rgba(244, 63, 94, 0.35) !important;
    }
}

.topbar-support-button .support-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 9999px;
    background: #e11d48;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
    animation: aykar-badge-scale 1.5s infinite;
}

.topbar-support-button .support-badge.has-open-tickets {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.35);
}

.topbar-support-button.is-platform-admin-desk:hover {
    border-color: #3b82f6;
    color: #1d4ed8;
}

@keyframes aykar-badge-scale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Slide-Over Drawer Backdrop */
.aykar-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.aykar-drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Slide-Over Drawer Container */
.aykar-slide-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 94vw);
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -8px 0 28px rgba(15, 23, 42, 0.16);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aykar-slide-drawer.open {
    transform: translateX(0);
}

/* Drawer Header */
.aykar-slide-drawer .drawer-header {
    padding: 16px 20px;
    background: #0f172a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aykar-slide-drawer .drawer-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aykar-slide-drawer .drawer-header-icon {
    font-size: 24px;
    line-height: 1;
}

.aykar-slide-drawer .drawer-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.aykar-slide-drawer .drawer-subtitle {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 1px;
}

.aykar-slide-drawer .drawer-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #1e293b;
    border: none;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.aykar-slide-drawer .drawer-close-btn:hover {
    background: #334155;
    color: #ffffff;
}

/* Drawer Body */
.aykar-slide-drawer .drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Diagnosis Alert Card */
.diagnosis-card {
    padding: 13px 15px;
    border-radius: 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.diagnosis-card[hidden],
.drawer-status[hidden],
.aykar-error-toast[hidden],
.topbar-support-button .support-badge[hidden] {
    display: none !important;
}

.diagnosis-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.diagnosis-badge-title {
    font-size: 12px;
    font-weight: 800;
    color: #be123c;
}

.diagnosis-badge-tag {
    font-size: 10px;
    font-weight: 700;
    background: #ffe4e6;
    color: #9f1239;
    padding: 2px 7px;
    border-radius: 6px;
}

.diagnosis-details {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #fecdd3;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    color: #1e293b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.5;
    word-break: break-all;
}

.diagnosis-tip {
    font-size: 10.5px;
    color: #9f1239;
    font-style: italic;
}

/* Sender Info Card */
.sender-info-card {
    padding: 11px 13px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 11.5px;
    color: #334155;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sender-info-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sender-info-line {
    line-height: 1.4;
    word-break: break-all;
}

/* Drawer Form */
.drawer-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.drawer-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}

.drawer-select,
.drawer-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.drawer-select:focus,
.drawer-textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.drawer-checkbox-row {
    padding: 9px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.drawer-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.drawer-status {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.drawer-status.ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.drawer-status.bad {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.drawer-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    border-radius: 9px;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
    transition: all 0.15s ease;
}

.drawer-submit-btn:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.drawer-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.drawer-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 10.5px;
    color: #64748b;
    text-align: center;
    flex-shrink: 0;
}

/* Floating Error Toast (Positioned above bottom-right chat dock) */
.aykar-error-toast {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 99998;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1.5px solid rgba(244, 63, 94, 0.6);
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 440px;
    animation: aykar-toast-enter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aykar-toast-enter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.aykar-error-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.aykar-error-toast .toast-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.aykar-error-toast .toast-title {
    font-size: 12px;
    font-weight: 700;
    color: #fda4af;
}

.aykar-error-toast .toast-desc {
    font-size: 11px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.aykar-error-toast .toast-action-btn {
    padding: 6px 12px;
    border-radius: 8px;
    background: #e11d48;
    color: #ffffff;
    border: none;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.3);
    transition: background 0.15s;
    flex-shrink: 0;
}

.aykar-error-toast .toast-action-btn:hover {
    background: #be123c;
}

.aykar-error-toast .toast-close-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    flex-shrink: 0;
}

.aykar-error-toast .toast-close-btn:hover {
    color: #ffffff;
}

/* Dark Theme Support */
html[data-theme="dark"] .topbar-support-button {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-theme="dark"] .topbar-support-button:hover {
    background: #334155;
    border-color: #475569;
    color: #ffffff;
}

html[data-theme="dark"] .aykar-slide-drawer {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-theme="dark"] .aykar-slide-drawer .drawer-header {
    background: #0b1120;
    border-color: #334155;
}

html[data-theme="dark"] .sender-info-card {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

html[data-theme="dark"] .sender-info-title {
    color: #f1f5f9;
}

html[data-theme="dark"] .drawer-select,
html[data-theme="dark"] .drawer-textarea {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .drawer-checkbox-row {
    background: #0f172a;
    border-color: #334155;
}

html[data-theme="dark"] .drawer-checkbox-label {
    color: #cbd5e1;
}

html[data-theme="dark"] .drawer-footer {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

html[data-theme="dark"] .diagnosis-card {
    background: #4c0519;
    border-color: #881337;
    color: #ffe4e6;
}

html[data-theme="dark"] .diagnosis-details {
    background: #270611;
    border-color: #9f1239;
    color: #fecdd3;
}

/* Subtle Enterprise Network Offline / Online Banner */
.aykar-network-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    padding: 9px 18px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: aykar-banner-drop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.aykar-network-banner[hidden] {
    display: none !important;
}

.aykar-network-banner.offline {
    background: #fef3c7;
    color: #92400e;
    border-bottom: 1px solid #fde68a;
}

.aykar-network-banner.online {
    background: #d1fae5;
    color: #065f46;
    border-bottom: 1px solid #a7f3d0;
}

html[data-theme="dark"] .aykar-network-banner.offline {
    background: #451a03;
    color: #fde68a;
    border-bottom-color: #78350f;
}

html[data-theme="dark"] .aykar-network-banner.online {
    background: #064e3b;
    color: #a7f3d0;
    border-bottom-color: #047857;
}

@keyframes aykar-banner-drop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =========================================================
   CAMERA BARCODE & QR SCANNER MODAL
   ========================================================= */
.camera-scanner-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: aykar-fade-in 0.2s ease-out;
}

.camera-scanner-modal {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.camera-scanner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.camera-scanner-close {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 6px;
}
.camera-scanner-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.camera-scanner-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.camera-viewfinder {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 250px;
    background: #000000;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-viewfinder video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.viewfinder-box {
    position: absolute;
    width: 220px;
    height: 130px;
    border: 2px dashed rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    overflow: hidden;
}

.viewfinder-laser {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    top: 0;
    animation: aykar-laser-sweep 2s infinite ease-in-out;
}

@keyframes aykar-laser-sweep {
    0%, 100% { top: 5%; }
    50% { top: 95%; }
}

.camera-scanner-tip {
    margin: 12px 0 6px;
    font-size: 12.5px;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
}

.camera-scanner-status {
    font-size: 12px;
    font-weight: 600;
    color: #0284c7;
    text-align: center;
}

.camera-scanner-footer {
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
}

html[data-theme="dark"] .camera-scanner-modal {
    background: #1e293b;
    color: #f1f5f9;
}
html[data-theme="dark"] .camera-scanner-header,
html[data-theme="dark"] .camera-scanner-footer {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}
html[data-theme="dark"] .camera-scanner-close {
    color: #94a3b8;
}
html[data-theme="dark"] .camera-scanner-close:hover {
    background: #334155;
    color: #ffffff;
}

/* =========================================================
   BARCODE & THERMAL LABEL PRINTING STYLES (@media print)
   ========================================================= */
@media print {
    body.printing-barcode-label * {
        visibility: hidden !important;
    }
    body.printing-barcode-label #aykarPrintableBarcodeLabel,
    body.printing-barcode-label #aykarPrintableBarcodeLabel * {
        visibility: visible !important;
    }
    body.printing-barcode-label #aykarPrintableBarcodeLabel {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 58mm !important;
        padding: 4mm !important;
        margin: 0 !important;
        font-family: monospace !important;
        background: #ffffff !important;
        color: #000000 !important;
        text-align: center !important;
    }
}



.camera-scanner-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.camera-scanner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28) !important;
  flex-shrink: 0;
}
.camera-scanner-badge svg {
  width: 18px;
  height: 18px;
}
.camera-scanner-title {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 45%, #059669 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  display: inline-block;
}
html[data-theme="dark"] .camera-scanner-title {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #34d399 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
