.leads-module {
    /* module-level spacing or background */
}

.leads-module .module-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    align-items: center;	
}

.leads-module .module-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-height: 36px;
    align-items: center;	
}

.leads-module .module-filters.is-hidden {
    display: none;
}

.leads-module .channel-filter {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;	
    min-height: 32px;	
    position: relative;	
}

.leads-module .channel-filter.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);	
}
.leads-module .channel-filter .channel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    position: absolute;
    right: -4px;
    top: 70%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 2px #fff;
}

.leads-module .channel-filter .channel-badge.channel-badge--compact {
    width: 16px;
    padding: 0;
}

.leads-module .channel-filter .channel-badge.channel-badge--wide {
    min-width: 18px;
    padding: 0 6px;	
}

.leads-module .channel-filter i {
    font-size: 0.9rem;
    line-height: 1;
}

.leads-module .lead-channel-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.leads-module .lead-channel-cell i {
    color: #1f2937;
}

.leads-module .module-menu button {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.leads-module .module-menu {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.leads-module .module-menu button:hover {
    background: #e2e8f0;
}

.leads-module .module-menu button.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.leads-module .module-filters-placeholder {
    color: #94a3b8;
    font-size: 0.85rem;
}

.leads-module .leads-channel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.leads-module .leads-channel-header h3 {
    margin: 0;
}

.leads-module .leads-channel-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

.leads-module .leads-channel-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.leads-module .leads-channel-table tbody tr {
    cursor: pointer;
}

.leads-module .channel-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.leads-module .channel-status.status--active {
    background: #dcfce7;
    color: #166534;
}

.leads-module .channel-status.status--disabled {
    background: #e2e8f0;
    color: #475569;
}

.leads-module .leads-empty {
    text-align: center;
    padding: 16px;
    color: #94a3b8;
}

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

.leads-module .leads-table th,
.leads-module .leads-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.leads-module .leads-table th {
    text-align: left;
    background: #e2e8f0;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leads-module .forms-date-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.leads-module .forms-date-filters label {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    color: #475569;
    gap: 4px;
}

.leads-module .forms-date-filters input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    min-height: 20px;
    width: 140px;	
}


.leads-module .forms-search-field {
    min-width: 220px;
}

.leads-module .forms-search-control {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.leads-module .forms-search-control input {
    width: 220px;
    padding-right: 34px;
}

.leads-module #forms-search-clear {
    position: absolute;
    right: 6px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.leads-module #forms-search-clear:hover,
.leads-module #forms-search-clear:focus-visible {
    background: #e2e8f0;
    color: #0f172a;
}

.leads-module .forms-date-filters__submit {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;	
}

.leads-module .leads-filter-action {
    margin-left: auto;
}

.leads-module #add-channel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 16px;
    border: 1px solid #1d4ed8;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.leads-module #add-channel-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.leads-module #add-channel-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}

.leads-module .lead-row {
    cursor: pointer;
}

.leads-module .lead-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.leads-module .lead-channel-icon {
    color: #64748b;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;	
}

.leads-module .leads-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.leads-module .leads-modal {
    background: #fff;
    width: min(900px, 92vw);
    border-radius: 6px;
    padding: 15px;
}

.leads-module .leads-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.leads-module .leads-modal-metric {
    position: absolute;
    top: -6px;
    right: 40px;
    font-size: 2.4rem;
    font-weight: 700;
    color: #22c55e;
}

.leads-module .channel-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.leads-module .channel-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.leads-module .channel-icon-picker-field {
    gap: 8px;
}

.leads-module .channel-icon-selected {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

.leads-module .channel-icon-selected strong {
    color: #1f2937;
}

.leads-module .channel-icon-grid {
    --channel-icon-row-height: 34px;
    --channel-icon-grid-gap: 6px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
    grid-auto-rows: var(--channel-icon-row-height);
    gap: var(--channel-icon-grid-gap);
    width: 100%;
    height: calc((var(--channel-icon-row-height) * 10) + (var(--channel-icon-grid-gap) * 9) + 16px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.leads-module .channel-icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-size: 0;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.leads-module .channel-icon-option i {
    color: #2563eb;
    font-size: 1rem;
}

.leads-module .channel-icon-option:hover,
.leads-module .channel-icon-option:focus-visible {
    border-color: #2563eb;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.14);
    outline: none;
    transform: translateY(-1px);
}

.leads-module .channel-icon-option.selected {
    border-color: #1d4ed8;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.leads-module .channel-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leads-module .channel-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1f2937;
}

.leads-module .channel-toggle-note {
    color: #b45309;
    font-size: 0.85rem;	
}

.leads-module .leads-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 15px;
}


.leads-module .leads-form-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.leads-module .leads-form-tab {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    padding: 7px 11px;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
}

.leads-module .leads-form-tab.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.leads-module .leads-form-panel {
    display: none;
}

.leads-module .leads-form-panel.active {
    display: block;
}

.leads-module .leads-performance-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
}

.leads-module .leads-performance-title {
    margin-bottom: 10px;
    font-weight: 600;
}

.leads-module .leads-performance-chart {
    width: 100%;
    height: 220px;
}

.leads-module .leads-performance-chart .axis {
    stroke: #cbd5e1;
    stroke-width: 1;
}

.leads-module .leads-performance-chart .trend {
    fill: none;
    stroke: #1d4ed8;
    stroke-width: 2;
}

.leads-module .leads-performance-chart circle {
    fill: #1d4ed8;
}

.leads-module .leads-performance-chart text {
    fill: #64748b;
    font-size: 9px;
}

.leads-module .submissions-table {
    width: 100%;
    border-collapse: collapse;
}

.leads-module .submissions-table th,
.leads-module .submissions-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 8px;
    text-align: left;
    font-size: 0.85rem;
}

.leads-module .submissions-pagination {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leads-module .submissions-pagination button {
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 6px;
    padding: 5px 9px;
    cursor: pointer;
}

.leads-module .submissions-pagination button:disabled {
    opacity: 0.5;
    cursor: default;
}

.leads-module .leads-empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 18px;
    color: #64748b;
    text-align: center;
}

.leads-module .leads-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.leads-module .leads-form-section {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.leads-module .leads-form-section + .leads-form-section {
    margin-top: 14px;	
}

.leads-module .leads-form-section summary {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2933;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 6px 8px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;	
}

.leads-module .leads-form-section summary::-webkit-details-marker {
    display: none;
}

.leads-module .leads-form-section summary::after {
    content: '▾';
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.leads-module .leads-form-section[open] summary::after {
    transform: rotate(-180deg);
}

.leads-module .leads-form-section > *:not(summary) {
    margin-top: 12px;
    font-size: 1rem;
    color: #1f2933;
}

.leads-module .leads-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}

.leads-module .leads-form-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #344053;
}


.leads-module .leads-form-field input {
    padding: 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;	
}

.leads-module .leads-form-field select {
    padding: 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    width: 100%;
    box-sizing: border-box;	
}

.leads-module .leads-form-field textarea {
    padding: 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}

.leads-module .leads-form-field input:focus {
    outline: none;
    border-color: #4c8bf5;
    box-shadow: 0 0 0 2px rgba(76, 139, 245, 0.2);
}

.leads-module .leads-form-toggle {
    justify-content: space-between;
}

.leads-module .leads-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 0.85rem;
}

.leads-module .leads-form-checkbox input[type="checkbox"] {
    width: auto;
}

.leads-module .leads-form-note {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.leads-module .leads-row-actions {
    display: flex;
    gap: 8px;
}

.leads-module .leads-modal-footer .btn-primary,
.leads-module .leads-modal-footer .btn-cancel,
.leads-module .leads-modal-footer .btn-secondary,
.leads-module .leads-header button,
.leads-module .leads-row-actions button {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
}

.leads-module .leads-modal-footer .btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.leads-module .leads-modal-footer .btn-cancel {
    background: #f8fafc;
}

.leads-module .leads-modal-footer .btn-secondary {
    background: #eef2ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.leads-module .hidden {
    display: none;
}

.leads-form-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #9a9a9a; /* light gray */
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.leads-form-value {
    white-space: normal;
}

.leads-form-value select {
    width: 100%;
    padding: 4px 6px;
    font-size: 0.85rem;
    box-sizing: border-box;	
}

.leads-form-field--full {
    grid-column: 1 / -1;
	align-items: flex-start;
}

.leads-form-stacked {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.leads-form-stacked .leads-form-label {
    margin-bottom: 4px;
}

.leads-form-stacked .leads-form-value {
    text-align: left;
    white-space: pre-wrap;
}

.leads-table,
.submissions-table,
.leads-row-actions {
    font-family: var(--app-list-font-family);
    font-size: var(--app-list-font-size);
    line-height: var(--app-list-line-height);
    letter-spacing: var(--app-list-letter-spacing);
    color: var(--app-list-color);
}

.leads-warning {
    color: #b91c1c;
    font-weight: 700;
    display: inline-block;
    margin-top: 0.25rem;
}

.assignment-member-tools {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.assignment-member-tools select {
    min-width: 16rem;
}
