/* ==========================================================================
   BentoBox Main Stylesheet
   Modern Glassmorphism Aesthetic matching RosterHound
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --color-slate-900: #0f172a;
    --color-slate-800: #1e293b;
    --color-slate-700: #334155;
    --color-slate-600: #475569;
    --color-slate-400: #94a3b8;
    --color-slate-300: #cbd5e1;
    --color-slate-200: #e2e8f0;

    --color-indigo-400: #818cf8;
    --color-indigo-500: #6366f1;
    --color-indigo-600: #4f46e5;

    --color-violet-400: #a78bfa;
    --color-amber-400: #fbbf24;
    --color-emerald-400: #34d399;
    --color-rose-400: #fb7185;

    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-card: rgba(30, 41, 59, 0.6);
    --glass-card-hover: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-focus: rgba(99, 102, 241, 0.5);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gradient);
    color: var(--color-slate-200);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

/* Application Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Navigation Header */
.app-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--glass-border);
    z-index: 50;
    flex-shrink: 0;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--color-slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Header Controls */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.board-select-wrapper {
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 4px 12px;
    gap: 8px;
}

.board-select {
    background: transparent;
    border: none;
    color: var(--color-slate-200);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    padding: 4px 0;
}

.board-select option {
    background: #1e293b;
    color: #f1f5f9;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--color-slate-200);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Toolbar Bar */
.app-toolbar {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.4);
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    gap: 8px;
    width: 280px;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--color-indigo-500);
    background: rgba(30, 41, 59, 0.9);
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-slate-200);
    font-family: inherit;
    font-size: 0.85rem;
    width: 100%;
}

.board-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.board-title-display {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-slate-100);
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-desc-display {
    font-size: 0.85rem;
    color: var(--color-slate-400);
}

/* Main Canvas */
.board-canvas {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: flex-start;
    height: calc(100vh - 116px);
}

/* Column Container */
.kanban-column {
    width: 310px;
    min-width: 310px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 14px;
    backdrop-filter: blur(8px);
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.column-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.column-drag-handle {
    cursor: grab;
    color: #64748b;
    display: flex;
    align-items: center;
    padding: 2px 2px 2px 0;
    transition: color 0.15s ease;
    user-select: none;
}

.column-drag-handle:hover {
    color: #cbd5e1;
}

.column-drag-handle:active {
    cursor: grabbing;
}

.kanban-column.column-dragging {
    opacity: 0.35;
    border: 2px dashed #a78bfa !important;
}

.kanban-column.drag-over-left {
    border-left: 3px solid #a78bfa !important;
}

.kanban-column.drag-over-right {
    border-right: 3px solid #a78bfa !important;
}

.column-color-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.column-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-slate-100);
}

.column-badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-slate-300);
    border-radius: var(--radius-full);
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.column-actions {
    display: flex;
    gap: 4px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--color-slate-400);
    border-radius: var(--radius-sm);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-btn:hover {
    color: var(--color-slate-100);
    background: rgba(255, 255, 255, 0.08);
}

/* Cards List Drop Zone */
.cards-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
    padding: 4px;
}

.cards-list.drag-over {
    background: rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-md);
    border: 1.5px dashed var(--color-indigo-500);
}

/* Kanban Card Component */
.kanban-card {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.kanban-card:hover {
    background: var(--glass-card-hover);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

/* Dynamic Rating & Aging Alert Card Borders */
.kanban-card.card-border-green {
    border: 1.5px solid #10b981 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3) !important;
}

.kanban-card.card-border-amber {
    border: 1.5px solid #f59e0b !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3) !important;
}

.kanban-card.card-border-red {
    border: 1.5px solid #ef4444 !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.4) !important;
}

/* Stale & Rating Badges */
.card-dwell-pill {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-dwell-pill.stale-red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.card-rating-pill {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.tag-pill {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.15);
    color: var(--color-indigo-400);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.card-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-slate-100);
    margin-bottom: 6px;
    line-height: 1.35;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--color-slate-400);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-slate-400);
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.priority-badge {
    text-transform: uppercase;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.priority-urgent {
    background: rgba(251, 113, 133, 0.2);
    color: #fb7185;
    border: 1px solid rgba(251, 113, 133, 0.4);
}
.priority-high {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
}
.priority-medium {
    background: rgba(129, 140, 248, 0.2);
    color: #818cf8;
    border: 1px solid rgba(129, 140, 248, 0.4);
}
.priority-low {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Settings Category Tabs */
.settings-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    background: rgba(15, 23, 42, 0.4);
}

.settings-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--color-slate-400);
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.15s, border-color 0.15s;
}

.settings-tab-btn:hover {
    color: #f8fafc;
}

.settings-tab-btn.active {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
}

/* Board Settings Modal - Fixed uniform size across all tabs to prevent jerky resizing */
#boardSettingsModal .modal-box {
    width: 860px;
    max-width: 94vw;
    height: 710px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#boardSettingsModal #boardSettingsForm {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#boardSettingsModal .modal-body {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

#boardSettingsModal .modal-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Modal Dialog */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-backdrop.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal-box {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 520px;
    max-width: 90vw;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.modal-backdrop.active .modal-box {
    transform: translateY(0);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-slate-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input, .form-textarea, .form-select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: var(--color-slate-100);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--color-indigo-500);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

#confirmModalMessage strong,
#confirmModalMessage b {
    color: #f8fafc;
    font-weight: 700;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--color-slate-400);
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-header {
        padding: 0 12px;
    }
    .board-canvas {
        padding: 12px;
    }
    .search-box {
        width: 180px;
    }
}

/* ==========================================================================
   Contacts & Activity Logging Styles
   ========================================================================== */
.modal-box.modal-lg {
    max-width: 840px;
    width: 92%;
}

.contacts-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    max-height: 72vh;
    overflow-y: auto;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.contact-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.contact-card:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(167, 139, 250, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-slate-100);
}

.contact-card-company {
    font-size: 0.78rem;
    color: var(--color-slate-400);
}

.contact-card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--color-slate-300);
}

.contact-card-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-badge {
    background: rgba(167, 139, 250, 0.15);
    color: #c084fc;
    border: 1px solid rgba(167, 139, 250, 0.3);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
}

.contact-form-wrap {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--glass-border-focus);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 16px;
}

/* Quick Activity Section */
.activity-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.activity-section-sub {
    font-size: 0.75rem;
    color: var(--color-slate-400);
}

.quick-activity-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.act-btn {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 8px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.act-call {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}
.act-call:hover {
    background: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.3);
}

.act-text {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.35);
    color: #38bdf8;
}
.act-text:hover {
    background: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.act-email {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.35);
    color: #c084fc;
}
.act-email:hover {
    background: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.3);
}

.act-note {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}
.act-note:hover {
    background: rgba(148, 163, 184, 0.3);
    box-shadow: 0 0 12px rgba(203, 213, 225, 0.3);
}

.act-btn.active {
    box-shadow: 0 0 0 2px var(--color-indigo-500), 0 0 14px rgba(99, 102, 241, 0.4);
    font-weight: 700;
}

.activity-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--glass-border-focus);
    border-radius: var(--radius-md);
    padding: 12px;
    animation: fadeIn 0.15s ease-out;
}

/* Activity Timeline & RosterHound Note Cards */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 4px;
}

.roster-note-card {
    background-color: #131b2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.roster-note-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.roster-note-card.editing {
    border-color: rgba(99, 102, 241, 0.8);
    background-color: #131b2e;
}

.roster-note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.roster-note-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-slate-100);
    display: flex;
    align-items: center;
    gap: 6px;
}

.roster-note-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.roster-note-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: #ffffff !important;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.roster-note-meta {
    font-size: 0.74rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.roster-note-textarea {
    width: 100%;
    background-color: #090e17 !important;
    color: #ffffff !important;
    border: 1px solid rgba(99, 102, 241, 0.7);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    resize: vertical;
    min-height: 70px;
}

/* Kanban Card Face Mini Note Preview */
.card-note-preview {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    margin-top: 8px;
    font-size: 0.78rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-note-preview-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Weekly Availability Grid Styles */
.avail-slot-cell {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s ease;
    user-select: none;
}

.avail-slot-cell:hover {
    background: rgba(52, 211, 153, 0.25);
    border-color: rgba(52, 211, 153, 0.6);
}

.avail-slot-cell.active {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: 1px solid #34d399 !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

/* Contact Typeahead / Pre-fill Dropdown */
.contact-typeahead-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #181926;
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
    max-height: 220px;
    overflow-y: auto;
    z-index: 250;
}

.contact-typeahead-header {
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-indigo-400);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(99, 102, 241, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.contact-typeahead-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
}

.contact-typeahead-item:last-child {
    border-bottom: none;
}

.contact-typeahead-item:hover,
.contact-typeahead-item.active {
    background: rgba(99, 102, 241, 0.22);
}

.contact-typeahead-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-typeahead-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 2px;
    min-width: 0;
}

.contact-typeahead-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-typeahead-company {
    font-size: 0.78rem;
    color: #a78bfa;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-typeahead-meta {
    font-size: 0.74rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.input-prefilled-highlight {
    animation: prefillPulse 1.2s ease;
    border-color: #34d399 !important;
}

@keyframes prefillPulse {
    0% {
        box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.7);
        border-color: #34d399;
    }
    50% {
        box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.4);
        border-color: #34d399;
    }
    100% {
        box-shadow: none;
    }
}

/* ==========================================================================
   Contacts CSV Import & Export Styles
   ========================================================================== */
.csv-mapping-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 12px;
}

.csv-mapping-row {
    display: grid;
    grid-template-columns: 160px 22px 1fr 1fr;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.csv-mapping-row:last-child {
    border-bottom: none;
}

.csv-target-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-slate-200);
    display: flex;
    align-items: center;
    gap: 6px;
}

.csv-target-badge {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--color-indigo-400);
    font-weight: 600;
}

.csv-target-badge.required {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

.csv-sample-preview {
    font-size: 0.75rem;
    color: var(--color-slate-400);
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.csv-preview-table-wrap {
    max-height: 180px;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.5);
}

.csv-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    text-align: left;
}

.csv-preview-table th {
    background: rgba(30, 41, 59, 0.8);
    color: var(--color-slate-300);
    padding: 8px 12px;
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.csv-preview-table td {
    padding: 8px 12px;
    color: var(--color-slate-300);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.csv-preview-table tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Form Embed Tabs & Panels (Form Settings Modal)
   ========================================================================== */
.form-embed-tabs {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.28);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-embed-tab-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--color-slate-400);
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.form-embed-tab-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.form-embed-tab-btn.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.35);
    border-color: rgba(167, 139, 250, 0.4);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.form-embed-panel {
    animation: fadeIn 0.15s ease-in-out;
}

