/* ==================== CONTADOR DE DOMICILIOS v3.0 ==================== */
/* Estilos simples, limpios y efectivos */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.brand-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 15px;
}

header h1 {
    color: #1a1a2e;
    font-size: 2rem;
    margin-bottom: 5px;
}

.subtitle {
    color: #667781;
    font-size: 0.9rem;
}

h2 {
    color: #1a1a2e;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-text {
    color: #667781;
    margin-bottom: 20px;
}

.sede-selector-wrap {
    background: #F8F9FA;
    border: 1px solid #E9EDEF;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.sede-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.sede-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #E9EDEF;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
}

.sede-select:focus {
    outline: none;
    border-color: #667eea;
}

.sede-help {
    margin-top: 8px;
    color: #667781;
    font-size: 0.85rem;
}

/* ==================== BOTONES ==================== */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #E9EDEF;
    color: #667781;
}

.btn-secondary:hover {
    background: #D7DBDD;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

.actions {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================== DOMICILIARIOS ==================== */

.domiciliario-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.emoji-input {
    width: 60px;
    padding: 12px;
    border: 2px solid #E9EDEF;
    border-radius: 10px;
    font-size: 1.5rem;
    text-align: center;
}

.emoji-input:focus {
    outline: none;
    border-color: #667eea;
}

.name-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #E9EDEF;
    border-radius: 10px;
    font-size: 1rem;
}

.name-input:focus {
    outline: none;
    border-color: #667eea;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.remove-btn:hover {
    opacity: 1;
}

/* ==================== INPUT SECTION ==================== */

.input-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.input-header h2 {
    margin-bottom: 0;
}

.sede-badge {
    margin-left: auto;
    background: #EEF2FF;
    color: #4C51BF;
    border: 1px solid #C7D2FE;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Quick Panel */
.quick-panel {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quick-panel h3 {
    margin: 0 0 15px 0;
    color: #1a1a2e;
    font-size: 1rem;
}

.fast-mode-row {
    margin-bottom: 12px;
}

.fast-mode-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #334155;
    user-select: none;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 3px solid #E9EDEF;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.quick-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.quick-btn:active {
    transform: translateY(0);
}

.quick-emoji {
    font-size: 1.5rem;
}

.quick-name {
    font-weight: 600;
    color: #1a1a2e;
}

/* Live Totals */
.live-totals {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.total-card {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.total-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.total-label {
    font-size: 0.85rem;
    color: #667781;
    margin-bottom: 5px;
}

.total-card.highlight .total-label {
    color: rgba(255, 255, 255, 0.8);
}

.total-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1a1a2e;
}

.total-card.highlight .total-value {
    color: white;
}

/* Totals Breakdown */
.totals-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.total-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.total-item:hover {
    background: #E9EDEF;
    transform: translateX(5px);
}

.total-emoji {
    font-size: 1.5rem;
}

.total-name {
    flex: 1;
    font-weight: 500;
    color: #1a1a2e;
}

.total-stats {
    font-size: 0.85rem;
    color: #667781;
}

.total-amount {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1rem;
}

/* Comandas Section */
.comandas-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.comandas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comandas-header h3 {
    margin: 0;
    color: #1a1a2e;
}

.comandas-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.comanda-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #F8F9FA;
    border-radius: 10px;
    transition: background 0.2s;
}
/* Marca de agua personal */
        .watermark {
            position: fixed;
            bottom: 8px;
            right: 12px;
            font-size: 0.7rem;
            color: #999;
            opacity: 0.5;
            pointer-events: none;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            letter-spacing: 0.5px;
            z-index: 10;
        }
.comanda-item:hover {
    background: #E9EDEF;
}

.comanda-emoji {
    font-size: 1.5rem;
}

.comanda-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.comanda-name {
    font-weight: 500;
    color: #1a1a2e;
}

.comanda-value {
    font-weight: bold;
    color: #667eea;
}

.comanda-delete {
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 1rem;
}

.comanda-delete:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #667781;
}

.empty-state p {
    margin: 5px 0;
}

/* Quick Feedback Animation */
.quick-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #667eea;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* ==================== RESULTADOS ==================== */

.result-summary {
    margin-bottom: 25px;
}

.summary-card {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.summary-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
}

.summary-item .label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.summary-item .value {
    font-size: 1.5rem;
    font-weight: bold;
}

.summary-item .highlight {
    font-size: 2rem;
}

.details-list {
    margin-top: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 10px;
    margin-bottom: 10px;
}

.detail-emoji {
    font-size: 2rem;
}

.detail-info {
    flex: 1;
}

.detail-name {
    font-weight: 600;
    color: #1a1a2e;
}

.detail-stats {
    font-size: 0.85rem;
    color: #667781;
}

.detail-total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
}

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

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* ==================== UTILIDADES ==================== */

.hidden {
    display: none !important;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 500px) {
    .app-container {
        padding: 20px;
        border-radius: 15px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .domiciliario-row {
        flex-wrap: wrap;
    }
    
    .emoji-input {
        width: 50px;
        padding: 10px;
        font-size: 1.2rem;
    }
    
    .summary-card {
        flex-direction: column;
    }
}

