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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
}

.capçalera {
    background: #2c3e50;
    color: white;
    padding: 16px 20px;
    text-align: center;
}

.capçalera { display: flex; align-items: center; justify-content: center; gap: 8px; }
.capçalera h1 { font-size: 20px; }
.estat-connexio { font-size: 14px; opacity: 0.9; }

.pantalla {
    display: none;
    flex: 1;
    padding: 20px;
    padding-bottom: 80px;
}

.pantalla.activa { display: block; }

.boto-gran {
    background: #3498db;
    color: white;
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
    active: background: #2980b9;
}

.boto-gran:active { background: #2980b9; }

.boto-gran .icona { font-size: 48px; display: block; margin-bottom: 12px; }
.boto-gran .text-boto { font-size: 20px; font-weight: bold; display: block; }
.boto-gran .sub-text { font-size: 13px; opacity: 0.8; display: block; margin-top: 6px; }

.cua h3 { font-size: 16px; color: #555; margin-bottom: 12px; }

.item-cua {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.item-cua img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.item-cua .nom { flex: 1; font-size: 13px; color: #333; word-break: break-all; }
.item-cua .estat { font-size: 20px; }

.btn-principal {
    width: 100%;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 16px;
}

.btn-principal:active { background: #229954; }
.btn-principal:disabled { background: #95a5a6; }

.nav-inferior {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    border-top: 1px solid #dee2e6;
    display: flex;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 12px;
    cursor: pointer;
}

.nav-btn span:first-child { font-size: 22px; }
.nav-btn.actiu { color: #3498db; font-weight: bold; }

/* Pantalla enviades */
.item-enviada {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.item-enviada img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.item-enviada .info { flex: 1; }
.item-enviada .info .nom { font-size: 13px; color: #333; word-break: break-all; }
.item-enviada .info .data { font-size: 11px; color: #888; margin-top: 2px; }

.btn-esborrar {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
}

.subtitol { color: #888; font-size: 13px; margin-bottom: 16px; }

h2 { font-size: 18px; margin-bottom: 6px; }

.missatge-buit {
    text-align: center;
    color: #aaa;
    padding: 40px 20px;
    font-size: 15px;
}

.avis-pendent {
    background: #fff3cd;
    border-bottom: 1px solid #ffc107;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #856404;
}

.avis-pendent button {
    background: #e67e22;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.cap-pantalla {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cap-pantalla h2 { margin: 0; }

.btn-enviar-tots {
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

.item-pendent {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.item-pendent img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.item-pendent .info { flex: 1; }
.item-pendent .info .nom  { font-size: 13px; color: #333; word-break: break-all; }
.item-pendent .info .data { font-size: 11px; color: #e67e22; margin-top: 2px; }

.missatge-flash {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 2px 7px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 6px;
    vertical-align: middle;
}
