/* ÖzsuTeknik Panel - Custom Styles (Bootstrap 5.3 Override) */

:root {
    --sidebar-width: 270px;
    --sidebar-bg: linear-gradient(180deg, #0f1023 0%, #1a1b3a 50%, #12132b 100%);
    --sidebar-surface: rgba(255, 255, 255, 0.04);
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active-bg: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --sidebar-text: rgba(255, 255, 255, 0.55);
    --sidebar-text-hover: rgba(255, 255, 255, 0.85);
    --sidebar-text-active: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.06);
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    --body-bg: #f0f2f5;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--sidebar-border);
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

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

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 20px;
    text-decoration: none;
    position: relative;
}

.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.sidebar-brand-text small {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--sidebar-text);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 1px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 16px 16px 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
    transform: translateX(2px);
}

.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-text-active);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #fff;
    border-radius: 0 3px 3px 0;
}

.sidebar-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.sidebar-link:hover i {
    transform: scale(1.1);
}

.sidebar-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
.sidebar-footer {
    padding: 12px 12px 16px;
    border-top: 1px solid var(--sidebar-border);
    position: relative;
}

.sidebar-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 10px;
    background: var(--sidebar-surface);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.sidebar-user-name {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
}

.sidebar-user-role {
    color: var(--sidebar-text);
    font-size: 0.7rem;
    font-weight: 400;
}

.sidebar-footer .sidebar-link {
    color: rgba(239, 68, 68, 0.7);
}

.sidebar-footer .sidebar-link:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
    padding-bottom: 70px; /* Footer alanı için yer bırakıyoruz (Desktop) */
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
        padding-bottom: 0 !important;
    }
}

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

/* ==================== MAIN FOOTER ==================== */
.main-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    width: calc(100% - var(--sidebar-width));
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 24px;
    z-index: 1010;
    transition: var(--transition);
}

.main-content.expanded .main-footer {
    width: 100% !important;
}

@media (max-width: 992px) {
    .main-footer {
        position: static !important;
        width: 100% !important;
    }
}

.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.top-navbar-logo {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    color: #1f2937;
}

/* ==================== AVATAR & CROPPER ==================== */
.sidebar-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.avatar-upload-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.avatar-preview-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: var(--transition-fast);
}

.avatar-upload-btn:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

#cropperModal {
    z-index: 2000;
}

#cropperModal .modal-body {
    max-height: 70vh;
    padding: 0;
    overflow: hidden;
}

.cropper-container-wrapper {
    width: 100%;
    height: 400px;
    background: #333;
}

.sidebar-toggle {
    color: #374151;
    text-decoration: none;
    padding: 4px 8px;
}

.page-content {
    padding: 24px;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.btn-back {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    color: #6b7280;
    background: #fff;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-back:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #c9cdd3;
}

/* ==================== CARDS ==================== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    padding: 16px 20px;
}

.card-body {
    padding: 20px;
}

/* Stats Cards */
.stat-card {
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 105px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
    min-height: 2.4rem;
    line-height: 1.2;
    display: flex;
    align-items: flex-start;
}

/* ==================== TABLE ==================== */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    color: #374151;
    font-size: 0.875rem;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background: #f8f9fb;
}

.table .actions {
    white-space: nowrap;
}

/* ==================== BUTTONS ==================== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 8px 16px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* ==================== FORMS ==================== */
.form-control,
.form-select,
.select2-container--bootstrap-5 .select2-selection {
    min-height: 42px !important;
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: var(--transition) !important;
    background-color: #fff !important;
    display: flex !important;
    align-items: center !important;
}

.form-control:focus,
.form-select:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12) !important;
    outline: none !important;
}

.form-label {
    font-weight: 600;
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

/* Select2 Specific Fixes */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding-left: 0 !important;
    color: #1f2937 !important;
    line-height: inherit !important;
}

.select2-container--bootstrap-5 .select2-selection--single {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center !important;
    background-size: 14px 10px !important;
}

.select2-dropdown {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    margin-top: 4px !important;
}

.select2-results__option {
    padding: 10px 16px !important;
    font-size: 0.875rem !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background: var(--primary-color) !important;
}

/* Premium Toggle Switch - Global Override for Bootstrap .form-switch */
.form-check.form-switch,
.form-check.form-switch-premium {
    padding-left: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 1.75rem !important;
}

.form-switch .form-check-input,
.form-switch-premium .form-check-input {
    width: 3.5em !important;
    height: 1.75em !important;
    margin-left: 0 !important;
    background-color: #e2e8f0 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-position 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    flex-shrink: 0 !important;
    float: none !important;
}

.form-switch .form-check-input:checked,
.form-switch-premium .form-check-input:checked {
    background-color: #10b981 !important;
    background-position: right center !important;
}

.form-switch .form-check-input:focus,
.form-switch-premium .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15) !important;
    border: none !important;
}

.toggle-status-label {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    transition: opacity 0.2s ease !important;
    user-select: none !important;
}

.form-check-input:not(:checked)~label .on {
    opacity: 0.3 !important;
}

.form-check-input:checked~label .off {
    opacity: 0.3 !important;
}

.form-check-input:checked~label .on {
    opacity: 1 !important;
}

.form-check-input:not(:checked)~label .off {
    opacity: 1 !important;
}



/* ==================== BADGE ==================== */
.badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* ==================== SEARCH BAR ==================== */
.search-bar {
    position: relative;
    max-width: 320px;
}

.search-bar .form-control {
    padding-left: 40px !important;
}

.search-bar .bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* ==================== LOGIN PAGE ==================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.login-card .brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .brand i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.login-card .brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 8px;
    color: #1f2937;
}

.login-card .brand p {
    color: #6b7280;
    font-size: 0.875rem;
}

/* ==================== SIGNATURE PAD ==================== */
.signature-pad-wrapper {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 8px;
    background: #fafafa;
}

.signature-pad-wrapper canvas {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    background: #fff;
    cursor: crosshair;
}

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

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3);
    }

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

@media (max-width: 576px) {
    .page-content {
        padding: 16px;
    }

    .page-header {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        /* allow wrapping by default (for listing pages) */
        justify-content: space-between;
        gap: 8px;
    }

    .page-header h1 {
        font-size: 1.1rem;
        width: 100%;
        /* default to 100% on mobile to push buttons below */
        margin-bottom: 4px;
    }

    /* Keep back button on the same line for edit/create pages */
    .page-header:has(.btn-back) {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .page-header:has(.btn-back) h1 {
        width: auto;
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
        margin-right: 0;
    }

    .stat-card .stat-value {
        font-size: 1.3rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.stat-card {
    animation: fadeIn 0.3s ease forwards;
}

/* ==================== CALENDAR ==================== */
.calendar-day {
    min-height: 100px;
    border: 1px solid #e5e7eb;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background: #f8f9fb;
}

.calendar-day.today {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary-color);
}

.calendar-event {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event.pending {
    background: #fef3c7;
    color: #92400e;
}

.calendar-event.approved {
    background: #d1fae5;
    color: #065f46;
}

.calendar-event.upcoming {
    background: #dbeafe;
    color: #1e40af;
}

/* ==================== STATUS TABS / SEGMENTED CONTROL ==================== */
.status-tabs-container {
    background: #eef2f6;
    padding: 6px;
    border-radius: 16px;
    display: inline-flex;
    gap: 4px;
    margin-bottom: 24px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: auto;
    /* Yazı kadar geniş olsun */
}

@media (max-width: 768px) {
    .status-tabs-container {
        display: flex !important;
        width: 100% !important;
        border-radius: 12px;
        padding: 4px;
        gap: 2px;
    }

    .status-tabs-container .nav-link {
        flex: 1 !important;
        padding: 8px 2px !important;
        font-size: 0.7rem !important;
        flex-direction: column !important;
        gap: 4px !important;
        text-align: center !important;
        justify-content: center !important;
        min-width: 0;
        /* overflow engellemek için */
    }

    .status-tabs-container .nav-link i {
        font-size: 1rem !important;
        margin: 0 !important;
    }
}

.status-tabs-container::-webkit-scrollbar {
    display: none;
}

.status-tabs-container .nav-link {
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-tabs-container .nav-link i {
    font-size: 1.1rem;
    color: #94a3b8;
    transition: var(--transition);
}

.status-tabs-container .nav-link:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
}

.status-tabs-container .nav-link.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.status-tabs-container .nav-link.active i {
    color: var(--primary-color);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.image-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

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

.image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ==================== PAGINATION ==================== */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: #374151;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ==================== PRINT STYLES ==================== */
@media print {

    .sidebar,
    .top-navbar,
    .d-print-none,
    .btn,
    .nav,
    .search-bar,
    .page-header div {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .page-content {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
        margin-bottom: 1.5rem !important;
        break-inside: avoid;
    }

    .card-header {
        background-color: #f8f9fa !important;
        border-bottom: 2px solid #e5e7eb !important;
        padding: 10px 15px !important;
        font-size: 1rem !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body {
        background: #fff !important;
        font-size: 9pt !important;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 10px;
    }

    .print-table th,
    .print-table td {
        border: 1px solid #e5e7eb !important;
        padding: 4px 6px !important;
        vertical-align: middle;
        font-size: 8.5pt !important;
    }

    .print-table th {
        background-color: #f8f9fa !important;
        font-weight: 600 !important;
        text-align: left;
        width: 25%;
        white-space: nowrap;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-table td {
        width: 25%;
    }

    .print-table {
        page-break-inside: avoid;
    }

    .print-section-title {
        background: #f1f5f9;
        font-weight: bold;
        padding: 5px 10px;
        border: 1px solid #e5e7eb;
        margin-top: 10px;
        font-size: 10pt;
    }

    /* Print color adjustment */
    .print-table th,
    .print-section-title,
    .bg-light {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }


    /* Hide unnecessary elements in print */
    .badge {
        display: none !important;
    }

    .text-muted {
        color: #666 !important;
    }

    .signature-pad-wrapper img {
        max-height: 80px;
    }

    .page-break {
        page-break-before: always !important;
        break-before: page !important;
    }
}

.table-bordered,
.table-bordered td,
.table-bordered th {
    border: 1px solid #000 !important;
}

.text-primary {
    color: #000 !important;
}

.bg-light {
    background-color: #f0f0f0 !important;
}

@page {
    margin: 1cm;
}
/* Hide number input spinners (Chrome, Safari, Edge, Opera) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
}

/* Hide number input spinners (Firefox) */
input[type=number] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Proposal Items Table Improvements */
#itemsTable input {
    min-width: 50px;
    padding: 0.375rem 0.5rem;
}
#itemsTable input.item-qty {
    min-width: 60px;
}
#itemsTable th {
    white-space: nowrap;
    font-size: 0.85rem;
}
#itemsTable td {
    vertical-align: middle;
}
.item-price-hint {
    line-height: 1;
    display: block;
    font-size: 0.7rem !important;
    opacity: 0.8;
}
