#app-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; background: #2E7D32; color: white;
}
#app-header h1 { font-size: 20px; }
#qr-btn { cursor: pointer; padding: 4px 12px; border: 1px solid white; border-radius: 4px; }
#main-nav { display: flex; gap: 0; background: #333; padding: 0; }
.nav-btn { flex: 1; border-radius: 0; background: #333; color: #aaa; padding: 10px; border-bottom: 3px solid transparent; }
.nav-btn.active { color: white; border-bottom-color: #2E7D32; }
.view { padding: 20px; }
.competition-card { background: white; padding: 16px; margin: 8px 0; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.competition-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.status-badge { padding: 2px 8px; border-radius: 12px; font-size: 12px; text-transform: uppercase; }
.status-draft { background: #fff3e0; color: #e65100; }
.status-active { background: #e8f5e9; color: #2E7D32; }
.status-completed { background: #e3f2fd; color: #1565C0; }
.template-card { background: white; padding: 16px; margin: 8px 0; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.template-actions { display: flex; gap: 8px; }
.setup-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.setup-row input[type="text"] { max-width: 250px; }
.contestant-tab { background: #eee; color: #333; margin: 4px; border-radius: 20px; padding: 6px 16px; }
.contestant-tab.active { background: #2E7D32; color: white; }
.admin-controls { display: flex; gap: 8px; margin: 12px 0; }
.overwatch-category { margin: 20px 0; }
.overwatch-category h3 { margin-bottom: 8px; }
.max-points { color: #888; font-weight: normal; font-size: 14px; }
.overwatch-table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.overwatch-table th, .overwatch-table td { padding: 8px 12px; text-align: center; border-bottom: 1px solid #eee; }
.overwatch-table th { background: #f5f5f5; font-size: 12px; text-transform: uppercase; }
.overwatch-table th.deduction { color: #d32f2f; }
.score-cell { cursor: pointer; }
.score-cell:hover { background: #e8f5e9; }
.score-cell.deduction { color: #d32f2f; }
.total-cell { font-weight: bold; background: #f5f5f5; }
.notes-cell { text-align: left; font-size: 12px; color: #666; max-width: 200px; }
.juror-name { text-align: left; white-space: nowrap; }
.connection-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ccc; margin-right: 4px; }
.connection-dot.online { background: #4caf50; }
.connection-dot.offline { background: #f44336; }

/* Template editor */
.te-back { background: none; color: #2E7D32; padding: 0; margin-bottom: 12px; font-size: 14px; }
.te-back:hover { text-decoration: underline; }
.te-field { margin-bottom: 16px; }
.te-field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 13px; text-transform: uppercase; color: #666; }
.te-field input[type="text"], .te-field input[type="number"] { width: auto; }
.te-colors { display: flex; gap: 12px; flex-wrap: wrap; }
.te-colors .te-field { flex: 1; min-width: 120px; }
.te-logo-preview { max-height: 64px; margin-top: 8px; border-radius: 4px; }
.te-logo-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.te-category-card { border: 1px solid #ddd; border-radius: 8px; padding: 16px; margin: 12px 0; background: white; }
.te-category-header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.te-category-header input { width: auto; }
.te-aspect-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.te-aspect-row input[type="text"] { width: 120px; }
.te-aspect-row input[type="number"] { width: 70px; }
.te-aspect-row label { font-size: 13px; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.te-aspect-row input[type="checkbox"] { width: auto; }
.te-aspects { margin-left: 16px; border-left: 3px solid #e0e0e0; padding-left: 16px; }
.te-save { margin-top: 24px; }

/* Color picker widgets */
.te-color-widget { display: flex; align-items: center; gap: 8px; }
.te-color-widget input[type="color"] { width: 36px; height: 36px; padding: 2px; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; background: none; }
.te-color-widget input[type="text"] { width: 80px !important; font-family: monospace; }
.te-color-swatch { width: 36px; height: 36px; border-radius: 4px; border: 1px solid #ddd; }

/* QR codes modal */
#qr-codes-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9997;
}
#qr-codes-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}
#qr-codes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
#qr-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
}
.qr-card img { width: 180px; height: 180px; border-radius: 4px; }
.qr-card strong { font-size: 14px; }
.qr-card a { font-size: 11px; color: #1565C0; word-break: break-all; }
