/* ==========================================================
   MGTEK TAKIP SISTEMI — MERKEZI CSS
   ==========================================================
   Birlesik dosya: tum CSS tek noktada
   ========================================================== */
/* Dashboard Ana CSS */
/* Main Dashboard CSS */

:root {
    /* Brand colors */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --light-color: #f8fafc;
    --dark-color: #1f2937;

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Typography scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Genel Stiller */
html {
    overflow-x: hidden;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: #ffffff;
    color: #374151;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-brand {
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.sidebar-brand h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.025em;
}

.sidebar-brand .version {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-top: 0.375rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-item {
    margin: 0.125rem 0;
}

.nav-link {
    color: #6b7280;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    margin: 0 0.75rem;
    border-radius: 8px;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    background-color: #f9fafb;
    color: #374151;
    transform: translateX(2px);
}

.nav-link:hover::before {
    height: 20px;
}

.nav-link.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::before {
    height: 24px;
}

.nav-link i {
    width: 1.25rem;
    flex-shrink: 0;
    margin-right: 0.875rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.8;
}

.nav-link:hover i,
    .nav-link.active i {
    opacity: 1;
}

.nav-submenu {
    background-color: transparent;
    padding: 0.25rem 0;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    border-left: 2px solid #f3f4f6;
    margin-top: 0.5rem;
}

.nav-submenu .nav-link {
    padding: 0.5rem 1rem 0.5rem 1.5rem;
    font-size: 0.8125rem;
    margin: 0;
    border-radius: 6px;
    font-weight: 500;
}

.nav-submenu .nav-link::before {
    display: none;
}

.nav-submenu .nav-link i {
    font-size: 0.75rem;
    margin-right: 0.75rem;
    width: 1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

/* Topbar */
.topbar {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.topbar-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    margin-right: 1rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* User Dropdown */
.user-dropdown .dropdown-toggle {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.user-dropdown .dropdown-toggle:hover {
    background-color: #f3f4f6;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    text-align: left;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.user-role {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

/* Main Wrapper */
.main-wrapper {
    padding: 1.5rem;
}

/* Page Header — TUM sayfalarda tek tip sayfa basligi.
   Standart kalip:
     <div class="page-header d-flex justify-content-between align-items-center">
       <div>
         <h1 class="page-title">Baslik</h1>
         <p class="page-subtitle">Alt baslik</p>
       </div>
       <div><!-- eylem butonlari --></div>
     </div>
   Tipografi, ikon boyutu ve rengi burada merkezi olarak belirlenir;
   sayfa dosyalarinda ayri font-size/renk verilmemelidir. */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

/* Baslik ikonu her sayfada ayni olculerde dursun */
.page-title > i,
.page-title .fas,
.page-title .far {
    font-size: 0.85em;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.page-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

/* Breadcrumb — header.php'de tek yerde basilir, tum sayfalarda ayni */
.page-breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    --bs-breadcrumb-divider: '/';
}

.page-breadcrumb .breadcrumb-item i {
    font-size: 0.8125rem;
}

.breadcrumb-item {
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6b7280;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.card-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0 !important;
    padding: 1.25rem 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: var(--success-color);
    border: none;
}

.btn-warning {
    background: var(--warning-color);
    border: none;
}

.btn-danger {
    background: var(--danger-color);
    border: none;
}

.btn-info {
    background: var(--info-color);
    border: none;
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.stats-label {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Charts Responsive */
@media (max-width: 768px) {

    canvas#trendChart,
    canvas#statusChart,
    canvas#priorityChart,
    canvas#sparePartsChart {
        max-height: 180px !important;
    }

    canvas#machineChart {
        max-height: 150px !important;
    }
}

@media (max-width: 576px) {

    canvas#trendChart,
    canvas#statusChart,
    canvas#priorityChart,
    canvas#sparePartsChart {
        max-height: 140px !important;
    }

    canvas#machineChart {
        max-height: 120px !important;
    }
}

/* Mobile Table - Hide on small screens */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .table-responsive-sm {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive-sm thead {
        display: none;
    }

    .table-responsive-sm tbody tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 0.75rem;
    }

    .table-responsive-sm tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.25rem 0.5rem;
        border: none;
    }

    .table-responsive-sm tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
    }
}

/* Calendar filter — segmented pill control */
.calendar-filter-group {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    padding: 0.25rem;
    border-radius: 50rem;
    gap: 0.25rem;
    border: 1px solid #e9ecef;
}

.calendar-filter-group .btn {
    border: none;
    border-radius: 50rem;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    color: #6c757d;
    background: transparent;
    transition: all 0.2s ease;
}

.calendar-filter-group .btn.active {
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.calendar-filter-group .btn-outline-danger.active {
    background-color: #dc3545;
}

.calendar-filter-group .btn-outline-primary.active {
    background-color: #0d6efd;
}

.calendar-filter-group .btn:hover:not(.active) {
    background-color: #e9ecef;
    color: #495057;
}

/* Calendar filter buttons - horizontal scroll on mobile/tablet */
@media (max-width: 768px) {
    .calendar-filter-group {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 0.5rem;
    }

    .calendar-filter-group::-webkit-scrollbar {
        display: none;
    }

    .calendar-filter-group .btn {
        flex-shrink: 0;
    }
}

/* FullCalendar Mobile/Tablet Toolbar - 992px'e kadar sikisma yasanan tum
   dar ekranlarda (telefon + tablet + kucuk laptop) toolbar alt alta diziliyor. */
@media (max-width: 992px) {
    .fc-toolbar {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: stretch !important;
    }

    .fc-toolbar .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }

    .fc-toolbar .fc-toolbar-chunk:first-child {
        order: 1;
    }

    .fc-toolbar .fc-toolbar-chunk:nth-child(2) {
        order: 0;
    }

    .fc-toolbar .fc-toolbar-chunk:last-child {
        order: 2;
    }

    .fc-toolbar .fc-button {
        padding: 0.375rem 0.5rem !important;
        font-size: 0.75rem !important;
    }

    .fc-toolbar .fc-toolbar-title {
        font-size: 1rem !important;
    }
}

/* Forms */

/* Yazdirmada gizlenecek ogeler — genel amacli utility, sayfaya scope'lamayin */
@media print {
    .no-print { display: none !important; }
}

/* Zorunlu alan isareti — TEK mekanizma.
   Kullanim:  <label class="form-label required">Ad</label>
   Etiket metnine elle * veya <span class="text-danger">*</span> EKLEMEYIN. */
/* Silinmek uzere isaretlenen ogeler — birden fazla sayfada kullanilir
   (spare-parts/edit, troubleshooting-guides/edit). Sayfaya scope'lamayin. */
.marked-for-deletion {
    opacity: 0.5;
    filter: grayscale(100%);
    position: relative;
}

.marked-for-deletion::after {
    content: 'SİLİNECEK';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.required::after {
    content: " *";
    color: var(--danger-color);
    font-weight: 600;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}/* Empty States */

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    /* Topbar Mobile Fixes */
    .topbar {
        padding: 0 0.75rem;
        height: auto;
        min-height: var(--header-height);
        flex-wrap: wrap;
    }

    .sidebar-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .topbar-left {
        flex: 1;
        min-width: 0;
    }

    .topbar-left .company-info {
        display: none;
    }

    .topbar-right {
        gap: 0.5rem;
        margin-left: auto;
    }

    .company-switcher .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    .company-switcher .btn i:last-child {
        display: none;
    }

    /* company-switcher ile tutarli: dar ekranda dropdown metnini gizle, sadece ikon kalsin */
    .language-switcher .btn span#currentLanguage,
    .language-switcher .btn .fa-chevron-down {
        display: none;
    }

    .language-switcher .btn {
        padding: 0.375rem 0.5rem;
    }

    /* min-width:250px inline stili kaldirildi; dar ekranda viewport'a gore sinirlandir */
    .company-switcher-menu,
    .company-switcher .dropdown-menu {
        min-width: 220px;
        max-width: calc(100vw - 1.5rem);
        max-height: 60vh;
        overflow-y: auto;
    }

    .user-dropdown .dropdown-toggle {
        padding: 0.25rem;
        gap: 0.25rem;
    }

    .user-dropdown .user-info {
        display: none;
    }

    .user-dropdown .user-avatar {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }

    .main-wrapper {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .stats-card {
        margin-bottom: 1rem;
    }
}

/* Mobile Button Optimizations — no !important needed (dashboard.css loaded after Bootstrap) */
@media (max-width: 768px) {
    .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
        border-radius: 8px;
        font-weight: 500;
        line-height: 1.4;
    }

    .btn-primary {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .btn-outline-primary,
    .btn-outline-secondary,
    .btn-outline-success,
    .btn-outline-danger,
    .btn-outline-warning,
    .btn-outline-info {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
        border-width: 1.5px;
    }

    .btn i {
        font-size: 0.875rem;
        margin-right: 0.5rem;
    }

    .btn i:last-child {
        margin-right: 0;
        margin-left: 0.5rem;
    }

    .page-header .btn,
    .d-flex .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
        white-space: nowrap;
    }

    .card-header .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.875rem;
    }

    .table .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
        min-height: 38px;
        min-width: 38px;
    }

    .modal-footer .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1.25rem;
        min-width: 80px;
    }
}

@media (max-width: 576px) {
    .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.875rem;
    }

    .btn-primary {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    .btn-lg {
        font-size: 0.85rem;
        padding: 0.625rem 1.25rem;
    }.d-flex .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.875rem;
    }

    .btn i {
        font-size: 0.8rem;
        margin-right: 0.375rem;
    }

    .modal-footer .btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        min-width: 70px;
    }

    .table .btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        min-height: 36px;
        min-width: 36px;
    }
}

/* Topbar dropdownlari (dil/isletme/kullanici) sidebar (z-index:1000) ile ayni
   degerde kalmasin diye acikca yukselttik - mobilde sidebar acikken de dropdown
   her zaman en ustte gorunmeli. */
.topbar .dropdown-menu {
    z-index: 1050;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* =================================
   ACCESSIBILITY
   ================================= */

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }.stats-card {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card,
    .stats-card {
        border: 2px solid #374151;
        box-shadow: none;
    }

    .btn-outline-primary,
    .btn-outline-secondary,
    .btn-outline-success,
    .btn-outline-danger,
    .btn-outline-warning,
    .btn-outline-info {
        border-width: 2px;
    }

    .badge {
        border: 1px solid currentColor;
    }
}

/* Focus visible — keyboard only */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-info { background-color: var(--info-color) !important; }/* Breakdowns Page Enhanced CSS - Mobile Responsive Version */
/* Arıza Sayfası Geliştirilmiş CSS - Mobil Uyumlu Versiyon */

/* Statistics Cards Improvements */

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stats-card .card-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.stats-icon {
    font-size: 2.5rem;
    opacity: 0.3;
    margin-left: 1rem;
}/* Enhanced Filter Section */

/* Enhanced Table Section */

.table-responsive {
    border-radius: 0 0 12px 12px;
    /* overflow:hidden Bootstrap'in kendi overflow-x:auto kuralini eziyordu -
       tum tablolarda mobil yatay kaydirmayi tamamen engelliyordu. */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 992px) {
    /* Bootstrap'in .table{width:100%} kurali tabloyu her zaman container
       genisliginde tutuyor; hucre metinleri sarildigi icin tablo hicbir zaman
       taşmıyor ve kaydıracak fazlalik olusmuyor. Hucreleri tek satirda tutup
       tablonun dogal genisligine buyumesine izin veriyoruz - boylece gercek
       yatay kaydirma (swipe) olusuyor. */
    .table-responsive > .table,
    .table-responsive > table {
        width: max-content !important;
        min-width: 100%;
    }

    .table-responsive > .table th,
    .table-responsive > .table td,
    .table-responsive > table th,
    .table-responsive > table td {
        white-space: nowrap;
    }

    /* Uzun metin gosteren hucreler (aciklama/not gibi) okunabilirligi korusun */
    .table-responsive .text-wrap,
    .table-responsive .white-space-normal {
        white-space: normal !important;
    }
}

.table {
    margin: 0;
    font-size: 0.875rem;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 0.75rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

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

/* Enhanced Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Action Buttons */
.btn-group-sm .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 6px;
    margin: 0 0.125rem;
}

.btn-group-sm .btn i {
    font-size: 0.875rem;
}

/* Enhanced Modals */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #1f2937;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    padding: 1rem 1.5rem;
}

/* Page Header Improvements */
.page-header-enhanced {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.page-header-enhanced h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header-enhanced .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-header-enhanced .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}/* Loading States */

/* .loading-spinner tek tanim: satir ~3366 (buton ici, 1rem currentColor).
   Buradaki 2rem'lik eski tanim tamamen eziliyordu, kaldirildi. */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Page Header Large Screens */
@media (min-width: 1200px) {
    .stats-card {
        padding: 2rem;
    }

    .page-header-enhanced {
        padding: 2.5rem;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {.stats-card {
        background-color: #1f2937;
        color: #f9fafb;
    }

    .table thead th {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        color: #f9fafb;
    }

    .table tbody tr:hover {
        background-color: #374151;
    }
}

/* Print styles */
@media print {
    .stats-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }

    .table {
        font-size: 0.75rem;
    }

    .page-header-enhanced {
        background: none;
        box-shadow: none;
        border-bottom: 2px solid #e5e7eb;
    }
}

/* Accessibility improvements */
.btn:focus,
    .form-control:focus,
    .form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.table tbody tr:focus-within {
    background-color: #e0f2fe;
    outline: 2px solid var(--info-color);
}/* Animation improvements */
.stats-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* =================================
   BREAKDOWN VIEW PAGE RESPONSIVE
   ================================= */

/* Timeline Responsive */
@media (max-width: 768px) {
    .timeline {
        padding-left: 20px;
    }

    .timeline-content {
        padding: 10px;
        font-size: 0.875rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-header .float-end {
        float: none !important;
        margin-top: 0.25rem;
    }
}

/* Page Header Mobile - breakdown-header.php uses .page-header class */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .page-header > div:first-child {
        width: 100%;
    }

    .page-header > div:first-child h1.h3 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        word-break: break-word;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }

    .page-header > div:first-child h1.h3 i {
        font-size: 1.25rem;
        margin-right: 0.5rem;
        flex-shrink: 0;
    }

    .page-header > div:first-child p.text-muted {
        font-size: 0.9rem;
        margin-bottom: 0;
        word-break: break-word;
    }

    .page-header > div:last-child {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .page-header > div:last-child .btn {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: center;
        white-space: nowrap;
        border-radius: 8px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin: 0;
    }

    .page-header > div:last-child .btn-secondary {
        margin-top: 0.5rem;
    }

    .page-header > div:last-child .btn-secondary::before {
        content: '';
        position: absolute;
        top: -0.375rem;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 2px;
        background-color: #dee2e6;
        border-radius: 1px;
    }

    .btn-group-sm {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .btn-group-sm .btn {
        flex: 1;
        min-width: 0;
        margin: 0;
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .page-header > div:first-child h1 {
        font-size: 1.25rem;
    }

    .page-header > div:last-child .btn {
        font-size: 0.8rem;
        padding: 0.625rem 0.875rem;
    }

    .page-header > div:last-child .btn-secondary {
        margin-top: 0.375rem;
    }
}

/* Landscape phone optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .page-header {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .page-header > div:first-child {
        flex: 1;
        width: auto;
    }

    .page-header > div:last-child {
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-header > div:last-child .btn {
        width: auto;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .page-header > div:last-child .btn-secondary {
        margin-top: 0;
        border-top: none;
    }
}

/* Info Tables Mobile */
@media (max-width: 768px) {
    .table-borderless td {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }

    .table-borderless .fw-bold {
        font-size: 0.8rem;
        min-width: 80px;
        display: inline-block;
    }
}

/* Duration Cards Mobile */
@media (max-width: 768px) {
    .text-center h4 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .text-center small {
        font-size: 0.75rem;
    }

    .row .col-md-3 {
        margin-bottom: 1rem;
    }
}

/* Image Gallery Mobile */
@media (max-width: 768px) {

    .col-md-3.mb-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .col-md-3.mb-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Modal Mobile Optimizations */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-dialog.modal-lg {
        max-width: calc(100% - 1rem);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .modal-body .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Form Elements Mobile */
@media (max-width: 768px) {
    .form-label {
        font-size: 0.875rem;
        font-weight: 600;
    }

    .form-control,
    .form-select {
        /* 16px altinda font-size iOS Safari'de focus aninda otomatik zoom tetikler */
        font-size: 1rem;
        padding: 0.625rem 0.75rem;
    }

    .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }

    .btn-sm {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Image Preview Mobile */
@media (max-width: 768px) {
    .image-preview-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .image-preview-container img {
        max-width: 100%;
        max-height: 200px;
    }

    .image-preview-container .btn {
        align-self: center;
    }
}

/* Badge Mobile */
@media (max-width: 768px) {
    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Card Body Mobile */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 1rem;
    }

    .card-header h5 {
        font-size: 1rem;
    }
}

/* HTML Content Mobile */
@media (max-width: 768px) {
    .html-content {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .html-content p {
        margin-bottom: 0.75rem;
    }
}

/* Timeline Mobile Improvements */
@media (max-width: 576px) {
    .timeline {
        padding-left: 15px;
    }

    .timeline::before {
        left: 7px;
        width: 1px;
    }

    .timeline-content {
        padding: 8px;
        font-size: 0.8rem;
    }

    .timeline-item {
        margin-bottom: 15px;
    }
}

/* Utility Classes for Mobile */
@media (max-width: 768px) {
    .d-md-flex {
        display: flex !important;
    }

    .flex-md-column {
        flex-direction: column !important;
    }

    .gap-md-2 {
        gap: 0.5rem !important;
    }

    .mb-md-3 {
        margin-bottom: 1rem !important;
    }

    .text-md-center {
        text-align: center !important;
    }
}

/* Image Modal Mobile */
@media (max-width: 768px) {
    #imageModal .modal-body {
        padding: 0.5rem;
    }

    #imageModal img {
        max-width: 100%;
        height: auto;
    }
}

/* Duration Info Mobile Layout */
@media (max-width: 768px) {
    .row .col-md-3 .text-center {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Extra Mobile Optimizations for View Page */
@media (max-width: 576px) {
    /* Page Title Mobile */
    .container-fluid .row.mb-4 h1 {
        font-size: 1.25rem;
    }

    .container-fluid .row.mb-4 p {
        font-size: 0.875rem;
    }

    /* Button Group Mobile */
    .container-fluid .row.mb-4 .d-flex .d-flex .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        white-space: nowrap;
    }

    /* Info Table Extra Small */
    .table-borderless td {
        padding: 0.375rem 0.125rem;
        font-size: 0.8rem;
        display: block;
        border: none;
    }

    .table-borderless tr {
        border-bottom: 1px solid #f3f4f6;
        margin-bottom: 0.5rem;
        display: block;
    }

    .table-borderless .fw-bold {
        font-weight: 600;
        color: #6b7280;
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    /* Duration Cards Extra Small */
    .text-center h4 {
        font-size: 1.1rem;
    }

    .text-center small {
        font-size: 0.7rem;
    }
}

/* ===== AUTH SAYFALARI (login / register / forgot-password) — scope: body.auth-page ===== */
body.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 2rem 0;
}
body.auth-page .auth-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 450px;
    width: 90%;
    backdrop-filter: blur(10px);
}
body.auth-page .auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}
body.auth-page .auth-header h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}
body.auth-page .auth-header .subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
body.auth-page .auth-body {
    padding: 2rem;
}
body.auth-page .form-group {
    margin-bottom: 1.25rem;
}
body.auth-page .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}
body.auth-page .form-control {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}
body.auth-page .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}
body.auth-page .input-group {
    position: relative;
}
body.auth-page .input-group .form-control {
    padding-left: 3rem;
}
body.auth-page .input-group-text {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: none;
    color: #6b7280;
}
body.auth-page .btn-login,
body.auth-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
}
body.auth-page .btn-login:hover,
body.auth-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
}
body.auth-page .btn-secondary {
    background: #6b7280;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
}
body.auth-page .btn-secondary:hover {
    background: #4b5563;
    color: white;
}
body.auth-page .alert {
    border-radius: 12px;
    border: none;
    margin-bottom: 1.5rem;
}
body.auth-page .alert-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}
body.auth-page .alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}
body.auth-page .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
body.auth-page .form-check-input {
    border-radius: 6px;
    border: 2px solid #e5e7eb;
}
body.auth-page .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}
body.auth-page .forgot-password,
body.auth-page .back-to-login {
    text-align: center;
    margin-top: 1rem;
}
body.auth-page .forgot-password a,
body.auth-page .back-to-login a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
body.auth-page .forgot-password a:hover,
body.auth-page .back-to-login a:hover {
    text-decoration: underline;
}
body.auth-page .auth-footer {
    background: #f8fafc;
    padding: 1rem 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}
body.auth-page .btn-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
}
body.auth-page .btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
}
body.auth-page #error-message,
body.auth-page #success-message {
    display: none;
}
body.auth-page .login-link {
    text-align: center;
    margin-top: 1.5rem;
}
body.auth-page .login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
body.auth-page .login-link a:hover {
    text-decoration: underline;
}
body.auth-page .password-strength {
    height: 5px;
    border-radius: 5px;
    margin-top: 5px;
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    body.auth-page .auth-container {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    body.auth-page .auth-header,
    body.auth-page .auth-body {
        padding: 1.5rem;
    }
    body.auth-page .auth-footer {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

/* ===== machines/print-qr — scope: body.print-qr-page ===== */
body.print-qr-page {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: white;
}
body.print-qr-page .print-container {
    width: 21cm;
    min-height: 29.7cm;
    margin: 0 auto;
    padding: 2cm;
    background: white;
    box-sizing: border-box;
}
body.print-qr-page .header {
    text-align: center;
    margin-bottom: 1cm;
    border-bottom: 2px solid #333;
    padding-bottom: 0.7cm;
}
body.print-qr-page .document-title {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
body.print-qr-page .machine-info {
    text-align: center;
    margin-bottom: 1cm;
    padding: 0 1cm;
}
body.print-qr-page .machine-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.7cm;
    word-wrap: break-word;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}
body.print-qr-page .machine-code {
    font-size: 16px;
    color: #666;
    margin-bottom: 0;
    font-weight: 500;
    background-color: #f8f9fa;
    padding: 0.5cm;
    border-radius: 6px;
    border: 2px solid #ddd;
}
body.print-qr-page .qr-container {
    text-align: center;
    margin: 1cm 0;
    padding: 0.5cm;
}
body.print-qr-page #printQrCode {
    margin: 0 auto;
    background: white;
    padding: 0.7cm;
    border: 2px solid #333;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
body.print-qr-page .qr-info {
    margin-top: 0.7cm;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    background-color: #f8f9fa;
    padding: 0.5cm 1cm;
    border-radius: 6px;
    border: 1px solid #ddd;
    max-width: 8cm;
    margin-left: auto;
    margin-right: auto;
}
body.print-qr-page .print-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
body.print-qr-page .print-button:hover {
    background: #0056b3;
}

@media print {
    body.print-qr-page .print-button {
        display: none;
    }
}

@media screen and (max-width: 850px) {
    body.print-qr-page .print-container {
        width: 100%;
        min-height: auto;
        padding: 1rem;
    }
    body.print-qr-page .machine-name {
        font-size: 20px;
    }
    body.print-qr-page .print-button {
        top: 10px;
        right: 10px;
        padding: 8px 14px;
        font-size: 13px;
    }
}

@page {
                size: A4;
                margin: 2cm;
            }
   DATATABLES TEMEL STILLER
   ================================= */

.dataTables_wrapper {
    position: relative;
    clear: both;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.875rem;
    margin: 0;
}

.dataTables_wrapper .row {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.dataTables_wrapper .row > div {
    padding: 0.75rem;
}

/* =================================
   DATATABLES KONTROLLERI
   ================================= */

/* Length Control - Kayıt Sayısı Seçici */
.dataTables_length {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
    margin: 0;
    font-size: 0.875rem;
}

.dataTables_length select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    background: white;
    color: #374151;
    transition: all 0.2s ease;
    min-width: 70px;
}

.dataTables_length select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Search Control - Arama Kutusu */
.dataTables_filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
    margin: 0;
    font-size: 0.875rem;
}

.dataTables_filter input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    background: white;
    color: #374151;
    transition: all 0.2s ease;
    min-width: 200px;
}

.dataTables_filter input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.dataTables_filter input::placeholder {
    color: #6b7280;
}

/* Processing Indicator - Yükleniyor Göstergesi */
.dataTables_processing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-weight: 500;
    color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dataTables_processing::before {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: dt-spin 1s linear infinite;
}

@keyframes dt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================================
   TABLO STILLER - MEVCUT TASARIMLA UYUMLU
   ================================= */

.dataTable {
    width: 100% !important;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: white;
}

/* Table Header - Mevcut breakdowns.css stilini kullan */
.dataTable thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 0.75rem;
    white-space: nowrap;
    position: relative;
    user-select: none;
    vertical-align: middle;
}

/* Sorting Styles - Sıralama İkonları */
.dataTable thead th.sorting,
    .dataTable thead th.sorting_asc,
    .dataTable thead th.sorting_desc {
    cursor: pointer;
    transition: all 0.2s ease;
    padding-right: 2rem;
}

.dataTable thead th.sorting:hover,
    .dataTable thead th.sorting_asc:hover,
    .dataTable thead th.sorting_desc:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #667eea;
}

.dataTable thead th.sorting::after,
    .dataTable thead th.sorting_asc::after,
    .dataTable thead th.sorting_desc::after {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: #6b7280;
}

.dataTable thead th.sorting::after {
    content: '\f0dc'; /* fa-sort */
    opacity: 0.5;
}

.dataTable thead th.sorting_asc::after {
    content: '\f0de'; /* fa-sort-up */
    color: #667eea;
    opacity: 1;
}

.dataTable thead th.sorting_desc::after {
    content: '\f0dd'; /* fa-sort-down */
    color: #667eea;
    opacity: 1;
}

.dataTable thead th.sorting_disabled {
    cursor: default;
}

.dataTable thead th.sorting_disabled::after {
    display: none;
}

/* Table Body - Mevcut breakdowns.css stilini kullan */
.dataTable tbody {
    background: white;
}

.dataTable tbody td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    transition: all 0.2s ease;
}

.dataTable tbody tr {
    transition: all 0.2s ease;
}

.dataTable tbody tr:hover {
    background-color: #f9fafb;
}

.dataTable tbody tr:last-child td {
    border-bottom: none;
}

/* Striped Rows */
.dataTable.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.dataTable.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: #f9fafb;
}

/* Empty State - Boş Durum */
.dataTables_empty {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 3rem 1rem !important;
    background: #f8fafc;
}

.dataTables_empty::before {
    content: '\f15c'; /* fa-file-text */
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* =================================
   SAYFALAMA - PAGINATION
   ================================= */

.dataTables_paginate {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 1rem 0.75rem 0.75rem 0.75rem;
}

.dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    min-width: 2.5rem;
    height: 2.5rem;
}

.dataTables_paginate .paginate_button:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.dataTables_paginate .paginate_button.current {
    background: #667eea;
    border-color: #667eea;
    color: white;
    font-weight: 600;
}

.dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.dataTables_paginate .paginate_button.previous,
    .dataTables_paginate .paginate_button.next {
    font-weight: 600;
}

.dataTables_paginate .paginate_button.previous::before {
    content: '\f104'; /* fa-angle-left */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 0.25rem;
}

.dataTables_paginate .paginate_button.next::after {
    content: '\f105'; /* fa-angle-right */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 0.25rem;
}

/* =================================
   BİLGİ METNİ - INFO TEXT
   ================================= */

.dataTables_info {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.75rem;
    margin: 0;
}

.dataTables_info::before {
    content: '\f05a'; /* fa-info-circle */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 0.5rem;
    color: #3b82f6;
}

/* =================================
   RESPONSIVE ÖZELLIKLER
   ================================= */

/* Tablet ve Mobil */
@media (max-width: 768px) {
    .dataTables_wrapper .row > div {
        padding: 0.5rem;
    }

    .dataTables_length,
    .dataTables_filter {
        justify-content: center;
        margin-bottom: 0.75rem;
    }

    .dataTables_length label,
    .dataTables_filter label {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }

    .dataTables_filter input {
        min-width: 150px;
    }

    .dataTable {
        font-size: 0.8rem;
    }

    .dataTable thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }

    .dataTable tbody td {
        padding: 0.75rem 0.5rem;
    }

    .dataTables_paginate {
        flex-wrap: wrap;
        gap: 0.125rem;
    }

    .dataTables_paginate .paginate_button {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
        min-width: 2rem;
        height: 2rem;
    }

    .dataTables_info {
        text-align: center;
        justify-content: center;
        font-size: 0.8rem;
    }
}

/* Çok Küçük Ekranlar */
@media (max-width: 576px) {
    .dataTables_wrapper .row {
        flex-direction: column;
    }

    .dataTables_length,
    .dataTables_filter {
        order: 1;
        margin-bottom: 0.5rem;
    }

    .table-responsive {
        order: 2;
    }

    .dataTables_info {
        order: 3;
        font-size: 0.75rem;
    }

    .dataTables_paginate {
        order: 4;
        margin-top: 0.5rem;
    }

    .dataTable {
        font-size: 0.75rem;
    }

    .dataTable thead th,
    .dataTable tbody td {
        padding: 0.5rem 0.25rem;
    }

    .dataTables_paginate .paginate_button {
        padding: 0.25rem 0.375rem;
        font-size: 0.75rem;
        min-width: 1.75rem;
        height: 1.75rem;
    }
}

/* =================================
   ÖZEL SCROLLBAR
   ================================= */

.table-responsive::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* =================================
   BADGE VE DURUM GÖSTERGELERİ
   ================================= */

.dataTable .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Bootstrap badge renklerini kullan */
.dataTable .badge.bg-success {
    background-color: #10b981 !important;
    color: white;
}

.dataTable .badge.bg-warning {
    background-color: #f59e0b !important;
    color: white;
}

.dataTable .badge.bg-danger {
    background-color: #ef4444 !important;
    color: white;
}

.dataTable .badge.bg-info {
    background-color: #3b82f6 !important;
    color: white;
}

.dataTable .badge.bg-secondary {
    background-color: #6b7280 !important;
    color: white;
}

.dataTable .badge.bg-primary {
    background-color: #667eea !important;
    color: white;
}

/* =================================
   AKSIYON BUTONLARI
   ================================= */

.dataTable .btn-group-sm .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 6px;
    margin: 0 0.125rem;
    transition: all 0.2s ease;
}

.dataTable .btn-group-sm .btn:hover {
    transform: translateY(-1px);
}

.dataTable .btn-group-sm .btn i {
    font-size: 0.875rem;
}

/* =================================
   YAZDIRMA STİLLERİ
   ================================= */

@media print {
    .dataTables_length,
    .dataTables_filter,
    .dataTables_paginate,
    .dataTables_processing {
        display: none !important;
    }

    .dataTable {
        border-collapse: collapse;
        font-size: 0.75rem;
    }

    .dataTable thead th {
        background: #f8fafc !important;
        border: 1px solid #000 !important;
        padding: 0.5rem !important;
    }

    .dataTable tbody td {
        border: 1px solid #ccc !important;
        padding: 0.5rem !important;
    }

    .table-responsive {
        overflow: visible !important;
        box-shadow: none !important;
    }
}

/* =================================
   ERİŞİLEBİLİRLİK İYİLEŞTİRMELERİ
   ================================= */

.dataTable thead th:focus,
    .dataTables_paginate .paginate_button:focus,
    .dataTables_length select:focus,
    .dataTables_filter input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.dataTable tbody tr:focus-within {
    background-color: #e0f2fe;
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* =================================
   YARDIMCI SINIFLAR
   ================================= */

.dt-center {
    text-align: center !important;
}

.dt-right {
    text-align: right !important;
}

.dt-left {
    text-align: left !important;
}

.dt-nowrap {
    white-space: nowrap !important;
}

.dt-bold {
    font-weight: 600 !important;
}

.dt-muted {
    color: #6b7280 !important;
}

.dt-small {
    font-size: 0.8rem !important;
}

.dt-large {
    font-size: 1rem !important;
}

/* =================================
   GENEL AMAÇLI DATATABLES STILLER
   ================================= */

/* Tablo boyut varyantları */
.dt-table-xs {
    font-size: 0.7rem !important;
}

.dt-table-xs thead th,
    .dt-table-xs tbody td {
    padding: 0.375rem 0.25rem !important;
}

.dt-table-xl {
    font-size: 1.1rem !important;
}

.dt-table-xl thead th,
    .dt-table-xl tbody td {
    padding: 1.5rem 1.25rem !important;
}

/* Renk temaları */
.dt-theme-dark .dataTable {
    background: #1f2937;
    color: #f9fafb;
}

.dt-theme-dark .dataTable thead th {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: #f9fafb;
    border-bottom-color: #4b5563;
}

.dt-theme-dark .dataTable tbody td {
    border-bottom-color: #374151;
    color: #f9fafb;
}

.dt-theme-dark .dataTable tbody tr:hover {
    background-color: #374151;
}

.dt-theme-dark .dataTables_wrapper {
    color: #f9fafb;
}

.dt-theme-dark .dataTables_length select,
    .dt-theme-dark .dataTables_filter input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

/* Özel durum göstergeleri */
.dt-status-active {
    position: relative;
}

.dt-status-active::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.375rem;
    height: 0.375rem;
    background: #10b981;
    border-radius: 50%;
}

.dt-status-inactive::before {
    background: #ef4444;
}

.dt-status-pending::before {
    background: #f59e0b;
}

/* Veri tipi göstergeleri */
.dt-number {
    text-align: right !important;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.dt-currency::before {
    content: '₺';
    margin-right: 0.25rem;
    color: #10b981;
    font-weight: 600;
}

.dt-percentage::after {
    content: '%';
    margin-left: 0.125rem;
    color: #6b7280;
}

.dt-date {
    font-family: 'Courier New', monospace;
    color: #6b7280;
}

.dt-time {
    font-family: 'Courier New', monospace;
    color: #3b82f6;
    font-size: 0.8rem;
}

/* Öncelik göstergeleri */
.dt-priority-high {
    color: #ef4444 !important;
    font-weight: 600;
}

.dt-priority-medium {
    color: #f59e0b !important;
    font-weight: 500;
}

.dt-priority-low {
    color: #10b981 !important;
}

.dt-priority-critical {
    color: #dc2626 !important;
    font-weight: 700;
    text-transform: uppercase;
}

/* =================================
   ÖZEL GELİŞTİRMELER
   ================================= */

/* Kenarlıklı tablo */
.dataTable.table-bordered {
    border: 1px solid #e5e7eb;
}

.dataTable.table-bordered thead th,
    .dataTable.table-bordered tbody td {
    border: 1px solid #e5e7eb;
}

/* Kompakt tablo */
.dataTable.table-sm thead th,
    .dataTable.table-sm tbody td {
    padding: 0.5rem 0.5rem;
}

/* Büyük tablo */
.dataTable.table-lg thead th,
    .dataTable.table-lg tbody td {
    padding: 1.25rem 1rem;
}

/* Satır seçimi */
.dataTable tbody tr.selected {
    background-color: rgba(102, 126, 234, 0.1);
}

.dataTable tbody tr.selected:hover {
    background-color: rgba(102, 126, 234, 0.15);
}

/* Loading durumu */
.dataTables_wrapper.loading {
    position: relative;
    pointer-events: none;
}

.dataTables_wrapper.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999;
    border-radius: 8px;
}

/* =================================
   GENEL AMAÇLI EKLENTILER
   ================================= */

/* Tablo başlık grupları */
.dt-header-group {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    border: none;
}

/* Satır grupları */
.dt-group-header {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    border-top: 2px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.dt-group-header td {
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem;
}

/* Toplam satırları */
.dt-total-row {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    font-weight: 600;
    border-top: 2px solid #cbd5e1;
}

.dt-total-row td {
    color: #1e293b;
    font-size: 0.9rem;
}

/* Vurgulama stilleri */
.dt-highlight {
    background: rgba(255, 235, 59, 0.3) !important;
    animation: dt-highlight-fade 2s ease-out;
}

@keyframes dt-highlight-fade {
    0% { background: rgba(255, 235, 59, 0.6) !important; }
    100% { background: rgba(255, 235, 59, 0.3) !important; }
}

/* Hata durumu */
.dt-error {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

.dt-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #d97706 !important;
}

.dt-success {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
}

/* =================================
   ÖZEL KOLON TİPLERİ
   ================================= */

/* Resim kolonları */
.dt-image-cell {
    text-align: center;
    padding: 0.5rem !important;
}

.dt-image-cell img {
    max-width: 50px;
    max-height: 50px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

/* Aksiyon kolonları */
.dt-actions {
    text-align: center;
    white-space: nowrap;
    width: 1%;
}

.dt-actions .btn-group {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

/* Checkbox kolonları */
.dt-checkbox {
    text-align: center;
    width: 1%;
}

.dt-checkbox input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

/* =================================
   DATATABLES EKLENTI DESTEĞİ
   ================================= */

/* Buttons Extension */
.dt-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.dt-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dt-button:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.dt-button i {
    font-size: 0.875rem;
}

/* ColReorder Extension */
.dt-column-reorder {
    cursor: move;
}

.dt-column-reorder:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* FixedHeader Extension */
.fixedHeader-floating {
    background: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* =================================
   PERFORMANS OPTİMİZASYONLARI
   ================================= */

/* GPU hızlandırması */
.dataTables_wrapper,
    .dataTable,
    .dataTables_paginate .paginate_button {
    will-change: transform;
    backface-visibility: hidden;
}

/* Smooth scrolling */
.table-responsive {
    scroll-behavior: smooth;
}

/* =================================
   TÜRKÇE DİL DESTEĞİ
   ================================= */

/* Türkçe karakterler için font optimizasyonu */
.dataTables_wrapper,
    .dataTable {
    font-feature-settings: "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
}

/* =================================
   RESPONSIVE TABLO GELİŞTİRMELERİ
   ================================= */

/* Mobilde gizlenecek kolonlar */
@media (max-width: 768px) {
    .dt-hide-mobile {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .dt-hide-tablet {
        display: none !important;
    }
}

/* Mobil için özel tablo düzeni */
@media (max-width: 576px) {
    .dt-mobile-stack .dataTable,
    .dt-mobile-stack .dataTable thead,
    .dt-mobile-stack .dataTable tbody,
    .dt-mobile-stack .dataTable th,
    .dt-mobile-stack .dataTable td,
    .dt-mobile-stack .dataTable tr {
        display: block;
    }

    .dt-mobile-stack .dataTable thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .dt-mobile-stack .dataTable tr {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 1rem;
        background: white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .dt-mobile-stack .dataTable td {
        border: none !important;
        position: relative;
        padding: 0.5rem 0 0.5rem 40% !important;
        text-align: left !important;
    }

    .dt-mobile-stack .dataTable td::before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 0;
        width: 35%;
        padding-right: 0.5rem;
        white-space: nowrap;
        font-weight: 600;
        color: #374151;
    }
}

/* =================================
   ANIMASYONLAR VE GEÇIŞLER
   ================================= */

/* Satır ekleme/çıkarma animasyonları */
@keyframes dt-row-insert {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dt-row-remove {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.dt-row-insert {
    animation: dt-row-insert 0.3s ease-out;
}

.dt-row-remove {
    animation: dt-row-remove 0.3s ease-out;
}

/* Tablo yenileme animasyonu */
@keyframes dt-refresh {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.dt-refreshing {
    animation: dt-refresh 0.5s ease-in-out;
}

/* ===================================
   BREAKDOWN VIEW - DEDICATED CSS
   All styles for view.php page
   =================================== */

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    width: 2px;
    height: 100%;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    margin-bottom: 30px;
}

.timeline-icon {
    position: absolute;
    left: 14px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.timeline-icon i {
    font-size: 14px;
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #dee2e6;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.timeline-date {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Timeline Icon Colors */
.timeline-icon.bg-success { background-color: #28a745 !important; border-color: #28a745; }
.timeline-icon.bg-primary { background-color: #007bff !important; border-color: #007bff; }
.timeline-icon.bg-warning { background-color: #ffc107 !important; border-color: #ffc107; }
.timeline-icon.bg-info { background-color: #17a2b8 !important; border-color: #17a2b8; }
.timeline-icon.bg-danger { background-color: #dc3545 !important; border-color: #dc3545; }

/* Media Gallery */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.media-item:hover {
    transform: scale(1.05);
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    border-radius: 50%;
    pointer-events: none;
}

.media-item .delete-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.media-item:hover .delete-media {
    opacity: 1;
}

/* Steps Table */
.steps-table {
    margin-top: 20px;
}

.step-row {
    transition: background-color 0.2s;
}

.step-row:hover {
    background-color: #f8f9fa;
}

.step-status-badge {
    padding: 0.35em 0.65em;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

.step-actions {
    display: flex;
    gap: 5px;
}

.step-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Image Preview */
.image-preview-container {
    position: relative;
    display: inline-block;
    margin: 10px;
}

.image-preview {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Video Preview */
.video-thumbnail {
    position: relative;
    display: inline-block;
}

.video-thumbnail video {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
}

/* Galeri grid'i icindeki video ogeleri (.media-item + .video-thumbnail birlikte kullanildiginda)
   sabit 200x150px yerine grid hucresini doldurmali - aksi halde media-gallery grid'i bozuluyor. */
.media-item.video-thumbnail video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

/* Status Badges */
.status-badge {
    padding: 0.4em 0.8em;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0.25rem;
}/* Priority Badges */

/* Progress Bar */
.upload-progress-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px;
    z-index: 9999;
    display: none;
}

.upload-progress-container .progress {
    height: 8px;
    margin-top: 10px;
}

@media (max-width: 576px) {
    .upload-progress-container {
        left: 10px;
        right: 10px;
        top: 10px;
        width: auto;
    }

    /* Resim kaldirma butonlari - dokunma hedefini buyut (24-30px -> 32px) */
    .remove-image,
    body.breakdowns-create-page .image-preview .remove-image {
        width: 32px;
        height: 32px;
        font-size: 16px;
        top: -10px;
        right: -10px;
    }

    .image-preview-remove,
    body.spare-parts-edit-page .new-image-remove,
    body.spare-parts-create-page .image-remove-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
        top: 3px;
        right: 3px;
    }

    /* badge-round-xs/sm ile olusturulan resim silme butonlari (maintenance_order.php) - 18-20px -> 32px */
    .badge-round-xs,
    .badge-round-sm {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 45px;
    }

    .timeline-icon {
        left: 0;
        width: 28px;
        height: 28px;
    }

    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 5px;
    }

    .step-actions {
        flex-direction: column;
    }
}

/* Mobile Header Responsive */
@media (max-width: 576px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .page-header .btn-group {
        width: 100%;
    }

    .page-header .btn {
        flex: 1;
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Extra small screens (576px and below) */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 15px;
    }

    h1.h3 {
        font-size: 1.25rem;
    }

    .timeline-content {
        padding: 10px;
    }

    .table {
        font-size: 0.875rem;
    }
}

/* Landscape phone optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-dialog {
        max-width: 90%;
        margin: 1rem auto;
    }

    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* Spare Parts Display */
.selected-spare-parts {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.spare-part-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.spare-part-info {
    flex: 1;
}

.spare-part-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.spare-part-quantity {
    width: 60px;
    text-align: center;
    padding: 2px 5px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* Step Description */
.step-description {
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Gantt Chart Container */
#gantt-chart {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    overflow-x: auto;
}/* View Mode Switcher */

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner 0.75s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Print Styles */
@media print {
    .btn, .modal, .timeline-icon, .delete-media {
        display: none !important;
    }

    .card {
        break-inside: avoid;
    }

    .timeline::before {
        display: none;
    }
}
/* ==========================================================
   ORTAK BILESENLER — birden fazla sayfada AYNI gorunmeli.
   Sayfaya scope'lamayin; buraya ekleyin.
   ========================================================== */
#modalImage {
    transition: transform 0.3s ease;
    cursor: grab;
}
#modalImage:active {
    cursor: grabbing;
}
#nextImageBtn:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
}
#prevImageBtn:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
}
.border-top {
    border-color: #e5e7eb !important;
}
.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}
.carousel-item img {
    border-radius: 0.375rem;
}
.custom-field-item {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    position: relative;
}
.custom-field-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-color: #c6c6c6;
}
.drag-handle {
    cursor: move;
}
.html-content {
    line-height: 1.6;
}
.html-content img {
    max-width: 100%;
    height: auto;
}
.html-content table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}
.html-content a {
    color: var(--bs-primary);
    text-decoration: none;
}
.html-content a:hover {
    text-decoration: underline;
}
.html-content b {
    font-weight: 600;
}
.html-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    padding: 0.75rem 1rem;
    border-radius: 0 0.375rem 0.375rem 0;
}
.html-content code {
    background-color: #f8f9fa;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}
.html-content em {
    font-style: italic;
}
.html-content i {
    font-style: italic;
}
.html-content li {
    margin-bottom: 0.25rem;
}
.html-content ol {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}
.html-content p {
    margin-bottom: 0.75rem;
}
.html-content p:last-child {
    margin-bottom: 0;
}
.html-content strong {
    font-weight: 600;
}
.html-content ul {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}
.image-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.modal-fullscreen .modal-body {
    min-height: calc(100vh - 120px);
}
.modal-thumb.border-primary {
    border-width: 2px !important;
    border-color: var(--bs-primary) !important;
}
.page-title {
    color: #0d6efd;
}
.step-images .card {
    transition: all 0.3s ease;
}
.step-images .card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.step-images-container img:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}
.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}
.text-xs {
    font-size: 0.7rem;
}
.thumbnail-selector.active {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}
@media (max-width: 768px) {
    /* Sadece resim galerisi modali (machines/spare-parts view.php) icin - genel
       .modal-body secicisi tum sitedeki modalleri etkiledigi icin ID ile scope'landi. */
    #imageViewerModal .modal-body {
        flex-direction: column;
        overflow-y: auto;
        max-height: calc(100vh - 60px);
    }
    #imageViewerModal .modal-body > div:first-child {
        margin-bottom: 200px;
    }
    #imageViewerModal .modal-body > div:last-child {
        width: 100% !important;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 200px;
        overflow-y: auto;
    }
}

/* ==========================================================
   INLINE CSS (sayfalardan tasinmis style bloklari)
   ========================================================== */

/* ===== machines/edit — scope: body.machines-edit-page ===== */

body.machines-edit-page .image-preview-item,
body.machines-index-page .image-preview-item {
    position: relative;
    border-radius: 0.375rem;
    overflow: hidden;
}
body.machines-edit-page .image-preview-item img,
body.machines-index-page .image-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}
body.machines-edit-page .rotate-image-btn,
body.machines-edit-page .set-main-image-btn {
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s ease;
    opacity: 0.7;
}
body.machines-edit-page .rotate-image-btn:hover,
body.machines-edit-page .set-main-image-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
body.machines-edit-page .rotate-image-btn:disabled {
    opacity: 0.6;
    transform: none !important;
}
body.machines-edit-page .position-relative:hover .rotate-image-btn,
body.machines-edit-page .position-relative:hover .set-main-image-btn {
    opacity: 1;
}/* ===== machines/create — scope: body.machines-create-page ===== */

body.machines-create-page .image-preview-item {
    position: relative;
    border-radius: 0.375rem;
    overflow: hidden;
}
body.machines-create-page .image-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}/* ===== machines/view — scope: body.machines-view-page ===== */

@media (max-width: 768px) {
}

/* ===== machines/index — scope: body.machines-index-page ===== */
body.machines-index-page .machine-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
body.machines-index-page .machine-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
body.machines-index-page .card-img-container {
    position: relative;
}
body.machines-index-page .btn-group input[type="radio"]:checked + label {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* ===== profile/change-password — scope: body.profile-change-password-page ===== */
body.profile-change-password-page .password-strength-meter {
    width: 100%;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
body.profile-change-password-page .strength-meter-bar {
    height: 100%;
    border-radius: 3px;
    transition: all 0.3s ease;
    width: 0%;
}
body.profile-change-password-page .strength-weak {
    background-color: #ef4444;
    width: 25%;
}
body.profile-change-password-page .strength-fair {
    background-color: #f59e0b;
    width: 50%;
}
body.profile-change-password-page .strength-good {
    background-color: #3b82f6;
    width: 75%;
}
body.profile-change-password-page .strength-strong {
    background-color: #10b981;
    width: 100%;
}
body.profile-change-password-page .form-label {
    font-weight: 600;
    color: #374151;
}
body.profile-change-password-page .alert-info {
    background-color: #f0f9ff;
    color: #0369a1;
}

/* ===== profile/edit — scope: body.profile-edit-page ===== */
body.profile-edit-page .profile-preview {
    width: 150px;
    height: 150px;
    object-fit: cover;
    font-size: 3rem;
}
body.profile-edit-page .profile-image-container {
    position: relative;
}
body.profile-edit-page .form-label {
    font-weight: 600;
    color: #374151;
}
body.profile-edit-page .form-text {
    color: #6b7280;
    font-size: 0.875rem;
}

/* ===== profile/index — scope: body.profile-index-page ===== */
body.profile-index-page .profile-avatar {
    position: relative;
}
body.profile-index-page .info-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
body.profile-index-page .timeline-item {
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}
body.profile-index-page .timeline-item:hover {
    background-color: #f8f9fa;
}
body.profile-index-page .timeline-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
}
body.profile-index-page .contact-info .fas {
    opacity: 0.7;
}/* ===== dashboard/index — scope: body.dashboard-index-page ===== */

body.dashboard-index-page .text-decoration-none {
    color: inherit !important;
}
body.dashboard-index-page .text-decoration-none:hover {
    color: inherit !important;
    text-decoration: none !important;
}
body.dashboard-index-page .stats-card .stats-label,
body.dashboard-index-page .stats-card .stats-number {
    color: inherit;
}
body.dashboard-index-page .clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}
body.dashboard-index-page .clickable-row:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
}/* ===== plan_mange/view — scope: body.plan-view-page ===== */

body.plan-view-page .badge {
    font-size: 0.75em;
}/* ===== plan_mange/planli_bakim_olustur — scope: body.plan-create-page ===== */

body.plan-create-page .badge {
    font-size: 0.75em;
}
body.plan-create-page .border {
    border-color: #dee2e6 !important;
}
body.plan-create-page .text-success {
    color: #198754 !important;
}

/* ===== plan_mange/maintenance_order — scope: body.maintenance-order-page ===== */
body.maintenance-order-page .task-item,
body.maintenance-order-page .spare-part-item {
    transition: all 0.2s ease;
}
body.maintenance-order-page .task-item:hover,
body.maintenance-order-page .spare-part-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
body.maintenance-order-page .progress {
    height: 20px;
}
body.maintenance-order-page .badge {
    font-size: 0.85em;
}
body.maintenance-order-page .form-control-sm {
    font-size: 0.875rem;
}
body.maintenance-order-page .btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.2rem;
}
body.maintenance-order-page .task-image-thumbnail {
    transition: transform 0.2s ease-in-out;
    border-radius: 4px;
}
body.maintenance-order-page .task-image-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
body.maintenance-order-page .delete-image-btn {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
body.maintenance-order-page .task-images:hover .delete-image-btn {
    opacity: 1;
}
body.maintenance-order-page .image-preview-item {
    transition: all 0.2s ease-in-out;
}
body.maintenance-order-page .image-preview-item:hover {
    transform: scale(1.05);
}
body.maintenance-order-page .swal2-image {
    max-height: 70vh !important;
    object-fit: contain !important;
}
body.maintenance-order-page .bar-completed,
body.maintenance-order-page .bar-completed .bar,
body.maintenance-order-page .bar-completed rect {
    fill: #198754 !important;
}
body.maintenance-order-page .bar-in-progress,
body.maintenance-order-page .bar-in-progress .bar,
body.maintenance-order-page .bar-in-progress rect {
    fill: #ffc107 !important;
}
body.maintenance-order-page .bar-pending,
body.maintenance-order-page .bar-pending .bar,
body.maintenance-order-page .bar-pending rect {
    fill: #6c757d !important;
}
body.maintenance-order-page .gantt .bar-wrapper {
    cursor: pointer;
}
body.maintenance-order-page .gantt .bar-label {
    fill: #fff !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-anchor: start !important;
    dominant-baseline: middle !important;
    pointer-events: none;
}
body.maintenance-order-page .gantt .bar-progress {
    display: none !important;
}
body.maintenance-order-page .gantt .bar-wrapper:hover .bar {
    opacity: 0.8;
}
body.maintenance-order-page .gantt .popup-wrapper {
    background: white !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
}
body.maintenance-order-page #gantt-chart {
    overflow-x: auto;
}
body.maintenance-order-page .gantt .bar {
    rx: 3;
    ry: 3;
}

/* ===== reports/spare-parts-usage-history — scope: body.reports-usage-history-page ===== */
body.reports-usage-history-page .stats-card {
    transition: all 0.3s ease;
}
body.reports-usage-history-page .stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
body.reports-usage-history-page #usageHistoryTable tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* ===== reports/inventory — scope: body.reports-inventory-page ===== */
@media print {
    body.reports-inventory-page .sidebar,
    body.reports-inventory-page .navbar,
    body.reports-inventory-page .card-header button {
        display: none !important;
    }
    body.reports-inventory-page .main-content {
        margin-left: 0 !important;
    }
    body.reports-inventory-page .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
    body.reports-inventory-page .table {
        font-size: 12px;
    }
}/* ===== admin/production-fields — scope: body.admin-production-fields-page ===== */

body.admin-production-fields-page .sortable-ghost,
body.admin-custom-field-categories-page .sortable-ghost {
    opacity: 0.4;
    background: #f8f9fa;
}

/* ===== admin/production-shifts — scope: body.admin-production-shifts-page ===== */
body.admin-production-shifts-page .shift-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
body.admin-production-shifts-page .shift-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
body.admin-production-shifts-page .sortable-ghost {
    opacity: 0.4;
}

/* ===== admin/settings — scope: body.admin-settings-page ===== */
body.admin-settings-page .setting-item {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}
body.admin-settings-page .setting-item:hover {
    background-color: #e9ecef;
}
body.admin-settings-page .form-label {
    color: #374151;
    font-weight: 500;
}

/* ===== production/create — scope: body.production-create-page ===== */
body.production-create-page .sticky-top {
    position: sticky;
    z-index: 1020;
}
body.production-create-page .is-invalid {
    border-color: #dc3545 !important;
}

/* ===== production/view — scope: body.production-view-page ===== */
body.production-view-page .card {
    transition: transform 0.2s;
}
body.production-view-page .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ===== breakdowns/edit — scope: body.breakdowns-edit-page ===== */
body.breakdowns-edit-page .image-container {
    position: relative;
}

/* ===== breakdowns/create — scope: body.breakdowns-create-page ===== */
body.breakdowns-create-page .upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
body.breakdowns-create-page .upload-area:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}
body.breakdowns-create-page .upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}
body.breakdowns-create-page .image-preview {
    position: relative;
    display: inline-block;
    margin: 5px;
}
body.breakdowns-create-page .image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}
body.breakdowns-create-page .image-preview .remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
}/* ===== troubleshooting-guides/view — scope: body.troubleshooting-guide-view-page ===== */

body.troubleshooting-guide-view-page .card-header .badge {
    font-size: 0.9em;
}
body.troubleshooting-guide-view-page .alert-success {
    border-left: 4px solid #28a745;
}

@media (max-width: 768px) {
    body.troubleshooting-guide-view-page .card-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    body.troubleshooting-guide-view-page .card-header .badge {
        margin-top: 0.5rem;
        margin-bottom: 0;
    }
}/* ===== spare-parts/edit — scope: body.spare-parts-edit-page ===== */

body.spare-parts-edit-page .image-preview-item {
    position: relative;
    border-radius: 0.375rem;
    overflow: hidden;
}
body.spare-parts-edit-page .image-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}
body.spare-parts-edit-page .new-image-preview {
    position: relative;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 10px;
}
body.spare-parts-edit-page .new-image-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}
body.spare-parts-edit-page .new-image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}
body.spare-parts-edit-page .new-image-remove:hover {
    background: #c82333;
}
body.spare-parts-edit-page .btn-group-vertical .btn {
    margin-bottom: 2px;
}
body.spare-parts-edit-page .image-item .btn-group-vertical {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
body.spare-parts-edit-page .image-item:hover .btn-group-vertical {
    opacity: 1;
}
body.spare-parts-edit-page #mainUploadProgress {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
body.spare-parts-edit-page #mainUploadProgress .card {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}
body.spare-parts-edit-page .progress-bar-striped.progress-bar-animated {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

@keyframes slideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== spare-parts/create — scope: body.spare-parts-create-page ===== */
body.spare-parts-create-page .image-preview-item {
    position: relative;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    animation: fadeInScale 0.3s ease;
}
body.spare-parts-create-page .image-preview-item:hover {
    border-color: #007bff;
    background: #e3f2fd;
}
body.spare-parts-create-page .image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
}
body.spare-parts-create-page .image-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    opacity: 0.9;
    transition: all 0.2s ease;
}
body.spare-parts-create-page .image-remove-btn:hover {
    background: #c82333;
    opacity: 1;
    transform: scale(1.1);
}
body.spare-parts-create-page .image-info {
    font-size: 11px;
    color: #6c757d;
    margin-top: 5px;
    text-align: center;
}
body.spare-parts-create-page .progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
}
body.spare-parts-create-page .progress-bar {
    background: linear-gradient(45deg, #007bff, #0056b3);
    transition: width 0.3s ease;
}
body.spare-parts-create-page .form-submitting {
    opacity: 0.7;
    pointer-events: none;
}
body.spare-parts-create-page .btn-loading {
    position: relative;
    color: transparent !important;
}
body.spare-parts-create-page .btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}/* ===== spare-parts/view — scope: body.spare-parts-view-page ===== */

@media (max-width: 768px) {
}
/* ==========================================================
   UTILITY CLASSES
   ========================================================== */
/* --- Image sizing --- */
.img-cover { object-fit: cover; }
.img-contain { object-fit: contain; }
.img-h-100 { height: 100px; }
.img-h-120 { height: 120px; }
.img-w-full { width: 100%; }
.img-square-50 { width: 50px; height: 50px; }
.img-square-60 { width: 60px; height: 60px; }
.img-square-80 { width: 80px; height: 80px; }
.img-square-60-40 { width: 60px; height: 40px; }
.img-preview-sm { width: 60px; height: 40px; object-fit: contain; }
.img-thumb-400 { height: 400px; object-fit: cover; border-radius: 0.375rem; cursor: pointer; }
.img-thumb-60 { height: 60px; object-fit: cover; cursor: pointer; }
.img-thumb-cover { width: 100%; height: 200px; object-fit: contain; background-color: #f8f9fa; }
.img-modal-full { max-height: 90vh; max-width: 100%; object-fit: contain; transition: transform 0.3s ease; }
.img-card-top-fixed { height: 200px; object-fit: cover; }
.img-card-top-placeholder { height: 200px; background: #f8f9fa; }
.img-current { height: 120px; width: 100%; object-fit: cover; border-radius: 0.375rem; }
.img-guide-thumb { height: 200px; width: 100%; object-fit: scale-down; background: white; border: 1px solid #dee2e6; cursor: pointer; border-radius: 0.375rem; }

/* Width utilities */
.w-280 { width: 280px; }
.w-160 { width: 160px; }
.w-140 { width: 140px; }
.w-full { width: 100%; }
.max-w-80 { max-width: 80px; word-break: break-all; }
.max-w-full { max-width: 100%; }
.min-w-300 { min-width: 300px; }
.max-h-400 { max-height: 400px; overflow-y: auto; }
.max-h-70vh { max-height: 70vh; }
.h-auto { height: auto; }
.h-700 { height: 700px; }/* Layout */

.pos-fixed-top-right { position: fixed; top: 20px; right: 20px; z-index: 1050; min-width: 300px; }
.sticky-top-20 { position: sticky; top: 20px; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Font sizes */
.fs-3rem { font-size: 3rem; }
.fs-2-5rem { font-size: 2.5rem; }
.fs-0-9rem { font-size: 0.9rem; }
.fs-0-85rem { font-size: 0.85rem; }
.shift-badge { font-size: 14px; padding: 0.375rem 0.75rem; }

/* Cursor */
.cursor-move { cursor: move; }
.cursor-pointer { cursor: pointer; }

/* Badge utilities */
.badge-lg { font-size: 0.9rem; padding: 0.5rem 0.75rem; }
.badge-purple { background-color: #6f42c1; color: white; }
.badge-red { background-color: #dc3545; color: white; }
.badge-round-sm { width: 20px; height: 20px; padding: 0; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.badge-round-xs { width: 18px; height: 18px; padding: 0; font-size: 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }

/* Progress */
.progress-0 { width: 0%; }
.progress-5 { width: 5%; }
.progress-10 { width: 10%; }
.progress-15 { width: 15%; }
.progress-20 { width: 20%; }
.progress-25 { width: 25%; }
.progress-30 { width: 30%; }
.progress-40 { width: 40%; }
.progress-100 { width: 100%; }
.progress-h-3 { height: 3px; }
.progress-h-4 { height: 4px; }
.progress-h-10 { height: 10px; }
.progress-h-12 { height: 12px; }
.progress-h-20 { height: 20px; }

/* Table columns */
.col-w-5 { width: 5%; }
.col-w-10 { width: 10%; }
.col-w-15 { width: 15%; }
.col-w-20 { width: 20%; }
.col-w-25 { width: 25%; }
.col-w-30 { width: 30%; }
.col-w-40 { width: 40%; }
.table-min-w-1200 { min-width: 1200px; }

/* Text truncate */
.text-truncate-200 { max-width: 200px; }

/* Card */
.card-min-w-400 { min-width: 400px; }
.card-max-w-500 { max-width: 500px; }
.card-img-container-fixed { height: 200px; overflow: hidden; }
.card-img-container-fixed img { width: 100%; height: 200px; object-fit: contain; background-color: #f8f9fa; }

/* Input - sabit px genislikler kucuk sayisal alanlar icin; text girisleri
   mobilde okunabilir kalsin diye asagida 576px'de esnetiliyor. */
.input-width-60 { width: 60px; }
.input-width-80 { width: 80px; }

@media (max-width: 576px) {
    /* Tam ekran yukleniyor karti (spare-parts create/edit submit overlay) - 400px
       sabit min-genislik 320-375px telefonlarda tasiyor. */
    .card-min-w-400 {
        min-width: 0;
        width: calc(100vw - 2rem);
        max-width: 400px;
    }

    .input-width-60,
    .input-width-80 {
        width: 100%;
        min-width: 60px;
        flex: 1 1 auto;
    }
}
.form-switch-lg { width: 3rem; height: 1.5rem; cursor: pointer; }
.form-switch-label { cursor: pointer; user-select: none; }
.color-picker-sm { width: 60px; padding: 0.375rem; }

/* Opacity */
.opacity-8 { opacity: 0.8; }

/* Category */
.category-color-badge { display: inline-block; padding: 0.5rem 0.75rem; font-size: 0.85rem; border-radius: 0.375rem; color: white; }
.optgroup-indent { margin-left: 20px; }

/* Settings */
.color-swatch { width: 28px; height: 28px; border: 2px solid #dee2e6; border-radius: 4px; padding: 0; }

/* Shift report */
.shift-report-card { padding: 0.75rem; border-radius: 0.375rem; }

/* Buttons */
.btn-xs-custom { --bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .75rem; }

/* Modal - max-width:100% burada da tanimli, img-fluid class'ina bagimli kalinmiyor */
.modal-img-fit { max-width: 100%; max-height: 80vh; width: auto; }
.modal-img-contain { max-width: 100%; max-height: 80vh; }
.modal-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); opacity: 0.8; z-index: 1060; }
.modal-nav-prev { left: 20px; }
.modal-nav-next { right: 20px; }
.sp-results-list { max-height: 400px; overflow-y: auto; }

/* Video */
.video-thumb-fixed { max-width: min(300px, 100%); max-height: 200px; }

/* Avatar */
.avatar-120 { width: 120px; height: 120px; object-fit: cover; }
.avatar-120-lg { width: 120px; height: 120px; font-size: 2.5rem; display: flex; align-items: center; justify-content: center; }

/* Icon */
.icon-fixed { width: 20px; text-align: center; }
.cf-swatch-sm { width: 20px; height: 20px; border-radius: 4px; }
.cf-swatch-lg { width: 30px; height: 20px; border-radius: 4px; border: 1px solid #dee2e6; }

/* =================================
   DASHBOARD FOOTER
   ================================= */

.dashboard-footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    margin-top: auto;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 100%;
}

.footer-left {
    color: #6b7280;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.footer-left i {
    color: var(--success-color);
}

.footer-right {
    color: #9ca3af;
    font-size: 0.75rem;
}

.footer-right strong {
    color: #6b7280;
    font-weight: 600;
}

/* Dashboard Footer Responsive */
@media (max-width: 768px) {
    .dashboard-footer {
        padding: 0.75rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }

    .footer-left {
        font-size: 0.75rem;
    }

    .footer-right {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .dashboard-footer {
        padding: 0.625rem 0.75rem;
    }

    .footer-left,
    .footer-right {
        font-size: 0.6875rem;
    }
}

/* =================================
   TOPBAR WIDGETS — dil/isletme secici,
   hizli eylemler, aktivite listesi, RTL
   (header.php inline <style> blogundan tasindi)
   ================================= */

.nav-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.nav-link[data-bs-toggle="collapse"] {
    cursor: pointer !important;
    pointer-events: auto !important;
}

.nav-link[data-bs-toggle="collapse"]:hover {
    background-color: #f9fafb !important;
}

.company-info {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.company-info strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: -0.025em;
}

.company-switcher .btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.company-switcher .btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.user-dropdown .dropdown-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.card-header h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-card:hover::before {
    width: 6px;
}

/* Renk gostergesi utility — 3 sayfada ortak kullaniliyor
   (breakdowns/index, reports/spare-parts-usage-history, troubleshooting-guides/index).
   .stats-card ile birlikte kullanildiginda ustteki 4px cubugun rengini,
   duz .card uzerinde ise sol kenarligi belirler. */
.border-left-primary { border-left: 4px solid var(--primary-color); }
.border-left-info    { border-left: 4px solid var(--info-color); }
.border-left-success { border-left: 4px solid var(--success-color); }
.border-left-warning { border-left: 4px solid var(--warning-color); }
.border-left-danger  { border-left: 4px solid var(--danger-color); }

.stats-card.border-left-primary::before {
    background: var(--primary-color);
}

.stats-card.border-left-success::before {
    background: var(--success-color);
}

.stats-card.border-left-info::before {
    background: var(--info-color);
}

.stats-card.border-left-warning::before {
    background: var(--warning-color);
}

.stats-card.border-left-danger::before {
    background: var(--danger-color);
}

.company-switcher .dropdown-menu {
    font-size: 0.75rem; /* 12px - much smaller */
    min-width: 250px;
    max-height: 70vh;
    overflow-y: auto;
}

.company-switcher .dropdown-header {
    font-size: 0.65rem; /* 10.4px for header */
    font-weight: 600;
}

.company-switcher .company-option strong {
    font-size: 0.75rem; /* 12px for company names */
}

.company-switcher .company-option small {
    font-size: 0.65rem; /* 10.4px for descriptions */
}

.language-switcher .btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-switcher .btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-switcher .btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.language-switcher .dropdown-menu {
    font-size: 0.875rem;
    border-radius: 8px;
    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 #e5e7eb;
}

.language-switcher .dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.language-switcher .language-option {
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.language-switcher .language-option:hover {
    background-color: #f9fafb;
    color: var(--primary-color);
}

.language-switcher .language-option.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    font-weight: 600;
}

.language-switcher .language-option.active::after {
    content: '✓';
    float: right;
    color: var(--success-color);
}
