/* ==========================================================================
   SISTEMA DE DISEÑO DINÁMICO POR EMPRENDIMIENTO - ALTURAS QR PRO
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* PALETA 1: SEGURIDAD INDUSTRIAL / TRABAJO EN ALTURAS (AMARILLO ALTA VISIBILIDAD) */
:root, [data-theme="safety"] {
    --bg-dark: #090a0d;
    --bg-surface: rgba(18, 20, 26, 0.92);
    --bg-card: #13161d;
    --primary: #eab308;
    --primary-glow: rgba(234, 179, 8, 0.35);
    --accent: #fde047;
    --text-main: #f8fafc;
    --text-muted: #9ca3af;
    --border-color: rgba(234, 179, 8, 0.32);
}

/* PALETA 2: CONSTRUCCIÓN / METALMECÁNICA (NARANJA TÁCTICO) */
[data-theme="industrial"] {
    --bg-dark: #0e0a08;
    --bg-surface: rgba(26, 19, 15, 0.92);
    --bg-card: #1a130f;
    --primary: #f97316;
    --primary-glow: rgba(249, 115, 22, 0.35);
    --accent: #fdba74;
    --text-main: #fff7ed;
    --text-muted: #a8a29e;
    --border-color: rgba(249, 115, 22, 0.32);
}

/* PALETA 3: INGENIERÍA / TELECOMUNICACIONES (CIAN ELÉCTRICO) */
[data-theme="tech"] {
    --bg-dark: #070b14;
    --bg-surface: rgba(15, 23, 42, 0.9);
    --bg-card: #0f172a;
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.35);
    --accent: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(56, 189, 248, 0.28);
}

/* PALETA 4: FORESTAL / PODA EN ALTURA (ESMERALDA) */
[data-theme="eco"] {
    --bg-dark: #07110a;
    --bg-surface: rgba(14, 28, 18, 0.92);
    --bg-card: #0e1d12;
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.35);
    --accent: #6ee7b7;
    --text-main: #f0fdf4;
    --text-muted: #9ca3af;
    --border-color: rgba(16, 185, 129, 0.3);
}

/* PALETA 5: CORPORATIVO VIP (DORADO Y NEGRO) */
[data-theme="luxury"] {
    --bg-dark: #0a0908;
    --bg-surface: rgba(24, 21, 18, 0.92);
    --bg-card: #161310;
    --primary: #d4af37;
    --primary-glow: rgba(212, 175, 55, 0.35);
    --accent: #f3e5ab;
    --text-main: #ffffff;
    --text-muted: #bdb3a3;
    --border-color: rgba(212, 175, 55, 0.3);
}

body {
    background-color: var(--bg-dark);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        radial-gradient(circle at 12% 10%, var(--primary-glow), transparent 42%);
    background-size: 36px 36px, 36px 36px, 100% 100%;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.4s ease;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

.hidden { display: none !important; }

/* ==========================================================================
   NOTIFICACIÓN FLOTANTE
   ========================================================================== */
.project-toast {
    position: fixed;
    top: 78px;
    right: 20px;
    z-index: 4000;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-left: 5px solid var(--primary);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 20px var(--primary-glow);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 370px;
    width: calc(100% - 40px);
    animation: slideInToast 0.35s ease-out;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.toast-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.toast-body strong {
    font-size: 0.9rem;
    color: var(--accent);
}

.toast-body span {
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.35;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.35rem;
    cursor: pointer;
    line-height: 1;
}

@keyframes slideInToast {
    from { transform: translateX(115%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--border-color);
    padding: 12px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-shield {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 0 16px var(--primary-glow);
}

.brand-main {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: 1.4px;
    color: var(--text-main);
}

.brand-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 600;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 7px 12px;
    border-radius: 8px;
}

.theme-switcher i { color: var(--primary); }

.theme-switcher select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

.theme-switcher select option {
    background: #111;
    color: #fff;
}

.btn-nav-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.84rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 0 16px var(--primary-glow);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-nav-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn-nav-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: var(--accent);
    border: 1px solid var(--primary);
    padding: 9px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.83rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.2s ease;
}

.btn-nav-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-nav-admin {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-nav-admin.unlocked {
    border-color: #22c55e;
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    cursor: default;
}

.btn-nav-logout {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    border: 1px solid #ef4444;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-nav-logout:hover {
    background: #dc2626;
    color: #ffffff;
}

/* ==========================================================================
   CABECERA Y ESTADÍSTICAS
   ========================================================================== */
.main-wrapper { flex: 1; padding: 30px 0 60px; }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 26px;
}

.system-badge {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--primary);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.header-info h1 {
    font-size: clamp(1.55rem, 3.4vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 6px;
}

.header-info p {
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 630px;
    line-height: 1.45;
}

.stats-cards {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary);
    padding: 14px 20px;
    border-radius: 12px;
    min-width: 125px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.stat-label {
    display: block;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35rem;
    color: var(--text-main);
}

.text-accent { color: var(--primary); }
.text-success { color: #22c55e; }

/* ==========================================================================
   BARRA DE BÚSQUEDA Y FILTROS
   ========================================================================== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 26px;
    background: var(--bg-card);
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.search-box {
    flex: 1;
    min-width: 260px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-box i { color: var(--primary); }

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
}

.status-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.79rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.active, .filter-chip:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* ==========================================================================
   GRILLA DE TARJETAS DE EQUIPO EN ALTURAS
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
    gap: 22px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6), 0 0 18px var(--primary-glow);
    border-color: var(--primary);
}

.card-thumb {
    width: 100%;
    height: 165px;
    background: linear-gradient(135deg, #07090e 0%, #141923 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-thumb-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.card-thumb-placeholder i {
    font-size: 2.4rem;
    color: var(--primary);
    opacity: 0.75;
}

.qr-badge-float {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid var(--primary);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
}

.code-badge-float {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
}

.status-badge-float {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-sin-iniciar { background: #334155; color: #f8fafc; }
.status-en-proceso { background: var(--primary); color: #000; }
.status-finalizado { background: #16a34a; color: #ffffff; }

.card-body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-operario-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}

.card-time-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 7px 10px;
    border-radius: 6px;
}

.card-time-row span strong {
    color: var(--text-main);
}

.card-desc {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-footer-btn {
    margin-top: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.81rem;
    font-weight: 700;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.project-card:hover .card-footer-btn {
    background: var(--primary);
    color: #000;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 12px;
}

/* ==========================================================================
   MODALES Y FORMULARIOS
   ========================================================================== */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 12px;
}

.modal-backdrop.active { display: flex; }

#authModal { z-index: 3600 !important; }
#operariosModal { z-index: 3200 !important; }

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 16px;
    width: 100%;
    max-width: 650px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.modal-sm { max-width: 400px; padding: 24px; }
.modal-md { max-width: 560px; }
.modal-detail { max-width: 690px; }

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-sm .modal-header { padding: 0 0 14px 0; }

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.7rem;
    cursor: pointer;
}

.modal-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 14px 0;
}

#projectForm {
    padding: 20px 22px;
    overflow-y: auto;
}

.form-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.flex-1 { flex: 1; min-width: 150px; }
.flex-2 { flex: 2; min-width: 230px; }

.form-group {
    margin-bottom: 15px;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 0.81rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 13px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-group select option { background: #111; color: #fff; }

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn select {
    flex: 1;
}

.btn-inline-add {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--primary);
    color: var(--accent);
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.btn-inline-add:hover {
    background: var(--primary);
    color: #000;
}

.field-hint {
    display: block;
    font-size: 0.71rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.image-preview-box img {
    max-height: 110px;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid var(--primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.w-100 { width: 100%; }

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* ==========================================================================
   GESTIÓN DE LISTA DE OPERARIOS
   ========================================================================== */
.operarios-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.operario-add-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.35);
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.operarios-list-wrapper h4 {
    font-size: 0.86rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.operarios-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.operario-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
    border-radius: 8px;
}

.operario-row-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-main);
}

.operario-row-info small {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.btn-del-operario {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
}

.btn-del-operario:hover {
    background: #dc2626;
    color: #fff;
}

/* ==========================================================================
   FICHA DETALLADA DE TARJETA QR
   ========================================================================== */
.detail-badge-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-pill {
    font-family: 'Orbitron', sans-serif;
    background: var(--primary);
    color: #000;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.85rem;
}

.status-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 800;
}

.detail-scroll-body {
    padding: 18px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    display: block;
}

.detail-scroll-body > * { margin-bottom: 18px; }
.detail-scroll-body > *:last-child { margin-bottom: 0; }

.detail-image-container {
    width: 100%;
    min-height: 130px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #05080f;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-image-container img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    display: block;
}

.detail-no-image {
    width: 100%;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.detail-no-image i {
    font-size: 1.8rem;
    color: var(--primary);
    opacity: 0.75;
}

.detail-info-block h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

/* GRID DE ESPECIFICACIONES DE TARJETA */
.card-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.spec-item {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 11px 14px;
}

.spec-full {
    grid-column: 1 / -1;
}

.spec-label {
    display: block;
    font-size: 0.74rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px;
}

.spec-val {
    font-size: 0.96rem;
    color: var(--text-main);
    font-weight: 800;
}

/* INDICADOR DE ESTATUS CON DESTELLO */
.status-display-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 11px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 14px;
}

.status-display-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
}

.status-display-label i { color: var(--primary); }

.status-glow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
}

.status-glow-badge.status-sin-iniciar {
    background: #334155;
    color: #f8fafc;
    border: 1px solid #94a3b8;
}

.status-glow-badge.status-en-proceso {
    background: var(--primary);
    color: #000000;
    border: 1px solid var(--accent);
    animation: flashPrimary 1.7s infinite ease-in-out;
}

.status-glow-badge.status-finalizado {
    background: #16a34a;
    color: #ffffff;
    border: 1px solid #86efac;
}

@keyframes flashPrimary {
    0%, 100% { box-shadow: 0 0 6px var(--primary-glow); }
    50% { box-shadow: 0 0 22px var(--primary); }
}

.detail-description-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-description-box h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.detail-description-box p {
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* GENERADOR DE CÓDIGO QR REUTILIZABLE */
.qr-card-generator {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--primary);
    padding: 16px;
    border-radius: 12px;
    flex-wrap: wrap;
}

.qr-visual-box {
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-instructions { flex: 1; min-width: 200px; }
.qr-instructions h4 { font-size: 0.95rem; color: var(--accent); margin-bottom: 4px; }
.qr-instructions p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.4; }

.qr-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-outline-sm {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-outline-sm:hover {
    background: var(--primary);
    color: #000;
}

/* PANEL DE EXPORTACIÓN Y COMPARTIR */
.share-export-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 12px;
}

.share-panel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.share-panel-top h4 {
    font-size: 0.88rem;
    color: var(--accent);
    margin: 0;
}

.share-auth-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lock-indicator {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #fbbf24;
}

.lock-indicator.unlocked {
    background: rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
    color: #4ade80;
}

.btn-mini-logout {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.share-grid-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
}

.btn-share {
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.btn-share:hover { transform: translateY(-2px); opacity: 0.92; }

.btn-ws { background: #25d366; color: #000; }
.btn-ws-dark { background: #128c7e; }
.btn-mail { background: #2563eb; }
.btn-pdf { background: #dc2626; }

.detail-footer-actions {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.btn-action-edit {
    flex: 1;
    padding: 11px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.btn-action-delete {
    flex: 1;
    padding: 11px;
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid #ef4444;
    color: #fca5a5;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.btn-action-delete:hover {
    background: #dc2626;
    color: #fff;
}

.app-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.app-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 640px) {
    .navbar { padding: 10px 14px; }
    .detail-footer-actions { flex-direction: column; }
    .card-specs-grid { grid-template-columns: 1fr; }
}