/* ===================================
   Broadcast Email System - Styles
   =================================== */

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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.25);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-input: rgba(15, 23, 42, 0.6);
    --border: rgba(100, 116, 139, 0.25);
    --border-focus: rgba(99, 102, 241, 0.5);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* -- App Container -- */
.app-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    min-height: 100vh;
}

/* -- Background Blobs (hidden) -- */
.bg-decoration {
    display: none;
}

/* -- Header -- */
.app-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    border-radius: 16px;
    margin-bottom: 16px;
    color: white;
    box-shadow: 0 8px 32px var(--primary-glow);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 32px var(--primary-glow); }
    50% { box-shadow: 0 8px 48px rgba(99, 102, 241, 0.4); }
}

.app-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

/* -- Main Content -- */
.main-content {
    position: relative;
    z-index: 1;
}

/* -- Form Section -- */
.broadcast-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-section:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-sm);
    color: var(--primary-light);
    flex-shrink: 0;
}

.section-header label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: block;
}

.section-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* -- Inputs -- */
input[type="text"],
textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    transition: border-color var(--transition), box-shadow var(--transition);
    resize: vertical;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea#emailList {
    min-height: 120px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
}

textarea#message {
    min-height: 180px;
}

/* -- Email Actions (counter + import) -- */
.email-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.email-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.email-counter #emailCount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 20px;
    min-width: 24px;
}

/* -- Import Button -- */
.import-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.import-button:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.import-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* -- Success Toast -- */
.toast-success {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    color: #6ee7b7;
    font-size: 0.85rem;
    max-width: 90%;
    width: max-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.3s ease-out;
}

.toast-success svg {
    flex-shrink: 0;
    color: var(--success);
}

/* -- Send Button -- */
.send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 16px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.send-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
    opacity: 0;
    transition: opacity var(--transition);
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--primary-glow);
}

.send-button:hover:not(:disabled)::before {
    opacity: 1;
}

.send-button:active:not(:disabled) {
    transform: translateY(0);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.send-button.loading span {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* -- Progress Section -- */
.progress-section {
    margin-top: 32px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    animation: slideUp 0.4s ease-out;
}

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

.progress-header {
    margin-bottom: 20px;
}

.progress-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.progress-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.stat-total {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-secondary);
}

.stat-success {
    background: var(--success-bg);
    color: var(--success);
}

.stat-fail {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat strong {
    font-weight: 700;
}

/* -- Progress Bar -- */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* -- Results List -- */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.results-list::-webkit-scrollbar {
    width: 4px;
}

.results-list::-webkit-scrollbar-track {
    background: transparent;
}

.results-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.result-item.success {
    border-color: rgba(16, 185, 129, 0.2);
}

.result-item.fail {
    border-color: rgba(239, 68, 68, 0.2);
}

.result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.result-item.success .result-icon {
    background: var(--success-bg);
    color: var(--success);
}

.result-item.fail .result-icon {
    background: var(--danger-bg);
    color: var(--danger);
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-email {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.result-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.result-item.success .result-badge {
    background: var(--success-bg);
    color: var(--success);
}

.result-item.fail .result-badge {
    background: var(--danger-bg);
    color: var(--danger);
}

/* -- Reset Button -- */
.reset-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    margin-top: 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.reset-button:hover {
    background: rgba(100, 116, 139, 0.1);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* -- Confirmation Modal -- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
    animation: modalFadeIn 0.25s ease-out;
}

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

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    border-radius: 16px;
    margin: 0 auto 16px;
    color: white;
    box-shadow: 0 8px 32px var(--primary-glow);
}

.modal-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.modal-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.modal-details {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
}

.modal-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.modal-detail-row + .modal-detail-row {
    border-top: 1px solid rgba(100, 116, 139, 0.12);
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-label svg {
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-email-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0 4px;
    max-height: 120px;
    overflow-y: auto;
}

.modal-email-tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-light);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.modal-message-preview {
    margin-top: 4px;
    padding: 10px 12px;
    background: rgba(100, 116, 139, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-height: 100px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.modal-btn-cancel {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.modal-btn-cancel:hover {
    background: rgba(100, 116, 139, 0.25);
    color: var(--text-primary);
}

.modal-btn-confirm {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.modal-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--primary-glow);
}

/* -- Footer -- */
.app-footer {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.app-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* -- Placeholder Hint (Personalization) -- */
.placeholder-hint {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.placeholder-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.placeholder-info svg {
    flex-shrink: 0;
    color: var(--primary-light);
    opacity: 0.7;
}

.placeholder-info code {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.78rem;
    font-weight: 600;
}

.placeholder-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.name-data-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--success);
    background: var(--success-bg);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.insert-placeholder-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.insert-placeholder-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

/* -- Utilities -- */
.hidden {
    display: none !important;
}

/* -- Toast Error Notification -- */
.toast-error {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    color: #fca5a5;
    font-size: 0.85rem;
    max-width: 90%;
    width: max-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.3s ease-out;
}

.toast-error svg {
    flex-shrink: 0;
    color: var(--danger);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}


/* -- Progress Actions -- */
.progress-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.retry-button {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: #f59e0b; /* Amber 500 */
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.retry-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
    background: #d97706; /* Amber 600 */
}

.retry-button:active {
    transform: translateY(0);
}

.retry-button.hidden {
    display: none !important;
}

.reset-button {
    flex: 1;
    min-width: 160px;
    margin-top: 0 !important;
}

/* -- Responsive -- */
@media (max-width: 640px) {
    .app-container {
        padding: 24px 16px;
    }

    .app-header h1 {
        font-size: 1.6rem;
    }

    .form-section {
        padding: 18px;
    }

    .progress-stats {
        flex-direction: column;
        gap: 8px;
    }

    .result-item {
        flex-wrap: wrap;
    }

    .toast-error {
        max-width: 95%;
        font-size: 0.8rem;
    }
}

/* -- Debug Log -- */
.debug-toggle-btn {
    display: block;
    margin-top: 8px;
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.debug-toggle-btn:hover {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-primary);
}

/* -- Layout Selection & Instruction -- */
/* -- Layout Selection Cards -- */
.layout-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.layout-card {
    position: relative;
    cursor: pointer;
}

.layout-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.layout-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.layout-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all var(--transition);
    flex-shrink: 0;
}

.layout-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.layout-card-check {
    margin-left: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all var(--transition);
    flex-shrink: 0;
}

/* Checked State */
.layout-card input[type="radio"]:checked + .layout-card-inner {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.layout-card input[type="radio"]:checked + .layout-card-inner .layout-card-icon {
    background: var(--primary);
    color: white;
}

.layout-card input[type="radio"]:checked + .layout-card-inner .layout-card-check {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Hover State */
.layout-card:hover .layout-card-inner {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.05);
}

.layout-group {
    background: rgba(99, 102, 241, 0.05);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}

.layout-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.layout-guide {
    margin-top: 12px;
    padding: 12px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.layout-guide h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.layout-guide ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.layout-guide li {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.layout-guide li::before {
    content: "•";
    color: var(--primary-light);
    font-weight: bold;
}

.placeholder-pill {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    border-radius: 4px;
    font-family: 'SF Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 2px;
}

.modal-message-preview {
    margin-top: 4px;
    padding: 0;
    background: rgba(100, 116, 139, 0.05);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.layout-recruitment-preview {
    background: #ffffff !important;
    color: #1e293b !important;
    text-align: left;
}

.preview-header {
    background: #ffffff;
    padding: 20px;
    border-bottom: 4px solid #cc0000;
}

.preview-logo {
    font-size: 16px;
    font-weight: 800;
    color: #1e3a8a;
    text-transform: uppercase;
}

.preview-sub {
    font-size: 11px;
    color: #64748b;
}

.preview-body {
    padding: 20px;
}

.preview-subject {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 15px 0;
    border-left: 3px solid #cc0000;
    padding-left: 10px;
}

.preview-text {
    font-size: 14px;
    color: #334155;
    white-space: pre-wrap;
}

.preview-footer {
    background: #f8fafc;
    padding: 20px;
    font-size: 11px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}
