/* ============================================================
   Lustre Outreach Engine — Dark Theme CSS
   ============================================================ */

/* --- CSS Variables / Color Palette --- */
:root {
    --bg-body: #0a0a1a;
    --bg-sidebar: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-input: #12122a;
    --bg-hover: #22223a;

    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;

    --accent: #d4a843;
    --accent-hover: #b8912e;
    --accent-highlight: #f0c860;

    --green: #2ecc71;
    --red: #e74c3c;
    --blue: #3498db;
    --orange: #f39c12;
    --purple: #9b59b6;

    --border: #2a2a3e;
    --border-light: #35354a;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 4px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);

    --sidebar-width: 240px;
    --transition: 0.2s ease;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}


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

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-highlight);
}

::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}


/* --- Sidebar --- */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
}

.logo {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--accent);
    margin-bottom: 0.1rem;
}

.logo .subtitle,
.subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.nav-links {
    list-style: none;
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.nav-links li {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 0.65rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(212, 168, 67, 0.08);
    border-left-color: var(--accent);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sidebar-footer span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* --- Main Content --- */
#content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem 2.5rem;
    min-height: 100vh;
    overflow-y: auto;
}

#page-container {
    max-width: 1400px;
    margin: 0 auto;
}

#page-container h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

#page-container h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}


/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}

.btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.btn-primary {
    background: var(--accent);
    color: #0a0a1a;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: var(--red);
}

.btn-danger:hover {
    background: var(--red);
    color: #fff;
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    border-radius: var(--radius-xs);
}

.btn-full {
    width: 100%;
}

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

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


/* --- Forms --- */
.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    font-family: var(--font);
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236a6a7a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.error {
    color: var(--red);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    text-align: center;
}


/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    margin-bottom: 0;
}


/* --- Tables --- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table th {
    background: var(--bg-sidebar);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    padding: 0.75rem 1rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

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

.table td.muted {
    color: var(--text-muted);
}

.table td.mono {
    font-family: var(--font-mono);
    font-size: 0.82rem;
}


/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-new        { background: rgba(52, 152, 219, 0.15); color: var(--blue); }
.badge-scraped    { background: rgba(155, 89, 182, 0.15); color: var(--purple); }
.badge-mockup     { background: rgba(243, 156, 18, 0.15); color: var(--orange); }
.badge-emailed    { background: rgba(212, 168, 67, 0.15); color: var(--accent); }
.badge-replied    { background: rgba(46, 204, 113, 0.15); color: var(--green); }
.badge-won        { background: rgba(46, 204, 113, 0.25); color: var(--green); }
.badge-lost       { background: rgba(231, 76, 60, 0.15); color: var(--red); }
.badge-paused     { background: rgba(106, 106, 122, 0.2); color: var(--text-muted); }

.badge-success    { background: rgba(46, 204, 113, 0.15); color: var(--green); }
.badge-danger     { background: rgba(231, 76, 60, 0.15); color: var(--red); }
.badge-info       { background: rgba(52, 152, 219, 0.15); color: var(--blue); }
.badge-warning    { background: rgba(243, 156, 18, 0.15); color: var(--orange); }


/* --- Stat Grid (Dashboard) --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    text-align: center;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.08);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.3rem;
}

.stat-card .stat-change {
    font-size: 0.75rem;
    margin-top: 0.4rem;
}

.stat-card .stat-change.up {
    color: var(--green);
}

.stat-card .stat-change.down {
    color: var(--red);
}


/* --- Pipeline (Kanban) --- */
.pipeline {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    min-height: 400px;
}

.pipeline-column {
    min-width: 260px;
    max-width: 300px;
    flex: 1;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.pipeline-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pipeline-column-header .count {
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
}

.pipeline-column-body {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pipeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    cursor: grab;
    transition: all var(--transition);
}

.pipeline-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(212, 168, 67, 0.1);
}

.pipeline-card:active {
    cursor: grabbing;
    opacity: 0.85;
}

.pipeline-card .prospect-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pipeline-card .prospect-url {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pipeline-card .prospect-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}


/* --- Score Bar --- */
.score-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
    background: var(--accent);
}

.score-bar-fill.high   { background: var(--green); }
.score-bar-fill.medium { background: var(--orange); }
.score-bar-fill.low    { background: var(--red); }

.score-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.score-label .score-value {
    font-weight: 700;
    color: var(--accent);
    min-width: 2rem;
}


/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}


/* --- Search Bar --- */
.search-bar {
    position: relative;
    max-width: 400px;
}

.search-bar input {
    padding-left: 2.5rem;
}

.search-bar::before {
    content: '';
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a6a7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}


/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
}

.pagination button,
.pagination .page-num {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.pagination button:hover,
.pagination .page-num:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.pagination .page-num.active {
    background: var(--accent);
    color: #0a0a1a;
    border-color: var(--accent);
}

.pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination .page-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0.5rem;
}


/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: #fff;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease forwards;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

.toast-success { background: var(--green); }
.toast-error   { background: var(--red); }
.toast-info    { background: var(--blue); }
.toast-warning { background: var(--orange); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(40px); }
}


/* --- Modal --- */
body.modal-open {
    overflow: hidden;
}

#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

#modal-content,
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.25s ease;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem 1.5rem;
    min-height: 0;
}

.modal-actions {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.prospect-website-preview {
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.prospect-website-preview iframe {
    width: 100%;
    height: 450px;
    border: none;
    background: #fff;
}

.prospect-website-preview .preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
}

.prospect-website-preview .preview-header a {
    color: var(--accent);
    font-weight: 600;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-header h3 {
    margin-bottom: 0;
}

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

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

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

@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* --- Login Page --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-body);
    background-image: radial-gradient(ellipse at 50% 30%, rgba(212, 168, 67, 0.04) 0%, transparent 70%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    text-align: center;
}

.login-card h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.login-card .subtitle {
    display: block;
    margin-bottom: 2rem;
}

.login-card .form-group {
    text-align: left;
}

.login-card .btn-primary {
    margin-top: 0.5rem;
}


/* --- Dropdown --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 500;
    padding: 0.35rem 0;
    animation: fadeIn 0.15s ease;
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--font);
    transition: background var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item.danger {
    color: var(--red);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.35rem 0;
}


/* --- Chips / Tags --- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.chip-gold {
    background: rgba(212, 168, 67, 0.12);
    color: var(--accent);
    border-color: rgba(212, 168, 67, 0.25);
}

.chip-remove {
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    color: var(--text-muted);
    transition: color var(--transition);
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font);
}

.chip-remove:hover {
    color: var(--red);
}

.chip-active {
    background: rgba(212, 168, 67, 0.18);
    color: var(--accent);
    border-color: var(--accent);
    cursor: pointer;
}

.chip:not(.chip-active) {
    cursor: pointer;
    opacity: 0.5;
}

.chip-removable {
    padding-right: 0.3rem;
}

.chip-group, .chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tab-content { margin-top: 1rem; }


/* --- Empty State --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 360px;
}

.empty-state .btn {
    margin-top: 1.25rem;
}


/* --- Loading Spinner --- */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loading-sm::after {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* --- Chart Placeholder --- */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chart-container canvas {
    max-width: 100%;
}

.chart-container .chart-placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
}


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

.text-gold    { color: var(--accent); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-blue    { color: var(--blue); }
.text-orange  { color: var(--orange); }
.text-muted   { color: var(--text-muted); }

.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }

.flex          { display: flex; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-wrap     { flex-wrap: wrap; }
.gap-1         { gap: 0.5rem; }
.gap-2         { gap: 1rem; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}


/* --- Toolbar (top bar within pages) --- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* --- Detail Panel / Split View --- */
.detail-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.detail-row {
    display: flex;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

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

.detail-row .label {
    min-width: 140px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-row .value {
    color: var(--text-primary);
    flex: 1;
}


/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    #sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    #sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    #content {
        margin-left: 0;
        padding: 1.25rem;
    }

    .form-row,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline {
        flex-direction: column;
    }

    .pipeline-column {
        min-width: 100%;
        max-width: 100%;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        justify-content: space-between;
    }

    .search-bar {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        margin: 1rem;
        padding: 2rem 1.5rem 1.5rem;
    }
}


/* --- Mobile Menu Toggle --- */
.menu-toggle {
    display: none;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.5rem 0.65rem;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}


/* --- Prospect Detail Grid --- */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    #modal-content,
    .modal {
        max-width: 100%;
        max-height: 95vh;
        margin: 0.5rem;
    }
}


/* --- Modal Scroll & Website Preview Fixes (2026-03-24) --- */

/* Ensure the modal body is scrollable even with long content */
.modal-body {
    flex: 1 1 auto;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding: 0 1.5rem 1.5rem;
    max-height: calc(90vh - 140px); /* account for header + actions */
}

/* Make sure detail-grid items wrap text */
.modal-body .detail-grid {
    word-break: break-word;
}

/* Ensure the website iframe container is always visible */
.prospect-website-preview {
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-height: 200px;
}

.prospect-website-preview iframe {
    width: 100%;
    height: 450px;
    border: none;
    background: #fff;
    display: block;
}

/* Fallback message styling for blocked iframes */
.prospect-website-preview .iframe-blocked {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-input);
}

/* Score breakdown and analysis sections should not break modal scroll */
.modal-body h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.modal-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

.modal-body ul {
    margin: 0.25rem 0;
    padding-left: 1.25rem;
}

.modal-body ul li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}


/* --- Bulk Selection UX Improvements (2026-03-24) --- */

/* Highlighted selected rows */
.table tbody tr.selected-row,
table.data-table tbody tr.selected-row {
    background: rgba(212, 168, 67, 0.10) !important;
    border-left: 3px solid var(--accent);
}

.table tbody tr.selected-row:hover,
table.data-table tbody tr.selected-row:hover {
    background: rgba(212, 168, 67, 0.16) !important;
}

/* Sticky bulk-action toolbar */
.bulk-toolbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.12), rgba(212, 168, 67, 0.06));
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
    animation: bulkBarIn 0.2s ease;
}

.bulk-toolbar.visible {
    display: flex;
}

.bulk-toolbar .bulk-count {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 100px;
}

.bulk-toolbar .btn {
    font-size: 0.82rem;
}

@keyframes bulkBarIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Make checkboxes more visible in dark theme */
table.data-table input[type="checkbox"],
.table input[type="checkbox"],
.row-check,
#select-all {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
    border: 2px solid var(--border-light);
    border-radius: 3px;
    vertical-align: middle;
}

/* Disabled vs enabled bulk buttons */
.bulk-toolbar .btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-muted);
}

.bulk-toolbar .btn:not(:disabled) {
    box-shadow: 0 0 8px rgba(212, 168, 67, 0.15);
}

.bulk-toolbar .btn-primary:not(:disabled) {
    background: var(--accent);
    color: #0a0a1a;
    border-color: var(--accent);
    animation: subtlePulse 2s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 0 8px rgba(212, 168, 67, 0.15); }
    50%      { box-shadow: 0 0 16px rgba(212, 168, 67, 0.35); }
}

/* Deselect all link */
.bulk-toolbar .deselect-link {
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    margin-left: auto;
    transition: color var(--transition);
}

.bulk-toolbar .deselect-link:hover {
    color: var(--text-primary);
}
