/* ============================================================
   DrSEO by Arobit AI — common.css  v3.0
   2026 Professional SaaS — White + Navy Material UI.
   Clean elevation, white surfaces, navy active states.
   DO NOT add module-specific styles here.
   ============================================================ */

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
    /* Brand */
    --brand-primary:   #1a56db;
    --brand-hover:     #1e429f;
    --brand-accent:    #e3a008;
    --brand-glow:      rgba(26,86,219,.15);
    --brand-navy:      #1e3a5f;
    --brand-navy-dark: #0f172a;

    /* Sidebar — White + Navy Material */
    --sidebar-bg:           #ffffff;
    --sidebar-border:       #e8ecf2;
    --sidebar-width:        210px;
    --sidebar-collapsed:    52px;
    --sidebar-item-h:       36px;
    --sidebar-active-bg:    #1e3a5f;
    --sidebar-active-text:  #ffffff;
    --sidebar-active-icon:  #ffffff;
    --sidebar-hover-bg:     #f1f5f9;
    --sidebar-hover-text:   #0f172a;
    --sidebar-text:         #475569;
    --sidebar-icon:         #94a3b8;
    --sidebar-logo-bg:      #1e3a5f;

    /* Topbar */
    --topbar-height:   52px;
    --topbar-bg:       #ffffff;
    --topbar-border:   #e8ecf2;

    /* Content */
    --content-bg:    #f4f6f8;
    --card-bg:       #ffffff;
    --border-color:  #e2e8f0;
    --border-light:  #f1f5f9;

    /* Text */
    --text-primary:   #0f172a;
    --text-secondary: #64748b;
    --text-muted:     #94a3b8;
    --text-inverse:   #ffffff;

    /* Semantic */
    --success:  #059669;
    --warning:  #d97706;
    --danger:   #dc2626;
    --info:     #0284c7;

    /* Shape */
    --radius-xs: 3px;
    --radius-sm: 5px;
    --radius-md: 7px;
    --radius-lg: 10px;
    --radius-xl: 14px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(15,23,42,.06);
    --shadow-sm: 0 1px 4px rgba(15,23,42,.08);
    --shadow-md: 0 4px 14px rgba(15,23,42,.10);
    --shadow-lg: 0 8px 28px rgba(15,23,42,.13);

    /* Motion */
    --ease: all .18s cubic-bezier(.4,0,.2,1);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Reset / Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--content-bg);
    color: var(--text-primary);
    font-size: 13.5px;
    line-height: 1.55;
    /* Body scrolls normally. Sidebar is position:fixed, topbar is sticky. */
}

/* Icon sizing utilities */
.icon-lg { font-size: 18px; }
.icon-md { font-size: 14px; }
.icon-xs { font-size: 9px; }
.icon-sm { font-size: 12px; }

.icon-brand { color: var(--brand-primary); }
.icon-muted { color: var(--text-muted); }

/* Topbar Dropdown Customizations */
.dropdown-menu-custom {
    min-width: 260px;
    font-size: 13px;
}

.site-switch-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.site-switch-active {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    background: var(--danger);
    border-radius: 8px;
    border: 1.5px solid #fff;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.user-name {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-chevron {
    color: var(--text-muted);
    margin-left: 1px;
}

.user-dropdown-menu {
    min-width: 190px;
    font-size: 12.5px;
    border-radius: var(--radius-lg);
    padding: 5px;
}

.user-dropdown-header {
    padding: 8px 12px 8px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 4px;
}

.user-dropdown-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.user-dropdown-email {
    font-size: 11.5px;
    color: var(--text-muted);
}

.user-dropdown-menu .dropdown-item {
    font-size: 12.5px;
}

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-hover); }
img { max-width: 100%; display: block; }
h1,h2,h3,h4,h5,h6 { font-weight: 600; line-height: 1.3; }

/* ─── App Shell ─────────────────────────────────────────── */
/*
 * Layout strategy: FIXED SIDEBAR + FIXED TOPBAR + BODY SCROLL
 *
 * Both sidebar and topbar are position:fixed — fully out of flow.
 * .main-area gets margin-left = sidebar width.
 * .main-content gets padding-top = topbar height.
 * Body scroll is the only scroll mechanism — zero breakage risk.
 *
 * Collapsed sidebar: :has() selector updates topbar.left + margin-left.
 */
.app-wrapper {
    display: block;     /* Simple block — no flex shell needed */
    min-height: 100vh;
}

/* Column wrapper — just provides the left margin offset */
.main-area {
    display: block;
    margin-left: var(--sidebar-width);
    transition: margin-left .22s cubic-bezier(.4,0,.2,1);
    min-height: 100vh;
}

/* Collapsed sidebar: shrink main-area left offset AND topbar left */
.sidebar.collapsed + .main-area {
    margin-left: var(--sidebar-collapsed);
}
/* :has() — update topbar left when sidebar is collapsed (Chrome 105+, FF 121+) */
body:has(.sidebar.collapsed) .topbar {
    left: var(--sidebar-collapsed);
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR — White + Navy Material UI v3.0
   White surface · Navy logo block · Navy active states
   ═══════════════════════════════════════════════════════════ */
.sidebar {
    position: fixed;       /* Always pinned — never scrolls with page */
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    transition: width .22s cubic-bezier(.4,0,.2,1);
    overflow-x: hidden;
    overflow-y: auto;      /* Sidebar nav scrolls if items overflow */
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 1px 0 0 var(--sidebar-border), 4px 0 16px rgba(15,23,42,.04);
    z-index: 1040;         /* Above topbar sticky z-index */
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

/* ─── Logo — deep navy block ─────────────────────────────── */
.sidebar-logo {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 15px;
    flex-shrink: 0;
    gap: 10px;
    background: var(--sidebar-logo-bg);
    border-bottom: none;
}

.sidebar-logo-icon {
    width: 28px; height: 28px;
    background: var(--brand-primary);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 12px; font-weight: 800; color: #fff;
    letter-spacing: -1px;
    box-shadow: 0 2px 8px rgba(26,86,219,.4);
}

.sidebar-logo-text {
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity .18s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.sidebar-logo-name {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: #ffffff;
}

.sidebar-logo-name span { color: #60a5fa; }

.sidebar-logo-sub {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255,255,255,.45);
    letter-spacing: .6px;
    text-transform: uppercase;
}

.sidebar.collapsed .sidebar-logo-text {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-logo {
    padding: 0;
    justify-content: center;
}

/* ─── Nav scroll area ────────────────────────────────────── */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

/* ─── Section labels ─────────────────────────────────────── */
.sidebar-nav > .sidebar-section-label:first-child {
    padding-top: 4px;
}

.sidebar-section-label {
    position: relative;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 14px 16px 4px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .18s ease;
}

.sidebar-section-label::before {
    content: '';
    display: block;
    height: 1px;
    background: var(--border-light);
    margin: 0 0 10px;
    opacity: .8;
}

.sidebar.collapsed .sidebar-section-label {
    opacity: 0;
    padding-top: 10px;
    padding-bottom: 2px;
}

/* ─── Nav items ──────────────────────────────────────────── */
.sidebar-item {
    display: flex;
    align-items: center;
    height: var(--sidebar-item-h);
    padding: 0 12px 0 14px;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
    position: relative;
    gap: 10px;
    margin: 1px 8px;
    border-radius: var(--radius-md);
}

.sidebar-item:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-hover-text);
    text-decoration: none;
}

.sidebar-item:hover .nav-icon {
    color: var(--brand-primary);
}

/* ─── Active state — solid navy pill ─────────────────────── */
.sidebar-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
    border-radius: var(--radius-md);
    margin: 1px 8px;
    padding: 0 12px 0 14px;
}

.sidebar-item.active .nav-icon {
    color: var(--sidebar-active-icon);
}

.sidebar-item.active .sidebar-badge {
    background: rgba(255,255,255,.25);
    color: #fff;
}

/* ─── Nav icons ──────────────────────────────────────────── */
.nav-icon {
    font-size: 15px;
    width: 17px;
    text-align: center;
    flex-shrink: 0;
    color: var(--sidebar-icon);
    transition: color .18s ease;
}

/* ─── Nav labels ─────────────────────────────────────────── */
.nav-label {
    font-size: 12.5px;
    font-weight: 500;
    opacity: 1;
    transition: opacity .15s ease;
    letter-spacing: -.1px;
}

.sidebar.collapsed .nav-label {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
    flex-shrink: 1;
}

/* ─── Badge ──────────────────────────────────────────────── */
.sidebar-badge {
    margin-left: auto;
    background: #fee2e2;
    color: #dc2626;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    flex-shrink: 0;
    line-height: 1.4;
}

.sidebar.collapsed .sidebar-badge { display: none; }

/* BETA tag — shown on working modules */
.nav-beta {
    margin-left: auto;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 1px 5px;
    border-radius: 10px;
    flex-shrink: 0;
    line-height: 1.5;
    text-transform: uppercase;
}
.sidebar.collapsed .nav-beta { display: none; }

/* ─── Footer ─────────────────────────────────────────────── */
.sidebar-footer {
    padding: 8px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

/* ─── Collapsed state ────────────────────────────────────── */
.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 0;
    margin: 2px 6px;
}

.sidebar.collapsed .sidebar-item .nav-icon {
    width: 20px;
    height: 20px;
    font-size: 15px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .sidebar-badge { display: none; }

/* ─── Collapsed tooltip ──────────────────────────────────── */
.sidebar.collapsed .sidebar-item::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand-navy-dark);
    color: #fff;
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--radius-md);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(15,23,42,.2);
}

.sidebar.collapsed .sidebar-item:hover::after { opacity: 1; }

/* ─── Sub-items (always-visible indented links) ──────────── */
.sidebar-item-sub {
    padding-left: 28px !important;
    height: 32px;
    font-size: 12px;
    opacity: .9;
}

/* ─── Two-Level Accordion Nav Groups ────────────────────── */
/* Group container */
.sidebar-group {
    margin: 1px 0;
}

/* Clickable group header */
.sidebar-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 10px;
    height: var(--sidebar-item-h);
    cursor: pointer;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    font-size: 12.5px;
    font-weight: 500;
    user-select: none;
    transition: var(--ease);
    margin: 1px 6px;
    position: relative;
}

.sidebar-group-header:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-hover-text);
}

.sidebar-group-header.group-active {
    color: var(--brand-primary);
    font-weight: 600;
}

/* Icon slot inside group header */
.sidebar-group-icon {
    width: 18px;
    height: 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--sidebar-icon);
    transition: color .18s;
}

.sidebar-group-header:hover .sidebar-group-icon,
.sidebar-group-header.group-active .sidebar-group-icon {
    color: inherit;
}

/* Label text */
.sidebar-group-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12.5px;
}

/* Chevron — rotates when group is open */
.sidebar-group-chevron {
    font-size: 10px;
    flex-shrink: 0;
    color: var(--sidebar-icon);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
}

.sidebar-group.open > .sidebar-group-header .sidebar-group-chevron {
    transform: rotate(90deg);
}

/* Collapsible children container */
.sidebar-group-items {
    display: none;
    padding-bottom: 3px;
}

.sidebar-group.open > .sidebar-group-items {
    display: block;
}

/* Child nav link — indented */
.sidebar-child {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 8px 0 28px;
    height: 32px;
    font-size: 12px;
    font-weight: 400;
    color: var(--sidebar-text);
    border-radius: var(--radius-md);
    text-decoration: none;
    margin: 1px 6px;
    position: relative;
    transition: var(--ease);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-child:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-hover-text);
    text-decoration: none;
}

.sidebar-child.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 500;
}

.sidebar-child .nav-icon {
    width: 15px;
    height: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: .7;
}

.sidebar-child.active .nav-icon { opacity: 1; }

.sidebar-child .nav-beta {
    margin-left: auto;
    font-size: 8.5px;
    padding: 1px 4px;
}

/* ── Collapsed sidebar behaviour for accordion groups ───── */
.sidebar.collapsed .sidebar-group-label,
.sidebar.collapsed .sidebar-group-chevron { display: none; }

.sidebar.collapsed .sidebar-group-header {
    justify-content: center;
    padding: 0;
    margin: 2px 6px;
}

.sidebar.collapsed .sidebar-group-items { display: none !important; }

.sidebar.collapsed .sidebar-group-icon {
    margin: 0;
    font-size: 15px;
    width: 20px;
    height: 20px;
}

/* Tooltip for collapsed group header */
.sidebar.collapsed .sidebar-group-header::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand-navy-dark);
    color: #fff;
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--radius-md);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(15,23,42,.2);
}

.sidebar.collapsed .sidebar-group-header:hover::after { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════ */
.topbar {
    position: fixed;       /* Always pinned — visible at ALL zoom levels */
    top: 0;
    left: var(--sidebar-width);   /* Aligns with sidebar right edge */
    right: 0;
    height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1030;
    gap: 14px;
    box-shadow: 0 1px 0 var(--topbar-border);
    transition: left .22s cubic-bezier(.4,0,.2,1);
}

.topbar-left  { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Sidebar toggle btn */
#sidebar-toggle {
    width: 30px; height: 30px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: var(--ease);
    flex-shrink: 0;
}
#sidebar-toggle:hover { background: var(--border-light); color: var(--text-primary); }

/* Site Switcher */
.site-switcher-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--border-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 5px 10px 5px 9px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--ease);
    height: 30px;
}

.site-switcher-btn:hover { border-color: #94a3b8; background: #e8ecf2; }

.site-switcher-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
}

/* Breadcrumb */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb-bar a { color: var(--text-secondary); }
.breadcrumb-bar a:hover { color: var(--brand-primary); }
.breadcrumb-bar .sep { color: var(--border-color); font-size: 11px; }
.breadcrumb-bar .current { color: var(--text-primary); font-weight: 500; }

/* Topbar icon buttons */
.topbar-icon-btn {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--ease);
    position: relative;
    flex-shrink: 0;
}
.topbar-icon-btn:hover { border-color: #94a3b8; color: var(--text-primary); }

/* ─── Global Search ──────────────────────────────────────── */
.topbar-search-wrap {
    flex: 1;
    justify-content: center;
    padding: 0 16px;
    max-width: 420px;
    margin: 0 auto;
}

.topbar-search {
    position: relative;
    width: 100%;
}

.topbar-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
}

.topbar-search-input {
    width: 100%;
    height: 30px;
    padding: 0 54px 0 30px;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 12.5px;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--ease);
    outline: none;
}

.topbar-search-input::placeholder { color: var(--text-muted); }

.topbar-search-input:focus {
    background: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.topbar-search-kbd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--border-light);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 1px 5px;
    pointer-events: none;
    white-space: nowrap;
}

.topbar-search-input:focus + .topbar-search-kbd,
.topbar-search-input:focus ~ .topbar-search-kbd { display: none; }

/* ─── Notifications Dropdown ─────────────────────────────── */
.notifications-dropdown {
    width: 340px;
    padding: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 6px;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--border-light);
}

.notif-header-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.notif-mark-all {
    font-size: 11px;
    color: var(--brand-primary);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: 500;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-list {
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }
.notif-list::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background .12s ease;
    position: relative;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--content-bg); }
.notif-item.notif-unread { background: #eff6ff; }
.notif-item.notif-unread:hover { background: #dbeafe; }

.notif-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-icon-warn  { background: #fef3c7; color: #d97706; }
.notif-icon-up    { background: #d1fae5; color: #059669; }
.notif-icon-info  { background: #dbeafe; color: #1d4ed8; }
.notif-icon-brand { background: #ede9fe; color: #7c3aed; }
.notif-icon-success { background: #d1fae5; color: #059669; }

.notif-body { flex: 1; min-width: 0; }

.notif-text {
    font-size: 12.5px;
    color: var(--text-primary);
    line-height: 1.5;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-primary);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.notif-view-all {
    font-size: 12px;
    color: var(--brand-primary);
    font-weight: 500;
    text-decoration: none;
}
.notif-view-all:hover { text-decoration: underline; }

/* User avatar chip */
.user-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: 3px 7px 3px 3px;
    border: 1px solid transparent;
    transition: var(--ease);
    height: 30px;
}
.user-chip:hover { background: var(--content-bg); border-color: var(--border-color); }

.user-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════ */
.main-content {
    padding: calc(var(--topbar-height) + 22px) 24px 22px 24px;
    background: var(--content-bg);
    min-height: calc(100vh - var(--topbar-height));
    /* Body scroll. Fixed topbar offset = topbar-height (52px) + normal top padding (22px) */
}

/* ─── Page Header ───────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-left { min-width: 0; }

.page-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 3px;
    line-height: 1.3;
    letter-spacing: -.3px;
}

.page-subtitle {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ─── Cards ─────────────────────────────────────────────── */
.card-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.card-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.card-box-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -.1px;
}

/* ─── KPI Tiles ─────────────────────────────────────────── */
.kpi-tile {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow-xs);
    transition: var(--ease);
    position: relative;
    overflow: hidden;
}

.kpi-tile::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--border-light);
    transition: background .18s ease;
}

.kpi-tile:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kpi-tile:hover::after { background: var(--brand-primary); }

.kpi-tile-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
}

.kpi-tile-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -.5px;
}

.kpi-tile-trend {
    font-size: 11.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.kpi-tile-trend.up      { color: var(--success); }
.kpi-tile-trend.down    { color: var(--danger); }
.kpi-tile-trend.neutral { color: var(--text-muted); }

/* ─── Severity Badges ───────────────────────────────────── */
.badge-sev {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.badge-sev-p0, .badge-sev-critical { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-sev-p1, .badge-sev-high     { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-sev-p2, .badge-sev-medium   { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.badge-sev-pass, .badge-sev-low    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ─── Exec Badges ───────────────────────────────────────── */
.badge-exec {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    gap: 4px;
}

.badge-exec-ai    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-exec-human { background: #fdf4ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.badge-exec-mixed { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ─── Status Pills ──────────────────────────────────────── */
.pill {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: capitalize;
    letter-spacing: .1px;
}

.pill-pending      { background: #f3f4f6; color: #6b7280; }
.pill-in-progress  { background: #eff6ff; color: #1d4ed8; }
.pill-done         { background: #f0fdf4; color: #15803d; }
.pill-cancelled    { background: #fef2f2; color: #b91c1c; }
.pill-blocked      { background: #fff7ed; color: #c2410c; }
.pill-active       { background: #f0fdf4; color: #15803d; }
.pill-inactive     { background: #f3f4f6; color: #6b7280; }
.pill-draft        { background: #f3f4f6; color: #6b7280; }
.pill-scheduled    { background: #eff6ff; color: #1d4ed8; }
.pill-running      { background: #fef3c7; color: #92400e; }
.pill-completed    { background: #f0fdf4; color: #15803d; }
.pill-failed       { background: #fef2f2; color: #b91c1c; }
.pill-open         { background: #eff6ff; color: #1d4ed8; }
.pill-accepted     { background: #f0fdf4; color: #15803d; }
.pill-resolved     { background: #f0fdf4; color: #15803d; }
.pill-rejected     { background: #fef2f2; color: #b91c1c; }
.pill-review       { background: #fdf4ff; color: #7e22ce; }

/* ─── Data Freshness ────────────────────────────────────── */
.data-freshness {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 2px 7px;
    border-radius: var(--radius-xs);
}

.freshness-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.freshness-dot.fresh  { background: var(--success); }
.freshness-dot.stale  { background: var(--warning); }
.freshness-dot.old    { background: var(--danger); }

/* ─── Empty State ───────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 20px;
    text-align: center;
}

.empty-state-icon {
    width: 48px; height: 48px;
    background: var(--content-bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 20px;
}

.empty-state-title { font-size: 14.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.empty-state-text  { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 18px; max-width: 300px; }

/* ─── Skeleton Loader ───────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-row { height: 13px; margin-bottom: 9px; border-radius: 3px; }
.skeleton-row:last-child { width: 60%; }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
    font-size: 12.5px;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 6px 14px;
    transition: var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.4;
    cursor: pointer;
    border: 1px solid transparent;
    letter-spacing: -.05px;
}

.btn-sm { font-size: 11.5px; padding: 3.5px 9px; }
.btn-lg { font-size: 13.5px; padding: 9px 20px; }

.btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,86,219,.25);
}

.btn-secondary {
    background: #fff;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover { border-color: #94a3b8; background: var(--content-bg); color: var(--text-primary); }

.btn-outline-primary {
    background: transparent;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}
.btn-outline-primary:hover { background: var(--brand-glow); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--content-bg); color: var(--text-primary); border-color: var(--border-color); }

/* Icon-only button */
.btn-icon {
    width: 30px; height: 30px;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--ease);
    flex-shrink: 0;
}

.btn-icon:hover { border-color: #94a3b8; color: var(--text-primary); }
.btn-icon.active, .btn-icon:active { background: var(--content-bg); }

/* ─── Filter Bar ────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 11px 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-xs);
}

.filter-bar label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); margin: 0; white-space: nowrap; }
.filter-bar .form-select,
.filter-bar .form-control { font-size: 12.5px; min-width: 120px; height: 30px; padding: 4px 8px; }
.filter-bar .btn-apply { background: var(--brand-primary); color: #fff; border: none; padding: 5px 14px; border-radius: var(--radius-md); font-size: 12.5px; cursor: pointer; height: 30px; }
.filter-bar .btn-reset { background: #fff; border: 1px solid var(--border-color); padding: 5px 12px; border-radius: var(--radius-md); font-size: 12.5px; cursor: pointer; color: var(--text-secondary); height: 30px; }
.filter-bar .btn-reset:hover { border-color: #94a3b8; }
.filter-bar .form-select:focus,
.filter-bar .form-control:focus { box-shadow: 0 0 0 2px rgba(26,86,219,.12); border-color: var(--brand-primary); outline: none; }

/* ─── Tables ────────────────────────────────────────────── */
.table-wrap {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: var(--shadow-xs);
}

table.drseo-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

table.drseo-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 9px 13px;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    user-select: none;
}

table.drseo-table tbody td {
    padding: 9px 13px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-primary);
}

table.drseo-table tbody tr:last-child td { border-bottom: none; }

table.drseo-table tbody tr:hover td { background: #f8fafc; }

.text-right  { text-align: right; }
.text-center { text-align: center; }

/* ─── Metrics Strip (shared across keywords, backlinks, analytics, on-page) ─── */
.analytics-metrics {
    display: grid;
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--shadow-xs);
}

.analytics-metrics.cols-3 { grid-template-columns: repeat(3, 1fr); }
.analytics-metrics.cols-4 { grid-template-columns: repeat(4, 1fr); }
.analytics-metrics.cols-5 { grid-template-columns: repeat(5, 1fr); }
.analytics-metrics.cols-6 { grid-template-columns: repeat(6, 1fr); }

.am-cell {
    background: #fff;
    padding: 15px 18px;
    cursor: default;
    transition: var(--ease);
    position: relative;
}

.am-cell::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: transparent;
    transition: background .18s;
}

.am-cell:hover { background: #fafbfc; }
.am-cell:hover::after { background: var(--brand-primary); }
.am-cell.selected::after { background: var(--brand-primary); }

.am-cell-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
}

.am-cell-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -.5px;
    line-height: 1.1;
}

.am-cell-trend {
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 3px;
}

.am-cell-trend.up   { color: var(--success); }
.am-cell-trend.down { color: var(--danger); }
.am-cell-trend.flat { color: var(--text-muted); }

/* ─── Toast Notifications ───────────────────────────────── */
#toast-container {
    position: fixed;
    top: 62px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 7px;
    pointer-events: none;
}

.toast-msg {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 11px 14px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 250px;
    max-width: 340px;
    animation: toast-in .22s cubic-bezier(.4,0,.2,1);
    pointer-events: all;
}

.toast-msg .toast-close {
    margin-left: auto;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.toast-msg.toast-success { border-left: 3px solid var(--success); }
.toast-msg.toast-error   { border-left: 3px solid var(--danger); }
.toast-msg.toast-info    { border-left: 3px solid var(--info); }
.toast-msg.toast-warning { border-left: 3px solid var(--warning); }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(16px) scale(.97); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ─── Forms ─────────────────────────────────────────────── */
.form-section { margin-bottom: 24px; }

.form-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    letter-spacing: -.1px;
}

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

.form-control, .form-select {
    font-size: 13px;
    border-color: var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    height: 34px;
    padding: 6px 10px;
    transition: var(--ease);
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,.1);
    outline: none;
}

textarea.form-control { height: auto; }

.field-hint   { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.required-mark { color: var(--danger); }

/* ─── Modals ────────────────────────────────────────────── */
.modal-content {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 14px 18px;
    background: var(--card-bg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; }

.modal-body   { padding: 18px; }

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 12px 18px;
    gap: 7px;
}

/* ─── Alerts ────────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-md);
    font-size: 12.5px;
    padding: 10px 14px;
}

.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert-warning { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.alert-info    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* ─── Divider ───────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border-light);
    border: none;
    margin: 16px 0;
}

/* ─── Tabs (pill style) ─────────────────────────────────── */
.tab-pills {
    display: flex;
    gap: 3px;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3px;
    width: fit-content;
    margin-bottom: 18px;
}

.tab-pill {
    padding: 5px 13px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: calc(var(--radius-md) - 2px);
    cursor: pointer;
    transition: var(--ease);
    border: none;
    background: transparent;
}

.tab-pill:hover { color: var(--text-primary); }

.tab-pill.active {
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

/* Tab content pane — shown/hidden via .tab-content-hidden */
.tab-content-pane { display: block; }
.tab-content-hidden { display: none; }

/* ─── Search Input ──────────────────────────────────────── */
.search-input-wrap {
    position: relative;
}

.search-input-wrap .bi-search {
    position: absolute;
    left: 10px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

.search-input-wrap input {
    padding-left: 32px;
}

/* ─── Utilities ─────────────────────────────────────────── */
.text-brand   { color: var(--brand-primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted   { color: var(--text-muted) !important; }
.text-primary-color { color: var(--text-primary); }
.font-mono    { font-family: var(--font-mono); font-size: .9em; }
.truncate     { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-500       { font-weight: 500; }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.gap-1        { gap: 4px; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.flex-1       { flex: 1; }
.flex-1-min0  { flex: 1; min-width: 0; }
.flex-2       { flex: 2; }
.fs-10        { font-size: 10px; }
.fs-11        { font-size: 11px; }
.fs-12        { font-size: 12px; }
.fs-13        { font-size: 13px; }
.fs-14        { font-size: 14px; }
.fs-16        { font-size: 16px; }
.fs-20        { font-size: 20px; }
.va-mid       { vertical-align: middle; }
.icon-dot     { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.empty-icon   { font-size: 24px; color: #9ca3af; }
.empty-icon-lg{ font-size: 32px; color: #9ca3af; display: block; margin-bottom: 12px; }

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 767.98px) {
    /* Mobile: sidebar is off-screen overlay — remove all left offsets */
    .main-area {
        margin-left: 0 !important;
    }
    .sidebar.collapsed + .main-area {
        margin-left: 0 !important;
    }
    .topbar {
        left: 0 !important;   /* Full-width topbar on mobile */
    }
    body:has(.sidebar.collapsed) .topbar {
        left: 0 !important;
    }
    .main-content {
        padding: calc(var(--topbar-height) + 16px) 16px 16px 16px;
    }
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        transition: transform .22s cubic-bezier(.4,0,.2,1);
        width: var(--sidebar-width) !important;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-actions { width: 100%; }
    .filter-bar { flex-direction: column; align-items: flex-start; }
    .kpi-tile-value { font-size: 22px; }
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATIONS PAGE
   ═══════════════════════════════════════════════════════════ */
.notif-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    background: #fff;
    transition: var(--ease);
    position: relative;
}
.notif-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.notif-unread { border-left: 3px solid var(--brand-primary); background: #fafcff; }
.notif-read   { opacity: .8; }

.notif-unread-dot {
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-primary);
}
.notif-body {
    flex: 1;
    min-width: 0;
    position: relative;
}
.notif-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}
.notif-text {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}
.notif-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.notif-time {
    font-size: 11.5px;
    color: var(--text-muted);
}
.notif-type-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}
.notif-type-audit         { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.notif-type-rank          { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.notif-type-backlink      { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.notif-type-keyword       { background: #faf5ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.notif-type-report        { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.notif-type-system        { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.notif-type-ai-visibility { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.notif-cta {
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 10px;
    margin-left: auto;
}
.notif-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

/* ─── 2-column form row utility ─────────────────────────── */
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
@media (max-width: 540px) {
    .form-row-2col { grid-template-columns: 1fr; }
}

/* ─── Shared: Searchable Picker (group / location) ───────── */
.group-picker-wrap { position: relative; }

.group-picker-input {
    width: 100%;
    padding: 7px 32px 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-primary);
    background: #fff;
    outline: none;
    transition: border-color .15s ease;
}
.group-picker-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}

.group-picker-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    z-index: 1060;
    max-height: 220px;
    overflow-y: auto;
}
.group-picker-dropdown.open { display: block; }

.group-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background .1s ease;
}
.group-picker-item:hover { background: var(--page-bg); }
.group-picker-item.selected { background: #eff6ff; color: var(--brand-primary); }

.group-picker-dot {
    width: 9px; height: 9px;
    border-radius: 50%; flex-shrink: 0;
}

.group-picker-create {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; font-size: 12.5px; font-weight: 600;
    color: var(--brand-primary); cursor: pointer;
    border-top: 1px solid var(--border-light);
    background: #f8fafc; transition: background .1s ease;
}
.group-picker-create:hover { background: #eff6ff; }

.group-picker-none {
    padding: 10px 12px; font-size: 12px;
    color: var(--text-muted); text-align: center;
}

/* ─── Utility: border-top separator ─────────────────────── */
.border-top-light { border-top: 1px solid var(--border-light); }

/* ─── Utility: narrow modal widths ──────────────────────── */
.modal-sm-440 { max-width: 440px; }
.modal-sm-460 { max-width: 460px; }
.modal-sm-480 { max-width: 480px; }
.modal-sm-500 { max-width: 500px; }
.modal-sm-520 { max-width: 520px; }
.modal-sm-540 { max-width: 540px; }

/* ─── Utility: favicon inline ────────────────────────────── */
.favicon-inline { border-radius: 2px; vertical-align: middle; }
.favicon-inline-sm { width: 14px; height: 14px; border-radius: 2px; vertical-align: middle; }
.site-favicon-inline { border-radius: 2px; vertical-align: middle; }

/* ─── Utility: table column widths ───────────────────────── */
.th-w50  { width: 50px; }
.th-w60  { width: 60px; }
.th-w70  { width: 70px; }
.th-w80  { width: 80px; }
.th-w90  { width: 90px; }
.th-w100 { width: 100px; }
.th-w110 { width: 110px; }
.th-w120 { width: 120px; }
.th-w130 { width: 130px; }
.th-w140 { width: 140px; }
.th-w150 { width: 150px; }
.th-w160 { width: 160px; }
.th-w180 { width: 180px; }
.th-w200 { width: 200px; }
.th-w220 { width: 220px; }
.th-w240 { width: 240px; }
.th-wauto { width: auto; }

/* ─── Utility: alert icon alignment ──────────────────────── */
.alert-icon { margin-top: 2px; flex-shrink: 0; }

/* ─── Utility: API key type badge ────────────────────────── */
.api-key-type-badge { font-size: 11px; font-weight: 600; color: var(--text-muted); }

/* ─── Utility: small muted text ──────────────────────────── */
.text-11 { font-size: 11px; color: var(--text-muted); }

/* ─── Topbar: Location Badge ─────────────────────────────── */
.topbar-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 7px;
    background: #f0f4ff;
    border: 1px solid #c7d7fa;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.topbar-location-badge:hover {
    background: #e0eaff;
    border-color: var(--brand-primary);
    color: var(--brand-hover);
}
.topbar-location-flag {
    font-size: 14px;
    line-height: 1;
}
.topbar-location-name {
    font-size: 12px;
    font-weight: 600;
}
.topbar-location-code {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
}

/* ─── Location Context Badge (inline in page subtitles) ─── */
.location-context-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-primary);
    background: #f0f4ff;
    border: 1px solid #c7d7fa;
    border-radius: 12px;
    padding: 1px 8px 1px 6px;
    vertical-align: middle;
}
.location-context-code {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
}

/* ─── Primary Market Badge (ADR-007 — display-only) ──────── */
/* Replaced the interactive location picker. Shows the site's  */
/* primary market in the topbar as information, not a filter.  */
/* Clicking links to the location settings page.               */
.primary-market-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 7px;
    background: #f0f4ff;
    border: 1px solid #c7d7fa;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .14s ease, border-color .14s ease;
}
.primary-market-badge:hover {
    background: #e0eaff;
    border-color: var(--brand-primary);
    text-decoration: none;
    color: var(--brand-hover);
}
.primary-market-badge .pm-flag { font-size: 14px; line-height: 1; }
.primary-market-badge .pm-name { font-size: 12px; font-weight: 600; }
.primary-market-badge .pm-more {
    font-size: 10px; font-weight: 700;
    background: #dbeafe; color: var(--brand-primary);
    border-radius: 10px; padding: 1px 5px;
}

.location-picker-menu {
    min-width: 260px;
    padding: 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    overflow: hidden;
}
.location-picker-search-wrap {
    padding: 10px 10px 6px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.location-picker-search-wrap .bi-search {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-55%);
    font-size: 12px;
    color: var(--text-muted);
    pointer-events: none;
}
.location-picker-search {
    width: 100%;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 10px 0 28px;
    font-size: 12.5px;
    color: var(--text-primary);
    background: var(--content-bg);
}
.location-picker-search:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(99,102,241,.1);
}
.location-picker-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
}
.location-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 12.5px;
    color: var(--text-primary);
    transition: background .1s;
    text-decoration: none;
}
.location-picker-item:hover { background: #f8faff; color: var(--text-primary); }
.location-picker-item.lp-active {
    background: #f0f4ff;
    color: var(--brand-primary);
    font-weight: 600;
}
.location-picker-item .lp-flag { font-size: 16px; line-height: 1; flex-shrink: 0; }
.location-picker-item .lp-name { flex: 1; }
.location-picker-item .lp-code { font-size: 10.5px; color: var(--text-muted); font-weight: 600; }
.location-picker-item .lp-check { font-size: 11px; color: var(--brand-primary); opacity: 0; }
.location-picker-item.lp-active .lp-check { opacity: 1; }
/* location-picker dropdown CSS removed — ADR-007 */

/* responsive: cols-5 collapses to 2-col on tablet */
@media (max-width: 991.98px) {
    .analytics-metrics.cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 575.98px) {
    .analytics-metrics.cols-5,
    .analytics-metrics.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Page-level Empty State (.page-empty-state) ──────────
   Used on: gap-analysis, topics, cwv, ai-visibility, and
   any full-page "no data yet" screen.
   ─────────────────────────────────────────────────────── */
.page-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 24px;
    text-align: center;
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 8px;
}

.pes-icon {
    font-size: 2.8rem;
    color: var(--text-muted);
    opacity: .45;
    margin-bottom: 16px;
}

.pes-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pes-body {
    font-size: .84rem;
    color: var(--text-muted);
    max-width: 400px;
    line-height: 1.6;
}

/* ─── Shared report empty state ────────────────────────── */
.report-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 52px 24px;
    text-align: center;
}

.report-empty-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    opacity: .5;
}

.report-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.report-empty-body {
    font-size: .82rem;
    color: var(--text-muted);
    max-width: 360px;
    line-height: 1.5;
}

/* ─── Paginator (vendor/pagination/default.blade.php) — global ─── */
.pagination-controls { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    background: #fff;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 5px;
    color: var(--text-secondary, #475569);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.pagination-btn:hover { background: #f8fafc; border-color: #cbd5e1; color: #1e293b; }
.pagination-btn-active {
    background: var(--brand-primary, #1a56db);
    color: #fff !important;
    border-color: var(--brand-primary, #1a56db);
    font-weight: 600;
    pointer-events: none;
}
.pagination-ellipsis { font-size: 12px; color: #94a3b8; padding: 0 4px; line-height: 28px; }

/* ─── Queue Status Widget ──────────────────────────────────── */
.queue-status-widget { display: inline-flex; align-items: center; }
.queue-status-btn { position: relative; }
.queue-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    border-radius: 8px;
    text-align: center;
    pointer-events: none;
}
.queue-pulse {
    animation: queue-pulse-anim 2s ease-in-out infinite;
}
@keyframes queue-pulse-anim {
    0%, 100% { opacity: 1; }
    50%       { opacity: .45; }
}
.queue-dropdown {
    min-width: 240px;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}
.queue-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 12px;
    color: #334155;
}
.queue-dropdown-title { display: flex; align-items: center; gap: 4px; }
.queue-dropdown-body { padding: 10px 14px; }
.queue-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.queue-stat-row:last-of-type { border-bottom: none; }
.queue-stat-label { color: #64748b; }
.queue-stat-val   { font-weight: 600; }
.queue-run-note   { font-size: 11px; color: #94a3b8; }
/* spin utility used inline by queue run button */
.spin { animation: spin-anim .7s linear infinite; display: inline-block; }
@keyframes spin-anim { to { transform: rotate(360deg); } }

/* location picker labels removed — ADR-007 */

/* ============================================================
   SYNC CONFIRM MODAL  (shared — partials/sync-modal.blade.php)
   ============================================================ */

.sync-confirm-dialog { max-width: 480px; }

.sync-confirm-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    overflow: hidden;
}

.sync-confirm-header {
    background: linear-gradient(135deg, var(--brand-navy, #1e3a5f) 0%, var(--brand-primary, #1a56db) 100%);
    color: #fff;
    border-bottom: none;
    padding: 16px 20px;
}

.sync-confirm-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.sync-confirm-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.sync-confirm-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0 0 2px; }
.sync-confirm-subtitle { font-size: 12px; color: rgba(255,255,255,.75); margin: 0; }
.sync-confirm-header .btn-close { filter: invert(1) grayscale(1) brightness(2); }

.sync-confirm-body { padding: 18px 20px 10px; }
.sync-confirm-footer { padding: 10px 20px 16px; border-top: 1px solid #f1f5f9; }

/* Credit card */
.sync-credit-card {
    background: #f8faff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.sync-credit-loading { font-size: 13px; color: #64748b; display: flex; align-items: center; }

.sync-credit-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.sync-credit-plan,
.sync-credit-balance { flex: 1; }

.sync-credit-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 3px;
}

.sync-credit-plan-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-navy, #1e3a5f);
}

.sync-credit-balance-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-primary, #1a56db);
    line-height: 1;
}

.sync-credit-balance-val.low { color: #dc2626; }

/* Op cost breakdown */
.sync-credit-ops {
    border-top: 1px solid #dbeafe;
    padding-top: 10px;
    margin-bottom: 10px;
}

.sync-credit-op-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 4px 0;
}

.sync-credit-op-label { color: #475569; }

.sync-credit-op-cost {
    font-weight: 600;
    color: var(--brand-navy, #1e3a5f);
    background: #dbeafe;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
}

.sync-credit-total-row {
    border-top: 1px solid #dbeafe;
    margin-top: 4px;
    padding-top: 6px;
}

.sync-credit-total {
    background: var(--brand-primary, #1a56db);
    color: #fff;
    font-size: 13px;
}

.sync-credit-after-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    border-top: 1px solid #dbeafe;
    padding-top: 8px;
    margin-top: 4px;
}

.sync-credit-after-val {
    font-weight: 700;
    font-size: 15px;
    color: #16a34a;
}

.sync-credit-after-val.low { color: #dc2626; }

/* Insufficient credits warning */
.sync-no-credits-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #dc2626;
    margin-top: 10px;
}

.sync-topup-link { color: #dc2626; font-weight: 600; text-decoration: underline; }

/* Info row at bottom of modal body */
.sync-info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #475569;
    background: #eff6ff;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 4px;
}

.sync-info-icon { font-size: 14px; color: var(--brand-primary, #1a56db); flex-shrink: 0; margin-top: 1px; }

/* Extra fields slot */
.sync-extra-fields { }

/* Confirm button running state */
.sync-btn-running { opacity: .8; cursor: not-allowed; }

/* ============================================================
   SYNC IN-PROGRESS BANNER  (partials/sync-progress-banner.blade.php)
   ============================================================ */

.sync-progress-banner {
    background: linear-gradient(135deg, var(--brand-navy, #1e3a5f) 0%, #1d4ed8 100%);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(30,58,95,.18);
}

.sync-progress-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.sync-progress-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sync-progress-spinner { color: #fff; font-size: 18px; }

.sync-progress-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sync-progress-text strong {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.sync-progress-time {
    font-size: 11px;
    color: rgba(255,255,255,.65);
}

.sync-progress-right { }

.sync-progress-note {
    font-size: 12px;
    color: rgba(255,255,255,.7);
}

/* Animated sliding progress bar */
.sync-progress-bar-wrap { padding: 0 18px 10px; }

.sync-progress-bar-track {
    height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 2px;
    overflow: hidden;
}

.sync-progress-bar-fill {
    height: 100%;
    width: 40%;
    background: rgba(255,255,255,.85);
    border-radius: 2px;
    animation: sync-progress-slide 2s ease-in-out infinite alternate;
}

@keyframes sync-progress-slide {
    0%   { transform: translateX(0);   width: 30%; }
    100% { transform: translateX(200%); width: 40%; }
}

/* ============================================================
   SYNC CONFIRM MODAL  (shared — partials/sync-modal.blade.php)
   ============================================================ */

.sync-confirm-dialog { max-width: 460px; }

.sync-confirm-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.sync-confirm-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 22px 16px;
    align-items: flex-start;
    gap: 0;
}

.sync-confirm-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
}

.sync-confirm-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--brand-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--brand-primary);
    font-size: 20px;
}

.sync-confirm-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.3;
}

.sync-confirm-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.sync-confirm-body { padding: 20px 22px; }

/* Credit card */
.sync-credit-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 14px;
}

.sync-credit-loading {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.sync-credit-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.sync-credit-plan,
.sync-credit-balance {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.sync-credit-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}

.sync-credit-plan-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-primary);
}

.sync-credit-balance-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -.02em;
}

.sync-credit-balance-val.low { color: var(--danger); }

/* Operation cost rows */
.sync-credit-ops {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.sync-credit-op-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
}

.sync-credit-op-label { color: var(--text-secondary); }

.sync-credit-op-cost {
    font-weight: 600;
    color: var(--text-primary);
    background: #e0e7ff;
    border-radius: 30px;
    padding: 2px 9px;
    font-size: 11px;
}

.sync-credit-total-row {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed var(--border-color);
}

.sync-credit-total {
    background: var(--brand-primary);
    color: #fff;
}

.sync-credit-after-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding-top: 2px;
}

.sync-credit-after-val {
    font-weight: 700;
    color: var(--success);
    font-size: 13px;
}

.sync-credit-after-val.low { color: var(--warning); }

/* No credits message */
.sync-no-credits-msg {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--danger);
}

.sync-topup-link {
    color: var(--danger);
    font-weight: 600;
    text-decoration: underline;
}

/* Info row */
.sync-info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    background: #f0f9ff;
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    line-height: 1.45;
}

.sync-info-icon {
    color: var(--info);
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.sync-confirm-footer {
    border-top: 1px solid var(--border-color);
    padding: 14px 22px;
    background: #f8fafc;
}

/* ============================================================
   SYNC PROGRESS BANNER  (shared — partials/sync-progress-banner.blade.php)
   ============================================================ */

.sync-progress-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a56db 100%);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.sync-progress-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 10px;
    gap: 12px;
    flex-wrap: wrap;
}

.sync-progress-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sync-progress-spinner .spinner-border {
    color: rgba(255,255,255,.85);
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.sync-progress-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.sync-progress-time {
    font-size: 11px;
    color: rgba(255,255,255,.65);
}

.sync-progress-note {
    font-size: 11px;
    color: rgba(255,255,255,.7);
}

/* Animated progress bar */
.sync-progress-bar-wrap { padding: 0 18px 10px; }

.sync-progress-bar-track {
    height: 3px;
    background: rgba(255,255,255,.2);
    border-radius: 2px;
    overflow: hidden;
}

.sync-progress-bar-fill {
    height: 100%;
    width: 30%;
    background: rgba(255,255,255,.85);
    border-radius: 2px;
    animation: sync-progress-slide 2s ease-in-out infinite;
}

@keyframes sync-progress-slide {
    0%   { transform: translateX(-100%); width: 40%; }
    50%  { width: 60%; }
    100% { transform: translateX(350%); width: 40%; }
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION SKELETON + EMPTY STATE
   ═══════════════════════════════════════════════════════════ */
.notif-skeleton { padding: 10px 14px; }

.notif-skeleton-line {
    height: 10px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    animation: notif-shimmer 1.4s ease-in-out infinite;
}
.notif-skeleton-line:nth-child(2) { width: 75%; }
.notif-skeleton-line:nth-child(3) { width: 88%; }
.notif-skeleton-line:nth-child(4) { width: 60%; }
.notif-skeleton-line:last-child   { margin-bottom: 0; }

@keyframes notif-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.notif-empty { padding: 24px 14px; text-align: center; }
.notif-empty-icon  { font-size: 26px; color: #cbd5e1; display: block; margin-bottom: 6px; }
.notif-empty-text  { font-size: 13px; font-weight: 600; color: var(--text-secondary); display: block; }
.notif-empty-sub   { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }
.notif-subtext     { font-size: 11px; color: var(--text-muted); margin-top: 2px; display: block; }
.notif-action-link { font-size: 11px; color: var(--brand-primary); text-decoration: none; font-weight: 500; margin-top: 3px; display: inline-block; }
.notif-action-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   CREDIT CHIP — topbar balance indicator
   ═══════════════════════════════════════════════════════════ */
.credit-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 7px;
    border-radius: 20px;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    transition: var(--ease);
    height: 28px;
    white-space: nowrap;
}
.credit-chip:hover { border-color: var(--brand-primary); color: var(--brand-primary); text-decoration: none; }
.credit-chip-icon  { font-size: 13px; color: var(--brand-primary); }
.credit-chip-val   { font-variant-numeric: tabular-nums; color: var(--text-primary); font-weight: 700; }
.credit-chip-label { color: var(--text-muted); font-weight: 500; }

.credit-chip.credit-chip-warn { border-color: #f59e0b; background: #fffbeb; }
.credit-chip.credit-chip-warn .credit-chip-icon { color: #d97706; }
.credit-chip.credit-chip-warn .credit-chip-val  { color: #92400e; }

.credit-chip.credit-chip-danger { border-color: #ef4444; background: #fef2f2; animation: credit-pulse 2s ease-in-out infinite; }
.credit-chip.credit-chip-danger .credit-chip-icon { color: #dc2626; }
.credit-chip.credit-chip-danger .credit-chip-val  { color: #991b1b; }

@keyframes credit-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .7; }
}

/* ═══════════════════════════════════════════════════════════
   COMMAND PALETTE
   ═══════════════════════════════════════════════════════════ */
#cp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14vh;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
#cp-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0,0,0,.22), 0 4px 16px rgba(0,0,0,.12);
    width: 560px;
    max-width: calc(100vw - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 60vh;
}
#cp-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.cp-search-icon { font-size: 16px; color: #94a3b8; flex-shrink: 0; }
#cp-input { flex: 1; border: none; outline: none; font-size: 15px; color: #1e293b; background: transparent; font-family: inherit; }
#cp-input::placeholder { color: #94a3b8; }
#cp-esc-hint { font-size: 11px; color: #94a3b8; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; padding: 2px 6px; flex-shrink: 0; }
#cp-list { overflow-y: auto; flex: 1; padding: 6px 0; }
#cp-list::-webkit-scrollbar { width: 4px; }
#cp-list::-webkit-scrollbar-track { background: transparent; }
#cp-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }
.cp-group-label { padding: 8px 16px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; }
.cp-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; text-decoration: none; color: inherit; transition: background 80ms; }
.cp-item:hover, .cp-item.cp-active { background: #eff6ff; text-decoration: none; color: inherit; }
.cp-item-icon { width: 28px; height: 28px; border-radius: 6px; background: #f1f5f9; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: #475569; flex-shrink: 0; }
.cp-item.cp-active .cp-item-icon { background: #dbeafe; color: var(--brand-primary); }
.cp-item-label { flex: 1; font-size: 13.5px; color: #1e293b; font-weight: 500; }
.cp-item-tag { font-size: 10px; color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; padding: 2px 6px; }
.cp-empty { padding: 32px 16px; text-align: center; font-size: 13px; color: #94a3b8; }
#cp-footer { padding: 9px 16px; border-top: 1px solid #e2e8f0; display: flex; align-items: center; gap: 14px; background: #f8fafc; font-size: 11px; color: #94a3b8; }
#cp-footer kbd { font-size: 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; padding: 1px 5px; color: #475569; font-family: inherit; box-shadow: 0 1px 0 #e2e8f0; margin-right: 2px; }

/* ═══════════════════════════════════════════════════════════
   GET STARTED CARD — new-site empty state on dashboard
   ═══════════════════════════════════════════════════════════ */
.gs-card { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 22px 24px 20px; margin-bottom: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.gs-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.gs-card-heading { display: flex; align-items: center; gap: 10px; }
.gs-card-icon { width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, var(--brand-primary), #6366f1); display: flex; align-items: center; justify-content: center; font-size: 17px; color: #fff; flex-shrink: 0; }
.gs-card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0 0 2px; }
.gs-card-sub { font-size: 12px; color: var(--text-muted); margin: 0; }
.gs-dismiss { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 2px 4px; line-height: 1; border-radius: 4px; transition: var(--ease); flex-shrink: 0; }
.gs-dismiss:hover { color: var(--text-secondary); background: var(--content-bg); }
.gs-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 767px) { .gs-steps { grid-template-columns: 1fr; } }
.gs-step { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--border-color); background: var(--content-bg); text-decoration: none; color: inherit; transition: var(--ease); }
.gs-step:hover { border-color: var(--brand-primary); background: #eff6ff; text-decoration: none; color: inherit; }
.gs-step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-primary); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gs-step-body { flex: 1; min-width: 0; }
.gs-step-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin: 0 0 3px; }
.gs-step-desc { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.4; }
.gs-step-arrow { font-size: 14px; color: #cbd5e1; align-self: center; flex-shrink: 0; transition: var(--ease); }
.gs-step:hover .gs-step-arrow { color: var(--brand-primary); transform: translateX(2px); }

/* ═══════════════════════════════════════════════════════════
   DISMISS-ONCE ALERT BUTTON
   ═══════════════════════════════════════════════════════════ */
.dismissible-module-alert { position: relative; }
.dismissible-module-alert .dma-close { opacity: .55; font-size: 11px; }
.dismissible-module-alert .dma-close:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR — COLLAPSED MODE TOOLTIPS
   ═══════════════════════════════════════════════════════════ */
.sidebar.collapsed .sidebar-item[data-label],
.sidebar.collapsed .sidebar-group-header[data-label] {
    position: relative;
}
.sidebar.collapsed .sidebar-item[data-label]::after,
.sidebar.collapsed .sidebar-group-header[data-label]::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease;
    z-index: 1200;
}
.sidebar.collapsed .sidebar-item[data-label]:hover::after,
.sidebar.collapsed .sidebar-group-header[data-label]:hover::after { opacity: 1; }
.sidebar.collapsed .sidebar-item[data-label]::before,
.sidebar.collapsed .sidebar-group-header[data-label]::before {
    content: '';
    position: absolute;
    left: calc(100% + 5px);
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #1e293b;
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease;
    z-index: 1201;
}
.sidebar.collapsed .sidebar-item[data-label]:hover::before,
.sidebar.collapsed .sidebar-group-header[data-label]:hover::before { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR — "More / Less" toggle for Backlinks sub-items
   ═══════════════════════════════════════════════════════════ */
.sidebar-more-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 12px 7px 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    transition: var(--ease);
}
.sidebar-more-btn:hover { color: var(--text-secondary); background: rgba(0,0,0,.03); }
.sidebar-more-btn .nav-icon { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   MODULE EMPTY STATES
   Standard pattern reused across all modules.
   ═══════════════════════════════════════════════════════════ */
.module-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 8px;
}
.module-empty-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
    line-height: 1;
}
.module-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}
.module-empty-sub {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 380px;
    line-height: 1.5;
    margin: 0 0 20px;
}
.module-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* ═══════════════════════════════════════════════════════════
   CREDIT 402 MODAL
   ═══════════════════════════════════════════════════════════ */
#credit-402-modal .modal-header {
    background: linear-gradient(135deg, #fef2f2, #fff);
    border-bottom: 1px solid #fecaca;
}
#credit-402-modal .credit-402-icon {
    font-size: 40px;
    color: #ef4444;
    display: block;
    margin-bottom: 8px;
}
#credit-402-modal .credit-402-balance {
    font-size: 28px;
    font-weight: 800;
    color: #dc2626;
    font-variant-numeric: tabular-nums;
}
#credit-402-modal .credit-402-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
}
