/* Shared base styles for all pages */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f0f2f5; }

/* Topbar */
.topbar {
    background: #1a1a2e; color: white; padding: 10px 20px;
    display: flex; align-items: center; justify-content: space-between; height: 50px;
}
.topbar h2 { font-size: 16px; font-weight: 600; }
.topbar a { color: #64b5f6; text-decoration: none; font-size: 13px; margin-left: 15px; }
.topbar a:hover { color: #90caf9; }
.topbar a.active { color: white; border-bottom: 2px solid #64b5f6; padding-bottom: 2px; }
.topbar .btn-icon {
    background: #16213e; border: 1px solid #2a3a5e; color: #aaa; padding: 6px 12px;
    border-radius: 6px; cursor: pointer; font-size: 13px; transition: all 0.2s;
}
.topbar .btn-icon:hover { background: #2a3a5e; color: white; }

/* Container */
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* Cards */
.card {
    background: white; border-radius: 10px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px;
}
.card h3 { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 16px; }

/* Summary chips */
.summary-bar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.chip {
    background: white; padding: 12px 18px; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); text-align: center; min-width: 100px;
}
.chip .num { font-size: 24px; font-weight: 700; }
.chip .lbl { font-size: 11px; color: #888; text-transform: uppercase; margin-top: 2px; }
.chip.green .num { color: #27ae60; }
.chip.red .num { color: #e74c3c; }
.chip.blue .num { color: #2980b9; }
.chip.orange .num { color: #e67e22; }
.chip.yellow .num { color: #f39c12; }
.chip.purple .num { color: #8e44ad; }
.chip.gray .num { color: #999; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; background: #f8f9fa; color: #555; font-weight: 600; border-bottom: 2px solid #eee; }
td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
tr:hover { background: #f8f9ff; }
td.mono { font-family: monospace; font-size: 12px; }

/* Badges */
.badge { padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; display: inline-block; }
.badge-green { background: #e8f5e9; color: #27ae60; }
.badge-yellow { background: #fff8e1; color: #f39c12; }
.badge-orange { background: #fff3e0; color: #e67e22; }
.badge-red { background: #ffebee; color: #e74c3c; }
.badge-blue { background: #e3f2fd; color: #2980b9; }
.badge-purple { background: #f3e5f5; color: #8e44ad; }

/* Buttons */
.btn {
    padding: 8px 20px; border: none; border-radius: 6px; font-size: 13px;
    font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn:disabled { background: #bdc3c7; cursor: not-allowed; }
.btn-green { background: #27ae60; color: white; }
.btn-green:hover { background: #219a52; }
.btn-blue { background: #3498db; color: white; }
.btn-blue:hover { background: #2980b9; }
.btn-purple { background: #8e44ad; color: white; }
.btn-purple:hover { background: #7d3c98; }
.btn-orange { background: #e67e22; color: white; }
.btn-orange:hover { background: #d35400; }
.btn-red { background: #e74c3c; color: white; }
.btn-sm { padding: 4px 12px; font-size: 11px; }

/* Tabs */
.tab-bar { display: flex; gap: 4px; margin-bottom: 16px; }
.tab-btn {
    padding: 8px 16px; border: none; border-radius: 6px 6px 0 0;
    font-size: 12px; font-weight: 600; cursor: pointer; background: #f0f0f0; color: #888;
}
.tab-btn.active { background: white; color: #333; box-shadow: 0 -1px 3px rgba(0,0,0,0.1); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Progress bar */
.bar-bg { background: #eee; border-radius: 3px; height: 20px; position: relative; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.bar-label { position: absolute; top: 2px; left: 6px; font-size: 11px; font-weight: 600; }

/* Log panel */
.log-panel {
    background: #1a1a2e; color: #a0e8af; border-radius: 6px; padding: 12px;
    font-family: monospace; font-size: 11px; max-height: 400px; overflow-y: auto; line-height: 1.8;
}

/* Loading / Error */
.loading { color: #888; padding: 40px; text-align: center; font-size: 14px; }
.error-msg { color: #e74c3c; padding: 40px; text-align: center; font-size: 14px; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
