/* ===== FORM DESIGNER LAYOUT ===== */

.designer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    gap: 12px;
    flex-shrink: 0;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-name-input {
    min-width: 300px;
    font-weight: 600;
}

.designer-container {
    display: flex;
    height: calc(100vh - 160px);
    overflow: hidden;
    border-top: 1px solid #e0e0e0;
}

/* ===== TOOLBOX PANEL ===== */

.designer-toolbox {
    width: 240px;
    min-width: 240px;
    background: #f8f9fb;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.toolbox-header {
    padding: 14px 16px 10px;
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbox-category {
    margin-bottom: 4px;
}

.toolbox-category-header {
    padding: 8px 16px 4px;
    font-weight: 600;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.toolbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: grab;
    border: 1px solid transparent;
    border-radius: 6px;
    margin: 2px 8px;
    transition: all 0.15s ease;
    font-size: 13px;
    color: #334155;
    user-select: none;
}

.toolbox-item:hover {
    background: #e8edf4;
    border-color: #c5cdd8;
}

.toolbox-item:active {
    cursor: grabbing;
    background: #dbeafe;
    border-color: #93c5fd;
}

.toolbox-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
    flex-shrink: 0;
}

.toolbox-item-label {
    font-weight: 500;
}

/* ===== CANVAS ===== */

.designer-canvas {
    flex: 1;
    background: #eef1f6;
    overflow-y: auto;
    padding: 24px;
    position: relative;
}

.canvas-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    text-align: center;
    padding: 40px;
}

.canvas-empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.canvas-empty-state h4 {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 18px;
}

.canvas-empty-state p {
    margin: 0;
    font-size: 14px;
}

.canvas-form {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
    padding: 28px 32px 20px;
    min-height: 300px;
}

.canvas-form-header h3 {
    margin: 0 0 4px;
    font-size: 20px;
    color: #1e293b;
}

.canvas-form-header .form-description {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 14px;
}

/* ===== CANVAS ELEMENTS ===== */

.canvas-element {
    position: relative;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 12px 12px 32px;
    margin: 2px 0;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fff;
}

.canvas-element:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.canvas-element-selected {
    border-color: #3b82f6 !important;
    background: #f0f7ff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.element-drag-handle {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: #cbd5e1;
    cursor: grab;
    user-select: none;
    line-height: 1;
    letter-spacing: -1px;
}

.canvas-element:hover .element-drag-handle {
    color: #94a3b8;
}

.element-content {
    pointer-events: none;
    min-height: 24px;
}

.element-actions {
    position: absolute;
    right: 4px;
    top: 4px;
    display: none;
    gap: 2px;
}

.canvas-element:hover .element-actions,
.canvas-element-selected .element-actions {
    display: flex;
}

.element-action-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #94a3b8;
    transition: all 0.15s ease;
    pointer-events: auto;
    padding: 0;
}

.element-action-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.delete-btn:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* ===== DROP ZONES ===== */

.drop-zone {
    height: 4px;
    margin: 0 4px;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.drop-zone.dragging {
    min-height: 18px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    margin: 4px;
}

.drop-zone-active,
.drop-zone.dragging.drop-zone-active {
    height: 40px;
    min-height: 40px;
    background: #dbeafe;
    border: 2px dashed #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone-end {
    min-height: 60px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone-end.drop-zone-active {
    min-height: 60px;
}

.drop-hint {
    font-size: 13px;
    color: #3b82f6;
    font-weight: 500;
}

/* ===== ELEMENT PREVIEWS ===== */

.preview-label {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 4px;
}

.preview-label .required-mark {
    color: #ef4444;
    margin-left: 2px;
}

.preview-help-text {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
}

.preview-input-mock {
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    background: #f9fafb;
}

.preview-textarea-mock {
    height: 72px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    color: #94a3b8;
    background: #f9fafb;
}

.preview-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
}

.preview-checkbox-box {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    flex-shrink: 0;
}

.preview-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
}

.preview-radio-circle {
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    flex-shrink: 0;
}

.preview-dropdown-mock {
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
}

.preview-dropdown-arrow {
    color: #94a3b8;
    font-size: 10px;
}

.preview-separator {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 4px 0;
}

.preview-image {
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.preview-button-mock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.preview-button-primary { background: #3b82f6; }
.preview-button-success { background: #22c55e; }
.preview-button-danger { background: #ef4444; }
.preview-button-secondary { background: #64748b; }
.preview-button-warning { background: #f59e0b; color: #1e293b; }

/* ===== PROPERTIES PANEL ===== */

.designer-properties {
    width: 300px;
    min-width: 300px;
    background: #f8f9fb;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.properties-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.properties-title {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.properties-type {
    font-size: 11px;
    color: #fff;
    background: #3b82f6;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.properties-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.properties-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 14px;
    padding: 24px;
    text-align: center;
}

.prop-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prop-group-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prop-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.prop-field-label {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
}

.prop-field .dxbl-text-edit,
.prop-field .dxbl-spin-edit,
.prop-field .dxbl-combobox {
    font-size: 13px;
}

.prop-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prop-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 4px 0;
}

/* Options editor */
.options-editor {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.option-row .dxbl-text-edit {
    flex: 1;
}

.option-remove-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.option-remove-btn:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* ===== IMAGE UPLOAD ===== */

.image-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s ease;
    background: #fafbfc;
}

.image-upload-area:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.image-file-input {
    width: 100%;
    font-size: 12px;
    color: #475569;
}

.image-file-input::file-selector-button {
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.15s ease;
}

.image-file-input::file-selector-button:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.image-upload-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
}

.image-upload-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    padding: 4px 8px;
    background: #fef2f2;
    border-radius: 4px;
}

.image-preview-container {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.image-preview-thumb {
    display: block;
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    background: #f1f5f9;
}

.image-preview-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-top: 1px solid #e2e8f0;
}

.image-filename {
    font-size: 11px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.image-source-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.image-source-divider::before,
.image-source-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #e2e8f0;
}

/* ===== TEMPLATE BADGE ===== */

.template-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    color: #7c3aed;
    background: #ede9fe;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.template-badge-small {
    font-size: 9px;
    padding: 1px 6px;
    margin-left: 6px;
    vertical-align: middle;
}

.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.template-card-header h4 {
    margin: 0;
}

.form-description-text {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* ===== FORM LIST PAGE ===== */

.form-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.form-list-header h1 {
    margin: 0;
}

.form-list-actions {
    display: flex;
    gap: 8px;
}

.template-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.template-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.template-card h4 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #1e293b;
}

.template-card p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.template-card .element-count {
    margin-top: 10px;
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.form-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.2s ease;
    overflow: hidden;
    min-width: 0;
}

.form-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.form-card h4 {
    margin: 0;
    font-size: 15px;
    color: #1e293b;
}

.form-card .form-date {
    font-size: 12px;
    color: #94a3b8;
}

.form-card .element-count {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.form-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ===== FORM PREVIEW PAGE ===== */

.form-preview-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.form-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-preview-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
    padding: 32px;
}

.form-preview-card h2 {
    margin: 0 0 8px;
    color: #1e293b;
}

.form-preview-card .form-description {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 14px;
}

.preview-element-wrapper {
    margin-bottom: 16px;
}

.preview-field-label {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.preview-field-label .required-star {
    color: #ef4444;
}

.preview-field-help {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.submission-result {
    margin-top: 24px;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.submission-result h4 {
    margin: 0 0 12px;
    color: #166534;
}

.submission-result table {
    width: 100%;
    border-collapse: collapse;
}

.submission-result td {
    padding: 4px 8px;
    font-size: 13px;
    border-bottom: 1px solid #dcfce7;
}

.submission-result td:first-child {
    font-weight: 600;
    color: #166534;
    width: 40%;
}

/* ===== PUBLISHED URL BAR (Designer) ===== */

.published-url-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    font-size: 13px;
}

.published-label {
    font-weight: 600;
    color: #166534;
    white-space: nowrap;
}

.published-link {
    color: #0369a1;
    text-decoration: none;
    font-family: monospace;
    font-size: 12px;
    background: #fff;
    padding: 2px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    word-break: break-all;
}

.published-link:hover {
    background: #f0f7ff;
    border-color: #93c5fd;
}

.published-note {
    color: #94a3b8;
    font-size: 11px;
    margin-left: auto;
}

.copy-url-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 3px 6px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    transition: all 0.15s;
}

.copy-url-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #94a3b8;
}

.copy-url-check {
    color: #16a34a;
    font-size: 14px;
    font-weight: 700;
}

/* ===== PUBLISHED URL ON FORM CARDS ===== */

.form-published-url {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    min-width: 0;
}

.form-published-url a {
    color: #0369a1;
    text-decoration: none;
    font-family: monospace;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-published-url a:hover {
    text-decoration: underline;
}

.published-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

/* ===== PUBLIC FORM PAGE ===== */

.public-form-page {
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    background: #f1f5f9;
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.public-form-card {
    width: 100%;
    max-width: 720px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
    padding: 36px 40px;
}

.public-form-not-found {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.public-form-not-found h2 {
    margin: 0 0 8px;
    color: #1e293b;
}

.public-form-footer {
    margin-top: 16px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}

/* ===== MONEY RADIO GROUP — PROPERTY EDITOR ===== */

.money-options-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.money-option-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.money-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.money-option-number {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #3b82f6;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rate-schedule-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.rate-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.rate-schedule-empty {
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
    padding: 4px 0;
}

/* The popup is rendered outside the narrow properties panel. */
.rate-grid-editor { padding: 8px; }
.rate-grid-editor p { margin: 0 0 12px; }
.rate-grid-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-grid-scroll { overflow: auto; max-height: 55vh; }
.rate-grid { width: 100%; min-width: 800px; border-collapse: collapse; table-layout: fixed; }
.rate-grid th, .rate-grid td { padding: 8px; border: 1px solid #dbe2ea; vertical-align: middle; }
.rate-grid th { background: #f1f5f9; text-align: left; position: sticky; top: 0; z-index: 1; }
.rate-grid th:first-child { width: 25%; }
.rate-grid th:last-child { width: 90px; }
.rate-grid td > div { width: 100%; }
.rate-grid tbody tr:nth-child(even) { background: #f8fafc; }
.rate-grid-remove { color: #b91c1c; background: transparent; border: 1px solid #fecaca; border-radius: 4px; padding: 5px 8px; }
.rate-grid-remove:hover { background: #fef2f2; }
.rate-grid-empty { text-align: center; color: #64748b; }
.rate-grid-error { color: #b91c1c; }
.rate-grid-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ===== MONEY RADIO GROUP — CANVAS PREVIEW ===== */

.preview-money-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-money-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f9fafb;
}

.preview-money-label {
    flex: 1;
}

.preview-money-price {
    font-weight: 600;
    color: #059669;
    font-size: 14px;
}

.preview-money-period {
    font-size: 10px;
    color: #7c3aed;
    background: #ede9fe;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.preview-rate-badge {
    margin-top: 4px;
    font-size: 10px;
    color: #0369a1;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 8px;
    display: inline-block;
    font-weight: 500;
}

/* ===== MONEY RADIO GROUP — LIVE RENDERER ===== */

.money-radio-group-live {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.money-radio-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fff;
}

.money-radio-option:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.money-radio-selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.money-radio-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.money-radio-dot {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.money-radio-dot-selected {
    border-color: #3b82f6;
    border-width: 5px;
}

.money-radio-opt-label {
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
}

.money-radio-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.money-radio-price {
    font-size: 16px;
    font-weight: 700;
    color: #059669;
}

.money-radio-rate-name {
    font-size: 11px;
    color: #7c3aed;
    background: #ede9fe;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.money-schedule-summary {
    margin-top: 8px;
}

.money-schedule-details {
    margin-bottom: 6px;
}

.money-schedule-details summary {
    font-size: 12px;
    color: #3b82f6;
    cursor: pointer;
    font-weight: 500;
    padding: 4px 0;
}

.money-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 4px;
}

.money-schedule-table th {
    text-align: left;
    padding: 4px 8px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.money-schedule-table td {
    padding: 4px 8px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.schedule-row-active {
    background: #f0fdf4;
}

.schedule-row-active td {
    color: #166534;
    font-weight: 500;
}

/* ===== AUTH / USER INFO IN LAYOUT ===== */

.user-info-footer {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.user-display-name {
    display: block;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-form {
    display: inline;
}

.logout-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}

.logout-btn:hover {
    text-decoration: underline;
}

.auth-links-footer {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.auth-link {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding-right: 16px;
}

.user-bar-name {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.logout-form-inline {
    display: inline;
}

.logout-btn-inline {
    background: none;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn-inline:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

/* ===== REGISTRATION CONFIRMATION ===== */

.registration-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.confirmation-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 32px;
    line-height: 64px;
    margin: 0 auto 20px;
}

.registration-confirmation h2 {
    color: #166534;
    margin-bottom: 8px;
}

.registration-confirmation p {
    color: #475569;
    font-size: 15px;
}

.confirmation-detail {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 15px;
}

.detail-label {
    color: #64748b;
    font-weight: 500;
}

.detail-amount {
    font-weight: 700;
    color: #166534;
    font-size: 18px;
}

.confirmation-note {
    margin-top: 24px;
    font-size: 13px;
    color: #94a3b8;
}

/* ===== VALIDATION ERRORS ===== */

.validation-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.validation-error-item {
    color: #dc2626;
    font-size: 13px;
    padding: 2px 0;
}

/* ===== REGISTRATIONS LIST PAGE ===== */

.registrations-page {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.registrations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.registrations-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}

.registrations-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
}

.registrations-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.registration-count {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.registrations-empty {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #475569;
}

.registrations-empty h4 {
    color: #334155;
    margin-bottom: 8px;
}

.registrations-grid {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

/* ===== CART SUMMARY (on public form) ===== */

.cart-summary-mini {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 20px 0;
    text-align: left;
}

.cart-summary-mini h4 {
    margin: 0 0 12px 0;
    color: #334155;
    font-size: 14px;
}

.cart-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 4px;
    font-size: 15px;
    color: #1e293b;
}

.cart-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cart-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.cart-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.cart-btn-primary:hover { opacity: 0.9; }

.cart-btn-secondary {
    background: #fff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}

.cart-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* ===== SESSION REGISTRANTS ===== */

.session-registrants {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 20px 0;
    text-align: left;
}

.session-registrants h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #334155;
}

.session-registrant-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.session-registrant-row:last-of-type {
    border-bottom: none;
}

.session-registrant-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    flex: 1;
}

.session-registrant-option {
    font-size: 13px;
    color: #64748b;
}

.session-registrant-amount {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.session-registrant-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 4px;
    font-size: 15px;
    color: #1e293b;
    border-top: 1px solid #e2e8f0;
}

.session-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #1e40af;
    font-weight: 500;
}

.session-banner-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.session-banner-btn:hover {
    color: #1d4ed8;
}

/* ===== CHECKOUT PAGE ===== */

.checkout-container {
    padding: 20px 0;
}

.checkout-container h2 {
    margin: 0 0 4px 0;
    color: #1e293b;
}

.checkout-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
}

.cart-items {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-desc {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

.cart-item-type {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-item-amount {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    margin-top: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #166534;
}

.cart-total-amount {
    font-size: 20px;
}

.checkout-fees {
    border-top: 1px solid #e2e8f0;
    padding: 10px 18px 0;
    margin-top: 8px;
}
.checkout-fee-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: #64748b;
}

.checkout-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 16px;
}

.payment-methods {
    margin-top: 28px;
}

.payment-methods h3 {
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 14px;
}

.payment-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
    text-align: left;
}

.payment-btn:hover:not(:disabled) {
    border-color: #667eea;
    background: #f8fafc;
}

.payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.payment-btn-icon {
    font-size: 28px;
    width: 40px;
    text-align: center;
}

.payment-btn-text {
    display: flex;
    flex-direction: column;
}

.payment-btn-text strong {
    font-size: 15px;
    color: #1e293b;
}

.payment-btn-text small {
    font-size: 12px;
    color: #64748b;
}

.no-providers {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 16px;
    color: #92400e;
    font-size: 13px;
}

.checkout-processing {
    text-align: center;
    color: #667eea;
    font-weight: 500;
    padding: 12px;
    font-size: 14px;
}

.checkout-back {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.checkout-back-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.checkout-back-link:hover { text-decoration: underline; }

/* ===== PAYMENT SUCCESS ===== */

.confirmation-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 20px auto;
    max-width: 360px;
    text-align: left;
}

.confirmation-line-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.confirmation-line-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    font-size: 15px;
    color: #166534;
}

.confirmation-transaction {
    margin-top: 16px;
    font-size: 12px;
    color: #94a3b8;
}

/* ===== SETTINGS PAGE ===== */

.settings-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 32px 24px;
}
.settings-page h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
}
.settings-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
}
.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}
.settings-description {
    color: #64748b;
    font-size: 13px;
    margin: 0 0 20px;
}
.settings-provider-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.settings-provider-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.2s;
}
.settings-provider-card.provider-active {
    border-color: #7c3aed;
    background: #faf5ff;
}
.settings-provider-card.provider-unconfigured {
    opacity: 0.6;
}
.provider-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.provider-card-desc {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}
.provider-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 600;
}
.provider-badge-active {
    background: #7c3aed;
    color: #fff;
}
.provider-badge-unconfigured {
    background: #fef3c7;
    color: #92400e;
}
.btn-provider-activate {
    padding: 8px 20px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}
.btn-provider-activate:hover {
    background: #6d28d9;
}
.btn-provider-current {
    padding: 8px 20px;
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}
.btn-provider-disabled {
    padding: 8px 20px;
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
}
.settings-status {
    margin-top: 16px;
    padding: 10px 16px;
    background: #f0fdf4;
    color: #166534;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* ===== CHECKOUT PAY BUTTON ===== */

.payment-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: #7c3aed;
    color: #fff;
    transition: background 0.2s;
    font-size: 16px;
}
.payment-btn-primary:hover:not(:disabled) {
    background: #6d28d9;
}
.payment-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.payment-btn-primary .payment-btn-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.payment-btn-primary .payment-btn-text strong {
    font-size: 18px;
}
.payment-btn-primary .payment-btn-text small {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

/* ===== DASHBOARD ===== */

.dashboard-section {
    margin-bottom: 32px;
}
.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.dashboard-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}
.dashboard-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 32px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* Event Cards */
.event-live-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 99px;
    background: #dcfce7;
    color: #166534;
}
.event-draft-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 99px;
    background: #fef3c7;
    color: #92400e;
}
.event-stats {
    display: flex;
    gap: 24px;
    margin: 12px 0;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
}
.event-stat {
    display: flex;
    flex-direction: column;
}
.event-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}
.event-stat-label {
    font-size: 12px;
    color: #64748b;
}
.event-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 99px;
    background: #ede9fe;
    color: #6d28d9;
}

/* Designer Form Settings Bar */
.designer-form-settings {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.form-setting-field {
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-setting-label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
}
.form-setting-input {
    min-width: 200px;
}

/* ===== DESIGNER TABS ===== */
.designer-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    border-bottom: 2px solid #e2e8f0;
    background: #fff;
}
.designer-tab {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.15s;
}
.designer-tab:hover {
    color: #1e293b;
    background: #f8fafc;
}
.designer-tab-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* ===== EVENT INFORMATION PANEL ===== */
.event-info-panel {
    padding: 20px;
    max-width: 900px;
}
.event-info-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}
.event-info-section h4 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}
.event-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.event-info-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.event-info-field-full {
    grid-column: 1 / -1;
}
.event-info-label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}
.registration-status-preview {
    margin-top: 12px;
}
.reg-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.reg-status-open {
    background: #dcfce7;
    color: #166534;
}
.reg-status-closed {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== EVENT CATEGORIES SECTION ===== */
.designer-categories-section,
.event-info-section:last-child {
    /* shared base */
}
.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.categories-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}
.categories-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.category-name-input {
    min-width: 180px;
}
.categories-empty {
    text-align: center;
    padding: 12px;
    color: #94a3b8;
    font-size: 13px;
}
.categories-empty p {
    margin: 0;
}
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.category-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
}
.category-card.category-inactive {
    opacity: 0.6;
    background: #f1f5f9;
}
.category-card-main {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.category-card-info {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.category-edit-name {
    font-weight: 500;
}
.category-edit-desc {
    font-size: 12px;
}
.category-card-limit {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.category-limit-input {
    width: 100px;
}
.category-enrollment-count {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}
.category-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ===== DEFAULT CATEGORIES POPUP ===== */
.default-categories-popup {
    padding: 4px 0;
}
.default-categories-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #475569;
}
.default-categories-listbox {
    max-height: 340px;
}

/* ===== DISCOUNT CODE FIELD ===== */
.discount-code-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.discount-code-input {
    flex: 1;
}
.discount-result {
    margin-top: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}
.discount-valid {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.discount-invalid {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ===== CATEGORIES GRID ===== */
.categories-grid {
    margin-top: 8px;
}

/* ===== DOB AGE DISPLAY ===== */
.dob-age-display {
    color: #7c3aed !important;
    font-weight: 500;
}

/* ===== REPORTS TAB ===== */
.reports-panel {
    max-width: 1000px;
}
.reports-top-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.reports-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
@media (max-width: 900px) {
    .reports-grid { grid-template-columns: 1fr; }
}
.reports-empty-text {
    color: #94a3b8;
    font-size: 14px;
    font-style: italic;
}
.report-stat-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.reports-grid > .event-info-section {
    min-width: 0;
}
.report-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    flex: 1 1 180px;
    min-width: 0;
    box-sizing: border-box;
    container-type: inline-size;
    text-align: center;
}
.report-stat-card.report-stat-money {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.report-stat-value {
    display: block;
    font-size: 22px;
    font-size: clamp(16px, 13cqi, 22px);
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #1e293b;
}
.report-stat-money .report-stat-value {
    color: #166534;
}
.report-stat-label {
    display: block;
    overflow-wrap: anywhere;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}
.report-sub-heading {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin: 12px 0 8px;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.report-table th {
    background: #f1f5f9;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}
.report-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.report-table code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}
.report-table-total td {
    border-top: 2px solid #e2e8f0;
    background: #f8fafc;
}
.export-popup {
    padding: 4px;
}
.export-popup-hint {
    font-size: 14px;
    color: #475569;
    margin-bottom: 8px;
}
.export-select-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
}
.export-select-actions a {
    color: #3b82f6;
    text-decoration: none;
}
.export-select-actions a:hover {
    text-decoration: underline;
}
.export-fields-listbox {
    max-height: 300px;
}

/* ===== MY SETTINGS PAGE ===== */

.my-settings-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.my-settings-page h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
}

.settings-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.my-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.my-settings-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.my-settings-field-full {
    grid-column: 1 / -1;
}

.my-settings-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

@media (max-width: 600px) {
    .my-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== CONTACT POPUP ===== */

.contact-popup-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0;
}

.contact-popup-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-popup-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.contact-popup-note {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* ===== PUBLIC LANDING PAGE ===== */

.landing-page {
    min-height: 100vh;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 40px;
    overflow-y: auto;
    height: 100vh;
}

.landing-topbar {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 16px 0 0;
}

.landing-topbar-link {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 6px;
    transition: background 0.15s;
}

.landing-topbar-link:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.landing-topbar-signup {
    background: #1e293b;
    color: #fff;
}

.landing-topbar-signup:hover {
    background: #334155;
    color: #fff;
}

.landing-header {
    text-align: center;
    padding: 48px 16px 32px;
    max-width: 600px;
    width: 100%;
}

.landing-logo {
    height: 48px;
    margin-bottom: 20px;
}

.landing-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
}

.landing-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 24px;
}

.landing-search {
    max-width: 460px;
    margin: 0 auto;
}

.landing-search-input {
    width: 100%;
    font-size: 15px;
}

.landing-admin-bar {
    margin-bottom: 16px;
}

.landing-admin-bar a {
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.landing-admin-bar a:hover {
    text-decoration: underline;
}

.landing-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 15px;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1100px;
}

.landing-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.landing-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 12px 32px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.landing-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 0;
}

.landing-card-logo img {
    max-height: 56px;
    max-width: 200px;
    object-fit: contain;
}

.landing-card-body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.landing-card-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.3;
}

.landing-card-org {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.landing-card-desc {
    font-size: 14px;
    color: #475569;
    margin: 0 0 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.landing-card-footer {
    margin-top: auto;
}

.landing-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.landing-badge-open {
    background: #dcfce7;
    color: #166534;
}

.landing-badge-closed {
    background: #fee2e2;
    color: #991b1b;
}

.landing-badge-upcoming {
    background: #e0f2fe;
    color: #075985;
    text-transform: none;
}

.landing-footer {
    margin-top: 40px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 700px) {
    .landing-grid {
        grid-template-columns: 1fr;
    }
    .landing-header {
        padding: 32px 8px 24px;
    }
    .landing-header h1 {
        font-size: 22px;
    }
}

/* ===== TEST HARNESS ===== */

.test-config-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 500px;
    margin-bottom: 20px;
}

.test-config-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.test-config-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.test-config-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-left: 8px;
}

.test-config-combo {
    max-width: 500px;
}

.test-config-spin {
    max-width: 160px;
}

.test-config-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.test-form-preview {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-width: 500px;
}

.test-form-meta {
    font-size: 13px;
    color: #64748b;
}

.test-running {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    color: #475569;
    font-size: 14px;
}

.test-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: test-spin 0.8s linear infinite;
}

@keyframes test-spin {
    to { transform: rotate(360deg); }
}

.test-output {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== PRODUCTS PAGE ===== */

.products-page {
    padding: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.products-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
}

.products-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: #64748b;
}

.products-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.products-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}

.products-grid {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.products-empty {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #475569;
}

.products-empty h4 {
    color: #334155;
    margin-bottom: 8px;
}

.products-info {
    font-size: 13px;
    color: #64748b;
    padding: 8px 0;
}

/* ===== PRODUCTS TAB IN FORM DESIGNER ===== */

.product-selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 700px;
}

.product-selection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.15s;
}

.product-selection-item.product-selected {
    background: #eff6ff;
    border-color: #93c5fd;
}

.product-selection-item.product-inactive {
    opacity: 0.6;
}

.product-selection-info {
    flex: 1;
    min-width: 0;
}

.product-selection-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-selection-desc {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.product-inactive-badge {
    font-size: 11px;
    font-weight: 500;
    color: #dc2626;
    background: #fee2e2;
    padding: 1px 6px;
    border-radius: 4px;
}

.product-selection-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.product-selection-type {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
}

.products-warning {
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 16px;
}

.products-warning a {
    color: #b45309;
    font-weight: 600;
}

.products-empty-tab {
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.products-empty-tab a {
    color: #3b82f6;
    font-weight: 500;
}

/* ===== PRODUCT IMAGES ===== */

.product-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-grid-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.product-images-manager {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-images-upload {
    padding: 16px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    text-align: center;
}

.product-images-empty {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.product-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.product-image-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.product-image-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.product-image-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    gap: 4px;
}

.product-image-filename {
    font-size: 11px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-image-delete {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    flex-shrink: 0;
}

.product-image-delete:hover {
    background: #fee2e2;
}

.image-upload-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.image-upload-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.image-file-input {
    font-size: 13px;
    color: #475569;
}

/* ===== CONTACTS PAGE ===== */
.contacts-page {
    padding: 24px 32px;
    max-width: 1100px;
}
.contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}
.contacts-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
}
.contacts-subtitle {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}
.contacts-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.contacts-empty {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
}
.contacts-grid {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.contacts-info {
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
}

/* ===== IMPORT POPUP ===== */
.import-popup-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.import-hint {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}
.import-hint p {
    margin: 0 0 6px;
}
.import-hint ul {
    margin: 0;
    padding-left: 20px;
}
.import-hint li {
    margin-bottom: 2px;
}
.import-file-area {
    padding: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
}
.import-file-input {
    font-size: 13px;
    color: #475569;
}
.import-result {
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
}
.import-result p {
    margin: 0 0 4px;
}
.import-result-success {
    background: #f0fdf4;
    color: #166534;
    padding: 12px;
    border-radius: 6px;
}
.import-result-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px;
    border-radius: 6px;
}

/* ===== EMAIL TEMPLATES PAGE ===== */
.templates-page {
    padding: 24px 32px;
    max-width: 1100px;
}
.templates-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}
.templates-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
}
.templates-subtitle {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}
.templates-empty {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
}
.templates-grid {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.templates-info {
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
}
.template-body-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.template-merge-hint {
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.template-merge-hint code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #334155;
}
.template-body-memo {
    min-height: 280px;
}

/* ===== RICH TEXT ===== */
.preview-richtext {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
}
.preview-richtext p { margin: 0 0 8px; }
.preview-richtext ul, .preview-richtext ol { margin: 0 0 8px; padding-left: 20px; }
.preview-richtext a { color: #2563eb; }
.richtext-content {
    font-size: 15px;
    color: #334155;
    line-height: 1.7;
}
.richtext-content p { margin: 0 0 10px; }
.richtext-content ul, .richtext-content ol { margin: 0 0 10px; padding-left: 22px; }
.richtext-content a { color: #2563eb; text-decoration: underline; }

/* ===== CONTACT TAGS ===== */
.contact-tag-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    line-height: 1.4;
}

.unsub-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    white-space: nowrap;
}
.contact-tags-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.contacts-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.tag-filter-combo {
    width: 220px;
}
.contacts-filter-count {
    font-size: 13px;
    color: #64748b;
}

/* Tag manager */
.tag-manager-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tag-manager-empty {
    color: #94a3b8;
    font-style: italic;
    font-size: 13px;
}
.tag-manager-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}
.tag-manager-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}
.tag-manager-spacer {
    flex: 1;
}
.tag-manager-add {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}
.tag-color-picker {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.tag-name-input, .tag-name-edit {
    flex: 1;
}

/* Import tag field */
.import-tag-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.import-tag-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.import-tag-combo {
    flex: 1;
}

/* Send email */
.send-email-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.send-email-merge-hint {
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.send-email-merge-hint code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #334155;
}
.send-action-btn {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(37,99,235,0.3) !important;
}
.send-action-btn:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

/* ===== LINK BUTTON STYLES (Public Form) ===== */

/* ===== EMAIL DESIGN LIST ===== */

.email-design-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.email-design-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.email-design-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59,130,246,0.1);
}

.email-design-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.email-design-card-date {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.email-design-card-actions {
    display: flex;
    gap: 8px;
}

/* ===== LINK BUTTON STYLES (Public Form) ===== */

.btn-link-primary { background: #3b82f6; color: #fff; }
.btn-link-secondary { background: #64748b; color: #fff; }
.btn-link-success { background: #22c55e; color: #fff; }
.btn-link-danger { background: #ef4444; color: #fff; }
.btn-link-warning { background: #f59e0b; color: #1e293b; }

.btn-link-primary:hover { background: #2563eb; }
.btn-link-secondary:hover { background: #475569; }
.btn-link-success:hover { background: #16a34a; }
.btn-link-danger:hover { background: #dc2626; }
.btn-link-warning:hover { background: #d97706; }

/* ===== TWO-COLUMN ROW (DESIGNER) ===== */

.canvas-row-pair {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.canvas-row-pair .canvas-row-col {
    flex: 1;
    min-width: 0;
    position: relative;
}

.canvas-row-pair .canvas-element {
    height: 100%;
    box-sizing: border-box;
}

.merge-indicator {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 12px;
    border-radius: 10px;
    white-space: nowrap;
    z-index: 5;
    pointer-events: none;
}

/* ===== TWO-COLUMN ROW (PUBLIC FORM) ===== */

.form-row-pair {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.form-row-pair .form-row-col {
    flex: 1;
    min-width: 0;
}

/* ===== MERGE OVERLAY (DESIGNER) ===== */

.canvas-element-merge-target {
    outline: 2px dashed #3b82f6;
    outline-offset: -2px;
    background: #eff6ff;
}

.canvas-element.canvas-element-merge-target .element-content {
    opacity: 0.4;
}

.merge-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 8px;
    padding: 8px;
    pointer-events: none;
    z-index: 4;
}

.merge-col-placeholder {
    flex: 1;
    border: 2px dashed #93c5fd;
    border-radius: 6px;
    background: rgba(219, 234, 254, 0.5);
}

.merge-col-new {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(191, 219, 254, 0.6);
    border-color: #3b82f6;
}

.merge-col-new span {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
}

/* ===== COLOR PICKER DROPDOWN ===== */

.color-picker-palette {
    border-width: 0;
}

/* ===== TERMS & CONDITIONS ===== */

.terms-link {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.terms-link:hover {
    color: #1d4ed8;
}

.terms-popup-body {
    padding: 8px 4px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
    font-size: 14px;
}

.terms-warning {
    font-size: 13px;
    color: #dc2626;
    margin-bottom: 8px;
}

/* ===== TEAM TABLE ===== */

.team-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.team-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
}

.team-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.team-table tbody tr:hover {
    background: #f8fafc;
}

/* Category options keep their saved name as the value and show supporting text separately. */
.event-category-option { padding: 4px 0; white-space: normal; min-width: 0; }
.event-category-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.event-category-description { display: block; font-size: 12px; line-height: 1.4; color: #475569; white-space: normal; overflow-wrap: anywhere; }
.event-category-option .event-category-description { color: inherit; opacity: .85; margin-top: 2px; }
.event-category-selected { margin-top: 6px; }


.field-validation-errors { color: #b91c1c; font-size: 13px; margin-top: 5px; }

/* Wider native category editor; cap its width on small screens. */
.event-category-edit-popup {
    --dxbl-popup-width: min(1000px, calc(100vw - 32px));
    --dxbl-popup-max-width: calc(100vw - 32px);
    width: min(1000px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
}
