:root {
    --background-color: #121212;
    --surface-color: #1E1E1E;
    --primary-text: #E0E0E0;
    --secondary-text: #A0A0A0;
    --accent-color: #4DB6AC;
    --key-background: #2C2C2C;
}
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--primary-text);
    margin: 0;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}
.app-container {
    width: 100vw;
    height: 100vh;
    max-width: 390px;
    max-height: 688px;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: auto;
    border-radius: 0 0 40px 40px;
}
.app-header {
    background-color: #F44336;
    color: white;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    padding: 15px 0;
    font-size: 1.2em;
    font-weight: 500;
    flex-shrink: 0;
}
.tool-section {
    background-color: var(--surface-color);
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
}
.footer {
    text-align: center;
    padding: 15px;
    font-size: 0.75em;
    flex-shrink: 0;
    background-color: var(--surface-color);
    border-top: 1px solid var(--key-background);
}
.footer a { color: var(--secondary-text); text-decoration: none; }

/* --- Estilos para Sistema de Facturación --- */
.factura-container { padding: 15px; }
.factura-form input { width: 100%; background-color: var(--key-background); border: 1px solid #404040; border-radius: 8px; padding: 12px; color: var(--primary-text); font-size: 1em; box-sizing: border-box; margin-bottom: 10px; }
.invoice-item { display: flex; gap: 10px; margin-bottom: 10px; }
.invoice-item .item-name { flex-grow: 1; }
.invoice-item .item-price { width: 80px; }
.invoice-item .delete-item-btn { background: #d32f2f; border: none; color: white; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 1.2em; padding: 0; }
.add-item-btn, .clear-btn, .save-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}
.add-item-btn { background-color: var(--accent-color); color: var(--background-color); }
.clear-btn { background-color: var(--key-background); color: var(--secondary-text); border: 1px solid #404040; }
.save-btn { background-color: #388E3C; color: white; }
.save-btn:disabled { background-color: var(--secondary-text); cursor: not-allowed; }

.factura-preview { background-color: #fff; color: #000; padding: 20px; margin-top: 15px; border-radius: 8px; }
.factura-preview h3 { text-align: center; margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
.factura-header { font-size: 0.9em; margin-bottom: 20px; color: #333; line-height: 1.5; }
#factura-preview-items { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid #eee; }
#factura-preview-items li { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.9em; }
.factura-totals { padding-top: 15px; font-weight: 700; }
.factura-totals .total-item { display: flex; justify-content: space-between; font-size: 1.1em; margin-bottom: 5px; }
.factura-totals .total-item:last-child { font-size: 1.3em; }

/* --- Scrollbar invisible --- */
::-webkit-scrollbar { width: 0px; background: transparent; }