* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2a 100%);
    min-height: 100vh;
    padding: 16px;
    color: #e0e0e0;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.neon-card {
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(192, 192, 192, 0.2);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(192, 192, 192, 0.1), 0 0 20px rgba(192, 192, 192, 0.2);
    transition: all 0.3s ease;
}

.neon-card:hover {
    border-color: rgba(192, 192, 192, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(192, 192, 192, 0.3), 0 0 30px rgba(192, 192, 192, 0.3);
}

h1 {
    
    .registro-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-small {
    flex: 1;
    min-width: 80px;
    padding: 8px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #2a2a35;
    color: #c0c0c0;
    border: 1px solid #444;
}

.btn-small.btn-whatsapp {
    background: #25D366;
    color: white;
    border-color: #128C7E;
}

.btn-small.btn-danger {
    background: #ff4444;
    color: white;
    border-color: #cc0000;
}

.btn-small:active {
    transform: scale(0.95);
}

.grafico-container {
    padding: 20px 10px;
}

.grafico-pizza {
    width: 100%;
}

.grafico-item {
    margin-bottom: 15px;
}

.grafico-bar {
    height: 30px;
    border-radius: 15px;
    margin-bottom: 5px;
    transition: width 0.3s ease;
}

.grafico-label {
    font-size: 14px;
    color: #c0c0c0;
    text-align: left;
}

.grafico-total {
    margin-top: 20px;
    padding: 10px;
    background: #1a1a25;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: #00ffff;
}
    font-size: 28px;
    text-align: center;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f0f0f0, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

h2 {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 20px;
    margin-top: 10px;
    background: linear-gradient(135deg, #f0f0f0, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.input-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #c0c0c0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select, textarea {
    width: 100%;
    padding: 14px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #c0c0c0;
    box-shadow: 0 0 0 3px rgba(192, 192, 192, 0.2), 0 0 20px rgba(192, 192, 192, 0.3);
}

.item-card {
    background: rgba(30, 30, 40, 0.6);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #333;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-card .remove-item {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #ff4444;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 10;
}

.photo-preview {
    width: 100%;
    height: 150px;
    background: #1a1a25;
    border-radius: 12px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px dashed #444;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview.empty::before {
    content: "📸 Sem foto";
    color: #666;
    font-size: 14px;
}

.photo-btn {
    background: linear-gradient(135deg, #2a2a35, #1a1a25);
    color: #c0c0c0;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 10px;
    width: 100%;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.photo-btn:hover {
    background: #3a3a45;
    border-color: #c0c0c0;
}

.signature-area {
    margin: 20px 0;
}

.signature-area label {
    color: #00ffff;
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.signature-preview {
    background: #1a1a25;
    border: 2px dashed #444;
    border-radius: 12px;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-top: 8px;
}

.signature-preview.has-signature {
    border: 2px solid #00ff88;
    box-shadow: 0 0 15px #00ff88;
}

.signature-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.signature-preview:hover {
    border-color: #c0c0c0;
}

.signature-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0f;
    z-index: 9999;
    flex-direction: column;
    padding: 16px;
}

.signature-modal.active {
    display: flex;
}

.signature-modal h3 {
    color: #00ffff;
    text-align: center;
    font-size: 22px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #00ffff;
}

.signature-canvas-container {
    flex: 1;
    background: #1a1a25;
    border-radius: 16px;
    border: 3px solid #00ffff;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    margin-bottom: 16px;
    touch-action: none;
    width: 100%;
    height: calc(100% - 120px);
}

#signatureCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.orientation-warning {
    display: none;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1a1a25;
    border-radius: 16px;
    border: 3px solid #ffaa00;
    margin-bottom: 16px;
    padding: 20px;
    text-align: center;
    min-height: 200px;
}

.orientation-warning span {
    font-size: 48px;
    margin-bottom: 20px;
    animation: rotate 1.5s ease infinite;
}

.orientation-warning p {
    color: #ffaa00;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #ffaa00;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(90deg); }
    75% { transform: rotate(90deg); }
    100% { transform: rotate(90deg); }
}

.signature-controls {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    background: transparent;
}

.signature-controls button {
    flex: 1;
    padding: 18px 0;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.signature-controls button:active {
    transform: scale(0.95);
}

.signature-controls button.primary {
    background: #00ffff;
    color: #000;
    box-shadow: 0 0 20px #00ffff;
}

.signature-controls button.danger {
    background: #ff4444;
    color: white;
    box-shadow: 0 0 20px #ff4444;
}

.signature-controls button:last-child {
    background: #444;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-primary {
    flex: 1;
    min-width: 140px;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #2a2a35, #1a1a25);
    color: #c0c0c0;
    border: 1px solid #444;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    border-color: #c0c0c0;
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.3);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: 1px solid #25D366;
}

.btn-email {
    background: linear-gradient(135deg, #4285f4, #0f9d58);
    color: white;
    border: 1px solid #4285f4;
}

.registros-container {
    max-width: 800px;
    margin: 0 auto;
}

.registro-card {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.registro-card:hover {
    border-color: #c0c0c0;
    transform: translateX(5px);
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.2);
}

.registro-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #c0c0c0;
}

.registro-data {
    font-size: 14px;
    color: #888;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(5px);
    z-index: 1500;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1a1a25;
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    border: 1px solid #444;
    box-shadow: 0 0 40px rgba(192, 192, 192, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #333;
    border-top-color: #c0c0c0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #2a2a35;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 16px;
    color: #c0c0c0;
    text-align: center;
    z-index: 4000;
    display: none;
    animation: slideUp 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.toast.show {
    display: block;
}

@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.header-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.config-group {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(10, 10, 15, 0.5);
    border-radius: 12px;
}

.config-group h3 {
    color: #c0c0c0;
    margin-bottom: 15px;
    font-size: 16px;
}

.protocolo-detalhe {
    padding: 15px;
}

.protocolo-detalhe .info-row {
    display: flex;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.protocolo-detalhe .info-label {
    width: 120px;
    color: #c0c0c0;
    font-weight: 500;
}

.protocolo-detalhe .info-value {
    flex: 1;
    color: #fff;
}

.protocolo-detalhe .assinaturas {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.protocolo-detalhe .assinatura-box {
    flex: 1;
    text-align: center;
}

.protocolo-detalhe .assinatura-img {
    max-width: 100%;
    height: 80px;
    border: 1px solid #444;
    border-radius: 8px;
    margin-top: 5px;
}
.registro-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-small {
    flex: 1;
    min-width: 70px;
    padding: 8px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #2a2a35;
    color: #c0c0c0;
    border: 1px solid #444;
}

.btn-small.btn-whatsapp {
    background: #25D366;
    color: white;
    border-color: #128C7E;
}

.btn-small.btn-email {
    background: #4285f4;
    color: white;
    border-color: #0f9d58;
}

.btn-small.btn-danger {
    background: #ff4444;
    color: white;
    border-color: #cc0000;
}

.btn-small:active {
    transform: scale(0.95);
}

.grafico-container {
    padding: 20px 10px;
}

.grafico-pizza {
    width: 100%;
}

.grafico-item {
    margin-bottom: 15px;
}

.grafico-bar {
    height: 30px;
    border-radius: 15px;
    margin-bottom: 5px;
    transition: width 0.3s ease;
}

.grafico-label {
    font-size: 14px;
    color: #c0c0c0;
    text-align: left;
}

.grafico-total {
    margin-top: 20px;
    padding: 10px;
    background: #1a1a25;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: #00ffff;
}

textarea#configCorpo {
    width: 100%;
    padding: 12px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    resize: vertical;
}

.signature-name-input {
    width: 100%;
    padding: 15px;
    background: #1a1a25;
    margin-bottom: 10px;
}

.signature-name-input input {
    width: 100%;
    padding: 12px;
    background: #2a2a35;
    border: 1px solid #00ffff33;
    color: white;
    border-radius: 5px;
    font-size: 16px;
}

.signature-name-input input:focus {
    outline: none;
    border-color: #00ffff;
}

/* Estilos para o detalhe do protocolo */
.itens-detalhe-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 15px 0;
}

.item-detalhe-card {
    display: flex;
    background: #2a2a35;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #00ffff33;
}

.item-detalhe-info {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.item-detalhe-foto {
    width: 100px;
    height: 100px;
    margin-left: 15px;
    border-radius: 5px;
    overflow: hidden;
    background: #1a1a25;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-foto-detalhe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sem-foto {
    color: #666;
    font-size: 12px;
    text-align: center;
}

.assinaturas-container {
    display: flex;
    gap: 30px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.assinatura-box {
    flex: 1;
    min-width: 200px;
    background: #2a2a35;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #00ffff33;
}

.assinatura-titulo {
    color: #00ffff;
    font-weight: bold;
    margin-bottom: 5px;
}

.assinatura-nome {
    color: white;
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #00ffff33;
}

.assinatura-img {
    max-width: 100%;
    max-height: 60px;
    background: white;
    border-radius: 4px;
    padding: 5px;
}