
.tacs-wrapper {
    --ios-bg: #F2F2F7;
    --ios-card: #FFFFFF;
    --ios-blue: #007AFF;
    --ios-green: #34C759;
    --ios-orange: #FF9500;
    --ios-red: #FF3B30;
    --ios-text: #1C1C1E;
    --ios-text-secondary: #8E8E93;
    --ios-separator: #C6C6C8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ios-text);
    padding: 20px;
    
    /* Fundo Aquático Animado */
    background: linear-gradient(-45deg, #f0f9ff, #e0f2fe, #bae6fd, #7dd3fc);
    background-size: 400% 400%;
    animation: ondasPiscina 15s ease infinite;
    border-radius: 12px;
}

@keyframes ondasPiscina {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.tacs-wrapper .panel { background: var(--ios-card); padding: 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 24px; }
.tacs-wrapper .segmented-control { display: flex; background-color: #E3E3E8; border-radius: 8px; padding: 2px; margin-bottom: 16px; }
.tacs-wrapper .segmented-control button { flex: 1; background: transparent; border: none; padding: 10px 0; font-size: 14px; font-weight: 600; color: var(--ios-text); border-radius: 6px; cursor: pointer; transition: 0.2s; }
.tacs-wrapper .segmented-control button.active { background: var(--ios-card); box-shadow: 0 3px 8px rgba(0,0,0,0.12); color: var(--ios-blue); }
.tacs-wrapper select, .tacs-wrapper input[type="text"] { width: 100%; padding: 12px; font-size: 16px; border: 1px solid var(--ios-separator); border-radius: 8px; box-sizing: border-box; }
.tacs-wrapper table { width: 100%; border-collapse: collapse; white-space: nowrap; margin-bottom:0; background: var(--ios-card); border-radius: 12px; overflow: hidden; }
.tacs-wrapper th, .tacs-wrapper td { padding: 12px; text-align: center; border-bottom: 1px solid var(--ios-separator); }
.tacs-wrapper th { background-color: #F8F8F8; font-size: 12px; text-transform: uppercase; color: var(--ios-text-secondary); border-top:none; border-left:none; border-right:none;}
.tacs-wrapper .badge { padding: 4px 8px; border-radius: 12px; font-weight: 600; font-size: 12px; color: white; display: inline-block;}
.tacs-wrapper .bg-green { background-color: var(--ios-green); }
.tacs-wrapper .bg-yellow { background-color: var(--ios-orange); }
.tacs-wrapper .bg-red { background-color: var(--ios-red); }
.tacs-wrapper .btn-primary { width: 100%; padding: 14px; background-color: var(--ios-blue); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }
.tacs-wrapper .ocr-zone { border: 2px dashed var(--ios-blue); padding: 20px; text-align: center; border-radius: 12px; cursor: pointer; background: rgba(255,255,255,0.7); margin-bottom: 20px; transition: background 0.3s;}
.tacs-wrapper .ocr-zone:hover { background: rgba(255,255,255,0.9); }
.tacs-alert { padding: 15px; background: #fff3cd; color: #856404; border-radius: 8px; border: 1px solid #ffeeba; }
.tacs-loader { display:none; font-weight:bold; color:var(--ios-blue); text-align:center; padding:10px;}

@media screen and (max-width: 800px) {
    .tacs-wrapper table, .tacs-wrapper thead, .tacs-wrapper tbody, .tacs-wrapper th, .tacs-wrapper td, .tacs-wrapper tr { display: block; background: transparent; }
    .tacs-wrapper thead tr { display: none; }
    .tacs-wrapper tr { margin-bottom: 16px; border-radius: 12px; background-color: var(--ios-card); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
    .tacs-wrapper td { border-bottom: 0.5px solid var(--ios-bg); position: relative; padding-left: 45%; text-align: right; }
    .tacs-wrapper td:before { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); width: 40%; text-align: left; font-size: 12px; color: var(--ios-text-secondary); content: attr(data-label); font-weight:600;}
    .tacs-wrapper td:last-child { border-bottom: none; }
    .tacs-wrapper .prova-name { text-align: center; padding-left: 16px; background-color: #F8F8F8; border-top-left-radius: 12px; border-top-right-radius: 12px; color: var(--ios-blue); }
    .tacs-wrapper .prova-name:before { content: none; }
}
