:root {
    --bg-color: #0b0d13;
    --card-bg: rgba(21, 25, 36, 0.82);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #9ea8b6;
    --accent: #FF6600;
    --accent-hover: #FF7711;
    --accent-gradient: linear-gradient(135deg, #FF6600 0%, #FF4500 100%);
    --accent-glow: rgba(255, 102, 0, 0.35);
    --input-bg: rgba(13, 16, 23, 0.75);
    --input-border: rgba(255, 255, 255, 0.12);
    --success: #10b981;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
    width: 100%;
    min-height: 100vh;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 102, 0, 0.12) 0px, transparent 45%),
        radial-gradient(at 100% 100%, rgba(255, 69, 0, 0.06) 0px, transparent 45%);
    color: var(--text-primary);
}

.page-wrapper {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
    min-width: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-left: 0.25rem;
}

.form-group input, .form-group select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.25);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-actions {
    margin-top: 1rem;
}

.btn-primary {
    width: 100%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px 0 rgba(255, 102, 0, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF7711 0%, #FF5500 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(255, 102, 0, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.loader {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

.hidden {
    display: none !important;
}

.feedback-message {
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.feedback-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.feedback-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }
}

/* --- NOVO: LAYOUT PRINCIPAL (SIDEBAR + CONTEÚDO) --- */

.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: rgba(11, 13, 19, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-brand img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 45;
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.sidebar {
    width: 260px;
    background: rgba(12, 14, 20, 0.96);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 50;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand img {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(255, 102, 0, 0.2));
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.sidebar-brand a:hover img,
.mobile-brand:hover img {
    transform: scale(1.03);
    filter: drop-shadow(0 6px 16px rgba(255, 102, 0, 0.35));
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(255, 102, 0, 0.12);
    color: var(--accent);
    border-left-color: var(--accent);
}

.main-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    padding: 2rem 2rem;
    overflow-y: auto;
    overflow-x: auto;
}

/* Secondary Action Button & Utilities */
.btn-secondary {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: rgba(255, 102, 0, 0.12);
}

.cell-wrap {
    max-width: 250px;
    word-break: break-word;
    white-space: normal;
}

.nowrap {
    white-space: nowrap;
}

/* Interactive Stat Card */
.stat-card.interactive {
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card.interactive:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.4);
}

/* Responsive Split Grid */
.contract-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1.2fr);
    gap: 1.5rem;
    width: 100%;
}

.contract-details-grid > * {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 1200px) {
    .contract-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Contract Cards Grid (2 cards per line, 2 lines total) */
.contract-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .contract-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* --- NOVO: COMPONENTES GERAIS --- */

.page-header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    width: 100%;
}

.dashboard-grid > * {
    min-width: 0;
    max-width: 100%;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    backdrop-filter: blur(16px);
}

.stat-title {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Dashboard Split Grid */
.dashboard-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.05fr);
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 2rem;
}

.dashboard-split-grid > * {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 1100px) {
    .dashboard-split-grid {
        grid-template-columns: 1fr;
    }
}

/* Fleet Allocation Bar */
.fleet-bar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    backdrop-filter: blur(16px);
}

.fleet-bar-track {
    display: flex;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.75rem 0;
}

.fleet-bar-segment {
    height: 100%;
    transition: width 0.4s ease;
}

.fleet-bar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.fleet-bar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.fleet-bar-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* Maintenance List */
.maintenance-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(245, 158, 11, 0.2);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.maintenance-item:hover {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.35);
}

.maintenance-item:last-child {
    margin-bottom: 0;
}

.maintenance-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.maintenance-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Mobile & Desktop Inspections View */
.mobile-inspections-view {
    display: none;
    flex-direction: column;
    gap: 0.65rem;
}

.desktop-inspections-view {
    display: block;
}

.inspection-mobile-card {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.inspection-mobile-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
}

@media (max-width: 640px) {
    .stat-card {
        padding: 1.15rem !important;
        border-radius: 16px;
    }
    
    .fleet-bar-card {
        padding: 1.15rem;
        border-radius: 16px;
    }

    .maintenance-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        padding: 0.9rem;
    }

    .maintenance-item-info {
        width: 100%;
    }

    .maintenance-item-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .maintenance-item-actions button,
    .maintenance-item-actions a {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 9px 12px !important;
        font-size: 0.85rem !important;
    }

    .desktop-inspections-view {
        display: none !important;
    }

    .mobile-inspections-view {
        display: flex !important;
    }
}


/* Tabelas Premium */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(16px);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges de Status */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

/* --- BOTTOM NAVIGATION BAR (MOBILE ONLY) --- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(11, 13, 19, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    z-index: 90;
    padding: 0.4rem 0.25rem calc(0.45rem + env(safe-area-inset-bottom, 0px)) 0.25rem;
    justify-content: space-around;
    align-items: center;
    box-sizing: border-box;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 0.35rem 0.15rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:active {
    transform: scale(0.92);
}

.bottom-nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

.bottom-nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.2s ease;
}

/* Active State */
.bottom-nav-item.active {
    color: var(--accent);
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: translateY(-1px);
    stroke: var(--accent);
    filter: drop-shadow(0 2px 6px rgba(255, 102, 0, 0.45));
}

.bottom-nav-item.active .bottom-nav-label {
    color: var(--accent);
    font-weight: 700;
}

/* Active top indicator pill */
.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -0.4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 999px;
    box-shadow: 0 1px 6px var(--accent-glow);
}

@media print {
    .bottom-nav, .mobile-header, .sidebar {
        display: none !important;
    }
}

/* --- NOVO: RESPONSIVIDADE MOBILE --- */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .mobile-header {
        display: flex;
    }

    .bottom-nav {
        display: flex !important;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    .main-content {
        padding: 1.5rem 1rem;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .glass-card {
        padding: 1.5rem;
    }

    table th, table td {
        padding: 1rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* --- VISTORIAS & TABELAS ENHANCEMENTS --- */
.badge-plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    word-break: keep-all !important;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f1f5f9;
    vertical-align: middle;
}

td:has(.badge-plate),
th.col-plate,
td.col-plate {
    white-space: nowrap !important;
}

.link-contrato {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.link-contrato:hover {
    color: #60a5fa;
    text-decoration: underline;
    transform: translateX(2px);
}

.btn-action {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Modal Moderno */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
    transform: scale(0.95) translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.modal-body {
    padding: 1.5rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 1rem;
}

.photo-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.5);
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-item .photo-zoom-icon {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    backdrop-filter: blur(4px);
}

.photo-badge-idx {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 3;
}

.photo-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.photo-remove-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Sortable Table Columns */
th.sortable-th {
    cursor: pointer !important;
    user-select: none !important;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

th.sortable-th:hover {
    color: var(--accent) !important;
    background: rgba(255, 102, 0, 0.08) !important;
}

.sort-indicator {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.75rem;
    opacity: 0.35;
    transition: opacity 0.15s ease, color 0.15s ease;
    vertical-align: middle;
}

th.sortable-th:hover .sort-indicator {
    opacity: 0.8;
}

th.sortable-th.sorted-asc .sort-indicator,
th.sortable-th.sorted-desc .sort-indicator {
    opacity: 1 !important;
    color: var(--accent) !important;
    font-weight: bold;
}


