/* Estilo CSS customizado - Diário de Obra SaaS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #f1f5f9;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent: #8b5cf6;
    --border: #e2e8f0;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout Estrutural */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-logo {
    padding: 24px 20px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-logo span {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    -webkit-text-fill-color: initial;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-grow: 1;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    color: #94a3b8;
}

.sidebar-item.active a, .sidebar-item a:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-light);
}

.sidebar-item.active a {
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding-left: 12px;
}

/* Sidebar Dropdown (details/summary) */
.sidebar-item-dropdown {
    display: flex;
    flex-direction: column;
}

.sidebar-details {
    width: 100%;
}

.sidebar-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    color: #94a3b8;
    cursor: pointer;
    list-style: none; /* Remove default details marker */
}

/* Remove default marker on Chrome/Safari/Firefox summary */
.sidebar-dropdown-toggle::-webkit-details-marker {
    display: none;
}

.sidebar-dropdown-toggle:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-light);
}

.sidebar-details[open] .sidebar-dropdown-toggle {
    color: var(--text-light);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    color: #64748b;
}

.sidebar-details[open] .dropdown-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    list-style: none;
    padding-left: 0;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
    margin-left: 24px;
}

.sidebar-subitem a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    color: #94a3b8;
}

.sidebar-subitem.active a, .sidebar-subitem a:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-light);
}

.sidebar-subitem.active a {
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding-left: 13px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: #64748b;
}

/* Área de Conteúdo Principal */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Topbar */
.topbar {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.topbar-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.logout-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    background-color: var(--danger-light);
    color: var(--danger);
    font-weight: 600;
    transition: all 0.2s;
}

.logout-btn:hover {
    background-color: var(--danger);
    color: #fff;
}

/* Workspace principal */
.workspace {
    padding: 30px;
    flex-grow: 1;
}

/* Alertas/Flash Messages */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-light);
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-error {
    background-color: var(--danger-light);
    border-color: #fca5a5;
    color: #991b1b;
}

/* Grid & Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card-stat {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 5px;
}

.stat-icon {
    font-size: 2.2rem;
    color: var(--primary);
    opacity: 0.15;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 25px;
    margin-bottom: 30px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Tabelas */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.92rem;
}

.table th {
    background-color: #f1f5f9;
    padding: 12px 16px;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid var(--border);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }
.badge-primary { background-color: #e0e7ff; color: var(--primary); }

/* Status Badges com Círculo Indicador */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-status.success { background-color: var(--success-light); color: var(--success); }
.badge-status.warning { background-color: var(--warning-light); color: var(--warning); }
.badge-status.danger { background-color: var(--danger-light); color: var(--danger); }
.badge-status.primary { background-color: #e0e7ff; color: var(--primary); }

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}
.status-dot.success { background-color: var(--success); }
.status-dot.warning { background-color: var(--warning); }
.status-dot.danger { background-color: var(--danger); }
.status-dot.primary { background-color: var(--primary); }


/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-group {
    display: flex;
    gap: 8px;
}

.header-form-diario {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-group-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.92rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: #fff;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.92rem;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Layout das Abas do Diário de Obra */
.tabs-navigation {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
    overflow-x: auto;
    gap: 5px;
}

.tab-btn {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.92rem;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
    background-color: #f1f5f9;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

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

/* Visualizadores e Imagens */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.photo-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    aspect-ratio: 1;
}

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

.photo-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.photo-delete:hover {
    background-color: var(--danger);
}

/* Estilo para Telas de Login */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, #1e1b4b 0%, #0f172a 90%);
    padding: 20px;
}

.auth-card {
    background-color: #ffffff;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-sidebar);
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Erros de Validação */
.form-control.is-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Print Styling */
@page {
    size: A4;
    margin: 12mm 12mm 12mm 12mm;
}

@media print {
    body {
        background-color: #fff !important;
        color: #000 !important;
        font-size: 9.5pt !important;
        line-height: 1.25 !important;
        margin: 0 !important;
        padding: 15mm !important; /* Forçar margem de 15mm como padding do body */
        box-sizing: border-box !important;
    }
    
    /* Ocultar elementos desnecessários na impressão */
    .sidebar, .topbar, .btn, .tabs-navigation, .alert, .photo-delete, 
    .btn-group, .btn-group-responsive, #lightbox-gallery, .web-only {
        display: none !important;
    }
    
    /* Ajustes estruturais de layout */
    .app-container {
        display: block !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .workspace {
        margin: 0 !important;
        padding: 0 !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Cabeçalho da impressão física */
    .print-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2px solid #000;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }
    .print-header h1 {
        font-size: 1.3rem !important;
        margin: 0 !important;
    }
    .print-header p {
        font-size: 0.8rem !important;
        margin: 3px 0 0 0 !important;
    }
    .print-header h2 {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }
    
    /* Grid de dados gerais super compacto */
    .card > div[style*="background-color: #f1f5f9"] {
        background-color: #f8fafc !important;
        padding: 10px !important;
        margin-bottom: 15px !important;
        gap: 10px !important;
        border: 1px solid #e2e8f0 !important;
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .card > div[style*="background-color: #f1f5f9"] > div {
        margin-bottom: 0 !important;
    }
    .card > div[style*="background-color: #f1f5f9"] span {
        font-size: 0.7rem !important;
    }
    .card > div[style*="background-color: #f1f5f9"] div {
        font-size: 0.9rem !important;
    }
    
    /* Seções */
    h3 {
        font-size: 0.95rem !important;
        margin-top: 15px !important;
        margin-bottom: 6px !important;
        border-bottom-width: 1px !important;
        padding-bottom: 3px !important;
    }
    
    /* Comentários do Engenheiro */
    div[style*="border-left: 4px solid var(--primary)"] {
        padding: 8px 12px !important;
        font-size: 8.5pt !important;
        border-left: 3px solid #0f172a !important;
        background-color: #f8fafc !important;
        margin-bottom: 15px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Tabelas compactadas */
    .table {
        width: 100% !important;
        margin-bottom: 12px !important;
    }
    .table th {
        background-color: #f1f5f9 !important;
        padding: 4px 6px !important;
        font-size: 8.5pt !important;
        font-weight: 700 !important;
        border-bottom: 1px solid #94a3b8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .table td {
        padding: 4px 6px !important;
        font-size: 8.5pt !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
    .table tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    /* Galeria Fotográfica compacta para caber em uma página */
    .photo-report-container {
        page-break-before: auto !important;
        break-before: auto !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .photo-gallery-print-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .photo-gallery-print-grid > div {
        border: 1px solid #cbd5e1 !important;
        border-radius: 6px !important;
        background-color: #fff !important;
        box-shadow: none !important;
        overflow: hidden !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .photo-gallery-print-grid div[style*="aspect-ratio"] {
        width: 100% !important;
        height: 260px !important;
        aspect-ratio: 1/1 !important;
    }
    .photo-gallery-print-grid img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }
    .photo-gallery-print-grid div[style*="padding: 10px"] {
        display: none !important; /* Esconder totalmente o nome do arquivo na impressão */
    }
    
    /* Bloco de assinaturas digitalizado na impressão */
    .approvals-container {
        margin-top: 25px !important;
        padding-top: 15px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .print-only {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 40px !important;
    }
    .print-only > div {
        margin-top: 10px !important;
        min-width: 180px !important;
    }
    .print-only img {
        height: 45px !important;
        object-fit: contain !important;
    }
}

/* Spinner e Animação de Carregamento */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

/* Botão Toggle da Sidebar (Oculto em Desktop) */
.sidebar-toggle {
    display: none;
}

/* Responsividade Geral */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-right: 15px;
        flex-shrink: 0;
    }
    
    .sidebar-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-main);
        border-radius: 2px;
        transition: all 0.2s ease;
    }
    
    /* Transformar em X quando ativo */
    .sidebar-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .sidebar-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .sidebar-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1100;
        transform: translateX(-100%);
        width: 280px;
        box-shadow: var(--shadow-lg);
    }

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

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        z-index: 1090;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

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

    .topbar {
        padding: 0 15px;
    }

    .workspace {
        padding: 15px;
    }

    /* Grids e formulários em coluna única no mobile */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Ajustar textos e botões */
    .topbar-title {
        font-size: 1.05rem;
    }

    .topbar-user {
        gap: 8px;
    }

    .user-info {
        display: none;
    }

    .logout-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding-bottom: 12px !important;
    }

    .header-form-diario {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .btn-group-responsive {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .btn-group-responsive .btn {
        flex-grow: 1 !important;
    }
}

/* Lightbox Gallery Style */
#lightbox-gallery {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightbox-gallery.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#lightbox-caption {
    margin-top: 15px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
    z-index: 2010;
}
.lightbox-close:hover {
    color: var(--danger);
}

/* Nav arrows */
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 30px;
    padding: 16px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    z-index: 2010;
}
.lightbox-prev:hover, .lightbox-next:hover {
    color: var(--primary);
    background-color: rgba(255, 255, 255, 0.15);
}

.lightbox-prev {
    left: 30px;
}
.lightbox-next {
    right: 30px;
}

@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 10px; right: 20px; }
}


