/* Signal Corps — layout and components. Shared visual language from styles.css (.war-card, etc.). */

/* Page: use same styles as trainer — body and .war-card from styles.css, no overrides */
.signal-corps-page {
    min-height: 100vh;
}

/* Arriving at Signal Corps: scan-in */
.signal-corps-page.sc-arriving {
    animation: scArrive 0.6s ease-out forwards;
}

@keyframes scArrive {
    0%   { opacity: 0.3; filter: brightness(0.6); }
    100% { opacity: 1; filter: brightness(1); }
}

/* Departing Signal Corps: gold vignette collapse */
.page-transition-overlay.warroom-depart {
    background: radial-gradient(circle at center,
        rgba(5, 5, 8, 0.92) 0%,
        rgba(5, 5, 8, 0.88) 40%,
        rgba(40, 30, 12, 0.8) 70%,
        rgba(215, 175, 55, 0.2) 100%);
    opacity: 1;
    animation: warDepartVignette 0.75s ease-in forwards;
}

@keyframes warDepartVignette {
    0%   { opacity: 0; }
    65%  { opacity: 0.85; }
    100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .signal-corps-page.sc-arriving,
    .page-transition-overlay.warroom-depart {
        animation: none !important;
        opacity: 1 !important;
    }
}

/* Slightly lighter card backgrounds so the main panels don’t feel darker than training */
/* Main content — same z-index as .app-container so body::after dark overlay doesn't sit on top */
.sc-main {
    box-sizing: border-box;
    width: 100%;
    max-width: min(96vw, 1800px);
    margin: 0 auto;
    padding: 1.25rem;
    position: relative;
    z-index: 1;
}

.sc-view {
    display: none;
}

.sc-view.is-active {
    display: block;
}

/* War Room link tab — match button styling */
.signal-corps-page .category-tab.category-tab-link {
    text-decoration: none;
    cursor: url('../img/kunai-cursor-64.png') 6 5, auto !important;
}

.signal-corps-page .category-tab.category-tab-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Radar nav goal celebration (scoped to Signal Corps page only) */
.signal-corps-page .category-tab[data-view="radar"] .category-icon-img {
    transition: transform 0.35s ease, filter 0.35s ease, opacity 0.35s ease;
}

.signal-corps-page .category-tab[data-view="radar"].sc-radar-goal-complete .category-icon-img {
    animation: scRadarIconCelebratePulse 2.4s ease-in-out infinite;
}

.signal-corps-page .category-tab[data-view="radar"].sc-radar-goal-complete .category-icon::after {
    animation: scRadarIconCelebrateHalo 2.4s ease-in-out infinite;
}

.signal-corps-page .category-tab[data-view="radar"].sc-radar-goal-burst .category-icon-img {
    animation: scRadarIconCelebrateBurst 1.2s ease-out 1;
}

.signal-corps-page .category-tab[data-view="radar"].sc-radar-goal-burst .category-tab-accent {
    opacity: 1;
    transform: translateX(-50%) scaleX(1.12);
    box-shadow:
        0 0 30px rgba(var(--tab-accent-rgb, 56, 189, 248), 0.9),
        0 0 55px rgba(var(--tab-accent-rgb, 56, 189, 248), 0.35);
}

@keyframes scRadarIconCelebratePulse {
    0%, 100% {
        transform: scale(1);
        filter:
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.25))
            drop-shadow(0 0 8px rgba(255, 200, 120, 0.65));
    }
    50% {
        transform: scale(1.08);
        filter:
            drop-shadow(0 0 16px rgba(160, 235, 255, 0.9))
            drop-shadow(0 0 22px rgba(56, 189, 248, 0.85));
    }
}

@keyframes scRadarIconCelebrateHalo {
    0%, 100% { opacity: 0.25; transform: translate(-4px, -4px) scale(1); }
    50% { opacity: 0.5; transform: translate(-4px, -4px) scale(1.22); }
}

@keyframes scRadarIconCelebrateBurst {
    0% { transform: scale(1); }
    30% { transform: scale(1.2); }
    55% { transform: scale(0.98); }
    100% { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .signal-corps-page .category-tab[data-view="radar"].sc-radar-goal-complete .category-icon-img,
    .signal-corps-page .category-tab[data-view="radar"].sc-radar-goal-complete .category-icon::after,
    .signal-corps-page .category-tab[data-view="radar"].sc-radar-goal-burst .category-icon-img,
    .sc-radar-progress-fill.sc-radar-progress-near {
        animation: none !important;
    }
}

/* Radar as standalone view: avoid stacking margin with .sc-main padding */
#radarView .sc-radar-section {
    margin-top: 0;
}

/* Calendar at bottom of Operations */
:where(#dailyOpsView) .sc-campaign-cal {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* ----- Today's Battle Plan (Operations Center center column) ----- */
.sc-battle-plan-root {
    min-width: 0;
}

.sc-battle-plan {
    margin-bottom: 0;
}

.sc-bp-header {
    padding-bottom: 0.65rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-bp-subtitle {
    margin-bottom: 0.15rem;
}

.sc-bp-heading {
    font-size: 1.1rem;
    margin: 0 0 0.2rem;
}

.sc-bp-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: rgba(224, 224, 224, 0.5);
    margin: 0;
    text-transform: uppercase;
}

/* Outreach pulse stats */
.sc-bp-pulse {
    padding-bottom: 0.65rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-bp-pulse-row {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 0.55rem;
}

.sc-bp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 4.5rem;
}

.sc-bp-stat-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.35rem;
    font-weight: 600;
    color: rgba(201, 168, 76, 0.92);
    line-height: 1.15;
}

.sc-bp-stat-label {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    color: rgba(224, 224, 224, 0.5);
    text-align: center;
    text-transform: uppercase;
    line-height: 1.3;
}

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

.sc-bp-progress-fill {
    height: 100%;
    background: rgba(201, 168, 76, 0.55);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.sc-bp-progress--complete {
    background: rgba(100, 200, 120, 0.7);
}

/* Sections */
.sc-bp-section {
    margin-bottom: 0.75rem;
}

.sc-bp-section:last-child {
    margin-bottom: 0;
}

.sc-bp-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(224, 224, 224, 0.65);
    margin: 0 0 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Badge pills */
.sc-bp-badge {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-weight: 400;
    vertical-align: middle;
    background: rgba(201, 168, 76, 0.18);
    color: rgba(201, 168, 76, 0.85);
}

.sc-bp-badge--overdue {
    background: rgba(220, 80, 60, 0.18);
    color: rgba(245, 120, 100, 0.9);
}

.sc-bp-badge--due {
    background: rgba(100, 180, 220, 0.15);
    color: rgba(140, 200, 240, 0.9);
}

/* Item lists */
.sc-bp-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sc-bp-list--tasks {
    padding-left: 0;
}

.sc-bp-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: rgba(224, 224, 224, 0.82);
    transition: background 0.15s;
}

.sc-bp-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.sc-bp-item--overdue {
    border-left: 2px solid rgba(220, 80, 60, 0.5);
    padding-left: 0.5rem;
}

.sc-bp-item--task {
    border-left: 2px solid rgba(201, 168, 76, 0.3);
    padding-left: 0.5rem;
}

.sc-bp-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-bp-item-stage {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    color: rgba(224, 224, 224, 0.4);
    text-transform: uppercase;
    flex-shrink: 0;
}

.sc-bp-item-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.62rem;
    color: rgba(224, 224, 224, 0.4);
    flex-shrink: 0;
}

.sc-bp-overflow {
    font-size: 0.72rem;
    color: rgba(224, 224, 224, 0.4);
    padding: 0.25rem 0.5rem;
    font-style: italic;
}

/* All clear state */
.sc-bp-all-clear {
    text-align: center;
    padding: 1.2rem 0.5rem;
}

.sc-bp-all-clear-text {
    font-size: 0.82rem;
    color: rgba(224, 224, 224, 0.5);
    line-height: 1.5;
    margin: 0;
}

/* ----- Contacts: command overview (streamlined strip + funnel; palette matches .sc-status-box) ----- */
#contactsView .contacts-command-overview-root {
    margin-bottom: 1.5rem;
}

#contactsView .contacts-cmd-overview {
    /* surface from .war-card */
    margin-bottom: 0;
}

#contactsView .contacts-cmd-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--panel-border, rgba(255, 255, 255, 0.06));
}

#contactsView .contacts-cmd-header-main {
    min-width: 0;
}

#contactsView .contacts-cmd-kebab {
    flex-shrink: 0;
    margin-top: 0.1rem;
    padding: 0 0.15rem;
    font-size: 1.15rem;
    line-height: 1;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.28);
    user-select: none;
}

#contactsView .contacts-cmd-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(248, 231, 185, 0.52);
    margin-bottom: 0.3rem;
}

#contactsView .contacts-cmd-heading {
    font-family: Cinzel, serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #e8e8e8;
    margin: 0;
    line-height: 1.2;
}

#contactsView .contacts-cmd-body {
    padding: 0;
}

/* Pipeline: one band; 1px gaps read as dividers (matches panel chrome) */
#contactsView .contacts-cmd-stage-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 1rem;
    padding: 1px;
    border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.06));
    border-radius: 0.65rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

#contactsView .contacts-cmd-stage-tile {
    position: relative;
    padding: 0.55rem 0.35rem 0.55rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.32);
}

#contactsView .contacts-cmd-stage-count {
    font-family: Cinzel, serif;
    font-size: 1.28rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.15;
}

#contactsView .contacts-cmd-stage-label {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
    margin-top: 0.2rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#contactsView .contacts-cmd-funnel {
    margin-bottom: 1rem;
    padding: 0.65rem 0 0.15rem;
    border-top: 1px solid var(--panel-border, rgba(255, 255, 255, 0.06));
}

#contactsView .contacts-cmd-funnel-title {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.55rem;
}

#contactsView .contacts-cmd-funnel-row {
    display: grid;
    grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.45rem 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--panel-border, rgba(255, 255, 255, 0.05));
}

#contactsView .contacts-cmd-funnel-row:last-child {
    border-bottom: none;
}

#contactsView .contacts-cmd-funnel-ident {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

#contactsView .contacts-cmd-funnel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #60a5fa;
}

#contactsView .contacts-cmd-funnel-row--contacted .contacts-cmd-funnel-dot {
    background: #eab308;
}

#contactsView .contacts-cmd-funnel-row--followed_up .contacts-cmd-funnel-dot {
    background: #a78bfa;
}

#contactsView .contacts-cmd-funnel-row--in_progress .contacts-cmd-funnel-dot {
    background: #fb923c;
}

#contactsView .contacts-cmd-funnel-row--won .contacts-cmd-funnel-dot {
    background: #22c55e;
}

#contactsView .contacts-cmd-funnel-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#contactsView .contacts-cmd-funnel-track {
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

#contactsView .contacts-cmd-funnel-bar {
    height: 100%;
    border-radius: 3px;
    min-width: 0;
    background: rgba(96, 165, 250, 0.55);
}

#contactsView .contacts-cmd-funnel-row--contacted .contacts-cmd-funnel-bar {
    background: rgba(234, 179, 8, 0.58);
}

#contactsView .contacts-cmd-funnel-row--followed_up .contacts-cmd-funnel-bar {
    background: rgba(167, 139, 250, 0.62);
}

#contactsView .contacts-cmd-funnel-row--in_progress .contacts-cmd-funnel-bar {
    background: rgba(251, 146, 60, 0.62);
}

#contactsView .contacts-cmd-funnel-row--won .contacts-cmd-funnel-bar {
    background: rgba(34, 197, 94, 0.62);
}

#contactsView .contacts-cmd-funnel-count {
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.88);
    text-align: right;
    min-width: 1.75rem;
}

#contactsView .contacts-cmd-funnel-pct {
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.45);
    min-width: 2.35rem;
    text-align: right;
}

#contactsView .contacts-cmd-status-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

#contactsView .contacts-cmd-status-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.06));
    background: rgba(0, 0, 0, 0.2);
}

#contactsView .contacts-cmd-status-card--overdue {
    border-left: 3px solid rgba(239, 68, 68, 0.65);
}

#contactsView .contacts-cmd-status-card--due {
    border-left: 3px solid rgba(232, 201, 135, 0.55);
}

#contactsView .contacts-cmd-status-value {
    font-family: Cinzel, serif;
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1;
    margin: 0;
    flex-shrink: 0;
}

#contactsView .contacts-cmd-status-value--danger {
    color: #f87171;
}

#contactsView .contacts-cmd-status-value--gold {
    color: #e8c987;
}

#contactsView .contacts-cmd-status-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.25;
    text-align: left;
    color: rgba(255, 255, 255, 0.45);
}

#contactsView .contacts-cmd-activity-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--panel-border, rgba(255, 255, 255, 0.06));
    font-size: 0.72rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.55);
}

#contactsView .contacts-cmd-activity-compact-k {
    flex: 0 0 auto;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: rgba(232, 201, 135, 0.65);
}

#contactsView .contacts-cmd-activity-compact-v {
    flex: 1 1 12rem;
    min-width: 0;
}

#contactsView .contacts-cmd-activity-compact-seg strong {
    color: rgba(255, 255, 255, 0.42);
    font-weight: 600;
    letter-spacing: 0.06em;
}

@media (max-width: 960px) {
    #contactsView .contacts-cmd-stage-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    #contactsView .contacts-cmd-stage-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    #contactsView .contacts-cmd-funnel-row {
        grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr) auto auto;
    }
}

@media (max-width: 640px) {
    #contactsView .contacts-cmd-status-row {
        grid-template-columns: 1fr;
    }

    #contactsView .contacts-cmd-funnel-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-rows: auto auto;
    }

    #contactsView .contacts-cmd-funnel-ident {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    #contactsView .contacts-cmd-funnel-track {
        grid-column: 1;
        grid-row: 2;
    }

    #contactsView .contacts-cmd-funnel-count {
        grid-column: 2;
        grid-row: 2;
        text-align: right;
    }

    #contactsView .contacts-cmd-funnel-pct {
        grid-column: 3;
        grid-row: 2;
        text-align: right;
    }
}

/* ----- Campaign Planning calendar (.sc-campaign-cal) ----- */
.sc-campaign-cal .sc-campaign-cal-header {
    margin-bottom: 0.75rem;
}

.sc-campaign-cal .sc-campaign-cal-subtitle {
    color: rgba(232, 201, 135, 0.85);
}

.sc-campaign-cal .sc-campaign-cal-heading {
    font-family: Cinzel, serif;
    letter-spacing: 0.06em;
}

.sc-campaign-cal .sc-cal-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.sc-campaign-cal .sc-cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
}

.sc-campaign-cal .sc-cal-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sc-campaign-cal .sc-cal-nav-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    font-size: 14px;
    padding: 0;
    border-radius: 2px;
}

.sc-campaign-cal .sc-cal-nav-btn:hover {
    border-color: rgba(232, 201, 135, 0.45);
    color: #e8c987;
}

.sc-campaign-cal .sc-cal-month-label {
    font-family: Cinzel, serif;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.08em;
    min-width: 160px;
    text-align: center;
}

.sc-campaign-cal .sc-cal-view-toggle {
    display: flex;
    gap: 0;
}

.sc-campaign-cal .sc-cal-view-btn {
    font-family: Cinzel, serif;
    font-size: 8px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.15s;
}

.sc-campaign-cal .sc-cal-view-btn:not(:last-child) {
    border-right: none;
}

.sc-campaign-cal .sc-cal-view-btn:hover {
    color: rgba(255, 255, 255, 0.75);
}

.sc-campaign-cal .sc-cal-view-btn.active {
    background: rgba(232, 201, 135, 0.1);
    border-color: rgba(232, 201, 135, 0.45);
    color: #e8c987;
}

.sc-campaign-cal .sc-cal-today-btn {
    font-family: Cinzel, serif;
    font-size: 8px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 2px;
}

.sc-campaign-cal .sc-cal-today-btn:hover {
    border-color: rgba(232, 201, 135, 0.45);
    color: #e8c987;
}

.sc-campaign-cal .sc-cal-body-root {
    min-height: 120px;
}

.sc-campaign-cal .sc-cal-month-grid {
    display: flex;
    flex-direction: column;
}

.sc-campaign-cal .sc-cal-day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-campaign-cal .sc-cal-day-header {
    font-family: Cinzel, serif;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    padding: 10px 0;
    text-align: center;
}

.sc-campaign-cal .sc-cal-weeks {
    display: flex;
    flex-direction: column;
}

.sc-campaign-cal .sc-cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 100px;
}

.sc-campaign-cal .sc-cal-week:last-child {
    border-bottom: none;
}

.sc-campaign-cal .sc-cal-day {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    min-height: 100px;
    vertical-align: top;
}

.sc-campaign-cal .sc-cal-day:last-child {
    border-right: none;
}

.sc-campaign-cal .sc-cal-day:hover {
    background: rgba(232, 201, 135, 0.04);
}

.sc-campaign-cal .sc-cal-day.other-month {
    opacity: 0.35;
}

.sc-campaign-cal .sc-cal-day.today {
    background: rgba(232, 201, 135, 0.06);
}

.sc-campaign-cal .sc-cal-day-num {
    font-family: Cinzel, serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
    display: block;
}

.sc-campaign-cal .sc-cal-day.today .sc-cal-day-num {
    background: #c9a227;
    color: #0a0a0b;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    margin-bottom: 5px;
}

.sc-campaign-cal .sc-cal-entries {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sc-campaign-cal .sc-cal-entry {
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: opacity 0.15s;
    line-height: 1.5;
}

.sc-campaign-cal .sc-cal-entry:hover {
    opacity: 0.85;
}

.sc-campaign-cal .sc-cal-entry.done {
    text-decoration: line-through;
    opacity: 0.45;
}

.sc-campaign-cal .sc-cal-entry.cat-content { background: rgba(26, 58, 92, 0.5); color: #7ab3d9; }
.sc-campaign-cal .sc-cal-entry.cat-campaign { background: rgba(122, 79, 10, 0.5); color: #e8a44a; }
.sc-campaign-cal .sc-cal-entry.cat-outreach { background: rgba(42, 92, 58, 0.5); color: #7acc8a; }
.sc-campaign-cal .sc-cal-entry.cat-personal { background: rgba(58, 26, 92, 0.5); color: #b07ad9; }
.sc-campaign-cal .sc-cal-entry.cat-task { background: rgba(201, 168, 76, 0.15); color: #e8c987; }
.sc-campaign-cal .sc-cal-entry.cat-recurring { background: rgba(40, 70, 80, 0.4); color: #6abccc; }
.sc-campaign-cal .sc-cal-entry.cat-followup { background: rgba(122, 40, 10, 0.4); color: #e87a4a; }

.sc-campaign-cal .sc-cal-more {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.45);
    padding: 1px 4px;
    cursor: pointer;
}

.sc-campaign-cal .sc-cal-more:hover {
    color: #e8c987;
}

/* Week view */
.sc-campaign-cal .sc-cal-week-view {
    display: grid;
    grid-template-columns: 48px repeat(7, 1fr);
}

.sc-campaign-cal .sc-cal-week-day-col {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 400px;
}

.sc-campaign-cal .sc-cal-week-day-col:last-child {
    border-right: none;
}

.sc-campaign-cal .sc-cal-week-day-header {
    padding: 12px 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.sc-campaign-cal .sc-cal-week-day-name {
    font-family: Cinzel, serif;
    font-size: 8px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    display: block;
}

.sc-campaign-cal .sc-cal-week-day-num {
    font-family: Cinzel, serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    display: block;
    line-height: 1.2;
    margin-top: 2px;
}

.sc-campaign-cal .sc-cal-week-day-col.today .sc-cal-week-day-num {
    color: #e8c987;
}

.sc-campaign-cal .sc-cal-week-day-col.today .sc-cal-week-day-header {
    background: rgba(232, 201, 135, 0.06);
}

.sc-campaign-cal .sc-cal-week-day-body {
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    min-height: 320px;
}

.sc-campaign-cal .sc-cal-week-day-body:hover {
    background: rgba(232, 201, 135, 0.02);
}

.sc-campaign-cal .sc-cal-week-entry {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 2px;
    cursor: pointer;
    transition: opacity 0.15s;
    line-height: 1.4;
}

.sc-campaign-cal .sc-cal-week-entry:hover {
    opacity: 0.85;
}

.sc-campaign-cal .sc-cal-week-entry.done {
    text-decoration: line-through;
    opacity: 0.45;
}

.sc-campaign-cal .sc-cal-week-entry.cat-content { background: rgba(26, 58, 92, 0.5); color: #7ab3d9; }
.sc-campaign-cal .sc-cal-week-entry.cat-campaign { background: rgba(122, 79, 10, 0.5); color: #e8a44a; }
.sc-campaign-cal .sc-cal-week-entry.cat-outreach { background: rgba(42, 92, 58, 0.5); color: #7acc8a; }
.sc-campaign-cal .sc-cal-week-entry.cat-personal { background: rgba(58, 26, 92, 0.5); color: #b07ad9; }
.sc-campaign-cal .sc-cal-week-entry.cat-task { background: rgba(201, 168, 76, 0.15); color: #e8c987; }
.sc-campaign-cal .sc-cal-week-entry.cat-recurring { background: rgba(40, 70, 80, 0.4); color: #6abccc; }
.sc-campaign-cal .sc-cal-week-entry.cat-followup { background: rgba(122, 40, 10, 0.4); color: #e87a4a; }

.sc-campaign-cal .sc-cal-week-placeholder {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    padding: 4px 0;
}

.sc-campaign-cal .sc-cal-week-corner {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-campaign-cal .sc-cal-week-corner-spacer {
    height: 62px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Day view (single-day agenda) */
.sc-campaign-cal .sc-cal-day-view {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.sc-campaign-cal .sc-cal-day-view-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
}

.sc-campaign-cal .sc-cal-day-view-banner.today {
    background: rgba(232, 201, 135, 0.06);
}

.sc-campaign-cal .sc-cal-day-view-dow {
    font-family: Cinzel, serif;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.sc-campaign-cal .sc-cal-day-view.is-today .sc-cal-day-view-dow {
    color: #e8c987;
}

.sc-campaign-cal .sc-cal-day-view-date {
    font-family: Cinzel, serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
}

.sc-campaign-cal .sc-cal-day-view-body {
    min-height: 360px;
    padding: 12px 14px 16px;
}

.sc-campaign-cal .sc-cal-day-view .sc-cal-week-entry {
    white-space: normal;
    word-break: break-word;
}

.sc-campaign-cal .sc-cal-legend-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
}

.sc-campaign-cal .sc-cal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sc-campaign-cal .sc-cal-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Popover */
.sc-cal-popover {
    position: fixed;
    z-index: 350;
    min-width: 240px;
    max-width: min(92vw, 300px);
    background: rgba(18, 20, 28, 0.98);
    border: 1px solid rgba(232, 201, 135, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    border-radius: 4px;
    overflow: hidden;
}

.sc-cal-popover-bg {
    position: fixed;
    inset: 0;
    z-index: 349;
    background: transparent;
}

.sc-cal-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-cal-popover-date {
    font-family: Cinzel, serif;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #e8c987;
}

.sc-cal-popover-body {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px 0;
}

.sc-cal-popover-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.12s;
}

.sc-cal-popover-item:hover {
    background: rgba(232, 201, 135, 0.06);
}

.sc-cal-popover-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sc-cal-popover-item-label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
}

.sc-cal-popover-item-label.done {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.45);
}

.sc-cal-popover-item-type {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
}

.sc-cal-popover-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.sc-cal-popover-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    font-size: 11px;
    color: #e8c987;
    cursor: pointer;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-cal-popover-add:hover {
    background: rgba(232, 201, 135, 0.06);
}

/* Entry modal */
.sc-cal-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sc-cal-modal-overlay.is-open {
    display: flex;
}

.sc-cal-modal {
    background: rgba(22, 24, 32, 0.98);
    border: 1px solid rgba(232, 201, 135, 0.3);
    width: 400px;
    max-width: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.sc-cal-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-cal-modal-kicker {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.75);
    margin: 0 0 4px;
}

.sc-cal-modal-title {
    font-family: Cinzel, serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
}

.sc-cal-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.sc-cal-modal-close:hover {
    color: #e8c987;
}

.sc-cal-modal-body {
    padding: 16px 18px;
}

.sc-cal-field-group {
    margin-bottom: 14px;
}

.sc-cal-field-group:last-child {
    margin-bottom: 0;
}

.sc-cal-field-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 6px;
}

.sc-cal-modal-input,
.sc-cal-modal-select,
.sc-cal-modal-textarea {
    width: 100%;
    box-sizing: border-box;
}

.sc-cal-modal-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-cal-modal-footer-spacer {
    flex: 1;
    min-width: 8px;
}

.sc-cal-modal-delete {
    color: #f87171 !important;
}

@media (max-width: 720px) {
    .sc-campaign-cal .sc-cal-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .sc-campaign-cal .sc-cal-nav {
        justify-content: center;
    }

    .sc-campaign-cal .sc-cal-view-toggle {
        justify-content: center;
    }
}

/* Card header reuse */
.sc-card-header .war-card-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.2rem;
}

.sc-card-header .war-card-heading {
    font-size: 1rem;
    margin: 0;
}

/* ----- CRM Dashboard (Operations Center center panel) ----- */
.crm-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.crm-dashboard-cards-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.crm-dashboard-pipeline-row .crm-stat-card {
    flex: 1 1 0;
    min-width: 0;
}

.crm-dashboard-cards-row:not(.crm-dashboard-pipeline-row) .crm-stat-card {
    flex: 1 1 0;
    min-width: 0;
}

.crm-stat-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid rgba(232, 201, 135, 0.7);
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    min-width: 0;
    flex: 0 1 auto;
}

.crm-stat-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-left-color 0.15s, background 0.15s;
}

.crm-stat-card-link:hover {
    background: rgba(0, 0, 0, 0.5);
    border-left-color: #e8c987;
}

.crm-stat-card-header {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.85);
    margin-bottom: 0.25rem;
}

.crm-stat-card-value {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e8c987;
    line-height: 1.2;
}

.crm-stat-card-footer {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: rgba(232, 201, 135, 0.55);
    margin-top: 0.2rem;
}

.crm-stat-card-dual {
    display: flex;
    gap: 1rem;
    margin-top: 0.35rem;
}

.crm-stat-card-mini {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.crm-stat-card-mini .crm-stat-card-value {
    font-size: 1.25rem;
}

.crm-stat-card-mini .crm-stat-card-footer {
    margin-top: 0;
    font-size: 0.6rem;
}

.crm-activity-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.crm-activity-row .crm-activity-box {
    flex: 1 1 0;
    min-width: 0;
}

.crm-activity-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid rgba(232, 201, 135, 0.7);
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
}

.crm-activity-box-header {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.85);
    margin-bottom: 0.35rem;
}

.crm-activity-box-body {
    font-size: 0.8rem;
    color: rgba(232, 201, 135, 0.9);
    letter-spacing: 0.02em;
}

.crm-dashboard-card .war-card-heading {
    font-size: 0.95rem;
}

/* ===== Contact Radar Card ===== */

.sc-radar-section {
    margin-top: 1.5rem;
}

/* Card header */
.sc-radar-header {
    margin-bottom: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Radar hero — full-width container, centers the circular display */
/* --- Contact Radar — Warfront-style field --- */

.sc-radar-display {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #030a05;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* L-shaped gold accent — top-left corner (matches warfront) */
.sc-radar-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 45px;
    height: 2px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.55), rgba(212, 175, 55, 0.12));
    z-index: 5;
    pointer-events: none;
}
.sc-radar-display::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 44px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.55), rgba(212, 175, 55, 0.12));
    z-index: 5;
    pointer-events: none;
}

/* Dark war-map texture */
.sc-radar-map-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
    filter: brightness(0.8) contrast(1.1);
    display: block;
    z-index: 0;
}

/* Vignette overlay — map-radar style (darker top/bottom) */
.sc-radar-map-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 11, 0.2) 0%,
        rgba(10, 10, 11, 0) 30%,
        rgba(10, 10, 11, 0) 70%,
        rgba(10, 10, 11, 0.5) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Grid overlay — mockup-style 40px green grid */
.sc-radar-field-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background-image:
        linear-gradient(rgba(120, 200, 70, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 200, 70, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Vertical scan line (mockup-style sweep top to bottom) */
.sc-radar-beam {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(120, 200, 70, 0.1) 20%,
        rgba(120, 200, 70, 0.5) 50%,
        rgba(120, 200, 70, 0.1) 80%,
        transparent 100%
    );
    animation: scScanLine 4s linear infinite;
    pointer-events: none;
    z-index: 4;
}

@keyframes scScanLine {
    0%   { top: 0%; opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Subtle top-left label */
.sc-radar-field-label {
    position: absolute;
    top: 10px;
    left: 14px;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.55);
    font-weight: 600;
    pointer-events: none;
    z-index: 5;
}

/* Blips — mockup-style fade; duration/delay set by JS */
.sc-radar-blip {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
    box-shadow: 0 0 6px var(--sc-blip-glow);
    animation: scBlipFade 3s ease-out infinite;
}

@keyframes scBlipFade {
    0%   { opacity: 0; }
    8%   { opacity: 1; }
    65%  { opacity: 0.7; }
    100% { opacity: 0.12; }
}

/* Ripple ring under each blip (mockup blipRing) */
.sc-radar-blip-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: scBlipRing 2.5s ease-out infinite;
    pointer-events: none;
    border: 1px solid var(--sc-blip-glow);
}

@keyframes scBlipRing {
    0% {
        width: 6px;
        height: 6px;
        opacity: 0.7;
        margin-left: -3px;
        margin-top: -3px;
    }
    100% {
        width: 20px;
        height: 20px;
        opacity: 0;
        margin-left: -10px;
        margin-top: -10px;
    }
}

.sc-radar-blip--lead {
    background: #e8c987;
    --sc-blip-glow: rgba(232, 201, 135, 0.65);
    --sc-blip-glow-strong: rgba(232, 201, 135, 0.95);
}
.sc-radar-blip--contacted {
    background: #60a5fa;
    --sc-blip-glow: rgba(96, 165, 250, 0.65);
    --sc-blip-glow-strong: rgba(96, 165, 250, 0.95);
}
.sc-radar-blip--in_progress {
    background: #fb923c;
    --sc-blip-glow: rgba(251, 146, 60, 0.65);
    --sc-blip-glow-strong: rgba(251, 146, 60, 0.95);
}
.sc-radar-blip--won {
    background: #22c55e;
    --sc-blip-glow: rgba(34, 197, 94, 0.65);
    --sc-blip-glow-strong: rgba(34, 197, 94, 0.95);
}
.sc-radar-blip--lost {
    background: #6b7280;
    --sc-blip-glow: rgba(107, 114, 128, 0.5);
    --sc-blip-glow-strong: rgba(107, 114, 128, 0.75);
}
.sc-radar-blip--followed_up {
    background: #a78bfa;
    --sc-blip-glow: rgba(167, 139, 250, 0.65);
    --sc-blip-glow-strong: rgba(167, 139, 250, 0.95);
}
.sc-radar-blip--closed_no_response {
    background: #64748b;
    --sc-blip-glow: rgba(100, 116, 139, 0.5);
    --sc-blip-glow-strong: rgba(100, 116, 139, 0.75);
}

/* Reusable ops panel primitives */
.sc-ops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
}

.sc-ops-col {
    padding: 1.05rem 1.2rem;
}

.sc-ops-col + .sc-ops-col {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-ops-col-label {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.75);
    margin: 0 0 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-ops-metric-display {
    display: flex;
    align-items: baseline;
    gap: 0.95rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-ops-phase-block {
    border-left: 3px solid rgba(212, 175, 55, 0.6);
    padding-left: 0.65rem;
    margin: 0.3rem 0 0.7rem;
}

.sc-ops-phase-title {
    margin: 0;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.9);
}

.sc-ops-phase-desc {
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    color: rgba(224, 224, 224, 0.58);
    line-height: 1.45;
}

.sc-ops-mission-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.85rem 1.15rem 0.9rem;
}

/* Radar 3-column inner grid (inside outer war-card) */
.sc-radar-three-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
    align-items: stretch;
}

.sc-radar-panel {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
}

.sc-radar-panel:last-child {
    border-right: none;
}

/* Legend list */
.sc-radar-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sc-radar-legend-item {
    margin: 0;
}

.sc-radar-stage-badge {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    background: rgba(8, 10, 14, 0.72);
    border: 1px solid var(--sc-stage-color, rgba(255,255,255,0.15));
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    width: 100%;
    box-sizing: border-box;
}

.sc-radar-stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: scRadarStagePulse 2.2s ease-in-out infinite;
}

@keyframes scRadarStagePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.75); }
}

@media (prefers-reduced-motion: reduce) {
    .sc-radar-stage-dot { animation: none; }
}

.sc-radar-stage-label {
    flex: 1;
}

.sc-radar-stage-count {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
}

.sc-radar-legend-footer {
    margin-top: 0.7rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sc-radar-legend-total-label {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.58);
}

.sc-radar-legend-total-value {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: rgba(224, 224, 224, 0.9);
}

.sc-radar-explain-rules {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.sc-radar-explain-rules .battle-event {
    margin-bottom: 0;
    padding: 0.42rem 0.56rem;
}

.sc-radar-explain-rules .battle-event p {
    font-size: 0.72rem;
    line-height: 1.4;
    opacity: 0.92;
}

.sc-radar-panel {
    padding: 20px 22px;
}

.sc-radar-panel .war-card-heading {
    font-size: 1.15rem;
    margin-bottom: 16px;
    padding-bottom: 0.85rem;
}

/* Goal panel */
.sc-radar-stats-row {
    gap: 0.65rem;
    padding-bottom: 10px;
    margin-bottom: 8px;
}

.sc-radar-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sc-radar-stat-value {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #e8c987;
    line-height: 1;
}

.sc-radar-stat-primary .sc-radar-stat-value {
    font-size: 1.85rem;
    text-shadow: 0 0 24px rgba(232, 201, 135, 0.3);
}

.sc-radar-stat-primary .warfront-advantage-pct {
    line-height: 0.95;
}

.sc-radar-stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.55);
}

/* Goal target inputs in Field Protocol panel */
.sc-radar-targets {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.sc-radar-target-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sc-radar-goal-label {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.65);
    flex-shrink: 0;
}

.sc-radar-goal-input {
    width: 72px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(232, 201, 135, 0.3);
    border-radius: 4px;
    color: #e8c987;
    font-size: 0.95rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    text-align: center;
}

.sc-radar-goal-input--daily  { border-color: rgba(91, 163, 217, 0.45); color: #5ba3d9; }
.sc-radar-goal-input--weekly { border-color: rgba(122, 204, 74, 0.45);  color: #7acc4a; }
.sc-radar-goal-input--monthly{ border-color: rgba(232, 201, 135, 0.45); color: #e8c987; }

.sc-radar-goal-input:focus {
    outline: none;
    border-color: rgba(232, 201, 135, 0.65);
    box-shadow: 0 0 0 2px rgba(232, 201, 135, 0.1);
}

/* Three-track progress bars */
.sc-radar-goal-tracks {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 0.65rem;
}

.sc-radar-goal-track {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sc-radar-track-header {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
}

.sc-radar-track-label {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    min-width: 3.6rem;
}

.sc-radar-track-score {
    flex: 1;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

.sc-radar-track-pct {
    font-size: 0.82rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

.sc-radar-track-pct--daily   { color: #5ba3d9; }
.sc-radar-track-pct--weekly  { color: #7acc4a; }
.sc-radar-track-pct--monthly { color: #e8c987; }

.sc-radar-progress-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.sc-radar-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.sc-radar-progress-daily   { background: linear-gradient(90deg, #3d7aaa, #5ba3d9); }
.sc-radar-progress-weekly  { background: linear-gradient(90deg, #52a02e, #7acc4a); }
.sc-radar-progress-monthly { background: linear-gradient(90deg, #e8a227, #e8c987); }

.sc-radar-progress-fill.sc-radar-progress-near {
    box-shadow: 0 0 12px currentColor;
    animation: scRadarGoalNearShimmer 1.8s ease-in-out infinite;
}

@keyframes scRadarGoalNearShimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.22); }
}

.sc-radar-status-msg {
    font-size: 0.72rem;
    color: rgba(232, 201, 135, 0.7);
    margin: 0.1rem 0 0;
    font-style: italic;
}

.sc-radar-goal-explain {
    font-size: 0.67rem;
    color: rgba(224, 224, 224, 0.46);
    line-height: 1.45;
    margin: 0.2rem 0 0;
}

.sc-radar-mission-footer .war-season-section-title {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.72);
}

.sc-radar-mission-footer .war-season-reward-name {
    margin: 0.28rem 0 0;
    font-size: 0.8rem;
    color: rgba(224, 224, 224, 0.74);
    line-height: 1.45;
}



/* Responsive */
@media (max-width: 1180px) {
    .sc-radar-three-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sc-radar-goal-col {
        grid-column: 1 / -1;
        border-right: none;
        border-top: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
    }
}

@media (max-width: 700px) {
    .sc-radar-three-grid {
        grid-template-columns: 1fr;
    }
    .sc-radar-panel {
        border-right: none;
        border-bottom: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
        padding: 16px 16px;
    }
    .sc-radar-panel:last-child {
        border-bottom: none;
    }
    .sc-radar-goal-tracks {
        gap: 0.7rem;
    }
    .sc-radar-track-score {
        font-size: 0.68rem;
    }
}

/* Recurring ops & one-off cards (below Operations Center) */
.sc-ops-rituals-section {
    margin-top: 1.5rem;
}

.sc-ops-todo-section {
    margin-top: 1.5rem;
}

.sc-ops-rituals-empty {
    margin: 0;
    padding: 0.9rem 0.2rem;
    color: rgba(163, 167, 194, 0.9);
    font-size: 0.9rem;
}

/* Edit Recurring Ops modal */
.sc-edit-rituals-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sc-edit-rituals-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-edit-rituals-row:last-child {
    border-bottom: none;
}

.sc-edit-rituals-name {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    color: #e0e0e0;
}

.sc-edit-rituals-delete {
    flex-shrink: 0;
}

.sc-edit-rituals-editor-block {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-edit-rituals-editor-block:last-child {
    border-bottom: none;
}

.sc-edit-rituals-editor-block .training-form-group {
    margin-bottom: 0;
}

.sc-edit-rituals-editor-block .training-form-group label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(232, 201, 135, 0.75);
    margin-bottom: 0.35rem;
}

.sc-edit-rituals-editor-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.sc-edit-rituals-editor-top .sc-edit-rituals-delete {
    margin-top: 1.5rem;
}

.sc-edit-rituals-editor-block .training-edit-days {
    margin-top: 0;
}

.sc-edit-rituals-editor-block .training-task-days-grid,
.sc-edit-rituals-editor-block .training-edit-days-grid {
    margin-top: 0.25rem;
}

/* ----- Nav contact count (Contacts tab) ----- */
.category-tab[data-view="contacts"] .category-tab-body {
    gap: 4px;
}

.category-tab[data-view="contacts"] .contacts-nav-count-wrap {
    background: transparent;
    box-shadow: none;
}

.category-tab[data-view="contacts"] .contacts-nav-count-wrap::after {
    display: none;
}

.contacts-nav-count {
    display: inline-block;
    min-width: 1.2em;
    max-width: 4ch;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e8c987;
    text-align: center;
    text-shadow:
        0 0 8px rgba(232, 201, 135, 0.6),
        0 0 12px rgba(232, 201, 135, 0.35);
    transition: transform 0.15s ease-out, text-shadow 0.15s ease-out;
}

.contacts-nav-count.is-flash {
    transform: scale(1.15);
    text-shadow:
        0 0 12px rgba(232, 201, 135, 0.9),
        0 0 20px rgba(232, 201, 135, 0.5);
}

/* ----- Contacts (CRM) ----- */
.contacts-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: center;
    position: relative;
}

.contacts-filters-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    flex: 1 1 280px;
    min-width: 0;
}

.contacts-filters-panel .sc-select {
    flex: 1 1 140px;
    min-width: 0;
}

.contacts-filters-toggle,
.contacts-more-wrap {
    display: none;
}

.contacts-more-wrap {
    position: relative;
}

.contacts-toolbar-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.contacts-columns-wrap,
.contacts-csv-wrap,
.contacts-templates-wrap {
    position: relative;
}

.contacts-toolbar-floating-dd {
    z-index: 160;
}

.sc-email-copy {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}

.sc-email-copy:hover {
    color: rgba(232, 201, 135, 0.9);
    text-decoration: underline;
}

.sc-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: #0d0e12;
    border: 1px solid rgba(232, 201, 135, 0.5);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.sc-toast.is-visible {
    opacity: 1;
    visibility: visible;
}

.sc-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    min-width: 10rem;
    padding: 0.5rem;
    background: #0d0e12;
    border: 1px solid rgba(232, 201, 135, 0.35);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: none;
}

.sc-dropdown.is-open {
    display: block;
}

.sc-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.35rem 0.5rem;
    margin: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.sc-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sc-dropdown-divider {
    height: 1px;
    margin: 0.35rem 0;
    background: rgba(255, 255, 255, 0.15);
}

.sc-column-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.sc-column-toggle input {
    margin: 0;
}

.contacts-layout {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 400px);
    gap: 1rem;
    align-items: start;
}

.contacts-list-wrap {
    min-width: 0;
}

/* Mobile contact cards (desktop uses table) */
.contacts-cards {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
}

.contacts-cards-empty,
.contacts-table-empty {
    margin: 0;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
}

.contacts-card {
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.42);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(212, 178, 111, 0.3);
    border-radius: 0.5rem;
    padding: 1rem 1rem 0.85rem;
    text-align: left;
    cursor: pointer;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.07),
        0 2px 14px rgba(0, 0, 0, 0.5);
    transition: background 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.contacts-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(232, 201, 135, 0.42);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.09),
        0 4px 18px rgba(0, 0, 0, 0.55);
}

.contacts-card.is-selected {
    background: rgba(232, 201, 135, 0.12);
    border-color: rgba(232, 201, 135, 0.58);
    box-shadow:
        inset 0 0 0 1px rgba(232, 201, 135, 0.28),
        0 2px 16px rgba(0, 0, 0, 0.5);
}

.contacts-card:focus {
    outline: none;
}

.contacts-card:focus-visible {
    outline: 2px solid rgba(232, 201, 135, 0.65);
    outline-offset: 2px;
}

.contacts-card-header {
    margin-bottom: 0.5rem;
}

.contacts-card-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.95);
}

.contacts-card-row {
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

.contacts-card-row--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.contacts-card-email {
    color: rgba(232, 201, 135, 0.95);
    word-break: break-word;
    min-width: 0;
}

.contacts-card-phone {
    color: rgba(255, 255, 255, 0.82);
    word-break: break-word;
    min-width: 0;
}

.contacts-card-muted {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
}

.contacts-card-phone-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.contacts-card-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(232, 201, 135, 0.28);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(232, 201, 135, 0.95);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.contacts-card-icon-btn.contacts-card-phone-link {
    color: rgba(232, 201, 135, 0.95);
}

.contacts-card-icon-btn:hover {
    background: rgba(232, 201, 135, 0.12);
    border-color: rgba(232, 201, 135, 0.5);
    color: #e8c987;
}

a.contacts-card-icon-btn.contacts-card-phone-link:hover {
    color: #e8c987;
}

.contacts-card-icon-btn svg {
    display: block;
}

.contacts-card-meta {
    margin: 0.35rem 0 0.65rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.contacts-card-meta-line {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.45;
}

.contacts-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.contacts-card-footer .sc-status-box {
    font-size: 0.68rem;
}

.contacts-card-followup {
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
}

.contacts-card-status-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.sc-table-wrap {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--panel-border);
}

.sc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.sc-table th,
.sc-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-table th {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    white-space: nowrap;
}

.sc-table th.sc-th-sortable {
    cursor: pointer;
    user-select: none;
}

.sc-table th.sc-th-sortable:hover {
    color: rgba(232, 201, 135, 0.9);
}

.sc-sort-indicator {
    margin-left: 0.2rem;
    font-size: 0.75em;
    opacity: 0.8;
}

.sc-table th.sc-th-draggable {
    cursor: default;
}

.sc-table th.sc-th-draggable.sc-th-sortable {
    cursor: pointer;
}

.sc-table th.sc-th-draggable.sc-drag-source {
    opacity: 0.6;
}

.sc-table th.sc-th-draggable.sc-drag-over {
    border-left: 2px solid rgba(232, 201, 135, 0.6);
}

.sc-table tbody tr {
    cursor: pointer;
    transition: background 0.1s;
}

.sc-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.sc-table tbody tr.is-selected {
    background: rgba(232, 201, 135, 0.12);
}

.sc-table .sc-overdue {
    color: #c75c5c;
}

/* Follow-up states (Next follow-up column) */


.sc-followup--scheduled {
    color: rgba(255, 255, 255, 0.7);
}

.sc-followup--due_soon {
    color: rgba(232, 201, 135, 0.9);
}

.sc-followup--overdue {
    color: rgba(232, 201, 135, 0.95);
    animation: sc-followup-pulse 2.5s ease-in-out infinite;
}

@keyframes sc-followup-pulse {
    0%, 100% {
        text-shadow: 0 0 0 rgba(232, 201, 135, 0);
    }
    50% {
        text-shadow: 0 0 12px rgba(232, 201, 135, 0.35);
    }
}

/* Status boxes (Status column) */
.sc-status-box {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sc-status-box-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sc-status-box--lead {
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}

.sc-status-box--lead .sc-status-box-dot {
    background: #60a5fa;
}

/* Legacy: identified (removed option; show as blue like lead) */
.sc-status-box--identified {
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}

.sc-status-box--identified .sc-status-box-dot {
    background: #60a5fa;
}

.sc-status-box--contacted {
    border-color: rgba(234, 179, 8, 0.6);
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
}

.sc-status-box--contacted .sc-status-box-dot {
    background: #eab308;
}

.sc-status-box--in_progress {
    border-color: rgba(251, 146, 60, 0.6);
    background: rgba(251, 146, 60, 0.12);
    color: #fb923c;
}

.sc-status-box--in_progress .sc-status-box-dot {
    background: #fb923c;
}

.sc-status-box--won {
    border-color: rgba(34, 197, 94, 0.6);
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.sc-status-box--won .sc-status-box-dot {
    background: #22c55e;
}

.sc-status-box--lost {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.sc-status-box--lost .sc-status-box-dot {
    background: #ef4444;
}

.sc-status-box--followed_up {
    border-color: rgba(167, 139, 250, 0.6);
    background: rgba(167, 139, 250, 0.12);
    color: #a78bfa;
}

.sc-status-box--followed_up .sc-status-box-dot {
    background: #a78bfa;
}

.sc-status-box--closed_no_response {
    border-color: rgba(100, 116, 139, 0.5);
    background: rgba(100, 116, 139, 0.12);
    color: #94a3b8;
}

.sc-status-box--closed_no_response .sc-status-box-dot {
    background: #64748b;
}

/* Legacy stage values (if any) */
.sc-status-box--located,
.sc-status-box--dispatched,
.sc-status-box--received,
.sc-status-box--in_negotiation,
.sc-status-box--closed {
    border-color: rgba(148, 163, 184, 0.5);
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

.sc-status-box--located .sc-status-box-dot,
.sc-status-box--dispatched .sc-status-box-dot,
.sc-status-box--received .sc-status-box-dot,
.sc-status-box--in_negotiation .sc-status-box-dot,
.sc-status-box--closed .sc-status-box-dot {
    background: #94a3b8;
}

.contacts-drawer {
    position: sticky;
    top: 5rem;
    background: radial-gradient(circle at top, #181a24, #090a0f);
    border: 1px solid var(--panel-border);
    border-radius: 0.9rem;
    padding: 1.25rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

.sc-quick-actions .sc-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.contacts-drawer[aria-hidden="true"] {
    display: none;
}

.contacts-drawer-inner {
    position: relative;
}

.sc-drawer-close {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ccc;
    cursor: pointer;
    border-radius: 4px;
}

.sc-drawer-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.contact-detail-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-detail-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.sc-drawer-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-drawer-section h4 {
    font-size: 0.8rem;
    margin: 0 0 0.5rem;
    color: rgba(232, 201, 135, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-drawer-note,
.contact-drawer-outreach {
    margin: 0.25rem 0;
    font-size: 0.85rem;
}

.contact-drawer-note-body {
    white-space: pre-wrap;
    word-break: break-word;
}

.contact-drawer-meta {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.15rem;
}

.contact-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.sc-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.85);
}

.sc-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.contact-drawer-footer {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ----- Field Notes (war card, two-column) ----- */
.field-notes-war-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.field-notes-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0;
    padding-bottom: 0.75rem;
}

.field-notes-header-left {
    min-width: 0;
    text-align: left;
}

.field-notes-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: rgba(248, 231, 185, 0.75);
    margin-bottom: 0.2rem;
}

.field-notes-heading {
    font-size: 1.1rem;
    margin: 0;
    color: #e0e0e0;
}

.field-notes-header-search-wrap {
    flex: 0 1 20rem;
    min-width: 0;
    max-width: 22rem;
    width: 100%;
}

.field-notes-header .field-notes-search {
    width: 100%;
    box-sizing: border-box;
}

.field-notes-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: min(420px, 58vh);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
}

.field-notes-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.field-notes-chip {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.field-notes-chip:hover {
    border-color: rgba(232, 201, 135, 0.4);
    color: rgba(255, 255, 255, 0.9);
}

.field-notes-chip.is-active {
    border-color: #e8c987;
    color: #e8c987;
    background: rgba(232, 201, 135, 0.1);
}

.field-notes-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: stretch;
    overflow-x: visible;
    overflow-y: visible;
    padding: 0.25rem 0.25rem 0.75rem;
}

.field-notes-grid-empty {
    flex: 1 1 100%;
    min-width: min(100%, 280px);
    margin: 0;
    padding: 1rem 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.45;
    align-self: center;
    text-align: center;
}

.field-notes-grid-empty strong {
    color: rgba(232, 201, 135, 0.9);
}

.field-note-card {
    flex: 0 0 auto;
    width: min(268px, 82vw);
    min-height: 240px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    border: 1px solid var(--fn-frame, rgba(232, 201, 135, 0.35));
    border-top: 3px solid var(--fn-frame, rgba(232, 201, 135, 0.45));
    background:
        linear-gradient(180deg, var(--fn-tint, rgba(232, 201, 135, 0.08)) 0%, transparent 42%),
        rgba(0, 0, 0, 0.42);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 2px 12px rgba(0, 0, 0, 0.45);
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-note-card:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.07),
        0 6px 18px rgba(0, 0, 0, 0.5);
}

.field-note-card.is-selected {
    border-color: rgba(232, 201, 135, 0.65);
    box-shadow:
        inset 0 0 0 1px rgba(232, 201, 135, 0.2),
        0 0 0 2px rgba(232, 201, 135, 0.2);
}

.field-note-card--accent-gold {
    --fn-frame: rgba(201, 162, 39, 0.55);
    --fn-tint: rgba(232, 201, 135, 0.12);
}

.field-note-card--accent-ember {
    --fn-frame: rgba(234, 88, 12, 0.55);
    --fn-tint: rgba(251, 146, 60, 0.1);
}

.field-note-card--accent-sky {
    --fn-frame: rgba(56, 189, 248, 0.5);
    --fn-tint: rgba(56, 189, 248, 0.1);
}

.field-note-card--accent-violet {
    --fn-frame: rgba(168, 85, 247, 0.5);
    --fn-tint: rgba(168, 85, 247, 0.1);
}

.field-note-card--accent-slate {
    --fn-frame: rgba(100, 116, 139, 0.55);
    --fn-tint: rgba(148, 163, 184, 0.08);
}

.field-note-card--accent-emerald {
    --fn-frame: rgba(34, 197, 94, 0.5);
    --fn-tint: rgba(34, 197, 94, 0.1);
}

.field-note-card--new {
    border-style: dashed;
    border-color: rgba(232, 201, 135, 0.35);
    border-top-color: rgba(232, 201, 135, 0.45);
    background: rgba(0, 0, 0, 0.25);
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem 0.75rem;
    font: inherit;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.field-note-card--new:hover {
    border-color: rgba(232, 201, 135, 0.55);
    background: rgba(232, 201, 135, 0.06);
}

.field-note-card-new-icon {
    display: block;
    font-size: 1.75rem;
    font-weight: 600;
    color: #e8c987;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.field-note-card-new-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.field-note-card-new-hint {
    display: block;
    font-size: 0.72rem;
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.45);
}

.field-note-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.field-note-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.25;
    min-width: 0;
}

.field-note-card-grip {
    width: 14px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.4;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 1px, transparent 1.5px) 0 0 / 5px 5px;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: element;
}

.field-note-card-grip:active {
    cursor: grabbing;
}

.field-note-card.field-note-drag-source {
    opacity: 0.55;
}

.field-note-card.field-note-drag-over,
.field-note-card--new.field-note-drag-over {
    outline: 2px solid rgba(232, 201, 135, 0.75);
    outline-offset: 2px;
}

.field-note-card-body {
    flex: 1;
    min-height: 0;
    padding: 0.65rem 0.75rem;
    background: rgba(0, 0, 0, 0.22);
}

.field-note-card-snippet {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.68);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.field-note-card-foot {
    padding: 0.45rem 0.75rem 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.field-note-card-time {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.field-note-modal-inner.is-editor {
    padding: 0;
}

.sc-modal-field-note {
    max-width: min(34rem, calc(100vw - 2rem));
    width: 100%;
}

.field-note-modal-inner .field-note-editor-title {
    font-size: 1.25rem;
}

.field-note-modal-inner .field-note-editor-body {
    min-height: 160px;
    resize: vertical;
}

.field-note-accent-picker {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.field-note-accent-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.45rem;
}

.field-note-accent-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.field-note-accent-swatch {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-note-accent-swatch-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.35);
}

.field-note-accent-swatch:hover {
    border-color: rgba(232, 201, 135, 0.55);
}

.field-note-accent-swatch.is-selected {
    border-color: #e8c987;
    box-shadow: 0 0 0 2px rgba(232, 201, 135, 0.25);
}

.field-note-modal-inner .field-note-editor-tag-dropdown {
    z-index: 200;
}

.field-note-editor-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.field-note-editor-title {
    flex: 1;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
    font-variant: small-caps;
    color: #fff;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 0;
    min-width: 0;
    letter-spacing: 0.04em;
}

.field-note-editor-title::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.field-note-editor-title:focus {
    outline: none;
}

.field-note-editor-tags-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.field-note-editor-tags-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.field-note-editor-tag-pill {
    font-size: 0.7rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(232, 201, 135, 0.4);
    background: rgba(232, 201, 135, 0.08);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.field-note-editor-tag-pill:hover {
    border-color: rgba(232, 201, 135, 0.6);
    background: rgba(232, 201, 135, 0.15);
    color: #e8c987;
}

.field-note-editor-tag-add-wrap {
    position: relative;
}

.field-note-editor-tag-add-btn {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.35);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 4px;
    transition: border-color 0.15s, color 0.15s;
}

.field-note-editor-tag-add-btn:hover {
    border-color: rgba(232, 201, 135, 0.5);
    color: #e8c987;
}

.field-note-editor-tag-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.2rem;
    min-width: 8rem;
    padding: 0.35rem;
    background: #0d0e12;
    border: 1px solid rgba(232, 201, 135, 0.35);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 50;
    display: none;
}

.field-note-editor-tag-dropdown[aria-hidden="false"] {
    display: block;
}

.field-note-editor-tag-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.3rem 0.5rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
}

.field-note-editor-tag-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e8c987;
}

.field-note-editor-tag-custom-row {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.field-note-editor-tag-custom-input {
    flex: 1;
    min-width: 0;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(232, 201, 135, 0.3);
    border-radius: 4px;
    color: #fff;
}

.field-note-editor-tag-custom-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.field-note-editor-tag-custom-add {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    background: rgba(232, 201, 135, 0.2);
    border: 1px solid rgba(232, 201, 135, 0.5);
    border-radius: 4px;
    color: #e8c987;
    cursor: pointer;
    white-space: nowrap;
}

.field-note-editor-tag-custom-add:hover {
    background: rgba(232, 201, 135, 0.3);
}

.field-note-editor-close {
    margin-left: auto;
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(220, 80, 80, 0.5);
    background: rgba(220, 80, 80, 0.15);
    color: #dc5050;
    cursor: pointer;
    border-radius: 4px;
}

.field-note-editor-close:hover {
    background: rgba(220, 80, 80, 0.25);
}

.field-note-editor-meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
}

.field-note-editor-body-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.field-note-editor-body {
    flex: 1;
    min-height: 120px;
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #fff;
    background: transparent;
    border: none;
    padding: 0;
    resize: none;
}

.field-note-editor-body::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.field-note-editor-body:focus {
    outline: none;
}

.field-note-editor-actions {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.field-note-editor-delete {
    margin-left: auto;
    border-color: rgba(220, 80, 80, 0.5);
    background: rgba(220, 80, 80, 0.12);
    color: #dc5050;
}

.field-note-editor-delete:hover {
    background: rgba(220, 80, 80, 0.22);
    border-color: rgba(220, 80, 80, 0.7);
}

/* ----- Daily Ops (training-page layout; trainer structure, minimal overrides) ----- */
/* Use same grid as app training room so coach card is identical size (sc-main now same width as app-container) */
.training-page--daily-ops .training-daily-grid {
    grid-template-columns: minmax(220px, 0.24fr) minmax(0, 0.52fr) minmax(280px, 0.24fr);
}

/* Match styles.css @900px: one column so portrait → CRM → field equipment stack (override wins over generic .training-daily-grid there) */
@media (max-width: 900px) {
    .training-page--daily-ops .training-daily-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.training-page--daily-ops .training-coach-card .daily-ops-briefing {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0.75rem 0 0;
    line-height: 1.4;
    text-align: center;
}

/* Coach overlay matches War Room trainers (styles.css .coach-video-overlay-btn); do not hide — JS sets has-new-tapes / label */

.training-daily-content > #dailyOpsAddRecurringBtn {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
}

.sc-daily-dispatch-footer-link {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(248, 231, 185, 0.9);
    text-decoration: none;
    transition: color 0.18s ease, text-decoration 0.18s ease;
}

.sc-daily-dispatch-footer-link:hover {
    color: rgba(248, 231, 185, 1);
    text-decoration: underline;
}

.training-page--daily-ops .training-toolbelt-card .training-toolbelt-panel {
    margin-top: 0.25rem;
}

.training-toolbelt-panel .daily-ops-tool {
    padding: 1rem;
}

.training-toolbelt-panel .daily-ops-tool .daily-ops-tool-title {
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
    color: #e8c987;
}

.training-toolbelt-panel .daily-ops-tool .daily-ops-tool-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 0.5rem;
}

.training-toolbelt-panel .daily-ops-tool .daily-ops-tool-desc a {
    color: #e8c987;
}

.quick-notes-textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    margin-bottom: 0.5rem;
}

/* ----- Compact War Echo in field-equipment tray ----- */
.training-toolbelt-card .field-equipment-music {
    justify-content: flex-start;
}

.training-toolbelt-card .field-equipment-music .war-echo-compact {
    margin-bottom: 0;
    padding: 0.5rem 0 0;
}

.war-echo-compact .war-echo-compact-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.war-echo-compact .war-echo-compact-row:last-child {
    margin-bottom: 0;
}

.war-echo-compact .war-echo-compact-track .war-echo-track-title {
    font-family: Cinzel, "Noto Serif JP", Georgia, serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e8c987;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.war-echo-compact .war-echo-compact-progress {
    gap: 0.35rem;
}

.war-echo-compact .war-echo-compact-progress .war-echo-current-time,
.war-echo-compact .war-echo-compact-progress .war-echo-duration {
    font-size: 0.65rem;
    min-width: 2.2rem;
}

.war-echo-compact .war-echo-compact-progress .war-echo-progress-bar {
    flex: 1;
    min-width: 0;
}

.war-echo-compact .war-echo-compact-controls {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.war-echo-compact .war-echo-controls-row {
    gap: 0.25rem;
}

.war-echo-compact .war-echo-controls-row .war-echo-btn {
    min-width: 1.75rem;
    min-height: 1.75rem;
    padding: 0.25rem;
}

.war-echo-compact .war-echo-controls-row .war-echo-btn .war-echo-icon {
    width: 10px;
    height: 10px;
}

.war-echo-compact .war-echo-controls-row .war-echo-btn.war-echo-play-btn-main {
    min-width: 2.25rem;
    min-height: 2.25rem;
}

.war-echo-compact .war-echo-volume-inline {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 120px;
}

.war-echo-compact .war-echo-volume-inline .war-echo-volume-slider {
    width: 48px;
}

.war-echo-compact .war-echo-volume-inline .war-echo-volume-value {
    font-size: 0.65rem;
    min-width: 2rem;
}

.training-toolbelt-card .field-equipment-music .field-equipment-tray-footer {
    margin-top: 0.75rem;
}

/* ----- Buttons & inputs ----- */
.sc-btn {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.sc-btn-primary {
    background: rgba(232, 201, 135, 0.25);
    border-color: rgba(232, 201, 135, 0.5);
    color: #e8c987;
}

.sc-btn-primary:hover {
    background: rgba(232, 201, 135, 0.35);
}

.sc-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
}

.sc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.sc-btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

.sc-input,
.sc-select {
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    color: #e0e0e0;
}

.sc-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.sc-search {
    min-width: 180px;
}

/* ----- Modals (Log Contact, Delete confirm) ----- */
.sc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.sc-modal[aria-hidden="true"] {
    display: none;
}

.sc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.sc-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ccc;
    cursor: pointer;
    border-radius: 4px;
}

.sc-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sc-modal-content {
    position: relative;
    background: #0d0e12;
    border: 1px solid rgba(232, 201, 135, 0.35);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 420px;
    width: 100%;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

.sc-modal-dispatch {
    max-width: 560px;
}

.sc-modal-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.85);
    margin: 0 0 0.25rem;
}

.sc-modal-title {
    font-family: Cinzel, serif;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #e8c987;
    margin: 0 0 1.25rem;
}

.sc-dispatch-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sc-dispatch-row {
    margin-bottom: 1rem;
}

.sc-dispatch-row-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sc-dispatch-field label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(232, 201, 135, 0.9);
    margin-bottom: 0.35rem;
}

.sc-dispatch-input,
.sc-dispatch-select,
.sc-dispatch-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.5rem 0.65rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(232, 201, 135, 0.35);
    border-radius: 4px;
    color: #e0e0e0;
}

.sc-dispatch-input:focus,
.sc-dispatch-select:focus,
.sc-dispatch-textarea:focus {
    outline: none;
    border-color: rgba(232, 201, 135, 0.6);
}

.sc-dispatch-input::placeholder,
.sc-dispatch-textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.sc-dispatch-textarea {
    resize: vertical;
    min-height: 4rem;
}

.sc-dispatch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.sc-modal-confirm .sc-modal-title {
    font-family: inherit;
    text-transform: none;
    font-size: 1.1rem;
}

.sc-modal-message {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1.25rem;
    line-height: 1.45;
}

.sc-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

#contactActionModalBody {
    margin-bottom: 1rem;
}

#contactActionModalBody .sc-dispatch-field {
    margin-bottom: 0;
}

.sc-btn-danger {
    background: rgba(180, 70, 60, 0.4);
    border-color: rgba(200, 90, 80, 0.7);
    color: #f0a0a0;
}

.sc-btn-danger:hover {
    background: rgba(180, 70, 60, 0.55);
}

.quick-add-fields-list {
    margin: 0 0 1.25rem;
}

.quick-add-fields-list .quick-add-config-name-row,
.quick-add-fields-list .quick-add-config-field-row {
    margin-bottom: 0.5rem;
}

.quick-add-fields-list label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.quick-add-fields-list input[type="checkbox"] {
    margin: 0;
}

.template-view-actions {
    margin-top: 1rem;
}

.template-view-actions .sc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sc-modal-templates-manage .template-manage-list {
    margin-bottom: 1rem;
}

.sc-modal-templates-manage .template-manage-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.sc-modal-templates-manage .template-manage-card-name {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.sc-modal-templates-manage .template-manage-card-preview {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.sc-modal-templates-manage .template-manage-card-actions {
    display: flex;
    gap: 0.35rem;
}

.sc-modal-templates-manage .template-manage-form {
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sc-modal-templates-manage .template-manage-actions {
    margin-top: 1rem;
}

/* ----- Responsive / mobile-friendly ----- */
.signal-corps-page {
    overflow-x: hidden;
}

.sc-main {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

@media (max-width: 1024px) {
    .sc-main {
        padding: 1rem;
    }

    .contacts-layout {
        grid-template-columns: 1fr;
    }

    .contacts-drawer {
        position: static;
        max-height: none;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Tablet / narrow: Field Notes header + note cards stack vertically */
@media (max-width: 768px) {
    .sc-main {
        padding: 0.75rem 1rem;
    }

    .field-notes-body {
        min-height: min(360px, 65vh);
    }

    .field-notes-header-search-wrap {
        flex: 1 1 100%;
        max-width: none;
    }

    .field-notes-card-grid {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: visible;
        overflow-y: visible;
        scroll-snap-type: none;
        align-items: stretch;
    }

    .field-notes-grid-empty {
        flex: none;
        width: 100%;
        min-width: 0;
        align-self: stretch;
    }

    .field-note-card {
        width: 100%;
        max-width: none;
        flex: 0 0 auto;
        scroll-snap-align: none;
        align-self: stretch;
    }

    .field-note-editor-tag-dropdown {
        max-width: min(18rem, calc(100vw - 2rem));
        left: 0;
        right: auto;
    }

    .sc-modal {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: max(1rem, env(safe-area-inset-top));
    }

    .sc-modal-content {
        max-width: 100%;
        max-height: calc(100vh - 2rem - env(safe-area-inset-top, 0px));
        margin: 0 auto;
    }

    .sc-modal-dispatch {
        max-width: 100%;
    }

    /* Week view: seven columns need horizontal pan on phones */
    .sc-campaign-cal .sc-cal-body-root {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sc-campaign-cal .sc-cal-week-view {
        min-width: 720px;
    }

    .sc-campaign-cal .sc-cal-month-label {
        min-width: 0;
        flex: 1 1 auto;
    }

    /* Contacts: search → Add → Filters → More; collapsible filters + overflow menu */
    .contacts-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .contacts-toolbar-search {
        order: 1;
        width: 100%;
    }

    .contacts-quick-add {
        order: 2;
        width: 100%;
    }

    .contacts-filters-toggle {
        display: flex;
        order: 3;
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .contacts-filters-panel {
        order: 4;
        flex: none;
        width: 100%;
    }

    .contacts-filters-panel:not(.is-open) {
        display: none;
    }

    .contacts-filters-panel.is-open {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .contacts-toolbar-secondary {
        display: none !important;
    }

    .contacts-more-wrap {
        display: block;
        order: 5;
        width: 100%;
    }

    .contacts-list-wrap .sc-table-wrap {
        display: none;
    }

    .contacts-cards {
        display: flex;
    }
}

/* Phone: touch targets, single column, horizontal scroll table */
@media (max-width: 640px) {
    .sc-main {
        padding: 0.5rem 0.75rem;
    }

    .field-notes-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .field-notes-heading {
        font-size: 1rem;
    }

    .field-notes-header-search-wrap .field-notes-search {
        min-height: 44px;
    }

    .field-notes-chip {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }

    .field-note-card {
        min-height: 168px;
    }

    .field-note-card--new {
        min-height: 168px;
    }

    .field-note-editor-tags-row {
        gap: 0.5rem;
    }

    .field-note-editor-tag-pill {
        min-height: 36px;
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }

    .field-note-editor-tag-add-btn {
        min-height: 36px;
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    .field-note-editor-tag-dropdown-item {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
    }

    .field-note-editor-tag-custom-row {
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }

    .field-note-editor-tag-custom-input,
    .field-note-editor-tag-custom-add {
        min-height: 44px;
        font-size: 0.9rem;
    }

    .field-note-editor-close,
    .field-note-editor-actions .sc-btn {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
    }

    .field-note-editor-title {
        font-size: 1.25rem;
    }

    .field-note-editor-body {
        min-height: 100px;
        font-size: 1rem;
        -webkit-text-size-adjust: 100%;
    }

    .contacts-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contacts-toolbar .sc-search,
    .contacts-toolbar .sc-select,
    .contacts-toolbar .sc-btn {
        width: 100%;
        min-height: 44px;
    }

    .sc-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
    }

    .sc-table {
        min-width: 600px;
    }

    .sc-dispatch-row-cols {
        grid-template-columns: 1fr;
    }

    .sc-modal-close {
        width: 44px;
        height: 44px;
        top: 0.5rem;
        right: 0.5rem;
    }

    .sc-modal-content {
        padding: 1rem;
    }

    .sc-modal-actions .sc-btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }

    .sc-radar-display {
        height: min(360px, 50vh);
    }

    .sc-campaign-cal .sc-cal-nav-btn {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
    }

    .sc-campaign-cal .sc-cal-today-btn,
    .sc-campaign-cal .sc-cal-view-btn {
        min-height: 44px;
        padding: 8px 16px;
        font-size: 9px;
    }

    .signal-corps-page .side-quests-todo-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .signal-corps-page .side-quests-todo-add-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .signal-corps-page .sc-input,
    .signal-corps-page .sc-select,
    .signal-corps-page .sc-dispatch-input,
    .signal-corps-page .sc-dispatch-select,
    .signal-corps-page .sc-dispatch-textarea,
    .signal-corps-page .side-quests-todo-input,
    .signal-corps-page .sc-radar-goal-input {
        font-size: 16px;
    }

    .signal-corps-page .sc-dropdown {
        left: 0;
        right: auto;
        max-width: min(calc(100vw - 2rem), 22rem);
        box-sizing: border-box;
    }

    .signal-corps-page .sc-dispatch-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .signal-corps-page .sc-dispatch-actions .sc-btn {
        width: 100%;
        justify-content: center;
    }

    .sc-modal-templates-manage .template-manage-card {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .sc-modal-templates-manage .template-manage-card-preview {
        max-width: 100%;
    }
}

/* Very small: tag dropdown constrained to viewport */
@media (max-width: 480px) {
    .field-note-editor-tag-dropdown {
        max-width: calc(100vw - 1rem);
    }

    .sc-campaign-cal .sc-cal-toolbar {
        padding-inline: 12px;
    }

    .sc-campaign-cal .sc-cal-day {
        padding: 5px 4px;
        min-height: 76px;
    }

    .sc-campaign-cal .sc-cal-week {
        min-height: 76px;
    }

    .sc-campaign-cal .sc-cal-day-header {
        padding-block: 8px;
        font-size: 7px;
    }
}

/* Operations pipeline: avoid unreadable micro-columns on tablet / phone */
@media (max-width: 900px) {
    .crm-dashboard-pipeline-row {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr));
        gap: 0.75rem;
    }

    .crm-dashboard-pipeline-row .crm-stat-card {
        flex: none;
        min-width: 0;
    }
}
