﻿:root {
    --color-verde-fieka: #43ea5e;
    --color-blanco: #ffffff;
    --color-negro: #000000;
    --color-bg-header: #23272b;
    --button-bg-ingreso: var(--color-verde-fieka);
    --button-bg-salida: #e53935;

    /* Paleta de grises */
    --gris-100: #f5f5f5;
    --gris-200: #e0e0e0;
    --gris-300: #cccccc;
    --gris-400: #b3b3b3;
    --gris-500: #999999;
    --gris-600: #7f7f7f;
    --gris-700: #666666;
    --gris-800: #4d4d4d;
    --gris-900: #333333;
}

#app {
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#app .main-content {
    /*padding: 0;*/
    margin: 0;
    height: 100%;
}

.page { 
    flex: 1 1 auto;
    min-height: 0;
    background: var(--gris-200);
}

.page > main, .page > main > article {
    overflow: hidden;
    height: 100%;
}

.main-container {
	padding: 1rem;
    overflow: auto;
    height: 100%;
}

.texto-verde-fieka {
    color: var(--color-verde-fieka);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-bg-header);
    padding: 16px;
    gap: 16px;
}

.layout-topbar {
    background: var(--color-bg-header);
}

.layout-topbar .topbar-content {
    width: 100%;
    height: 100%;
    padding: 0;
    box-shadow: none;
}

.topbar-user-name {
    font-size: 1rem;
    color: var(--color-blanco);
}

.user-menu-root {
    z-index: 1000;
}

    .user-menu-root {
        color: var(--color-blanco);
    }

.user-menu-item {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
}

/*Logo*/

.logo-container .logo-img {
    height: 40px;
    width: 40px;
}

/* Responsive chips en encabezado */
.header-chips-responsive {
	display: flex;
	flex-direction: row;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}

.header-title {
    color: var(--color-blanco);
    font-size: 1.5rem;
    letter-spacing: 1px;
    display: flex; 
    gap: 0.5rem
}

.uppercase-input input {
	text-transform: uppercase;
}

 /* Barra superior minimalista */
.topbar-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 16px;
}
.topbar-left-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-logo {
    height: 32px;
    max-width: 32px;
}
.topbar-title {
    font-weight: bold;
    font-size: 1.2rem;
}
.topbar-chips {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Dashboard styles */
.dashboard-main {
    display: flex;
    gap: 1rem;
}

.dashboard-info-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-header {
    background: #23272b;
    color: #fff;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    margin-bottom: 18px;
}
.dashboard-title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}
.dashboard-header-left {
    display: flex;
    align-items: center;
}
.dashboard-header-right {
    font-size: 1rem;
    font-weight: 500;
}
.dashboard-row {
    display: flex;
    gap: 24px;
    /*margin-bottom: 18px;*/
}
.dashboard-info {
    display: flex;
    gap: 18px;
}
.dashboard-info-block {
    background: #fff;
    border-radius: 12px;
    /*box-shadow: 0 2px 8px rgba(0,0,0,0.04);*/
    padding: 18px 24px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.dashboard-info-block * {
    width: 100%;
}

.dashboard-time, .dashboard-vehiculos-count {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 8px;
}
.dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    justify-content: flex-start;
}

.dashboard-actions button {
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-blanco);
}

.dashboard-btn-ingreso {
    background: var(--button-bg-ingreso);
}

.dashboard-btn-egreso {
    background: var(--button-bg-salida);
}
.dashboard-btn-desc {
    font-size: 0.95rem;
    font-weight: 400;
    margin-top: 6px;
    color: #f5f5f5;
    display: block;
}

.dashboard-main .dashboard-actions button span svg {
    font-size: 2rem;
}

.dashboard-table-block {
    margin-top: 8px;
}

.dashboard-table-paper {
    padding: 18px 24px;
}

.dashboard-table-title {
    font-weight: bold;
    margin-bottom: 12px;
}
.dashboard-table {
    width: 100%;
    font-size: 1.1rem;
}

.dashboard-table table {
    cursor: default;
}

/* Botón de iniciar sesión estilo morado */
.login-btn {
    background: #5a4be7;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    padding: 12px 32px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(90,75,231,0.12);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-btn:hover {
    background: #4737c7;
}

/* Botón de iniciar sesión oscuro */
.login-btn-dark {
    background: #232a32;
    color: #fff;    
    border: none;
    border-radius: 10px;
    padding: 12px 32px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-btn-dark:hover {
    background: #181c20;
}

/* Chip de usuario autenticado como botón */
.user-chip-btn {
    background: #2563eb;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    padding: 10px 28px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}
.user-chip-btn:hover {
    background: #1741a6;
}
.user-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23fff" viewBox="0 0 24 24"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg>') no-repeat center center;
    background-size: 20px 20px;
}
.logout-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%232563eb" viewBox="0 0 24 24"><path d="M16 13v-2H7V8l-5 4 5 4v-3zM20 3h-8c-1.1 0-2 .9-2 2v4h2V5h8v14h-8v-4h-2v4c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>') no-repeat center center;
    background-size: 20px 20px;
}

/* Responsive */
@media (max-width: 900px) {
    .dashboard-main {
        padding: 12px 0;
    }
    .dashboard-row {
        flex-direction: column;
        gap: 12px;
    }
    .dashboard-info {
        /*flex-direction: column;
        gap: 12px;*/
    }
    .dashboard-actions {
        flex-direction: row;
        gap: 12px;
    }
}
@media (max-width: 600px) {

    .dashboard-main {
        flex-direction: column-reverse;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }
    .dashboard-title {
        font-size: 1.1rem;
    }
    .dashboard-info-block {
        min-width: 140px;
        padding: 12px;
        font-size: 0.95rem;
    }
    .dashboard-table-paper {
        padding: 12px;
    }
    .dashboard-time, .dashboard-vehiculos-count {
        font-size: 1.2rem;
    }

    .header-title {
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0;
    }

	.header-chips-responsive {
		flex-direction: column !important;
		align-items: center;
		gap: 12px;
	}

    .dashboard-main .dashboard-actions button span svg {
        font-size: 1.5rem;
    }

    .dashboard-actions button {
        font-size: 0.9rem;
    }

}

/* Ocultar recibo de imprimir solo visualmente en pantalla */
#reciboImprimir {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 58mm !important;
  min-width: 58mm !important;
  max-width: 58mm !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  /* El recibo está fuera del viewport pero NO oculto con display:none */
}

/* mostrar recibo en impresión */
@media print {
  body > *:not(#reciboImprimir) {
    display: none !important;
  }
  #reciboImprimir {
    display: block !important;
    position: static !important;
    left: 0 !important;
    top: 0 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
}

/* Tamaño de página para impresora de recibos 58mm */
@media print {
  @page {
    size: 58mm auto;
    margin: 0;
  }
  #reciboImprimir, body, html {
    width: 58mm !important;
    min-width: 58mm !important;
    max-width: 58mm !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
}

.recibo-visible {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999 !important;
  background: #fff !important;
  width: 58mm !important;
  min-width: 58mm !important;
  max-width: 58mm !important;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}