/* Campaigns Page & Play Space Dashboard Styles */

/* Browser Page Layout */
.campaign-browser-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.campaign-browser-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

@media (min-width: 768px) {
    .campaign-browser-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: var(--space-xs) var(--space-sm) var(--space-xs) calc(var(--space-sm) * 2.5);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

.invite-box {
    display: flex;
    gap: var(--space-xs);
}

.invite-input {
    width: 140px;
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.invite-input:focus {
    outline: none;
    border-color: var(--color-gold);
}

.invite-btn {
    padding: var(--space-xs) var(--space-md);
    background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold));
    border: none;
    border-radius: var(--radius-sm);
    color: var(--bg-body);
    font-family: var(--font-title);
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast), filter var(--transition-fast);
}

.invite-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.invite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Campaign Card Lists */
.campaign-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

@media (min-width: 992px) {
    .campaign-card-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.campaign-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-sm);
}

.campaign-card:hover {
    border-color: var(--color-gold);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.campaign-card--selected {
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.campaign-card__title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
}

.campaign-card__name {
    font-family: var(--font-title);
    font-size: 1.25rem;
    color: var(--text-color);
    margin: 0;
}

.campaign-badge {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px var(--space-xs);
    border-radius: var(--radius-sm);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.campaign-badge--role {
    background: var(--color-gold-dark);
}

.campaign-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.campaign-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.campaign-meta-item--lock {
    color: #f59e0b;
}

.campaign-card__desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.campaign-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.reorder-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-sm);
}

/* Campaign Details / Join Rules Box */
.campaign-detail-long-desc {
    line-height: 1.6;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.campaign-detail-filters {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.campaign-detail-filters strong {
    display: block;
    color: var(--text-gold);
    font-family: var(--font-title);
    margin-bottom: var(--space-xs);
}

.campaign-detail-filters ul {
    margin: 0;
    padding-left: var(--space-md);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.campaign-detail-filters li {
    margin-bottom: 4px;
}

/* Character Selection (Eligibility list) */
.character-eligibility-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.eligibility-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.eligibility-card--selected {
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
    background: rgba(212, 175, 55, 0.03);
}

.eligibility-card--ineligible {
    opacity: 0.5;
    cursor: not-allowed;
}

.eligibility-card__name {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--text-color);
}

.eligibility-card__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.eligibility-card__reason {
    font-size: 0.85rem;
    color: #ef4444;
    padding-top: 4px;
    border-top: 1px dashed rgba(239, 68, 68, 0.2);
}

/* Active Play Space: Narrative & Chronicles */
.scene-viewer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    margin-bottom: var(--space-sm);
}

.scene-nav-label {
    font-size: 1rem;
    color: var(--text-gold);
    font-weight: 600;
}

.story-panel-box {
    border: 1px solid var(--border-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.05);
}

.story-panel-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
}

.story-meta-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.story-body-text {
    line-height: 1.75;
    color: #d1d5db;
    font-size: 1.125rem;
}

.story-body-text p {
    margin-bottom: var(--space-md);
    text-indent: var(--space-md);
}

.story-body-text p:first-of-type {
    text-indent: 0;
}

/* Play Space: Intent Input Panel */
.intent-panel-box {
    border: 1px solid var(--border-color);
    margin-top: var(--space-md);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(12, 18, 32, 0.95) 100%);
}

.intent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.intent-status-badges {
    display: flex;
    gap: var(--space-xs);
}

.intent-textarea {
    height: 110px;
    font-size: 1rem;
    resize: none;
    border-color: var(--border-color);
    background: var(--bg-body);
}

.intent-textarea:focus {
    border-color: var(--color-gold);
}

.intent-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

/* Sidebar Tab content layout */
.sidebar-pc-info,
.sidebar-party-info,
.sidebar-ledger-info {
    animation: fadeIn 0.2s ease-out;
}

.sidebar-pc-info .pc-sub {
    font-size: 0.9rem;
    margin-top: 2px;
}

.sidebar-stat-gauge {
    margin-top: var(--space-sm);
}

.sidebar-stat-gauge__header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.sidebar-stat-gauge__track {
    height: 8px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.sidebar-stat-gauge__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold));
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
    transition: width var(--transition-slow);
}

.sidebar-section-title {
    font-family: var(--font-title);
    font-size: 0.95rem;
    color: var(--text-gold);
    margin-bottom: var(--space-xs);
    border-bottom: 1px dashed rgba(212, 175, 55, 0.2);
    padding-bottom: 2px;
}

.sidebar-entry-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-entry-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.sidebar-entry-card:hover {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.02);
}

.sidebar-entry-card__name {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.sidebar-entry-card__sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Party list card */
.party-member-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.party-member-card__name {
    font-family: var(--font-title);
    font-size: 0.95rem;
    color: var(--text-color);
}

.party-member-card__desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.party-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.party-status-badge--ready {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.party-status-badge--waiting {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Outcomes Ledger */
.ledger-sections-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.ledger-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-body);
    padding: var(--space-xs) var(--space-sm);
}

.ledger-section--self {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.02);
}

.ledger-section__title {
    font-size: 0.95rem;
    color: var(--text-gold);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 4px;
    margin-bottom: var(--space-xs);
}

.ledger-section__empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: var(--space-xs) 0;
}

.ledger-row-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.ledger-row-entry:hover {
    background: rgba(255, 255, 255, 0.02);
    padding-left: var(--space-xs);
}

.ledger-row-entry:last-child {
    border-bottom: none;
}

.ledger-row-entry:hover .ledger-row-entry__name {
    color: var(--text-gold);
}

.ledger-row-entry__name {
    color: var(--text-color);
    transition: color var(--transition-fast);
}

.ledger-row-entry__badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: var(--radius-sm);
}

.ledger-row-entry__badge--add {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 12.5%, transparent);
}

.ledger-row-entry__badge--modify {
    color: var(--info);
    background: color-mix(in srgb, var(--info) 12.5%, transparent);
}

.ledger-row-entry__badge--remove {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 12.5%, transparent);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   DM & Campaign Administration Tools styles
   ============================================================ */

.campaign-tools-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

@media (min-width: 992px) {
    .campaign-tools-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

.tools-sidebar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-xs);
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
}

@media (min-width: 992px) {
    .tools-sidebar {
        flex-direction: column;
        width: 240px;
        flex-shrink: 0;
    }
}

.tools-sidebar-btn {
    flex: 1 1 auto;
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-title);
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tools-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
}

.tools-sidebar-btn--active {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--border-gold);
    color: var(--color-gold);
}

.tools-content {
    flex: 1;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

/* Split Panel Layout for Lists + Details */
.split-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .split-panel {
        flex-direction: row;
    }
}

.panel-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
}

.panel-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
}

@media (min-width: 768px) {
    .panel-left {
        max-width: 45%;
        border-right: 1px solid var(--border-color);
        padding-right: var(--space-md);
    }
    .panel-right {
        max-width: 55%;
    }
}

.panel-section-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--text-gold);
    margin-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border-gold);
    padding-bottom: var(--space-xs);
}

.panel-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-body);
    text-align: center;
    padding: var(--space-md);
}

/* Lists and Cards */
.intent-list, .scene-list, .summary-list, .invites-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 500px;
    overflow-y: auto;
    padding-right: var(--space-xs);
}

.intent-item, .scene-item, .summary-item, .invite-row-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.intent-item:hover, .scene-item:hover, .summary-item:hover {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.02);
}

.intent-item--selected, .scene-item--selected, .summary-item--selected {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.1);
}

.intent-item-header, .scene-item-header, .summary-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.intent-item-label, .scene-index, .summary-index, .invite-row-code {
    font-family: var(--font-title);
    font-weight: bold;
    color: var(--text-color);
}

.intent-item-preview, .scene-title, .summary-title, .summary-preview {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.scene-title, .summary-title {
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 500;
}

.current-indicator {
    color: var(--text-gold);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-title);
}

.summary-indicator {
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-title);
}

.scene-branch {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Detail view panels */
.intent-detail-card, .story-preview-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.detail-title, .preview-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    color: var(--text-gold);
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-xs);
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.detail-field label {
    font-family: var(--font-title);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.detail-readonly-box {
    padding: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #d1d5db;
    font-family: var(--font-body);
    line-height: 1.5;
    font-size: 1rem;
    max-height: 150px;
    overflow-y: auto;
}

.detail-textarea {
    width: 100%;
    height: 120px;
    padding: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
}

.detail-textarea:focus {
    outline: none;
    border-color: var(--color-gold);
}

.detail-actions, .preview-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

.preview-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    color: #cbd5e1;
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 1.05rem;
    max-height: 350px;
    overflow-y: auto;
    white-space: pre-line;
}

/* Members View */
.members-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.chip-btn {
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-family: var(--font-title);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chip-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-color);
}

.chip-btn--active {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.chip-count {
    font-size: 0.8rem;
    opacity: 0.8;
}

.members-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
}

@media (min-width: 600px) {
    .members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.member-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.member-card:hover {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.02);
}

.member-card--active {
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.member-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 4px;
    margin-bottom: var(--space-xs);
}

.member-name {
    font-family: var(--font-title);
    font-size: 1.05rem;
    color: var(--text-color);
    font-weight: 600;
}

.member-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.member-badge--role {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-gold);
    border: 1px solid var(--border-gold);
}

.member-details {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.member-details p {
    margin: 2px 0;
}

.status-badge {
    font-weight: 600;
}

.status-badge--approved { color: var(--success); }
.status-badge--pending { color: var(--warning); }
.status-badge--denied, .status-badge--kicked, .status-badge--banned { color: var(--danger); }

/* Premium Custom Modal overlay */
.custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 18, 32, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    animation: modalFadeIn 0.2s ease-out;
}

.custom-modal-container {
    background: var(--bg-card);
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.15);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.custom-modal-title {
    font-size: 1.25rem;
    color: var(--text-gold);
    margin: 0;
}

.custom-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}

.custom-modal-close:hover {
    color: var(--text-color);
}

.custom-modal-body {
    padding: var(--space-md);
    overflow-y: auto;
    flex-1: 1;
}

.custom-modal-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.15);
}

.modal-section {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.modal-section-title {
    font-family: var(--font-title);
    font-size: 0.9rem;
    color: var(--text-gold);
    margin-top: 0;
    margin-bottom: var(--space-sm);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: var(--space-xs);
}

.modal-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.input-with-btn {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Campaign codes card details */
.invite-row-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
}

.invite-row-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invite-row-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Settings Form Grid */
.settings-form {
    max-height: 700px;
    overflow-y: auto;
    padding-right: var(--space-xs);
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-family: var(--font-title);
    font-size: 0.9rem;
    color: var(--text-gold);
}

.checkbox-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    font-family: var(--font-body) !important;
    font-size: 1rem !important;
    color: var(--text-body) !important;
}

.checkbox-container input {
    cursor: pointer;
}

.settings-section-title {
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: var(--text-gold);
    margin-top: var(--space-sm);
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-gold);
    padding-bottom: var(--space-xs);
}

.join-filters-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.intent-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.intent-status-badge--not-submitted {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.intent-status-badge--submitted {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.intent-status-badge--overridden {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    border: 1px solid var(--border-gold);
}

.char-badge--pulse {
    border-color: var(--gold) !important;
    color: var(--gold-bright) !important;
    background: rgba(212, 175, 55, 0.12) !important;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
    animation: gold-badge-pulse 2s infinite ease-in-out;
}

@keyframes gold-badge-pulse {
    0%, 100% {
        box-shadow: 0 0 4px rgba(212, 175, 55, 0.15);
        border-color: rgba(212, 175, 55, 0.4) !important;
    }
    50% {
        box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
        border-color: var(--gold-bright) !important;
    }
}

/* Campaign Hub play space grid */
.campaign-hub-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-xl);
    align-items: start;
}

@media (max-width: 1024px) {
    .campaign-hub-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* Play space extra styles (aligned with MAUI) */
.char-badge--danger {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

.collapse-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px var(--border-gold-glow);
}

.generate-image-prompt:hover {
    background: rgba(212, 175, 55, 0.09) !important;
    border-color: var(--gold-bright) !important;
}

.party-member-card--selected {
    background: rgba(212, 175, 55, 0.08) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.ledger-section--self {
    border-left: 2px solid var(--gold);
}
