* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    min-height: 100vh; padding: 20px; color: #333;
}
.container {
    max-width: 1200px; margin: 0 auto; background: white;
    border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.1); overflow: hidden;
}
header {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: white; padding: 30px; display: flex; justify-content: space-between; align-items: center;
}
header h1 { font-size: 26px; font-weight: 600; }
.status-indicator { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: #ffd700; animation: pulse 2s infinite; }
.status-dot.online { background: #4ade80; }
.status-dot.offline { background: #ef4444; animation: none; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
nav.tabs { display: flex; background: #f8f9fa; border-bottom: 1px solid #e9ecef; }
.tab-btn {
    flex: 1; padding: 15px; background: none; border: none; cursor: pointer;
    font-size: 15px; color: #6c757d; border-bottom: 3px solid transparent;
}
.tab-btn.active { color: #6366f1; border-bottom-color: #6366f1; background: white; font-weight: 600; }
main { padding: 30px; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.card {
    background: white; border: 1px solid #e9ecef; border-radius: 8px;
    padding: 25px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,.05);
}
.card h2 { font-size: 20px; margin-bottom: 20px; color: #495057; border-bottom: 2px solid #e9ecef; padding-bottom: 10px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.info-item { display: flex; flex-direction: column; gap: 5px; }
.info-item label { font-size: 14px; color: #6c757d; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.status-badge.running { background: #d1fae5; color: #065f46; }
.status-badge.stopped { background: #fee2e2; color: #991b1b; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.stat-item { text-align: center; padding: 20px; background: #f8f9fa; border-radius: 8px; }
.stat-value { font-size: 28px; font-weight: 700; color: #6366f1; }
.stat-label { font-size: 14px; color: #6c757d; }
.btn { padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-primary { background: #6366f1; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-danger { background: #dc3545; color: white; }
.action-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.log-controls { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.log-controls select, .log-controls input { padding: 8px 12px; border: 1px solid #ced4da; border-radius: 6px; }
.log-container { background: #1e1e1e; border-radius: 6px; padding: 15px; max-height: 600px; overflow: auto; }
.log-content { color: #d4d4d4; font-family: Consolas, monospace; font-size: 13px; white-space: pre-wrap; }
.config-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 600; color: #495057; }
.form-group input { padding: 10px 12px; border: 1px solid #ced4da; border-radius: 6px; font-size: 14px; }
.form-actions { display: flex; gap: 10px; }
.config-status { padding: 20px; background: #f8f9fa; border-radius: 6px; margin-bottom: 16px; }
.status-info p { color: #6c757d; font-size: 14px; margin-bottom: 10px; }
.marketplace-tokens { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-hint { color: #6c757d; font-size: 14px; margin-bottom: 16px; }
.success-message { background: #d1fae5; color: #065f46; padding: 12px; border-radius: 6px; margin-bottom: 12px; }
.error-message { background: #fee2e2; color: #991b1b; padding: 12px; border-radius: 6px; margin-bottom: 12px; }
footer { background: #f8f9fa; padding: 15px; text-align: center; color: #6c757d; font-size: 14px; }

.calendar-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 20px; }
#calendarTitle { font-size: 18px; font-weight: 600; min-width: 140px; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-header { text-align: center; font-size: 13px; font-weight: 600; color: #6c757d; padding: 8px 0; }
.calendar-day {
    aspect-ratio: 1; border: 1px solid #e9ecef; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; transition: all .2s; min-height: 56px;
}
.calendar-day.empty { background: transparent; border: none; cursor: default; }
.calendar-day.today { border-color: #6366f1; font-weight: 700; }
.calendar-day.ok { background: #d1fae5; }
.calendar-day.error { background: #fee2e2; }
.calendar-day.neutral { background: #f8f9fa; }
.calendar-day:hover:not(.empty) { transform: scale(1.05); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.calendar-day .day-num { font-size: 16px; }
.calendar-day .day-dots { display: flex; gap: 3px; margin-top: 4px; }
.calendar-day .dot { width: 6px; height: 6px; border-radius: 50%; }
.dot.google { background: #4285f4; }
.dot.meta { background: #1877f2; }
.calendar-detail { margin-top: 20px; padding: 16px; background: #f8f9fa; border-radius: 8px; display: none; }
.calendar-detail.visible { display: block; }
.calendar-detail h4 { margin-bottom: 10px; color: #495057; }
.calendar-detail pre { font-size: 13px; white-space: pre-wrap; color: #495057; }

@media (max-width: 768px) {
    .marketplace-tokens { grid-template-columns: 1fr; }
    header { flex-direction: column; gap: 12px; }
}
