/* Fonts imported via shared/css/tokens.css */

/* --- Variables de Diseño (Simplificadas) --- */
/* Design tokens provided by shared/css/tokens.css */

/* --- Base --- */
/* Base layout handled by shared/css/base.css */

/* --- Títulos --- */
.module-title {
    font-size: var(--font-size-xxl);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    text-shadow: var(--glow-effect);
    background: rgba(34, 34, 34, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.module-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(34, 34, 34, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(0, 255, 0, 0.3);
    display: inline-block;
}

.subtitle-within-card {
    margin-top: calc(var(--spacing-md) * -1);
    margin-bottom: var(--spacing-lg);
}

/* --- Layout Principal --- */
#billing-screen { 
    display: flex; 
    gap: 20px; 
    max-width: 1400px; 
    margin: 20px auto; 
    padding-left: 80px; /* Compensación por el sidebar fijo */
    position: relative; 
    z-index: 10; /* Debe estar encima de #tiles */
}

.module-content { /* Contenedor principal del contenido (main) */
    flex: 1; 
    padding: var(--spacing-xl);
    position: relative;
}

/* --- Sidebar (Navegación) --- */
.sidebar {
    width: 80px;
    background-color: var(--card-bg-dark);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid rgba(0, 255, 0, 0.1);
    z-index: 1000;
}

.sidebar-btn {
    background: none; 
    border: none;
    color: var(--primary-color);
    font-size: 24px; 
    padding: 15px;
    cursor: pointer; 
    transition: all var(--transition-normal);
    width: 60px; 
    height: 60px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    position: relative; 
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.sidebar-btn.active {
    background-color: var(--hover-bg);
    color: #fff;
    box-shadow: inset 0 0 8px rgba(0, 255, 0, 0.2), 0 0 10px rgba(0, 255, 0, 0.1);
}

.sidebar-btn:hover {
    background-color: var(--hover-bg);
    transform: scale(1.05);
}

.logout-btn {
    margin-top: auto;
}

/* --- Card y Grupos de Información --- */
.card-like-container { /* Contenedor general con fondo semitransparente y blur */
    background: rgba(34, 34, 34, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 0, 0.3);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-xl);
}

.card { /* Tarjetas internas (Emisor, Receptor, Producto) */
    background-color: var(--card-bg-dark); 
    border: 1px solid rgba(0, 255, 0, 0.3); 
    border-radius: var(--border-radius-md); 
    padding: var(--spacing-lg); 
    flex: 1; 
}

.card h3 { 
    color: var(--primary-color); 
    margin-bottom: var(--spacing-sm); 
    font-size: var(--font-size-md); 
}

.info-group, .item-detail-group { /* Flexbox para Emisor/Receptor y Detalle de Item */
    display: flex; 
    gap: var(--spacing-md); 
    margin-bottom: var(--spacing-lg); 
}

/* --- Inputs Flotantes (inputBox-style) --- */
.inputBox-style {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.inputBox-style input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 255, 0, 0.5); 
    width: 100%;
    color: #fff;
    font-weight: 500;
    font-size: var(--font-size-md);
    padding: 10px 0;
    outline: none;
    height: 44px;
}

.inputBox-style i {
    position: absolute;
    left: 0;
    padding: 10px 0;
    font-style: normal;
    color: #aaa;
    transition: 0.5s;
    pointer-events: none;
    font-size: var(--font-size-md);
}

.inputBox-style input:focus ~ i,
.inputBox-style input:valid ~ i,
.inputBox-style input:not(:placeholder-shown) ~ i {
    transform: translateY(-24px);
    font-size: 0.7em;
    color: var(--primary-color) !important;
}

/* --- Inputs de Búsqueda Combinados --- */
.form-group.search-input {
    display: flex;
    gap: 0;
    margin-bottom: var(--spacing-md);
}

.form-group.search-input input {
    flex-grow: 1;
    background: var(--card-bg-dark);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-right: none;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    padding: 10px 15px;
    color: var(--text-light);
    outline: none;
    font-size: var(--font-size-md);
}

.form-group.search-input button {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    padding: 0 15px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    cursor: pointer;
    transition: background-color var(--transition-normal);
}

.form-group.search-input button:hover {
    background-color: #000000;
    color: var(--primary-color);
}

/* --- SELECTs (Estilo) --- */
.tax-inputs select, .header-data-group select, .billing-actions select {
    background: var(--card-bg-dark); 
    border: 1px solid rgba(0, 255, 0, 0.3); 
    border-radius: 4px; 
    color: #fff; 
    font-weight: 500; 
    font-size: var(--font-size-sm); 
    padding: 10px 15px;
    -webkit-appearance: none; 
    -moz-appearance: none; 
    appearance: none;
    /* Flecha SVG verde para SELECTs */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22%230f0%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.247%2011.14l3.086%203.086a.5.5%200%200%200%20.707%200l3.086-3.086a.5.5%200%200%200-.353-.854H7.6a.5.5%200%200%200-.353.854z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat; 
    background-position: right 10px center; 
    background-size: 12px;
    height: 44px;
    width: 100%;
    cursor: pointer;
}

.add-btn {
    margin-top: auto; 
}

/* --- Detalle de Producto --- */
.product-search-title {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.search-product {
    max-width: 400px;
    margin: 0 auto var(--spacing-lg) auto !important; 
}

.product-detail-card {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.image-tax-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.image-reference {
    text-align: center;
    border: 1px solid rgba(0, 255, 0, 0.2);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
}

.image-reference p {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-weight: bold;
}

.image-reference img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tax-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.tax-inputs label {
    display: block;
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    margin-bottom: 4px;
}

/* --- Tabla de Items --- */
.billing-table-container {
    margin-top: var(--spacing-lg);
}

.table-title {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
}

.table th, .table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--card-bg-dark);
}

.table th {
    background-color: var(--card-bg-dark);
    color: var(--primary-color);
    font-weight: bold;
}

.table tr:hover {
    background-color: var(--hover-bg);
}

.total-pago {
    text-align: right;
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 255, 0, 0.3);
}

/* --- Datos del Encabezado y Acciones --- */
.header-data-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.billing-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
}

.billing-actions select {
    width: 200px;
    margin-right: auto;
}

.billing-actions .btn {
    min-width: 180px;
}

/* --- Media Queries --- */
@media (max-width: 1024px) {
    .info-group, .item-detail-group {
        flex-direction: column;
    }
    .header-data-group {
        grid-template-columns: repeat(2, 1fr);
    }
    .billing-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    .billing-actions select {
        margin-right: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    #billing-screen {
        padding-left: 0;
    }
    .header-data-group {
        grid-template-columns: 1fr;
    }
    .tax-inputs {
        grid-template-columns: 1fr;
    }
}
