/* Modern CSS Reset with Bootstrap Compatibility */
:where(*, *::before, *::after) {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Core Bootstrap 5.3.3 Color System Retention */
:root {
    --bs-body-font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Enhanced Typography System */
html {
    font-family: var(--bs-body-font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
    position: relative;
    min-height: 100%;
}
body {
    margin-bottom: 60px;
}
/* Modern Fluid Typography */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

/* Enhanced Bootstrap Components */
.btn {
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .btn:active {
        transform: translateY(0);
    }

/* Modern Form Enhancements */
.form-control {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border-radius: 0.375rem;
}

    .form-control:focus {
        box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.15);
    }

/* Modern Grid Enhancement */
.grid-modern {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

/* Enhanced Callouts with Bootstrap Colors */
.bd-callout {
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 0.375rem solid;
    border-radius: 0 0.5rem 0.5rem 0;
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    border-color: var(--bs-primary);
}

    .bd-callout h4 {
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }

/* Modern Scrollbar Styling */
@media (pointer: fine) {
    ::-webkit-scrollbar {
        width: 0.5rem;
        height: 0.5rem;
    }

    ::-webkit-scrollbar-track {
        background-color: var(--bs-light);
    }

    ::-webkit-scrollbar-thumb {
        background-color: var(--bs-secondary);
        border-radius: 0.5rem;
    }
}

/* Modern Focus States */
:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Responsive Spacing System */
:root {
    --space-3xs: 0.25rem;
    --space-2xs: 0.5rem;
    --space-xs: 0.75rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
}

/* Modern Utility Classes */
.shadow-hover {
    transition: box-shadow 0.2s ease;
}

    .shadow-hover:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.sticky-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.85);
    /*z-index: 1020;*/
}

/* Enhanced Table Styling */
.table-modern {
    --bs-table-bg: transparent;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

    .table-modern th {
        background-color: var(--bs-secondary);
        color: white;
        font-weight: 500;
    }


/* Add ripple to existing buttons */
.btn:active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 1%, transparent 20%);
    opacity: 0;
    animation: btnRipple 0.6s ease-out;
}

@keyframes btnRipple {
    from {
        opacity: 1;
        transform: scale(0);
    }

    to {
        opacity: 0;
        transform: scale(2);
    }
}

/* Enhance existing image hover */
.table-modern img:hover {
    transform: scale(1.03);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Add depth-aware shadows */
.card[data-scroll-depth] {
    transition: box-shadow 0.3s ease-out;
}

.card[data-scroll-depth="0"] {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.card[data-scroll-depth="1"] {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card[data-scroll-depth="2"] {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
@media (max-width: 768px) {
    .table-modern tr {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .table-modern td:nth-child(3)::before {
        content: "Fiyat: ";
        font-weight: 500;
    }
}
/* Status sparklines */
.badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    background: currentColor;
    opacity: 0.3;
}
:focus-visible {
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.2);
}
.form-control[disabled] {
    position: relative;
    overflow: hidden;
}

    .form-control[disabled]::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.3) 50%, transparent 75% );
        animation: loadingShimmer 1.5s infinite;
    }
.bd-callout summary {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bd-callout[open] summary {
    opacity: 0.7;
}
@media (pointer: coarse) {
    .table-modern td {
        touch-action: pan-y;
        padding: 0.5rem 1rem;
    }

    .table-modern tr {
        transition: transform 0.3s ease;
    }

        .table-modern tr:active {
            transform: translateX(10%);
        }
}
[data-density="compact"] .btn {
    padding: var(--space-2xs) var(--space-xs);
}

[data-density="compact"] .table-modern td {
    padding: var(--space-2xs) var(--space-xs);
}
/* ================= NEW ANIMATIONS ================= */
@keyframes btnRipple {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes loadingShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes statusPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes focusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.2);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(var(--bs-primary-rgb), 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0);
    }
}

@keyframes headerSlideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ======= ENHANCED BUTTONS (Additions) ======= */
.btn {
    position: relative; /* New */
    overflow: hidden; /* New */
}

    .btn:active::after {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 60%);
        animation: btnRipple 0.6s ease-out;
    }

/* ======= ENHANCED FORMS (Additions) ======= */
.form-control[disabled] {
    position: relative; /* New */
    overflow: hidden; /* New */
}

    .form-control[disabled]::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.3) 50%, transparent 75% );
        animation: loadingShimmer 1.5s infinite;
    }

/* ======= ENHANCED TABLE (Additions) ======= */
.table-modern img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* New */
}

    .table-modern img:hover {
        transform: scale(1.03); /* New */
    }

/* ======= SCROLL-AWARE CARDS (New) ======= */
.card[data-scroll-depth] {
    transition: box-shadow 0.3s ease-out;
}

.card[data-scroll-depth="0"] {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.card[data-scroll-depth="1"] {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card[data-scroll-depth="2"] {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* ======= STATUS BADGES (Additions) ======= */
.badge::before {
    content: ''; /* New */
    display: inline-block; /* New */
    width: 8px; /* New */
    height: 8px; /* New */
    border-radius: 50%; /* New */
    margin-right: 0.5rem; /* New */
    background: currentColor; /* New */
    opacity: 0.3; /* New */
    animation: statusPulse 1.5s infinite; /* New */
}

/* ======= MOBILE GESTURES (New) ======= */
@media (pointer: coarse) {
    .table-modern tr {
        transition: transform 0.3s ease;
    }

        .table-modern tr:active {
            transform: translateX(10%);
        }
}

/* ======= ENHANCED SCROLLBARS (Additions) ======= */
::-webkit-scrollbar-thumb {
    transition: background-color 0.2s ease; /* New */
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: var(--bs-primary); /* New */
    }

/* ======= ENHANCED FOCUS STATES (Additions) ======= */
:focus-visible {
    animation: focusPulse 1.5s infinite; /* New */
}

/* ======= STICKY HEADER (Additions) ======= */
.sticky-header {
    animation: headerSlideDown 0.4s ease-out; /* New */
}
/* ======= INPUT FOCUS ANIMATIONS ======= */
input:not([type="checkbox"], [type="radio"]),
textarea,
select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    input:focus:not([type="checkbox"], [type="radio"]),
    textarea:focus,
    select:focus {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.1);
    }

/* Floating label effect */
label:has(+ input:focus) {
    transform: translateY(-0.5rem) scale(0.9);
    opacity: 0.8;
}

/* ======= IMAGE LOAD ANIMATIONS ======= */
img {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

    img.loaded {
        opacity: 1;
        transform: translateY(0);
    }

    /* Loading skeleton animation */
    img:not([src]),
    img[data-src]:not([src]) {
        animation: skeletonPulse 1.5s ease-in-out infinite;
        background: linear-gradient( 90deg, rgba(var(--bs-secondary-rgb), 0.1) 25%, rgba(var(--bs-secondary-rgb), 0.15) 50%, rgba(var(--bs-secondary-rgb), 0.1) 75% );
        border-radius: 4px;
    }


@keyframes skeletonPulse {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ======= TABLE INTERACTION ANIMATIONS ======= */
.table-modern tbody tr {
    opacity: 0;
    transform: translateX(-20px);
    animation: tableRowEnter 0.6s ease-out forwards;
}

@keyframes tableRowEnter {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered animation */
.table-modern tbody tr:nth-child(even) {
    animation-delay: 0.05s;
}

.table-modern tbody tr:nth-child(odd) {
    animation-delay: 0.1s;
}

/* ======= LIST ITEM ANIMATIONS ======= */
/*ul:not(.dropdown-menu) li,
ol:not(.dropdown-menu) li {
    opacity: 0;
    transform: translateX(-1rem);
    animation: listItemEnter 0.4s ease-out ease-out;
}
*/
@keyframes listItemEnter {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger children */
li:nth-child(1) {
    animation-delay: 0.1s;
}

li:nth-child(2) {
    animation-delay: 0.2s;
}

li:nth-child(3) {
    animation-delay: 0.3s;
}

/* ======= PROGRESS BAR ANIMATIONS ======= */
progress {
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

    progress:not([value="0"]) {
        opacity: 1;
        transform: scaleX(1);
    }

/* ======= DETAILS/SUMMARY ANIMATIONS ======= */
details[open] summary {
    animation: detailsOpen 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes detailsOpen {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

details > *:not(summary) {
    animation: detailsContent 0.6s ease-out;
}

@keyframes detailsContent {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======= NAVIGATION ANIMATIONS ======= */
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bs-primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ======= DROPDOWN ANIMATIONS ======= */
.dropdown-menu {
    transform-origin: top center;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .dropdown-menu.show {
        transform: scaleY(1);
    }

/* ======= VALIDATION ANIMATIONS ======= */
input:invalid {
    animation: shake 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

/* ======= TOOLTIP ANIMATIONS ======= */
[data-bs-toggle="tooltip"] {
    position: relative;
    overflow: visible;
}

    [data-bs-toggle="tooltip"]::after {
        content: attr(title);
        position: absolute;
        bottom: 100%;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease;
    }

    [data-bs-toggle="tooltip"]:hover::after {
        opacity: 1;
        transform: translateY(0);
    }

/* ======= ACCORDION ANIMATIONS ======= */
.accordion-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-button:not(.collapsed) {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ======= PAGINATION ANIMATIONS ======= */
.page-item:not(.active) .page-link {
    transition: all 0.3s ease;
}

    .page-item:not(.active) .page-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.1);
    }

/* ======= LAZY LOAD ANIMATIONS ======= */
[data-lazy] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

    [data-lazy].loaded {
        opacity: 1;
        transform: translateY(0);
    }

/* ======= REDUCED MOTION OVERRIDE ======= */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
/* ======== SCROLL SYSTEM ======== */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
        scroll-padding-top: var(--scroll-margin);
    }

    /* ++ Scroll progress tracking */
    body {
        animation: scroll-progress linear;
        animation-timeline: scroll();
    }
}

@keyframes scroll-progress {
    from {
        --scroll: 0;
    }

    to {
        --scroll: 1;
    }
}
/* ++ Adaptive density */
@media (width <= 768px) {
    :root {
        --space-unit: 0.75rem;
    }
}

/* ======== ENHANCED NAVIGATION ======== */
/* ++ View transitions */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.8s;
}

/* ++ Breadcrumb animations */
.breadcrumb-item:not(:last-child)::after {
    transition: transform 0.3s var(--easing);
}

.breadcrumb-item:hover::after {
    transform: translateX(0.25em);
}
@container card (width < 400px) {
    .card-title {
        font-size: 1.1rem;
    }
}
/* ++ Cascade layers */
@layer overrides, themes, animations;

@layer animations {
    /* All animation keyframes */
}

/* ======== BRAND IDENTITY ======== */
/* ++ Animated logo mark */
.logo {
    --logo-hue: 210;
    animation: logo-flow 8s infinite;
}

@keyframes logo-flow {
    50% {
        filter: hue-rotate(30deg);
    }
}

/* ======== ENHANCED ACCESSIBILITY ======== */
/* ++ Forced colors */
@media (forced-colors: active) {
    :focus-visible {
        outline-color: Highlight !important;
    }
}

/* ++ Reduced motion */
@media (prefers-reduced-motion) {
    .sticky-header {
        animation-duration: 0.001ms;
    }
}

.card,
.table-modern,
.bd-callout {
    contain: layout paint style;
}

.btn {
    --btn-glow: rgba(var(--bs-primary-rgb), 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px var(--btn-glow);
    }

    .btn:active {
        transform: translateY(1px);
    }

    .btn::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        opacity: 0;
        background: radial-gradient(circle at center, var(--btn-glow) 0%, transparent 80%);
        transition: opacity 0.3s;
    }

    .btn:hover::after {
        opacity: 0.6;
    }
.form-group {
    position: relative;
    margin-top: 1.5rem;
}

.form-control {
    transition: all 0.3s ease;
    background: rgba(var(--bs-body-bg-rgb), 0.9);
}

label:has(+ .form-control:focus),
label:has(+ .form-control:not(:placeholder-shown)) {
    transform: translateY(0rem) scale(0.85);
    opacity: 0.8;
}
.table-modern {
    --table-border: rgba(var(--bs-secondary-rgb), 0.1);
    border: 1px solid var(--table-border);
}

    .table-modern th {
        background: linear-gradient( to bottom, rgba(var(--bs-primary-rgb), 1), rgba(var(--bs-primary-rgb), 0.9) );
        backdrop-filter: blur(4px);
    }

    .table-modern tr {
        transition: all 0.3s ease;
    }

        .table-modern tr:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
.modal-content {
    border: none;
    background: rgba(var(--bs-body-bg-rgb), 0.95);
    backdrop-filter: blur(16px);
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-backdrop {
    background: radial-gradient( circle at center, rgba(0,0,0,0.4), rgba(0,0,0,0.6) );
}
.table {
    --table-accent: rgba(var(--bs-primary-rgb), 0.05);
    border-collapse: separate;
    border-spacing: 0;
}

.table-hover tbody tr {
    transition: all 0.3s ease;
}

    .table-hover tbody tr:hover {
        transform: translateX(4px);
        box-shadow: 4px 0 0 var(--bs-primary) inset;
    }
/* Alert modern styling */
.alert {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Pagination depth effect */
.page-link {
    transition: all 0.3s ease;
}

    .page-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

/* Accordion interactions */
.accordion-button:not(.collapsed) {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

/* Tooltip modern look */
.tooltip-inner {
    backdrop-filter: blur(6px);
    /* background: rgba(var(--bs-body-bg-rgb), 0.9) !important; */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.1);
}
/* Modal enhancements */
.modal-content {
    border: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.list-group {
    --bs-list-group-color: var(--bs-body-color);
    --bs-list-group-bg: var(--bs-body-bg);
    --bs-list-group-border-color: #eeeeee;
    --bs-list-group-border-width: var(--bs-border-width);
    --bs-list-group-border-radius: var(--bs-border-radius);
    --bs-list-group-item-padding-x: 1rem;
    --bs-list-group-item-padding-y: 0.5rem;
    --bs-list-group-action-color: var(--bs-secondary-color);
    --bs-list-group-action-hover-color: var(--bs-emphasis-color);
    --bs-list-group-action-hover-bg: var(--bs-tertiary-bg);
    --bs-list-group-action-active-color: var(--bs-body-color);
    --bs-list-group-action-active-bg: var(--bs-secondary-bg);
    --bs-list-group-disabled-color: var(--bs-secondary-color);
    --bs-list-group-disabled-bg: #eeeeee;
    --bs-list-group-active-color: #fff;
    --bs-list-group-active-bg: #d9230f;
    --bs-list-group-active-border-color: #d9230f;
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: var(--bs-list-group-border-radius);
}
.list-group-item {
    color: var(--bs-list-group-color);
}

    .list-group-item.active, .list-group-item:focus, .list-group-item:hover {
        color: var(--bs-secondary);
    }