html {
    scroll-behavior: smooth;
    /* Firefox scrollbar support */
    scrollbar-width: thin;
    scrollbar-color: #1e293b #0d1117;
}

/* Firefox scrollbar for light mode */
html:not(.dark) {
    scrollbar-color: #94a3b8 #f1f5f9;
}

/* Webkit (Chrome, Safari, Edge) scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* Mobil cihazlar için daha ince scrollbar */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
}

::-webkit-scrollbar-track {
    background: #0d1117;
    border-radius: 3px;
}

.dark ::-webkit-scrollbar-track {
    background: #0d1117;
}

:not(.dark) ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
    border: 1px solid #0d1117;
}

.dark ::-webkit-scrollbar-thumb {
    background: #1e293b;
    border: 1px solid #0d1117;
}

:not(.dark) ::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border: 1px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #38e07b;
}

/* Scrollbar corner */
::-webkit-scrollbar-corner {
    background: #0d1117;
}

:not(.dark) ::-webkit-scrollbar-corner {
    background: #f1f5f9;
}

.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#profile-menu-toggle:checked~#profile-dropdown {
    display: block;
    animation: fadeIn 0.2s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1024px) {
    #sidebar-toggle:checked~aside {
        width: 5rem;
    }

    #sidebar-toggle:checked~aside .sidebar-text {
        display: none !important;
        opacity: 0;
    }

    #sidebar-toggle:checked~aside .sidebar-chevron {
        transform: rotate(180deg);
    }

    #sidebar-toggle:checked~aside nav a:hover::after {
        content: attr(data-title);
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 0.75rem;
        background-color: #1e293b;
        color: white;
        padding: 0.5rem 0.75rem;
        border-radius: 0.375rem;
        font-size: 0.875rem;
        white-space: nowrap;
        z-index: 50;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    #sidebar-toggle:checked~aside #profile-dropdown {
        left: 100%;
        bottom: 1rem;
        right: auto;
        margin-left: 0.5rem;
        width: 160px;
        transform-origin: bottom left;
    }

    #sidebar-toggle:checked~aside label[for="profile-menu-toggle"] svg {
        display: none;
    }

    #sidebar-toggle:checked~aside #profile-menu-toggle:checked~#profile-dropdown {
        display: block;
    }

    #sidebar-toggle:checked~aside .search-icon-wrapper {
        left: 50%;
        transform: translateX(-50%);
        padding-left: 0;
        margin-left: 0;
    }

    #sidebar-toggle:checked~aside .search-input {
        opacity: 0;
        width: 0;
        padding: 0;
    }
}

aside.mobile-open {
    transform: translateX(0) !important;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.apexcharts-tooltip {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

:not(.dark) .apexcharts-tooltip {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.apexcharts-tooltip-title {
    background: #0f172a !important;
    border-bottom: 1px solid #334155 !important;
    font-family: 'JetBrains Mono', monospace !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

:not(.dark) .apexcharts-tooltip-title {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.apexcharts-text {
    font-family: 'Spline Sans', sans-serif !important;
}

.apexcharts-legend-text {
    color: inherit !important;
}

.katibim-scroll::-webkit-scrollbar {
    display: none;
}

.sortable-ghost {
    opacity: 0.4;
    transform: scale(0.98);
}

.sortable-drag {
    cursor: grabbing !important;
    opacity: 1 !important;
    background: rgba(30, 41, 59, 0.9) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

:not(.dark) .sortable-drag {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #e2e8f0;
}

@media (max-width: 1023px) {
    .drag-handle {
        width: 100% !important;
        height: 40px !important;
        opacity: 1 !important;
        background: transparent;
    }

    .drag-handle>div {
        opacity: 0.2;
        width: 60px;
        height: 4px;
    }
}

.theme-transition,
.theme-transition *,
.theme-transition *:before,
.theme-transition *:after {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 200ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.preload * {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
}

.glass-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.neon-glow {
    box-shadow: 0 0 15px rgba(56, 224, 123, 0.3);
}

.neon-glow:hover {
    box-shadow: 0 0 25px rgba(56, 224, 123, 0.5);
}

body {
    font-family: "Spline Sans", sans-serif;
}

.font-mono-input {
    font-family: "JetBrains Mono", monospace;
}

.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 300,
        'GRAD' 0,
        'opsz' 24
}

/* Form Input Styling */
.form-input-styled {
    transition: all 0.2s ease-in-out;
    background-color: #f8fafc;
}

.dark .form-input-styled {
    background-color: #1e293b;
}

.form-input-styled:focus {
    box-shadow: 0 0 0 2px rgba(56, 224, 123, 0.2);
}

/* Date Picker Styling */
::-webkit-calendar-picker-indicator {
    filter: invert(0.6);
    cursor: pointer;
}

.dark ::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

.dark input[type="date"]::-webkit-datetime-edit {
    color: #f1f5f9;
}

.dark input[type="date"] {
    color-scheme: dark;
}

/* Select Option Styling */
.dark select option {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    padding: 10px;
}

.dark select option:checked {
    background-color: #38e07b !important;
    color: #ffffff !important;
    background-image: linear-gradient(#38e07b, #38e07b);
}

.dark select option:hover,
.dark select option:focus,
.dark select option:active {
    background-color: #38e07b !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px 100px #38e07b inset;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
}

select#period-selector option {
    background-color: #1e293b;
    color: #f1f5f9;
}

select#period-selector option:checked,
select#period-selector option:hover {
    background-color: #38e07b !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px 100px #38e07b inset;
}

.popup-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.dropdown-menu-animate {
    transform-origin: top right;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.dropdown-trigger:focus+.dropdown-menu-content,
.dropdown-menu-content:hover {
    display: block;
    opacity: 1;
    transform: scale(1);
}

.dropdown-menu-content {
    display: none;
    opacity: 0;
    transform: scale(0.95);
}

.table-row-card {
    display: table-row;
}

/* Popup Scrollbar Styling */
.popup-content {
    /* Firefox scrollbar support */
    scrollbar-width: thin;
    scrollbar-color: #1e293b #0d1117;
}

.popup-content ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

@media (max-width: 768px) {
    .popup-content ::-webkit-scrollbar {
        width: 3px;
        height: 3px;
    }
}

.popup-content ::-webkit-scrollbar-track {
    background: #0d1117;
    border-radius: 3px;
}

.dark .popup-content ::-webkit-scrollbar-track {
    background: #0d1117;
}

:not(.dark) .popup-content ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.popup-content ::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}

.dark .popup-content ::-webkit-scrollbar-thumb {
    background: #1e293b;
}

:not(.dark) .popup-content ::-webkit-scrollbar-thumb {
    background: #94a3b8;
}

.popup-content ::-webkit-scrollbar-thumb:hover {
    background: #38e07b;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px
}

select.chart-period-select option {
    background-color: #1e293b;
    color: #f1f5f9;
}

:not(.dark) select.chart-period-select option {
    background-color: #fff;
    color: #1e293b;
}

select.chart-period-select option:hover,
select.chart-period-select option:checked {
    background-color: #38e07b !important;
    color: #ffffff !important;
}

.modal-enter {
    opacity: 0;
    transform: scale(0.95);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.modal-exit {
    opacity: 1;
    transform: scale(1);
}

.modal-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 200ms ease-in, transform 200ms ease-in;
}

.chip {
    animation: fadeInChip 0.2s ease-out forwards;
}

@keyframes fadeInChip {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Custom Button Styles - Fix for missing btn-primary */
.btn-primary {
    background-color: #3b82f6 !important;
    /* blue-500 */
    color: white !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem !important;
    transition: background-color 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    border: none !important;
    cursor: pointer !important;
}

.btn-primary:hover {
    background-color: #2563eb !important;
    /* blue-600 */
}

/* Ensure secondary button is consistent */
.btn-secondary {
    background-color: #334155 !important;
    /* slate-700 */
    color: #e2e8f0 !important;
    /* slate-200 */
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem !important;
    transition: background-color 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
}

.btn-secondary:hover {
    background-color: #475569 !important;
    /* slate-600 */
}

/* ================================================================
   TOAST BİLDİRİM SİSTEMİ
   ================================================================ */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    width: max-content;
    max-width: 90vw;
}

.toast-item {
    pointer-events: auto;
    animation: toastSlideUp 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.toast-item.toast-exit {
    animation: toastSlideDown 0.3s cubic-bezier(0.06, 0.71, 0.55, 1) forwards;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(1rem) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(1rem) scale(0.96);
    }
}