:root {
    --primary-color: #006666;
    --primary-light: #008888;
    --primary-dark: #004444;
    --sidebar-bg: linear-gradient(135deg, #006666 0%, #004444 100%);
    --sidebar-hover: linear-gradient(135deg, #008888 0%, #006666 100%);
    --header-bg: #f8f9fa;
    --content-bg: #f4f6f8;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --card-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

body, html {
    min-height: 100%;
    background-color: var(--content-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#sidebarOverlay {
    height: 0px;
}

.app-shell {
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: #fff;
    min-height: 100vh;
    padding-bottom: 2rem;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1001;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

    .sidebar .btn-close {
        display: none;
    }

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.15rem;
}

.sidebar-logo {
    font-size: 1.5rem;
    color: #fff;
}

.sidebar-section {
    padding: 1rem 0;
}

.sidebar-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

.sidebar-menu {
    padding: 0;
}

    .sidebar-menu .nav-link {
        color: rgba(255, 255, 255, 0.8);
        padding: 0.75rem 1.5rem;
        border-left: 3px solid transparent;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        text-decoration: none;
    }

        .sidebar-menu .nav-link i:first-child {
            width: 20px;
            font-size: 1.1rem;
        }

        .sidebar-menu .nav-link i:last-child {
            margin-left: auto;
            font-size: 0.75rem;
            opacity: 0.5;
        }

        .sidebar-menu .nav-link:hover,
        .sidebar-menu .nav-link.active {
            color: #fff;
            border-left-color: #00aaaa;
            background: linear-gradient(90deg, rgba(0, 170, 170, 0.2) 0%, rgba(0, 102, 102, 0.1) 100%);
        }

/* Content Area */
.content {
    margin-left: 260px;
    background-color: var(--content-bg);
    min-height: 100vh;
}

.content-header {
    background: var(--header-bg);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-box {
    position: relative;
    width: 250px;
}

    .search-box i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #6c757d;
        z-index: 1;
    }

    .search-box input {
        padding-left: 40px;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        background: #fff;
    }

        .search-box input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.2rem rgba(0, 102, 102, 0.25);
        }

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.2s;
    cursor: pointer;
}

    .btn-icon:hover {
        background: #e9ecef;
        color: var(--primary-color);
    }

    .btn-icon i {
        font-size: 1.2rem;
    }

.badge-notification {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
    background: transparent;
    border: none;
    color: inherit;
}

    .user-profile:hover {
        background: #e9ecef;
    }

    .user-profile.dropdown-toggle::after {
        margin-left: 0.5rem;
    }

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow-lg);
    border: 1px solid #e9ecef;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background 0.2s;
}

    .dropdown-item:hover {
        background: #f8f9fa;
    }

    .dropdown-item.text-danger:hover {
        background: #fee;
        color: #dc3545 !important;
    }

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #006666 0%, #004444 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
}

.user-role {
    font-size: 0.75rem;
    color: #6c757d;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #212529;
}

.content-body {
    padding: 2rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    background: #fff;
    transition: all 0.3s;
}

    .card:hover {
        box-shadow: var(--card-shadow-lg);
    }

.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    border-radius: 1rem 1rem 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

.card-metric {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
    background: #fff;
}

    .card-metric:hover {
        transform: translateY(-2px);
        box-shadow: var(--card-shadow-lg);
    }

.card-metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

    .card-metric-icon.primary {
        background: linear-gradient(135deg, #006666 0%, #004444 100%);
    }

    .card-metric-icon.success {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    }

    .card-metric-icon.warning {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    }

    .card-metric-icon.info {
        background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    }

/* Table Styles */
.table {
    margin-bottom: 0;
}

    .table thead {
        background-color: #f8f9fa;
        color: #495057;
        font-weight: 600;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

        .table thead th {
            border-bottom: 2px solid #dee2e6;
            padding: 1rem;
        }

    .table tbody td {
        padding: 1rem;
        vertical-align: middle;
    }

.table-hover tbody tr:hover {
    background-color: #007d7d94;
}

/* Badge Styles */
.badge {
    padding: 0.35rem 0.65rem;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-status {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
}

/* Button Styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

/* Action Buttons - Compact Icon Style */
.btn-action {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
}

    .btn-action i {
        font-size: 0.875rem;
        line-height: 1;
    }

    .btn-action:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .btn-action:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .btn-action.btn-detail {
        color: #6c757d;
        background-color: #f8f9fa;
        border-color: #dee2e6;
    }

        .btn-action.btn-detail:hover {
            color: #495057;
            background-color: #e9ecef;
            border-color: #adb5bd;
        }

    .btn-action.btn-edit {
        color: var(--primary-color);
        background: linear-gradient(135deg, rgba(0, 102, 102, 0.1) 0%, rgba(0, 136, 136, 0.1) 100%);
        border-color: rgba(0, 102, 102, 0.3);
    }

        .btn-action.btn-edit:hover {
            color: #fff;
            background: linear-gradient(135deg, #006666 0%, #008888 100%);
            border-color: var(--primary-color);
        }

    .btn-action.btn-delete {
        color: #dc3545;
        background-color: #f8d7da;
        border-color: #f1aeb5;
    }

        .btn-action.btn-delete:hover {
            color: #fff;
            background-color: #dc3545;
            border-color: #dc3545;
        }

    .btn-action.btn-success {
        color: #198754;
        background-color: #d1e7dd;
        border-color: #badbcc;
    }

        .btn-action.btn-success:hover {
            color: #fff;
            background-color: #198754;
            border-color: #198754;
        }

.btn-action-group {
    display: inline-flex;
    gap: 0.375rem;
    align-items: center;
    flex-wrap: nowrap;
}

/* Form içindeki action butonları için */
form.d-inline .btn-action {
    margin: 0;
}

/* Bootstrap Primary Color Override */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: linear-gradient(135deg, #006666 0%, #004444 100%) !important;
}

    .bg-primary.bg-opacity-10 {
        background: rgba(0, 102, 102, 0.1) !important;
    }

.border-primary {
    border-color: var(--primary-color) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #006666 0%, #004444 100%);
    border-color: var(--primary-color);
    color: #fff;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #008888 0%, #006666 100%);
        border-color: var(--primary-light);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 102, 102, 0.3);
    }

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

    .btn-outline-primary:hover {
        background: linear-gradient(135deg, #006666 0%, #004444 100%);
        border-color: var(--primary-color);
        color: #fff;
    }

/* Alert Styles */
.alert {
    border-radius: 0.75rem;
    border: none;
    box-shadow: var(--card-shadow);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(0, 102, 102, 0.25);
    }

.avatar-sm {
    width: 40px;
    height: 40px;
}

/* Filter Input Styles */
.input-group-text {
    background: linear-gradient(135deg, #006666 0%, #004444 100%);
    color: #fff;
    border-color: var(--primary-color);
}

    .input-group-text i {
        font-size: 1rem;
    }

.input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 102, 0.25);
}

@media (min-width: 991.98px) {
    .container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        padding-right: 0px !important;
        padding-left: 0px !important;
    }
}
/* Responsive */
@media (max-width: 991.98px) {

    .container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

        .sidebar-overlay.show {
            display: block;
        }

    .content {
        margin-left: 0;
    }

    .content-body {
        padding: 1rem;
    }

    .content-header {
        padding: 1rem;
    }

        .content-header h5 {
            font-size: 1rem;
        }

    .search-box {
        width: 200px;
    }
}

@media (max-width: 767.98px) {
    .content-header {
        padding: 0.75rem;
    }

        .content-header h5 {
            font-size: 0.9rem;
        }

    .content-body {
        padding: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }

    .btn-group {
        flex-direction: column;
        gap: 0.25rem;
    }

        .btn-group .btn {
            width: 100%;
        }

    .search-box {
        width: 150px;
    }

    .user-profile {
        padding: 0.25rem;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
}

@media (max-width: 575.98px) {
    .content-header h5 {
        font-size: 0.85rem;
    }

    .content-header small {
        display: none;
    }

    .search-box {
        display: none !important;
    }

    .card-metric {
        margin-bottom: 1rem;
    }

        .card-metric .display-6 {
            font-size: 1.5rem;
        }

    .table {
        font-size: 0.75rem;
    }

        .table thead th,
        .table tbody td {
            padding: 0.35rem 0.25rem;
            white-space: nowrap;
        }

            .table thead th:first-child,
            .table tbody td:first-child {
                position: sticky;
                left: 0;
                background: white;
                z-index: 10;
                box-shadow: 2px 0 5px rgba(0,0,0,0.1);
                padding-left: 0.5rem;
            }

        .table tbody tr:hover td:first-child {
            background: #007d7d94;
        }

        .table thead th:first-child {
            background: #f8f9fa;
        }

    .btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

    .btn-sm {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    /* Son sütunu (butonlar) her zaman göster */
    .table-responsive .table th:last-child,
    .table-responsive .table td:last-child {
        display: table-cell !important;
        position: sticky;
        right: 0;
        background: white;
        z-index: 10;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        min-width: 80px;
    }

    .table tbody tr:hover td:last-child {
        background: #007d7d94;
    }

    .table thead th:last-child {
        background: #f8f9fa;
    }

    /* Form responsive */
    .form-label {
        font-size: 0.875rem;
    }

    .form-control,
    .form-select {
        font-size: 0.875rem;
    }

    /* Card responsive */
    .card {
        margin-bottom: 1rem;
    }

    .card-header {
        font-size: 0.9rem;
    }

    /* Button groups responsive */
    .btn-action-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    /* Modal responsive */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 0.5rem;
    }

    /* Filter forms responsive */
    .row.g-2.g-md-3 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }

    /* Details pages responsive */
    .row.g-3.g-md-4 > [class*="col-"] {
        margin-bottom: 1rem;
    }

    /* Breadcrumb responsive */
    .breadcrumb {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    /* Badge responsive */
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    /* Input groups responsive */
    .input-group-text {
        font-size: 0.875rem;
        padding: 0.5rem;
    }

    /* Action buttons in mobile */
    .table-actions-compact {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.25rem;
    }

    .btn-action {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* Extra small devices (phones, less than 400px) */
@media (max-width: 399.98px) {
    .content-body {
        padding: 0.5rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .card-header {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    h2, h3, h4 {
        font-size: 1.25rem;
    }

    h5 {
        font-size: 1rem;
    }

    .display-6 {
        font-size: 1.25rem;
    }

    .table {
        font-size: 0.7rem;
    }

    .btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }

    .form-control,
    .form-select {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}
