/* ============================================================
   MCL Media — Componenti UI (LIGHT THEME)
   ============================================================ */

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent-blue); color: #fff; border: none;
    border-radius: var(--radius-sm); padding: 9px 16px;
    font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
    transition: all 0.15s;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 9px 16px; font-size: 13px; font-weight: 500;
    cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--border-light); background: var(--bg-card-hover); }

.btn-danger {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent-red-dim); color: var(--accent-red);
    border: 1px solid rgba(220,53,69,0.2); border-radius: var(--radius-sm);
    padding: 9px 16px; font-size: 13px; font-weight: 500;
    cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.btn-danger:hover { background: rgba(220,53,69,0.15); }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    animation: fadeIn 0.4s ease both;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}

.card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; }

.card-action {
    font-size: 12px; color: var(--accent-blue); cursor: pointer; font-weight: 500;
}
.card-action:hover { text-decoration: underline; }

.card-body { padding: 16px 20px; }

/* ============================================================
   KPI CARDS
   ============================================================ */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 28px;
}

.kpi-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    transition: all 0.2s; position: relative; overflow: hidden;
    animation: fadeIn 0.4s ease both;
    box-shadow: var(--shadow);
}
.kpi-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.kpi-card.blue::before { background: var(--accent-blue); }
.kpi-card.green::before { background: var(--accent-green); }
.kpi-card.amber::before { background: var(--accent-amber); }
.kpi-card.purple::before { background: var(--accent-purple); }
.kpi-card.red::before { background: var(--accent-red); }

.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.1s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.2s; }

.kpi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.kpi-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-icon.blue { background: var(--accent-blue-glow); color: var(--accent-blue); }
.kpi-icon.green { background: var(--accent-green-dim); color: var(--accent-green); }
.kpi-icon.amber { background: var(--accent-amber-dim); color: var(--accent-amber); }
.kpi-icon.purple { background: var(--accent-purple-dim); color: var(--accent-purple); }
.kpi-icon.red { background: var(--accent-red-dim); color: var(--accent-red); }

.kpi-trend { font-size: 11.5px; font-weight: 500; display: flex; align-items: center; gap: 3px; }
.kpi-trend.up { color: var(--accent-green); }
.kpi-trend.down { color: var(--accent-red); }

.kpi-value {
    font-size: 26px; font-weight: 700; letter-spacing: -1px;
    margin-bottom: 4px; font-family: 'JetBrains Mono', monospace;
}

.kpi-label { font-size: 12.5px; color: var(--text-secondary); }

/* ============================================================
   GRIDS
   ============================================================ */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 28px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; margin-bottom: 28px; }

/* ============================================================
   TABS
   ============================================================ */

.tabs {
    display: flex; gap: 2px;
    background: var(--bg-primary); border-radius: var(--radius-sm); padding: 3px;
    border: 1px solid var(--border);
}

.tab {
    padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
    cursor: pointer; color: var(--text-muted); transition: all 0.15s;
}
.tab:hover { color: var(--text-secondary); }
.tab.active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ============================================================
   TABLES
   ============================================================ */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
    text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 600;
    letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-muted);
    border-bottom: 1px solid var(--border); background: var(--bg-primary);
}

td {
    padding: 12px 16px; font-size: 13px;
    border-bottom: 1px solid var(--border); color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-card-hover); }

.site-name { color: var(--text-primary); font-weight: 500; }
.site-name:hover { color: var(--accent-blue); }
.domain-text { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-muted); }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 500;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.badge.active { background: var(--accent-green-dim); color: var(--accent-green); }
.badge.active::before { background: var(--accent-green); }
.badge.pending { background: var(--accent-amber-dim); color: var(--accent-amber); }
.badge.pending::before { background: var(--accent-amber); }
.badge.issue { background: var(--accent-red-dim); color: var(--accent-red); }
.badge.issue::before { background: var(--accent-red); }
.badge.setup { background: var(--accent-purple-dim); color: var(--accent-purple); }
.badge.setup::before { background: var(--accent-purple); }

/* ============================================================
   TASKS
   ============================================================ */

.task-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }

.task-check {
    width: 18px; height: 18px; border: 2px solid var(--border-light);
    border-radius: 5px; flex-shrink: 0; margin-top: 1px; cursor: pointer;
    transition: all 0.15s; position: relative;
}
.task-check:hover { border-color: var(--accent-blue); }
.task-check.done { background: var(--accent-blue); border-color: var(--accent-blue); }
.task-check.done::after {
    content: '✓'; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); color: #fff; font-size: 11px; font-weight: 700;
}

.task-content { flex: 1; min-width: 0; }
.task-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.task-title:hover { color: var(--accent-blue); }
.task-title.done { text-decoration: line-through; color: var(--text-muted); }
.task-meta { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.task-category {
    font-size: 11px; color: var(--text-muted); background: var(--bg-primary);
    padding: 3px 8px; border-radius: 4px; flex-shrink: 0; align-self: center;
    border: 1px solid var(--border);
}

.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.priority-dot.high { background: var(--accent-red); }
.priority-dot.medium { background: var(--accent-amber); }
.priority-dot.low { background: var(--accent-green); }

/* ============================================================
   COLLABORATORS
   ============================================================ */

.collab-list { display: flex; flex-direction: column; gap: 12px; }

.collab-card {
    display: flex; align-items: center; gap: 14px; padding: 14px;
    background: var(--bg-primary); border-radius: var(--radius-sm);
    border: 1px solid var(--border); transition: all 0.15s;
}
.collab-card:hover { border-color: var(--border-light); box-shadow: var(--shadow); }

.collab-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; color: #fff; flex-shrink: 0;
}

.collab-info { flex: 1; }
.collab-name { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.collab-name:hover { color: var(--accent-blue); }
.collab-role { font-size: 11.5px; color: var(--text-muted); }

.collab-stats { display: flex; gap: 16px; text-align: center; }
.collab-stat-val { font-size: 15px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.collab-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================================
   PIPELINE
   ============================================================ */

.pipeline-stages { display: flex; gap: 2px; margin-bottom: 16px; }

.pipeline-stage {
    flex: 1; text-align: center; padding: 10px 8px;
    background: var(--bg-primary); border-radius: var(--radius-sm);
    cursor: pointer; transition: all 0.15s; border: 1px solid var(--border);
}
.pipeline-stage:hover { background: var(--bg-card-hover); }
.pipeline-stage .stage-count { font-size: 20px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.pipeline-stage .stage-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.pipeline-stage.watching .stage-count { color: var(--accent-amber); }
.pipeline-stage.bidding .stage-count { color: var(--accent-blue); }
.pipeline-stage.won .stage-count { color: var(--accent-green); }
.pipeline-stage.setup-stage .stage-count { color: var(--accent-purple); }

/* ============================================================
   REVENUE
   ============================================================ */

.revenue-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.revenue-row:last-child { border-bottom: none; }
.revenue-source { font-size: 13px; font-weight: 500; width: 120px; flex-shrink: 0; }
.revenue-bar-wrap { flex: 1; height: 8px; background: var(--bg-primary); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.revenue-bar { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.revenue-amount { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; width: 80px; text-align: right; flex-shrink: 0; }

/* ============================================================
   ACTIVITY FEED
   ============================================================ */

.activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.activity-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   MINI CHARTS
   ============================================================ */

.mini-chart { display: flex; align-items: flex-end; gap: 3px; height: 48px; padding: 8px 0; }
.mini-bar {
    flex: 1; background: var(--accent-blue); border-radius: 2px 2px 0 0;
    opacity: 0.5; transition: opacity 0.15s; min-width: 6px;
}
.mini-bar:hover { opacity: 0.8; }

/* ============================================================
   FORMS
   ============================================================ */

.form-group { margin-bottom: 20px; }

.form-label {
    display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 14px; background: var(--bg-primary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: inherit; font-size: 13px;
    transition: border-color 0.15s; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px var(--accent-blue-glow); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }

.form-select { appearance: none; cursor: pointer; }

.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state h2 { font-size: 18px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.3); z-index: 500;
    align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 16px; font-weight: 600; }
.modal-close {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; cursor: pointer; color: var(--text-muted); background: none; border: none;
    transition: all 0.15s;
}
.modal-close:hover { background: var(--bg-primary); color: var(--text-primary); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body { padding: 24px; }

.modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 16px 24px; border-top: 1px solid var(--border);
}

/* ============================================================
   TOAST / ALERTS
   ============================================================ */

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 600; display: flex; flex-direction: column; gap: 8px; }

.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    box-shadow: var(--shadow-lg); animation: fadeIn 0.3s ease;
    min-width: 280px; max-width: 420px;
    background: var(--bg-card);
}
.toast.success { background: #ecfdf5; border: 1px solid rgba(22,163,100,0.2); color: var(--accent-green); }
.toast.error { background: #fef2f2; border: 1px solid rgba(220,53,69,0.2); color: var(--accent-red); }
.toast.warning { background: #fffbeb; border: 1px solid rgba(217,119,6,0.2); color: var(--accent-amber); }
.toast.info { background: #eff6ff; border: 1px solid rgba(59,109,230,0.2); color: var(--accent-blue); }

.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast-close { margin-left: auto; cursor: pointer; opacity: 0.6; background: none; border: none; color: inherit; }
.toast-close:hover { opacity: 1; }

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 20px 0;
}
.pagination a, .pagination span {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
    transition: all 0.15s;
}
.pagination a { color: var(--text-secondary); border: 1px solid var(--border); background: var(--bg-card); }
.pagination a:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.pagination .active { background: var(--accent-blue); color: #fff; border: none; }
.pagination .disabled { color: var(--text-muted); pointer-events: none; opacity: 0.4; }