@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
:root {
    --primary: #00E7DF;
    --primary-dark: #07C8C1;
    --primary-darker: #006A66;
    --primary-light: #E4FAF9;
    --secondary: #0b1c3f;
    --success: #197d12;
    --success-light:#e4ffe3;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --text-color:#003835;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --deg-primary:linear-gradient(180deg,rgba(0, 231, 223, 1) 0%, rgba(7, 200, 193, 1) 100%);
    --deg-primary-h:linear-gradient(180deg,rgba(0, 231, 223, 1) 42%, rgba(7, 200, 193, 1) 100%, rgba(0, 219, 212, 1) 89%);
}

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

body {
    font-family: "Raleway", sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.5;
}

/* ============================================
   2. LAYOUT
   ============================================ */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

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

/* ============================================
   3. COMPONENTES
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 16px;
}
.card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px 24px;
    background: var(--deg-primary);
    color: var(--text-color);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1em;
}

.btn-primary:hover {
    background: var(--deg-primary-h);
}

/* ============================================
   4. UTILIDADES
   ============================================ */
.text-muted {
    color: var(--gray-600);
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 16px;
}

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

body {
    background: linear-gradient(180deg, #e0f7fa 0%, #f0fdfa 50%, #ffffff 100%);
    min-height: 100vh;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 0 16px;
    max-width: 480px;
    margin: 0 auto;
}
.header_nav{
    display: block;
    width: 100%;
    background: linear-gradient(180deg, rgba(250, 250, 250, 0.8) 20%, rgba(250, 250, 250, 0) 100%);
    display: flex;
    justify-content: space-between;
    padding: 12px 5%;
    align-items: center;
}
.header_nav > img{
    width: 52px;
}
/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.breadcrumb > a span{
    color: var(--primary-darker);
}
.breadcrumb > a:hover  span{
    text-decoration: underline;
}
.breadcrumb > span{
    color: var(--primary-darker);
}

.breadcrumb svg {
    stroke: var(--primary-darker);
}

/* Título Principal */
.main-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 24px;
    line-height: 1.2;
}

/* Card Aforo */
.aforo-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}

.aforo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}


/* Métricas */
.metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.metric-box {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 16px;
}

.metric-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-600);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-darker);
}

.metric-badge {
    background: #DAEAFA;
    color: var(--primary-darker);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Barra de Progreso */
.progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.progress-bar-bg {
    flex: 1;
    height: 10px;
    background: var(--gray-200);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 99px;
    transition: width 0.5s ease-out;
}

.progress-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    min-width: 40px;
    text-align: right;
}

/* Gráfico */
.chart-section {
    border-top: 1px solid var(--gray-200);
    padding-top: 20px;
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.chart-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 140px;
    gap: 8px;
    position: relative;
}
.chart-container:after{
    display: block;
    content: '';
    width: 100%;
    height: 1px;
    background: var(--primary-darker);
    position: absolute;
    bottom: 23px;
    left: 0;
}
.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    max-width: 36px;
    background: linear-gradient(0deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: height 0.5s ease-out;
}

.chart-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
}

/* Cuando el valor es 0, mostrar el número en gris claro */
.chart-bar-wrapper:has(.chart-value:contains("0")) .chart-value {
    color: var(--gray-600);
}

.chart-label {
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Botones de Acción */
.action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-btn:active {
    transform: scale(0.98);
}

.action-btn-primary {
    background: linear-gradient(270deg, var(--primary) 0%, var(--primary) 60%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}

.action-btn-secondary {
    background: white;
    color: var(--secondary);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--primary-dark);
}

.action-btn-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}



.action-btn span {
    flex: 1;
}

.action-btn svg:last-child {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Card Últimos Accesos */
.accesos-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.link-ver-todos {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
}

.access-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.access-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.access-item:last-child {
    border-bottom: none;
}

.access-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.access-name {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.95rem;
}

.access-company {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.time-badge {
    background: var(--primary-light);
    color: var(--primary-darker);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

/* Cerrar Sesión */
.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.logout-link:hover {
    color: var(--danger);
}

.logout-link svg {
    stroke: currentColor;
}

/* Navegación Inferior */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background:linear-gradient(90deg, rgba(240, 240, 240, .6) 0%, rgba(250, 250, 250, .8) 100%);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    padding: 12px 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
}

.bottom-nav ul{
    display: flex;
    max-width: 480px;
    width: 90%;
    justify-content: space-around;
    margin: 0 auto;
}
.bottom-nav ul li{
    list-style-type: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    gap: 4px;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--primary-dark);
}

.nav-item svg {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 8px;
}

.nav-item.active svg {
    background:linear-gradient(0deg, rgba(228, 250, 249, .3) 0%, rgba(228, 250, 250, .5) 100%);
    backdrop-filter: blur(5px);
}

/* ============================================
   SCANNER
   ============================================ */

.subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-top: -16px;
    margin-bottom: 24px;
}

.scanner-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 360px;
    margin: 0 auto 24px;
    border-radius: 20px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.qr-reader {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.qr-reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 20px;
}

/* Ocultar elementos por defecto de la librería */
.qr-reader__scan_region,
.qr-reader__dashboard {
    display: none !important;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-frame {
    position: relative;
    width: 220px;
    height: 220px;
}

.corner {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: var(--primary);
    border-style: solid;
    border-width: 0;
}

.corner-tl { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 8px; }
.corner-tr { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 8px; }
.corner-bl { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 8px; }
.corner-br { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 8px; }

.scanner-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.scanner-hint svg {
    stroke: var(--primary);
}

/* Fallback Card */
.fallback-card {
    text-align: center;
    padding: 24px 20px;
}

.fallback-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.fallback-icon svg {
    stroke: var(--primary);
}

.fallback-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.btn-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s;
}

.btn-fallback:active {
    transform: scale(0.98);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: white;
    border-radius: 20px;
    padding: 32px 24px 24px;
    max-width: 380px;
    width: 100%;
    position: relative;
    animation: modalIn 0.3s ease-out;
    text-align: center;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gray-100);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--gray-200);
}

.modal-close svg {
    stroke: var(--gray-600);
}

.modal-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-icon-circle.success { background: #d1fae5; }
.modal-icon-circle.warning { background: #fef3c7; }
.modal-icon-circle.error { background: #fee2e2; }

.modal-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 20px;
}

.modal-info-grid {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 16px;
    text-align: left;
    margin-bottom: 20px;
}

.modal-info-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-600);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.modal-info-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
}

.modal-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.modal-error-text {
    background: #fee2e2;
    color: #b91c1c;
    padding: 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.btn-modal-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-modal-primary:active {
    transform: scale(0.98);
}

/* ============================================
   BUSCADOR
   ============================================ */

.search-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gray-50);
    border-radius: 12px;
    padding: 12px 16px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    background: white;
}

.search-icon {
    stroke: var(--gray-600);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--secondary);
    outline: none;
}

.search-input::placeholder {
    color: var(--gray-600);
}

.clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--gray-200);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.clear-btn:hover {
    background: var(--gray-300);
}

.clear-btn svg {
    stroke: var(--gray-600);
}

/* Contador de resultados */
.results-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 12px;
    padding: 0 4px;
}

/* Lista de resultados */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-item:active {
    transform: scale(0.98);
}

.result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.result-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
}

.result-company {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.result-company svg {
    stroke: var(--primary-dark);
}

.result-email {
    font-size: 0.8rem;
    color: var(--gray-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges de estado */
.result-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-confirmed {
    background: var(--success-light);
    color: var(--success);
}

.status-confirmed .status-dot {
    background: var(--success);
}

.status-pending {
    background: var(--gray-100);
    color: var(--gray-600);
}

.status-pending .status-dot {
    background: var(--gray-600);
}

/* Estado vacío */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 12px;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.empty-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    max-width: 280px;
}

.error-message {
    background: #fee2e2;
    color: #b91c1c;
    padding: 16px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
}

/* ============================================
   DETALLE DE INVITADO (FICHA)
   ============================================ */

.ficha-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 20px;
}
.ficha-card .main-title{
    text-align: center;
}
/* Header de estatus */
.ficha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    margin: 16px 16px 0;
    border-radius: 12px;
}

.ficha-header-confirmed {
    background: var(--success-light);
}

.ficha-header-confirmed .ficha-header-label,
.ficha-header-confirmed .ficha-header-value {
    color: var(--success);
}

.ficha-header-confirmed svg {
    stroke: var(--success);
}

.ficha-header-pending {
    background: var(--gray-100);
}

.ficha-header-pending .ficha-header-label,
.ficha-header-pending .ficha-header-value {
    color: var(--gray-600);
}

.ficha-header-pending svg {
    stroke: var(--gray-600);
}

.ficha-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ficha-header-label {
    font-size: 0.9rem;
    font-weight: 700;
}

.ficha-header-value {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Grid de campos */
.ficha-grid {
    padding: 16px 20px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ficha-field {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ficha-field-full {
    grid-column: 1 / -1;
}

.ficha-field-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-600);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ficha-field-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
    word-break: break-word;
}

.ficha-field-email {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Fila con ícono (empresa, correo) */
.ficha-field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.ficha-field-row > div:first-child {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ficha-field-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ficha-field-icon svg {
    stroke: var(--primary);
}

/* Botones de acción */
.ficha-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-ficha-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}

.btn-ficha-primary:active:not(:disabled) {
    transform: scale(0.98);
}

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

.btn-ficha-primary svg {
    stroke: white;
}

.btn-ficha-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: var(--gray-100);
    color: var(--secondary);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-ficha-secondary:active {
    background: var(--gray-200);
}

.btn-ficha-secondary svg {
    stroke: var(--secondary);
}


/* ============================================
   REGISTRO MANUAL
   ============================================ */

.registro-card {
    padding: 24px 20px;
    margin: 20px 0;
}

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gray-50);
    border-radius: 10px;
    padding: 12px 16px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.input-with-icon:focus-within {
    border-color: var(--primary);
    background: white;
}

.input-icon {
    stroke: var(--gray-600);
    flex-shrink: 0;
}

.input-with-icon input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--secondary);
    outline: none;
}

.input-with-icon input::placeholder {
    color: #BBB;
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 10px;
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 0.3px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-200);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Botones del formulario */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}

.btn-submit:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit svg {
    stroke: white;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: var(--gray-100);
    color: var(--secondary);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:active {
    background: var(--gray-200);
}

.btn-secondary svg {
    stroke: var(--secondary);
}