@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

.insc-banner {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    width: calc(100% + 60px);
    margin-left: -30px;
    margin-top: -30px;
    padding: 60px 50px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    margin-bottom: 30px;
    box-sizing: border-box;
}
.insc-banner h1 { margin: 0 0 10px 0; font-family: 'Roboto', sans-serif; font-size: 2.2em; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; line-height: 1.1; }
.insc-banner p { margin: 0; font-family: 'Roboto', sans-serif; font-size: 1em; font-weight: 400; opacity: 0.85; }

.insc-toolbar { font-family: 'Roboto', sans-serif; padding: 15px 25px; background: #fff; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.insc-legend { display: flex; align-items: center; gap: 14px; font-size: 0.85em; color: #555; font-weight: 500; }
.insc-legend-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: #f8f9fa; border-radius: 20px; border: 1px solid #eee; }
.insc-btn-pdf { background: #e74c3c; color: white; padding: 9px 20px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 0.85em; transition: all 0.3s; display: inline-flex; align-items: center; gap: 7px; border: none; cursor: pointer; }
.insc-btn-pdf:hover { background: #c0392b; }

.insc-stats { font-family: 'Roboto', sans-serif; display: flex; justify-content: center; gap: 40px; padding: 18px 20px; background: #f8f9fa; border-bottom: 1px solid #eee; }
.insc-stat { text-align: center; font-size: 0.85em; color: #7f8c8d; font-weight: 400; }
.insc-stat b { display: block; font-size: 1.6em; font-weight: 700; color: #2c3e50; line-height: 1.2; }

.insc-table-wrap { display: block; width: 100%; }
.insc-table-scroll { width: 100%; max-height: 65vh; overflow: auto; -webkit-overflow-scrolling: touch; }
.insc-table-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.insc-table-scroll::-webkit-scrollbar-track { background: #f8f9fa; }
.insc-table-scroll::-webkit-scrollbar-thumb { background: #95a5a6; border-radius: 4px; }
.insc-table-scroll::-webkit-scrollbar-thumb:hover { background: #7f8c8d; }

.insc-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1000px; }
.insc-table thead th { background-color: #34495e; color: white; padding: 14px 10px; text-align: center; font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; position: sticky; top: 0; z-index: 20; transition: box-shadow 0.2s; }
.insc-table thead th:first-child { width: 45px; color: rgba(255,255,255,0.6); }
.insc-table thead th:nth-child(2) { text-align: left; min-width: 150px; padding-left: 16px; }
.insc-table thead th:first-child { position: sticky; left: 0; z-index: 40; }
.insc-table thead th:nth-child(2) { position: sticky; left: 45px; z-index: 30; box-shadow: 3px 0 6px rgba(0,0,0,0.1); }

.insc-table tbody td { padding: 12px 10px; border-bottom: 1px solid #eee; text-align: center; font-family: 'Roboto', sans-serif; font-size: 0.9em; color: #333; }
.insc-table tbody tr:nth-child(even) { background-color: #f8f9fa; }
.insc-table tbody tr:hover { background-color: #eaf2f8; }
.insc-table tbody td:first-child { position: sticky; left: 0; z-index: 5; background-color: inherit; color: #95a5a6; font-weight: 500; font-size: 0.82em; }
.insc-table tbody td:nth-child(2) { position: sticky; left: 45px; z-index: 5; background-color: inherit; text-align: left; font-weight: 500; color: #333; padding-left: 16px; min-width: 150px; box-shadow: 3px 0 6px rgba(0,0,0,0.03); }
.insc-table tbody tr:nth-child(even) td:first-child, .insc-table tbody tr:nth-child(even) td:nth-child(2) { background-color: #f8f9fa; }
.insc-table tbody tr:hover td:first-child, .insc-table tbody tr:hover td:nth-child(2) { background-color: #eaf2f8; }
.insc-table tbody td:nth-child(3) { text-align: left; font-weight: 400; }
.insc-table tbody td:nth-child(4) { font-weight: 700; color: #3498db; font-size: 0.95em; }

.insc-table tfoot td { background: #34495e; font-weight: 500; color: white; padding: 14px 10px; text-align: center; font-size: 0.85em; position: sticky; bottom: 0; z-index: 15; }
.insc-table tfoot td:first-child { position: sticky; left: 0; z-index: 25; }
.insc-table tfoot td:nth-child(2) { position: sticky; left: 45px; z-index: 25; box-shadow: 3px 0 6px rgba(0,0,0,0.03); }
.tfoot-total-label { text-align: right; font-size: 0.85em; }

.insc-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-size: 0.72em; font-weight: 700; }
.insc-badge-ok { background: #27ae60; color: white; }
.insc-badge-ok::after { content: "\2713"; }
.insc-badge-ko { background: #e74c3c; color: white; }
.insc-badge-ko::after { content: "\2717"; }
.insc-badge-sm { width: 14px; height: 14px; font-size: 0.5em; }

.insc-check { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: #3498db; border-radius: 4px; }
.insc-check::after { content: "\2713"; color: white; font-size: 0.6em; font-weight: 700; }
.insc-check-sm { width: 14px; height: 14px; }

.insc-scroll-hint { font-family: 'Roboto', sans-serif; text-align: center; padding: 10px; background: #f8f9fa; color: #95a5a6; font-size: 0.78em; border-top: 1px solid #eee; }

.insc-search { display: none; padding: 12px 16px; background: #f8f9fa; border-bottom: 1px solid #eee; }
.insc-search-label { display: block; font-family: 'Roboto', sans-serif; font-size: 0.78em; font-weight: 500; color: #7f8c8d; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.insc-search-box { position: relative; }
.insc-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #95a5a6; pointer-events: none; }
.insc-search-input { width: 100%; padding: 10px 36px 10px 38px; border: 1px solid #ddd; border-radius: 8px; font-family: 'Roboto', sans-serif; font-size: 0.9em; color: #333; background: #fff; outline: none; -webkit-appearance: none; appearance: none; box-sizing: border-box; }
.insc-search-input::placeholder { color: #bbb; }
.insc-search-input:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }
.insc-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: none; background: #ecf0f1; border-radius: 6px; color: #7f8c8d; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 2; }
.insc-search-clear.show { display: flex; }
.insc-search-clear:hover { background: #bdc3c7; }
.insc-search-count { font-family: 'Roboto', sans-serif; text-align: center; padding: 5px 0 0; font-size: 0.75em; color: #95a5a6; display: none; }
.insc-search-count b { color: #2c3e50; }
.insc-search-count.fail { color: #e74c3c; }

.insc-cards { display: none; flex-direction: column; padding: 0; }
.insc-card { background: #fff; border-radius: 10px; border: 1px solid #eee; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.03); margin-bottom: 10px; }
.insc-card.hide { display: none !important; }
.insc-card-top { display: flex; align-items: center; gap: 12px; padding: 12px 15px; background: #f8f9fa; border-bottom: 1px solid #eee; }
.insc-card-rank { width: 30px; height: 30px; border-radius: 6px; background: #3498db; color: white; display: flex; align-items: center; justify-content: center; font-family: 'Roboto', sans-serif; font-weight: 700; font-size: 0.8em; flex-shrink: 0; }
.insc-card-rank.gold { background: #f39c12; }
.insc-card-info { flex: 1; min-width: 0; }
.insc-card-name { font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 0.9em; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insc-card-pts { font-family: 'Roboto', sans-serif; font-size: 0.78em; color: #3498db; font-weight: 700; margin-top: 1px; }
.insc-card-badges { display: flex; gap: 5px; flex-shrink: 0; }
.insc-card-body { padding: 10px 15px; }
.insc-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.insc-tag { font-family: 'Roboto', sans-serif; padding: 3px 9px; border-radius: 16px; font-size: 0.7em; font-weight: 500; white-space: nowrap; }
.insc-tag-on { background: #eaf2f8; color: #2980b9; border: 1px solid #aed6f1; }
.insc-tag-off { background: #f8f9fa; color: #bbb; border: 1px solid #eee; }

.insc-no-result { display: none; text-align: center; padding: 30px 16px; color: #95a5a6; font-family: 'Roboto', sans-serif; }
.insc-no-result.show { display: block; }
.no-result-icon { font-size: 2em; opacity: 0.4; margin-bottom: 6px; }
.no-result-text { font-size: 0.88em; font-weight: 400; }

.insc-totals { font-family: 'Roboto', sans-serif; padding: 15px; margin: 10px 0 20px; background: #fff; border-radius: 10px; border: 1px solid #eee; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.insc-totals h4 { font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.5px; color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 8px; margin: 0 0 12px; font-weight: 500; }
.insc-totals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.insc-totals-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; background: #f8f9fa; border-radius: 6px; font-size: 0.8em; }
.insc-totals-item span:first-child { color: #7f8c8d; font-weight: 400; }
.insc-totals-item span:last-child { color: #2c3e50; font-weight: 700; }
.insc-totals-total { grid-column: 1 / -1; background: #34495e; border: none; }
.insc-totals-total span:first-child { color: rgba(255,255,255,0.85); }
.insc-totals-total span:last-child { color: white; font-size: 1.05em; }

@media (max-width: 768px) {
    .insc-banner { width: calc(100% + 32px); margin-left: -16px; margin-top: -16px; padding: 35px 20px; border-radius: 0; margin-bottom: 0; box-shadow: none; }
    .insc-banner h1 { font-size: 1.5em; margin-bottom: 6px; }
    .insc-banner p { font-size: 0.85em; }
    .insc-toolbar { padding: 10px 15px; }
    .insc-legend { width: 100%; justify-content: center; gap: 8px; font-size: 0.78em; }
    .insc-legend-item { padding: 4px 8px; font-size: 0.72em; }
    .insc-btn-pdf { width: 100%; justify-content: center; padding: 10px; }
    .insc-stats { gap: 20px; padding: 12px 15px; }
    .insc-stat { font-size: 0.78em; }
    .insc-stat b { font-size: 1.3em; }
    .insc-table-wrap { display: none; }
    .insc-search { display: block; }
    .insc-cards { display: flex; }
    .insc-badge { width: 20px; height: 20px; border-radius: 5px; font-size: 0.65em; }
}
@media (min-width: 769px) {
    .insc-cards { display: none !important; }
    .insc-search { display: none !important; }
}