﻿/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --sidebar-width: 280px;
    --topbar-height: 60px;
    --border-radius: 0.5rem;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Initial Page Loading */
.page-initializing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

    .page-initializing .loading-content {
        text-align: center;
        padding: 2rem;
        background: white;
        border-radius: var(--border-radius);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
        max-width: 400px;
        width: 90%;
    }

    .page-initializing .spinner-border {
        width: 3rem;
        height: 3rem;
        margin-bottom: 1.5rem;
    }

    .page-initializing .brand-section {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 1rem;
    }

        .page-initializing .brand-section img {
            margin: 0;
        }

    .page-initializing h5 {
        color: var(--secondary-color);
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .page-initializing p {
        color: var(--secondary-color);
        opacity: 0.8;
        margin-bottom: 0;
    }

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Search Container */
.search-container {
    padding: 1.25rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

    .search-container .input-group {
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    }

    .search-container .form-control {
        border-radius: var(--border-radius) 0 0 var(--border-radius);
        border: 1px solid #dee2e6;
        padding: 0.75rem 1rem;
    }

    .search-container .btn {
        border-radius: 0 var(--border-radius) var(--border-radius) 0;
        padding: 0.75rem 1.5rem;
        -webkit-border-radius: 0 var(--border-radius) var(--border-radius) 0;
        -moz-border-radius: 0 var(--border-radius) var(--border-radius) 0;
        -ms-border-radius: 0 var(--border-radius) var(--border-radius) 0;
        -o-border-radius: 0 var(--border-radius) var(--border-radius) 0;
    }

/* Desktop Sidebar */
.sidebar {
    height: 100vh;
    width: var(--sidebar-width);
    min-width: 300px;
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    transition: transform 0.3s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Mobile Topbar */
.mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    height: var(--topbar-height);
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

    .mobile-menu-toggle:hover {
        background: #f8f9fa;
        border-color: #dee2e6;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    .mobile-menu-toggle:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: var(--dark-color);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle:hover .hamburger-line {
    background-color: var(--secondary-color);
}

/* Mobile Offcanvas Improvements */
.offcanvas {
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.offcanvas-header {
    background: #fff;
    color: var(--dark-color);
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.offcanvas-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.btn-close {
    filter: none;
    opacity: 0.6;
}

    .btn-close:hover {
        opacity: 0.8;
    }

/* Navigation */
.nav-link {
    color: var(--dark-color);
    border-radius: var(--border-radius);
    padding: 0.875rem 1rem;
    transition: all 0.2s ease-in-out;
    margin-bottom: 0.25rem;
}

    .nav-link:hover {
        background-color: var(--light-color);
        color: var(--primary-color);
    }

    .nav-link.active {
        background-color: var(--primary-color);
        color: #fff;
        font-weight: 500;
    }

        .nav-link.active i {
            color: #fff;
        }

    .nav-link i {
        font-size: 1.25rem;
        width: 1.5rem;
        margin-right: 0.75rem;
    }

/* Cards */
.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease-in-out;
}

/* Tables */
.table {
    --bs-table-hover-bg: var(--light-color);
    --bs-table-hover-color: var(--dark-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

    .table th {
        background-color: var(--light-color);
        font-weight: 600;
        padding: 1rem;
        white-space: nowrap;
    }

    .table td {
        padding: 1rem;
        vertical-align: middle;
    }

    .table > :not(caption) > * > * {
        background-color: transparent !important;
    }

/* Forms */
.form-control,
.form-select {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
}

.form-floating > .form-control {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: #0b5ed7;
        border-color: #0a58ca;
    }

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    main {
        padding-top: 0 !important;
        padding-left: 0;
        padding-right: 0;
    }

    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    /* Mobile Content Improvements */
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 100%;
    }

    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    .table-responsive {
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 1rem;
    }

    /* Mobile Typography */
    h1,
    .h1 {
        font-size: 1.75rem;
    }

    h2,
    .h2 {
        font-size: 1.5rem;
    }

    /* Mobile Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Login Page */
.login-page {
    min-height: 100vh;
    background-color: var(--light-color);
}

.login-card {
    max-width: 400px;
    margin: 0 auto;
}

/* QuickGrid Customization */
.quickgrid {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

    .quickgrid th {
        background-color: var(--light-color);
        font-weight: 600;
        padding: 1rem;
    }

    .quickgrid td {
        padding: 1rem;
        vertical-align: middle;
    }

/* Utility Classes */
.min-h-screen {
    min-height: 100vh;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.col-title:hover {
    color: var(--bs-btn-hover-color);
    background-color: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color);
}

.col-title:focus-visible {
    color: var(--bs-btn-hover-color);
    background-color: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color);
    outline: 0;
    box-shadow: var(--bs-btn-focus-box-shadow);
}

.col-title[b-b7yucal7gj] {
    display: flex;
    min-width: 0px;
    flex-grow: 1;
    padding: 0;
}

button.col-title[b-b7yucal7gj] {
    border: none;
    background: none;
    position: relative;
    cursor: pointer;
}

.col-justify-center .col-title[b-b7yucal7gj] {
    justify-content: center;
}

.col-justify-end .col-title[b-b7yucal7gj] {
    flex-direction: row-reverse;
}

.quickgrid[theme="default"] > tbody > tr > td {
    padding: 0.1rem 0.2rem !important;
}

.quickgrid th {
    padding: 0.4rem 0.2rem !important;
}

.col-title-text[b-b7yucal7gj] {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.paginator[b-3qssc0bm46] {
    display: flex;
    border-top: 1px solid #ccc;
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    align-items: center;
}

.pagination-text[b-3qssc0bm46] {
    margin: 0 0.5rem;
}

nav[b-3qssc0bm46] {
    display: flex;
    margin-left: auto;
    gap: 0.5rem;
    align-items: center;
}

nav button[b-3qssc0bm46] {
    border: 0;
    background: none center center / 1rem no-repeat;
    width: 2rem;
    height: 2rem;
}

nav button[disabled][b-3qssc0bm46] {
    opacity: 0.4;
}

nav button:not([disabled]):hover[b-3qssc0bm46] {
    background-color: #eee;
}

nav button:not([disabled]):active[b-3qssc0bm46] {
    background-color: #aaa;
}

.go-first[b-3qssc0bm46],
.go-last[b-3qssc0bm46] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-bar-left" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"/> </svg>');
}

.go-previous[b-3qssc0bm46],
.go-next[b-3qssc0bm46] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"/> </svg>');
}

.go-next[b-3qssc0bm46],
.go-last[b-3qssc0bm46] {
    transform: scaleX(-1);
}

th[b-vznuo5fmpv] {
    position: relative;
}

.col-header-content[b-vznuo5fmpv] {
    position: relative;
    display: flex;
    align-items: center;
}

th[b-vznuo5fmpv] .sort-indicator {
    width: 1rem;
    height: 1rem;
    align-self: center;
    text-align: center;
}

th[aria-sort="none"] .sort-indicator {
    display: none;
}

.col-sort-desc[b-vznuo5fmpv] .sort-indicator,
.col-sort-asc[b-vznuo5fmpv] .sort-indicator {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-caret-down-fill" viewBox="0 0 16 16"> <path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/> </svg>');
}

.col-sort-asc[b-vznuo5fmpv] .sort-indicator {
    transform: scaleY(-1);
}

th[b-vznuo5fmpv] .col-options-button {
    border: none;
    padding: 0;
    width: 1rem;
    align-self: stretch;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="1.5 0 21 24" stroke="currentColor" stroke-width="2"><path d="M4 6h16M4 12h16M4 18h16" /></svg>') center center / 1rem no-repeat;
}

.col-options[b-vznuo5fmpv] {
    position: absolute;
    background: white;
    border: 1px solid silver;
    left: 0;
    padding: 1rem;
    z-index: 1;
}

.col-justify-end .col-options[b-vznuo5fmpv] {
    left: unset;
    right: 0;
}

.col-width-draghandle[b-vznuo5fmpv] {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0rem;
    cursor: ew-resize;
}

    .col-width-draghandle[b-vznuo5fmpv]:after {
        content: " ";
        position: absolute;
        top: 0;
        bottom: 0;
        border-left: 1px solid black;
    }

td.col-justify-center[b-vznuo5fmpv] {
    text-align: center;
}

td.col-justify-end[b-vznuo5fmpv] {
    text-align: right;
}

html[dir="rtl"] td.col-justify-end[b-vznuo5fmpv] {
    text-align: left;
}

html[dir="rtl"] .col-options[b-vznuo5fmpv] {
    left: unset;
    right: 0;
}

html[dir="rtl"] .col-justify-end .col-options[b-vznuo5fmpv] {
    right: unset;
    left: 0;
}

.quickgrid[theme="default"] {
    --col-gap: 1rem;
}

    .quickgrid[theme="default"] .col-header-content {
        padding-right: var(--col-gap);
    }

    .quickgrid[theme="default"] > thead > tr > th {
        font-weight: normal;
    }

    .quickgrid[theme="default"].loading > tbody {
        opacity: 0.25;
        transition: opacity linear 100ms;
        transition-delay: 25ms; /* Don't want flicker if the queries are resolving almost immediately */
    }

    .quickgrid[theme="default"] .col-title {
        padding: 0.1rem 0.4rem;
    }

    .quickgrid[theme="default"] > tbody > tr > td {
        padding: 0.1rem calc(0.4rem + var(--col-gap)) 0.1rem 0.4rem;
    }

    .quickgrid[theme="default"] .col-title {
        gap: 0.4rem; /* Separate the sort indicator from title text */
        font-weight: bold;
    }

    .quickgrid[theme="default"] .sort-indicator {
        opacity: 0.5;
    }

    .quickgrid[theme="default"] .col-options-button {
        width: 1.5rem;
    }

        .quickgrid[theme="default"] button.col-title:hover,
        .quickgrid[theme="default"] .col-options-button:hover {
            background-color: rgba(128, 128, 128, 0.2);
        }

        .quickgrid[theme="default"] button.col-title:active,
        .quickgrid[theme="default"] .col-options-button:active {
            background-color: rgba(128, 128, 128, 0.5);
        }

    .quickgrid[theme="default"] > thead .col-width-draghandle {
        width: 1rem;
        right: calc(var(--col-gap) / 2 - 0.5rem);
    }

        .quickgrid[theme="default"] > thead .col-width-draghandle:hover {
            background: rgba(128, 128, 128, 0.2);
        }

        .quickgrid[theme="default"] > thead .col-width-draghandle:active {
            background: rgba(128, 128, 128, 0.4);
        }

            .quickgrid[theme="default"] > thead .col-width-draghandle:hover:after,
            .quickgrid[theme="default"] > thead .col-width-draghandle:active:after {
                border-color: black;
            }

        .quickgrid[theme="default"] > thead .col-width-draghandle:after {
            border-color: #ccc;
            left: 0.5rem;
            top: 5px;
            bottom: 5px;
        }

    .quickgrid[theme="default"] .col-options {
        box-shadow: 0 3px 8px 1px #aaa;
        border-color: #ddd;
        border-radius: 0.3rem;
    }

    .quickgrid[theme="default"] > tbody > tr > td.grid-cell-placeholder:after {
        content: "\2026";
        opacity: 0.75;
    }

/* Offcanvas Styles */
.offcanvas {
    width: 100% !important;
    max-width: 500px;
}

/* Dropdown Styles */
.dropdown-item {
    border-radius: 6px;
    margin: 2px 4px;
    transition: all 0.2s;
}

    .dropdown-item:hover {
        background-color: #f8f9fa;
    }

    .dropdown-item.active {
        background-color: #e7f1ff;
        color: #0d6efd;
    }

/* Dropup menu position fix */
.dropup .dropdown-menu {
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 0.5rem !important;
}

@media only screen and (max-width: 991.98px) {
    main {
        padding-top: 0px !important;
    }
}

/* Layout Styles */
.layout-wrapper {
    min-height: 100vh;
    width: 100%;
}

.layout-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.main-content {
    flex: 1;
}

.dropdown-menu {
    transform: translateY(-100%);
    -webkit-transform: translateY(-100%);
    -moz-transform: translateY(-100%);
    -ms-transform: translateY(-100%);
    -o-transform: translateY(-100%);
}

@media (max-width: 991.98px) {
    .layout-content {
        padding-top: var(--topbar-height);
    }
}

/* QuickGrid İsim Kolonu Genişletme */
.quickgrid td:nth-child(2),
.quickgrid th:nth-child(2) {
    min-width: 300px !important;
    width: 35% !important;
    max-width: none !important;
}

.quickgrid .table th:nth-child(2) {
    min-width: 300px !important;
    width: 35% !important;
}

/* Tutarlı Sayfa Tasarımı */
.page-header {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1.5rem 2rem;
}

.page-title {
    margin: 0;
    font-weight: 700;
    font-size: 1.5rem;
}

.page-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.filter-section {
    background: var(--light-color);
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: var(--border-radius);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.badge.rounded-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-primary {
    background-color: #0d6efd !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Mobil Responsive Tasarım */
@media (max-width: 767.98px) {
    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .container-fluid {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        width: 100%;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .card {
        margin-left: 0;
        margin-right: 0;
        border-radius: 8px;
        width: 100%;
    }

    .card-body {
        padding: 1rem 0.75rem;
    }

        .card-body .card {
            border: 1px solid #dee2e6;
            margin-bottom: 1rem;
        }

    .card-title {
        font-size: 1.1rem;
        font-weight: 700;
    }

    .table-sm {
        font-size: 0.875rem;
    }

        .table-sm td {
            padding: 0.75rem 0.5rem;
            border-bottom: 1px solid #dee2e6;
        }

    .page-header {
        padding: 1rem 0.75rem !important;
    }

    .filter-section {
        margin-left: 0;
        margin-right: 0;
        padding: 0.75rem;
    }

    .col-12 {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Boş Durum Stilleri */
.display-1 {
    font-size: 4rem;
    line-height: 1;
}

.opacity-50 {
    opacity: 0.5 !important;
}

/* Responsive Geliştirmeler */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 100%;
    }

    .col-md-4 {
        margin-bottom: 1rem;
    }

    .btn-lg {
        font-size: 0.9rem;
        padding: 0.625rem 1.25rem;
    }

    .page-header {
        padding: 1.25rem 1rem;
    }

    .filter-section {
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .table-responsive {
        border-radius: var(--border-radius);
        overflow: hidden;
    }

    .table thead th {
        position: sticky;
        top: 0;
        z-index: 10;
    }
}

/* Form Geliştirmeleri */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Text Stilleri */
.fw-semibold {
    font-weight: 600 !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Gölge Geliştirmeleri */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Sortable Table Headers */
.sortable-header {
    transition: all 0.2s ease;
    user-select: none;
}

    .sortable-header:hover {
        background-color: rgba(13, 110, 253, 0.08) !important;
        transform: translateY(-1px);
    }

    .sortable-header:active {
        background-color: rgba(13, 110, 253, 0.15) !important;
        transform: translateY(0);
    }

    .sortable-header i {
        font-size: 0.875rem;
        transition: all 0.2s ease;
    }

    .sortable-header:hover i.opacity-50 {
        opacity: 0.8 !important;
    }

.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}