/* SecurityAlert.ai — Brand Monitor Dashboard Styles */

.brand-page { padding-bottom: 60px; }
.brand-page h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.brand-page .subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }

/* Stats row */
.brand-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.brand-stat { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; padding: 16px; display: flex; align-items: center; gap: 12px; transition: border-color 0.2s, box-shadow 0.2s; }
.brand-stat:hover { border-color: var(--accent); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08); }
.brand-stat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-stat-value { font-size: 1.5rem; font-weight: 700; }
.brand-stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); }

/* Admin section grouping */
.brand-section-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-section-heading:first-child { margin-top: 0; }
.brand-section-heading-others { margin-top: 32px; }
.brand-section-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: none;
    letter-spacing: 0;
}
.brand-section-empty {
    padding: 20px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
}
.brand-customer-label {
    margin: 14px 0 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-customer-uid {
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--text-tertiary);
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* Table — takedowns-style single-bubble layout */
.brand-table-wrap { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.brand-table-header { display: grid; grid-template-columns: 1.5fr 90px 80px 1fr 80px 100px 100px; gap: 12px; padding: 12px 16px; background: var(--bg-tertiary); font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); align-items: center; border-bottom: 1px solid var(--border-color); }
.brand-table-header span { text-align: center; cursor: pointer; user-select: none; }
.brand-table-header span:first-child { text-align: left; }
.brand-table-header span:nth-child(2) { text-align: left; }
.brand-table-header span:hover { color: var(--text-secondary); }
.brand-row { display: grid; grid-template-columns: 1.5fr 90px 80px 1fr 80px 100px 100px; gap: 12px; padding: 14px 16px; align-items: center; cursor: pointer; transition: background 0.1s; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border-color); }
.brand-row:hover { background: var(--bg-tertiary); }
.brand-row:last-child { border-bottom: none; }
.brand-team-badge { font-size: 0.75rem; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 4px; display: inline-block; }
.brand-domain { font-weight: 600; font-size: 0.95rem; }
.brand-label { font-size: 0.78rem; color: var(--text-secondary); }

/* Risk badges */
.brand-risk { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.brand-risk.critical { background: var(--accent-soft); color: var(--danger); }
.brand-risk.high { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.brand-risk.medium { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.brand-risk.low { background: var(--surface-2); color: var(--ink-3); }

.brand-findings-count { font-size: 0.88rem; font-weight: 600; }
.brand-scan-status { font-size: 0.78rem; color: var(--text-secondary); }

/* Actions */
.brand-actions { display: flex; gap: 8px; }
.brand-scan-btn { padding: 6px 14px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-tertiary); color: var(--text-primary); font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.brand-scan-btn:hover { border-color: var(--accent); }
.brand-scan-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.brand-delete-btn { padding: 6px 10px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--text-tertiary); cursor: pointer; font-size: 0.78rem; }
.brand-delete-btn:hover { color: var(--danger); border-color: var(--accent-line); }

/* Add brand button */
.brand-add-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 0.88rem; font-weight: 600; cursor: pointer; margin-bottom: 20px; }
.brand-add-btn:hover { filter: brightness(1.1); }

/* Empty state */
.brand-empty { text-align: center; padding: 60px 20px; color: var(--text-tertiary); }
.brand-empty h3 { color: var(--text-secondary); margin-bottom: 8px; }

/* Modal */
.brand-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000; align-items: center; justify-content: center; }
.brand-modal-content { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; padding: 28px; max-width: 480px; width: 90%; }
.brand-modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.brand-modal-field { margin-bottom: 14px; }
.brand-modal-field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; color: var(--text-secondary); }
.brand-modal-field input { width: 100%; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-primary); color: var(--text-primary); font-size: 0.9rem; font-family: inherit; }
.brand-modal-field input:focus { border-color: var(--accent); outline: none; }
.brand-modal-hint { font-size: 0.75rem; color: var(--text-tertiary); margin: 4px 0 0; }
.brand-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.brand-modal-status { font-size: 0.82rem; margin-top: 8px; }
.brand-modal-status.error { color: var(--danger); }
.brand-modal-status.success { color: var(--ok); }

/* Toast */
.brand-toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 500; color: #fff; z-index: 2000; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; }
.brand-toast.visible { opacity: 1; transform: translateY(0); }
.brand-toast.success { background: var(--ok); color: var(--bg); }
.brand-toast.error { background: var(--danger); }

/* Loading / Auth states */
.brand-loading { text-align: center; padding: 80px 20px; color: var(--text-tertiary); }
.brand-loading .spinner { width: 32px; height: 32px; border: 3px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; animation: brand-spin 0.7s linear infinite; margin: 0 auto 16px; }
@keyframes brand-spin { to { transform: rotate(360deg); } }

/* Scan progress bar (inline below row) */
.brand-scan-progress { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 8px; padding: 14px 18px; margin-bottom: 6px; animation: bsp-fade-in 0.2s ease; }
@keyframes bsp-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.bsp-inner { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bsp-spinner { width: 18px; height: 18px; border: 3px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; animation: brand-spin 0.7s linear infinite; flex-shrink: 0; }
.bsp-step { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.bsp-detail { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.bsp-bar-track { height: 5px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.bsp-bar { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }

/* Responsive */
@media (max-width: 768px) {
    .brand-stats { grid-template-columns: repeat(2, 1fr); }
    .brand-table-header { display: none; }
    .brand-row { grid-template-columns: 1fr; gap: 8px; }
    .brand-team-col { display: none; }
}
