/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    /* Primary - deeper, richer blue */
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #dbeafe;
    --primary-lighter: #eff6ff;

    /* Secondary - warmer gray (zinc family) */
    --secondary: #52525b;

    /* Success */
    --success: #16a34a;
    --success-light: #dcfce7;

    /* Warning - amber accent */
    --warning: #d97706;
    --warning-light: #fef3c7;

    /* Danger - softer approach */
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --danger-text: #991b1b;

    /* Backgrounds - warmer tones */
    --bg: #fafaf9;
    --bg-white: #ffffff;

    /* Text - warmer grays (zinc) */
    --text: #18181b;
    --text-light: #71717a;
    --text-muted: #a1a1aa;

    /* Borders - warmer */
    --border: #e4e4e7;
    --border-light: #f4f4f5;

    /* Shadows - refined depth */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);

    /* Border radius */
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--primary-dark);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    background: var(--primary-dark);
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    height: 48px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.top-bar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition);
}

.top-bar-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.top-bar-icon svg {
    width: 20px;
    height: 20px;
}

/* Notification Bell Dropdown */
.notif-dropdown {
    position: relative;
}

.notif-bell {
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 16px;
    height: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.notif-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--bg-white, #fff);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
    flex-direction: column;
}

.notif-dropdown-menu.open {
    display: flex;
}

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

.notif-header-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notif-mark-all {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
}

.notif-mark-all:hover {
    text-decoration: underline;
}

.notif-list {
    overflow-y: auto;
    max-height: 380px;
}

.notif-item {
    display: flex;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.1s;
}

.notif-item:hover {
    background: var(--bg, #f9fafb);
}

.notif-item-read {
    opacity: 0.55;
}

.notif-item-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--bg-primary-subtle, #eff6ff);
    border-radius: 6px;
}

.notif-item-icon svg {
    width: 14px;
    height: 14px;
}

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.8rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notif-item-time {
    font-size: 0.7rem;
    color: var(--text-light, #6b7280);
    margin-top: 0.125rem;
}

.notif-empty, .notif-loading {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-light, #6b7280);
    font-size: 0.85rem;
}

.notif-footer {
    display: block;
    text-align: center;
    padding: 0.625rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.notif-footer:hover {
    background: var(--bg, #f9fafb);
}

.top-bar-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all var(--transition);
}

.top-bar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Universal Top Search — HubSpot-style pill */
.top-search {
    display: flex;
    align-items: center;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    flex: 1;
    max-width: 520px;
    margin: 0 0 0 1rem;
    height: 30px;
    padding: 0;
    box-shadow: none;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    align-self: center;
}

.top-search:focus-within,
.top-search.focused {
    background: var(--bg);
    border-color: var(--bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.top-search-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-left: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.15s;
}

.top-search:focus-within .top-search-icon,
.top-search.focused .top-search-icon {
    color: var(--text-light);
}

.top-search input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    padding: 0 0.5rem;
    font-size: 0.85rem;
    outline: none;
    min-width: 0;
    height: 100%;
    cursor: text;
    caret-color: #fff;
}

.top-search:focus-within input[type="text"],
.top-search.focused input[type="text"],
.top-search input[type="text"]:focus {
    color: #18181b !important;
    caret-color: #18181b !important;
    -webkit-text-fill-color: #18181b;
}

.top-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.top-search:focus-within input::placeholder,
.top-search.focused input::placeholder,
.top-search input:focus::placeholder {
    color: #a1a1aa !important;
    -webkit-text-fill-color: #a1a1aa;
}

/* Type selector (custom dropdown on right end of pill) */
.top-search-type {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 12px;
    border-left: 1.5px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    height: 100%;
    user-select: none;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s;
}

.top-search:focus-within .top-search-type,
.top-search.focused .top-search-type {
    border-left-color: var(--border);
    color: var(--text-light);
}

.top-search-type:hover {
    color: rgba(255, 255, 255, 0.95);
}

.top-search:focus-within .top-search-type:hover,
.top-search.focused .top-search-type:hover {
    color: var(--text);
}

.top-search-type-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 200;
    overflow: hidden;
}

.top-search-type-menu.open {
    display: block;
}

.tsm-option {
    padding: 0.5rem 0.75rem;
    font-size: 0.825rem;
    color: var(--text);
    cursor: pointer;
    transition: background 0.1s;
}

.tsm-option:hover {
    background: var(--bg);
}

.tsm-option.active {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 600px) {
    .top-search {
        display: none;
    }
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    transition: all var(--transition);
}

.user-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-dropdown-btn svg {
    width: 20px;
    height: 20px;
}

.icon-xs {
    width: 14px !important;
    height: 14px !important;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.25rem;
    display: none;
    z-index: 200;
}

.user-dropdown-menu.open {
    display: block;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: background var(--transition);
}

.user-dropdown-menu a:hover {
    background: var(--bg);
    color: var(--primary);
}

.user-dropdown-menu a svg {
    width: 16px;
    height: 16px;
    color: var(--text-light);
}

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

/* App Layout */
.app-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--primary-dark);
}

/* Main content */
main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.5rem 0;
    width: 100%;
    background: var(--bg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Scrollbars: floating thumb only, never a track/background — app-wide.
   Removes the hover "gutter" background that overlapped the rounded corner
   between the content panel and the top bar. */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.4) transparent;
}
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background-color: rgba(100, 116, 139, 0.4);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
    background-color: rgba(100, 116, 139, 0.6);
    background-clip: padding-box;
}

/* Corner radius only when sidebar is present */
main:not(:last-child) {
    border-top-right-radius: 20px;
}

/* No dark bleed when there's no sidebar */
main:last-child {
    background: var(--bg);
}

main > .site-footer {
    margin-top: auto;
}

/* Right Navigation Sidebar */
.nav-sidebar {
    width: 52px;
    flex-shrink: 0;
    background: var(--primary-dark);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 48px;
    height: calc(100vh - 48px);
    overflow: visible;
    z-index: 50;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    gap: 2px;
    align-items: center;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Sidebar tooltips - appear to the left on hover */
.nav-item::before {
    content: attr(data-tip);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #fff;
    padding: 0.35rem 0.65rem;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 200;
    line-height: 1.3;
}

.nav-item::after {
    content: '';
    position: absolute;
    right: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #1e293b;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 200;
}

.nav-item:hover::before,
.nav-item:hover::after {
    opacity: 1;
}

/* Footer */
footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 150ms ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.15);
}

.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.15);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Light button for dark backgrounds (header, banners) */
.btn-on-dark {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-on-dark:hover:not(:disabled) {
    background: #f0f4ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-on-dark:active:not(:disabled) {
    background: #e0e7ff;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(.btn-disabled) {
    background: var(--bg);
    border-color: var(--text-muted);
    box-shadow: var(--shadow);
}

.btn-secondary:active:not(.btn-disabled) {
    box-shadow: none;
}

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

/* Loading spinner - hidden by default */
.btn-loading {
    display: none !important;
}

.btn-text {
    display: inline;
}

/* Show loading state only during HTMX request */
#search-btn.htmx-request .btn-text,
.htmx-request #search-btn .btn-text {
    display: none !important;
}

#search-btn.htmx-request .btn-loading,
.htmx-request #search-btn .btn-loading {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

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

/* Hero section */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
}

.hero h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem;
    color: var(--text);
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.feature:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature h3 {
    margin: 0 0 0.5rem;
    color: var(--primary);
}

.feature p {
    margin: 0;
    color: var(--text-light);
}

/* Data info */
.data-info {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.data-info h2 {
    margin: 0 0 1rem;
}

.data-info ul {
    margin: 0;
    padding-left: 1.25rem;
}

.data-info li {
    margin-bottom: 0.5rem;
}

/* Search page */
.search-page h1 {
    margin: 0 0 1.5rem;
}

/* Forms */
form {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 150px;
}

.form-group-wide {
    flex: 2;
    min-width: 300px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Multi-select dropdowns */
.multi-select {
    min-height: 100px;
}

.multi-select option {
    padding: 0.25rem 0.5rem;
}

.multi-select option:checked {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* Research Filters Section */
.research-filters {
    background: var(--bg);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

/* Checkbox Group Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-actions {
    margin-top: 1rem;
}

/* Results Header */
.results-header {
    margin-bottom: 1rem;
}

.results-summary {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-count {
    font-size: 1.125rem;
    color: var(--text);
}

.results-showing {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Table Container - Desktop */
.table-container {
    overflow-x: auto;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

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

.results-table th,
.results-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.results-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-light);
    white-space: nowrap;
}

.results-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.results-table th.sortable:hover {
    background: var(--border);
}

.sort-indicator {
    margin-left: 0.25rem;
    color: var(--primary);
}

.results-table th.num,
.results-table td.num {
    text-align: right;
}

.results-table th.volume-col {
    background: var(--primary-light);
    color: var(--primary-dark);
}

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

.provider-name {
    font-weight: 600;
    color: var(--text);
}

.provider-npi {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.provider-address,
.provider-city,
.provider-phone {
    font-size: 0.875rem;
    color: var(--text-light);
}

.specialty-badge {
    display: inline-block;
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Volume highlighting */
.volume-cell {
    font-weight: 600;
}

.volume-value {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
}

.volume-value.high-volume {
    background: var(--success-light);
    color: #166534;
}

.volume-value.medium-volume {
    background: var(--warning-light);
    color: #92400e;
}

/* Mobile Card View */
.cards-container {
    flex-direction: column;
    gap: 1rem;
}

.provider-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.card-header .provider-name {
    font-size: 1rem;
}

.volume-badge {
    flex-shrink: 0;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.volume-badge.high-volume {
    background: var(--success-light);
    color: #166534;
}

.volume-badge.medium-volume {
    background: var(--warning-light);
    color: #92400e;
}

.card-body {
    padding: 1rem;
}

.card-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.card-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.card-value {
    font-size: 0.875rem;
    color: var(--text);
    text-align: right;
}

.card-value.npi {
    font-family: monospace;
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Mobile/Desktop view toggles - use !important to override component styles */
.mobile-view {
    display: none !important;
}

.desktop-view {
    display: block !important;
}

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

.page-info {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Top pagination - compact inline style */
.pagination-top {
    margin: 0.75rem 0 0 0;
    justify-content: flex-start;
    gap: 0.5rem;
}

.pagination-top .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.pagination-top .page-info {
    font-size: 0.75rem;
    min-width: auto;
}

/* Load More */
.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.load-more-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* No results / Search prompt */
.no-results,
.search-prompt {
    background: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}

.no-results-icon,
.prompt-icon {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-results h3,
.search-prompt h3 {
    margin: 0 0 0.5rem;
    color: var(--text);
}

.no-results p,
.search-prompt p {
    color: var(--text-light);
    margin: 0 0 1rem;
}

.suggestions {
    text-align: left;
    max-width: 400px;
    margin: 1.5rem auto 0;
    background: var(--bg);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
}

.suggestions ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.suggestions li {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Example codes grid */
.example-codes {
    margin-top: 1.5rem;
}

.code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    text-align: left;
}

.code-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: var(--radius);
}

.code-item code {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.code-item span {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Error message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.error-message strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group,
    .form-group-wide {
        min-width: 100%;
    }

    /* Switch to mobile card view */
    .mobile-view {
        display: flex !important;
    }

    .desktop-view {
        display: none !important;
    }

    /* Hide sidebar on mobile */
    .nav-sidebar {
        display: none;
    }

    .top-bar .user-name {
        display: none;
    }

    .results-summary {
        flex-direction: column;
        gap: 0.25rem;
    }

    .pagination {
        gap: 0.5rem;
    }

    .code-grid {
        grid-template-columns: 1fr;
    }
}

/* HTMX loading states */
.htmx-request #results-container {
    opacity: 0.6;
    pointer-events: none;
}

/* Provider Detail Page */
.provider-page {
    max-width: 100%;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--primary-dark);
}

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.provider-header-main h1 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    color: var(--text);
}

.provider-specialty {
    color: var(--text-light);
    font-size: 1.125rem;
}

.provider-npi-badge {
    background: var(--bg);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-light);
    white-space: nowrap;
}

.provider-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
}

.info-card h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.info-label {
    color: var(--text-light);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.info-value {
    color: var(--text);
    font-size: 0.875rem;
    text-align: right;
}

.info-value.mono {
    font-family: monospace;
}

.procedures-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.procedures-section h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0 0 1.5rem;
}

.procedures-table {
    width: 100%;
    border-collapse: collapse;
}

.procedures-table th,
.procedures-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.procedures-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-light);
}

.procedures-table th.num,
.procedures-table td.num {
    text-align: right;
}

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

.code-cell code {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.no-procedures {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* Provider Detail Page Map */
.provider-location-map {
    margin-top: 1rem;
    height: 200px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* Provider name link in search results - always styled as link */
.provider-name-link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.provider-name-link:hover {
    text-decoration-thickness: 2px;
}

@media (max-width: 768px) {
    .provider-header {
        flex-direction: column;
    }

    .provider-header-main h1 {
        font-size: 1.5rem;
    }

    .info-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .info-value {
        text-align: left;
    }

    .procedures-table {
        font-size: 0.875rem;
    }

    .procedures-table th,
    .procedures-table td {
        padding: 0.5rem;
    }
}

/* Authentication Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--text-light);
    margin: 0 0 1.5rem;
    font-size: 0.875rem;
}

.auth-form {
    background: transparent;
    padding: 0;
    box-shadow: none;
    margin-bottom: 1rem;
}

.btn-full {
    width: 100%;
}

.auth-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 1rem 0 0;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.success-message {
    background: var(--success-light);
    border: 1px solid var(--success);
    color: #166534;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.success-message p {
    margin: 0;
}

.info-message {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.info-message p {
    margin: 0;
}

.subscription-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.account-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Saved Searches Page */
.searches-page {
    max-width: none;
}

.searches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.searches-header h1 {
    margin: 0;
}

.searches-grid {
    display: grid;
    gap: 1rem;
}

.saved-search-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 1.25rem;
    transition: all var(--transition);
}

.saved-search-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.saved-search-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.saved-search-name {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text);
}

.saved-search-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.saved-search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    color: var(--text);
}

.filter-chip svg {
    opacity: 0.6;
}

.filter-chip.filter-codes {
    background: var(--primary-lighter);
    border-color: var(--primary-light);
    color: var(--primary);
}

.filter-chip.filter-drg {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.filter-chip.filter-state {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.filter-chip.filter-location {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #4338ca;
}

.filter-chip.filter-specialty {
    background: #fce7f3;
    border-color: #f9a8d4;
    color: #9d174d;
}

.filter-chip.filter-payment {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #047857;
}

.saved-search-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.saved-search-actions form {
    display: inline-flex;
}

.no-searches {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-light);
}

.no-searches h3 {
    margin: 0 0 0.5rem;
    color: var(--text);
}

.no-searches p {
    margin: 0;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-danger {
    background: var(--danger-light);
    color: var(--danger-text);
    border: 1px solid #fecaca;
    box-shadow: none;
}

.btn-danger:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: var(--danger);
}

/* Save Search Modal */
.save-search-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--radius);
}

.save-search-form .form-group {
    flex: 1;
    margin: 0;
}

.save-search-form label {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.save-search-form input {
    padding: 0.5rem;
}

/* User menu in nav */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-email {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Results header with save button */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

.modal-content h3 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Industry Payments Section */
.payments-section {
    margin-top: 2rem;
}

.payments-section h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.payments-summary {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius);
}

.payments-total {
    font-size: 1.125rem;
}

.payments-table {
    width: 100%;
    border-collapse: collapse;
}

.payments-table th,
.payments-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.payments-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-light);
}

.payments-table th.num,
.payments-table td.num {
    text-align: right;
}

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

.company-name {
    font-weight: 500;
}

.payment-amount {
    font-weight: 600;
    font-family: var(--font-mono);
}

.payment-amount.high-payment {
    color: #dc2626;
}

.payment-amount.medium-payment {
    color: #d97706;
}

.payment-type {
    font-size: 0.875rem;
    color: var(--text-light);
}

.product-name {
    font-size: 0.875rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-source {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

.no-payments {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.no-payments small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/* Payment Summary Card */
.payment-summary-card {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    align-items: center;
}

.summary-total {
    text-align: center;
    padding-right: 1.5rem;
    border-right: 1px solid var(--border);
}

.summary-total .amount {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.summary-total .label,
.summary-companies .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-top: 0.25rem;
}

.summary-companies {
    text-align: center;
    padding-right: 1.5rem;
    border-right: 1px solid var(--border);
}

.summary-companies .count {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.summary-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 200px;
}

.type-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(to right, var(--primary-light) var(--width, 0%), transparent var(--width, 0%));
    border-radius: 4px;
    font-size: 0.8125rem;
}

.type-bar .type-name {
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.type-bar .type-amount {
    color: var(--text-light);
    font-weight: 500;
    margin-left: 0.5rem;
}

.consulting-badge {
    background: var(--warning-light);
    color: #92400e;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.consulting-badge .badge-icon {
    color: #d97706;
}

/* Payer select dropdown */
.payer-select {
    max-width: 400px;
}

/* Payment Filter Tabs */
.payment-filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.payment-filter-tabs button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text);
    transition: var(--transition-fast);
}

.payment-filter-tabs button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.payment-filter-tabs button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .payment-summary-card {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .summary-total,
    .summary-companies {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--border);
        padding-bottom: 1rem;
    }

    .summary-breakdown {
        grid-column: span 2;
    }

    .consulting-badge {
        grid-column: span 2;
        text-align: center;
    }

    .payments-table {
        font-size: 0.875rem;
    }

    .payments-table th,
    .payments-table td {
        padding: 0.5rem;
    }

    .product-name {
        max-width: 120px;
    }
}

/* Map Toggle Checkbox */
.map-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--bg);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
    user-select: none;
}

.map-toggle:hover {
    color: var(--text);
    background: var(--border);
}

.map-toggle:has(input:checked) {
    background: var(--primary-light);
    color: var(--primary);
}

.map-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.map-toggle svg {
    width: 16px;
    height: 16px;
}

/* Provider row interaction */
.provider-row {
    cursor: pointer;
    transition: background-color 0.15s;
}

.provider-row:hover {
    background: var(--bg) !important;
}

.provider-row.highlighted {
    background: var(--primary-light) !important;
}

.provider-row.highlighted td {
    border-color: var(--primary);
}

/* Split Layout for List + Map */
.results-split {
    display: block;
    width: 100%;
}

.results-split.map-visible {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0;
    align-items: stretch;
    width: 100%;
}

.results-split.map-visible .results-list-panel {
    flex: 0 0 calc(50% - 6px);
    min-width: 20%;
    max-width: 75%;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    padding-right: 0.5rem;
}

.results-split.map-visible .results-map-panel {
    flex: 0 0 calc(50% - 6px);
    min-width: 20%;
    max-width: 75%;
}

.results-list-panel {
    width: 100%;
}

.results-map-panel {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Resizable divider - only visible when map is shown */
.split-resizer {
    flex: 0 0 12px !important;
    min-width: 12px !important;
    width: 12px !important;
    align-items: center;
    justify-content: center;
    cursor: col-resize;
    background: var(--bg);
    position: relative;
    z-index: 100;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    transition: background 0.15s;
}

/* Only show resizer when map is visible */
.results-split.map-visible .split-resizer {
    display: flex !important;
}

.split-resizer:hover {
    background: var(--primary-light);
}

.resizer-handle {
    width: 6px;
    height: 48px;
    background: var(--secondary);
    border-radius: 3px;
    transition: background 0.2s, height 0.2s;
    position: relative;
}

/* Add grip dots to the handle */
.resizer-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 24px;
    background: repeating-linear-gradient(
        to bottom,
        var(--bg-white) 0px,
        var(--bg-white) 2px,
        transparent 2px,
        transparent 6px
    );
}

.split-resizer:hover .resizer-handle {
    background: var(--primary);
    height: 64px;
}

.split-resizer:active .resizer-handle {
    background: var(--primary-dark);
    height: 80px;
}

#provider-map {
    width: 100%;
    height: calc(100vh - 6rem);
    min-height: 400px;
    max-height: 700px;
    z-index: 1;
}

.map-cap-notice {
    background: var(--warning-light);
    color: #92400e;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    text-align: center;
    border-bottom: 1px solid #fde68a;
}

.map-no-coords {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.map-no-coords svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.map-no-coords h3 {
    margin: 0 0 0.5rem;
    color: var(--text);
}

.map-no-coords p {
    margin: 0 0 0.5rem;
}

/* Map Popup Styles */
.map-popup {
    min-width: 200px;
}

.map-popup .popup-name {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.map-popup .popup-name:hover {
    text-decoration: underline;
}

.map-popup .popup-specialty {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.map-popup .popup-location {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.map-popup .popup-volume {
    font-size: 0.875rem;
    color: var(--text);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

/* Override Leaflet popup styles */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-content {
    margin: 0.75rem 1rem !important;
}

.leaflet-popup-close-button {
    top: 6px !important;
    right: 6px !important;
}

/* Responsive Map - only stack on small screens */
@media (max-width: 768px) {
    .results-split.map-visible {
        flex-direction: column !important;
    }

    .split-resizer {
        display: none !important;
    }

    .results-split.map-visible .results-list-panel {
        flex: none !important;
        max-width: 100% !important;
        width: 100% !important;
        max-height: none !important;
        overflow-y: visible !important;
        padding-right: 0 !important;
    }

    .results-split.map-visible .results-map-panel {
        flex: none !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        position: relative;
        top: 0;
        max-height: none;
        order: -1; /* Map above list on mobile */
        margin-bottom: 1rem;
    }

    #provider-map {
        height: 350px;
        min-height: 300px;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .map-toggle {
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }

    .map-toggle span {
        display: none;
    }

    .results-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .provider-card.highlighted {
        border: 2px solid var(--primary);
        background: var(--primary-light) !important;
    }

    #provider-map {
        height: 300px;
        min-height: 250px;
    }
}

/* Code inputs side by side */
.form-row-codes {
    flex-wrap: nowrap;
}

.form-row-codes > .form-group {
    flex: 1;
    min-width: 0;
}

/* Advanced filter toggles */
.search-page form#search-form {
    padding: 0;
    box-shadow: none;
    background: none;
    border: none;
}

.advanced-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.advanced-filters-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.advanced-filters-toggles {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-toggle-chip {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text);
    background: var(--bg-white);
    transition: all 150ms ease;
    user-select: none;
}

.filter-toggle-chip:hover {
    border-color: var(--primary);
    background: #f0f4ff;
}

.filter-toggle-chip input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.filter-toggle-chip:has(input:checked) {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
    font-weight: 600;
}

.filter-group-body {
    padding: 0.5rem 0;
}

.filter-group-body .form-row {
    margin-bottom: 0;
}

/* Code Discovery UI */
.code-input-container {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    padding: 0.5rem;
    min-height: 44px;
}

.code-input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.selected-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.selected-codes:empty {
    display: none;
}

.selected-codes:empty + input {
    margin-top: 0;
}

.code-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.code-chip:hover {
    background: var(--primary);
    color: white;
}

.code-chip button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.code-chip button:hover {
    opacity: 1;
}

.code-chip.drg-chip {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.code-input-container input[type="text"] {
    border: none;
    width: 100%;
    padding: 0.25rem;
    font-size: 1rem;
    outline: none;
}

.code-search-results {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.code-result {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    border-bottom: 1px solid var(--border);
}

.code-result:last-child {
    border-bottom: none;
}

.code-result:hover {
    background: var(--bg);
}

.code-result.no-results {
    color: var(--text-light);
    cursor: default;
}

.code-result.no-results:hover {
    background: transparent;
}

/* Typeahead loading + error states (issue #15) — an error must read
   distinctly from "no results", never as "this code doesn't exist". */
.code-result.loading {
    color: var(--text-light);
    cursor: default;
    font-style: italic;
}
.code-result.loading:hover,
.code-result.error:hover {
    background: transparent;
}
.code-result.error {
    color: #b91c1c;
    cursor: default;
}

.code-result-code {
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
    font-family: monospace;
}

.code-result-desc {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-result-cat {
    font-size: 0.75rem;
    color: var(--text-light);
    flex-shrink: 0;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.code-actions small {
    margin-left: auto;
}

.codes-preview {
    background: var(--bg);
    padding: 0.5rem;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Code Sets List in Modal */
.code-sets-list {
    max-height: 300px;
    overflow-y: auto;
}

.code-set-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-set-item:last-child {
    border-bottom: none;
}

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

.code-set-name {
    font-weight: 500;
    color: var(--text);
}

.code-set-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.code-set-actions-row {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.code-set-actions-row .form-group-wide {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.code-set-help {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.no-sets {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

/* Code Sets Management Page */
.code-sets-page {
    max-width: none;
}

.code-sets-page h1 {
    margin: 0 0 0.5rem;
}

.page-description {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.code-sets-grid {
    display: grid;
    gap: 1rem;
}

.code-set-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 1.25rem;
    transition: all var(--transition);
}

.code-set-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border);
}

.code-set-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.code-set-card .code-set-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.code-set-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-set-type {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius);
}

.code-set-type.type-cpt {
    background: var(--primary-lighter);
    color: var(--primary);
}

.code-set-type.type-drg {
    background: #fef3c7;
    color: #92400e;
}

.code-set-type.type-mixed {
    background: #f3e8ff;
    color: #7c3aed;
}

.code-set-codes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-light);
}

.code-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.code-section-label {
    width: 100%;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.drg-chip-full code {
    color: #92400e;
}

.code-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    max-width: 100%;
}

.code-chip code {
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-lighter);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.code-chip .code-desc {
    color: var(--text-light);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Full description code chips for code sets page */
.code-chip-full {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.375rem;
}

.code-chip-full code {
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-lighter);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.code-chip-full .code-desc-full {
    color: var(--text);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.code-set-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.code-set-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.empty-state {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 3rem 2rem;
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 0.5rem;
    color: var(--text);
}

.empty-state p {
    color: var(--text-light);
    margin: 0 0 0.5rem;
}

.empty-state a:not(.btn) {
    color: var(--primary);
}

/* Providers Search Page */
.providers-page h1 {
    margin: 0 0 1.5rem;
}

.search-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.search-input-wrapper input {
    flex: 1;
}

.search-input-wrapper .btn {
    flex-shrink: 0;
}

.provider-results-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.providers-page .provider-card {
    display: block;
    text-decoration: none;
    padding: 1rem;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.providers-page .provider-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.providers-page .provider-name {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.providers-page .provider-specialty {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.providers-page .provider-location {
    font-size: 0.875rem;
    color: var(--text-light);
}

.provider-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

.badge-info {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-asc {
    background: #dbeafe;
    color: #1e40af;
}

.badge-high-quality {
    background: #d1fae5;
    color: #065f46;
}

.badge-med-quality {
    background: #fef3c7;
    color: #92400e;
}

.badge-source {
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.65rem;
    margin-left: 0.5rem;
}

.search-prompt .hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Trial Banner */
.trial-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.875rem;
    font-weight: 500;
}

.trial-banner.trial-expired {
    background: #fef2f2;
    color: #991b1b;
}

/* Landing Page */
body.is-landing {
    background: var(--bg-white);
    overflow: auto;
    height: auto;
}

body.is-landing header {
    padding: 0 1rem;
}

body.is-landing nav {
    max-width: none;
    padding: 0 3rem;
}

body.is-landing main {
    max-width: none;
    padding: 0;
    overflow: visible;
}

.landing-page {
    width: 100%;
    position: relative;
    overflow: visible;
}

.landing-hero {
    position: relative;
    min-height: 520px;
    padding: 5rem 0;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg) 100%);
    overflow: visible;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 660px;
    margin: 0;
    padding-left: 8rem;
    padding-right: 2rem;
    text-align: left;
}

.hero-globe {
    position: absolute;
    right: -450px;
    top: 50%;
    transform: translateY(-50%);
    width: 1200px;
    height: 1200px;
    z-index: 10;
    opacity: 0.9;
    pointer-events: none;
}

.hero-globe canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Hero fade-in animation */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-hero h1 {
    font-size: 3.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1.25rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    animation: heroFadeIn 0.7s ease-out both;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin: 0 0 2rem;
    line-height: 1.5;
    animation: heroFadeIn 0.7s ease-out 0.15s both;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    animation: heroFadeIn 0.7s ease-out 0.3s both;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--radius-md);
}

.cta-note {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.landing-section {
    padding: 5rem 3rem;
    position: relative;
    z-index: 1;
}

.landing-section h2 {
    font-size: 2.25rem;
    text-align: center;
    margin: 0 0 1rem;
    letter-spacing: -0.025em;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
}

/* ============================================
   DISRUPTION BREAKPOINT SECTION
   ============================================ */

.disruption-section {
    background: var(--bg-white);
    padding: 5rem 3rem;
    position: relative;
    z-index: 1;
}

.disruption-flow {
    display: grid;
    grid-template-columns: 1fr auto 1.1fr;
    gap: 2rem;
    max-width: 950px;
    margin: 0 auto;
    align-items: start;
}

/* The Old Way - Heavy, Constrained */
.disruption-old {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: #f3f4f6;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.disruption-old.visible {
    opacity: 1;
    transform: translateX(0);
}

.disruption-old .disruption-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.disruption-old .disruption-price {
    font-size: 2.25rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 1.25rem;
    line-height: 1;
}

.disruption-old .disruption-price span {
    font-size: 1rem;
    font-weight: 500;
    color: #9ca3af;
}

.disruption-old ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.disruption-old li {
    padding: 0.5rem 0;
    color: #9ca3af;
    font-size: 0.9375rem;
    border-bottom: 1px solid #e5e7eb;
}

.disruption-old li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Transition Arrow */
.disruption-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 4rem;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}

.disruption-arrow.visible {
    opacity: 1;
    transform: scale(1);
}

.disruption-arrow svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

/* RepXD - Light, Elevated, Relief */
.disruption-new {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid var(--primary);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

.disruption-new.visible {
    opacity: 1;
    transform: translateX(0);
}

.disruption-new .disruption-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.disruption-new .disruption-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.25rem;
    line-height: 1;
}

.disruption-new .disruption-price span {
    font-size: 1rem;
    font-weight: 500;
    color: #60a5fa;
}

.disruption-new ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.disruption-new li {
    padding: 0.5rem 0;
    color: var(--text);
    font-size: 0.9375rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.15);
    padding-left: 1.25rem;
    position: relative;
}

.disruption-new li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.disruption-new li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.disruption-new .btn {
    width: 100%;
    text-align: center;
    padding: 0.875rem 1.5rem;
}

/* Moment of Realization */
.disruption-insight {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
    margin: 3rem auto 0;
    max-width: 500px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 0.8s, transform 0.6s ease 0.8s;
}

.disruption-insight.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .disruption-flow {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .disruption-arrow {
        padding: 0;
        transform: rotate(90deg) scale(0.5);
    }

    .disruption-arrow.visible {
        transform: rotate(90deg) scale(1);
    }

    .disruption-old,
    .disruption-new {
        transform: translateY(20px);
    }

    .disruption-old.visible,
    .disruption-new.visible {
        transform: translateY(0);
    }
}

/* Features Section - Workflow Phases */
.features-section {
    background: var(--bg);
}

.features-section .section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-top: -1rem;
    margin-bottom: 3rem;
}

/* Workflow Phases Container */
.workflow-phases {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* Phase Connector Arrows */
.phase-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3rem;
}

.phase-connector svg {
    width: 28px;
    height: 28px;
    color: var(--border);
}

/* Individual Phase */
.workflow-phase {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.workflow-phase.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Phase Header */
.phase-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.phase-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.phase-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* Feature Rows */
.phase-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: default;
    opacity: 0;
    transform: translateX(-10px);
}

.feature-row.visible {
    opacity: 1;
    transform: translateX(0);
}

.feature-row:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.feature-row:hover .feature-content h4 {
    color: var(--primary);
}

.feature-row:hover .feature-content h4::after {
    opacity: 1;
    transform: translateX(0);
}

.feature-content {
    flex: 1;
    min-width: 0;
}

.feature-content h4 {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-content h4::after {
    content: '\2192';
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.feature-content p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Feature Previews - Base */
.feature-preview {
    width: 60px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 1rem;
}

/* Preview: Search Input */
.preview-search .mini-input {
    width: 50px;
    height: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    font-size: 10px;
    font-family: monospace;
    color: var(--text);
}

.preview-search .input-text::after {
    content: '27447';
    animation: typeCode 3s infinite;
}

.preview-search .input-cursor {
    width: 1px;
    height: 10px;
    background: var(--primary);
    animation: blink 1s infinite;
}

@keyframes typeCode {
    0%, 10% { content: ''; }
    20% { content: '2'; }
    30% { content: '27'; }
    40% { content: '274'; }
    50% { content: '2744'; }
    60%, 90% { content: '27447'; }
    100% { content: ''; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Preview: Code Chips */
.preview-codes {
    display: flex;
    gap: 3px;
}

.preview-codes .code-chip {
    font-size: 8px;
    padding: 2px 4px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 2px;
    font-family: monospace;
}

.preview-codes .code-chip.fade {
    opacity: 0.5;
}

.feature-row:hover .preview-codes .code-chip.fade {
    opacity: 1;
    animation: fadeInChip 0.3s ease forwards;
}

@keyframes fadeInChip {
    to { opacity: 1; }
}

/* Preview: Geographic Map */
.preview-geo .mini-map {
    width: 40px;
    height: 30px;
    background: var(--bg);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.preview-geo .map-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--primary);
    border-radius: 50%;
}

.preview-geo .dot-1 { top: 8px; left: 10px; }
.preview-geo .dot-2 { top: 15px; left: 22px; opacity: 0.7; }
.preview-geo .dot-3 { top: 20px; left: 12px; opacity: 0.5; }

.feature-row:hover .preview-geo .map-dot {
    animation: pulseDot 1s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Preview: Volume Bars */
.preview-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 28px;
}

.preview-bars .mini-bar {
    width: 12px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.preview-bars .bar-1 { height: 28px; }
.preview-bars .bar-2 { height: 18px; opacity: 0.7; }
.preview-bars .bar-3 { height: 10px; opacity: 0.5; }

.feature-row:hover .preview-bars .bar-1 { height: 28px; }
.feature-row:hover .preview-bars .bar-2 { height: 22px; animation: barGrow 0.5s ease; }
.feature-row:hover .preview-bars .bar-3 { height: 15px; animation: barGrow 0.5s ease 0.1s; }

@keyframes barGrow {
    0% { transform: scaleY(0.8); }
    50% { transform: scaleY(1.1); }
    100% { transform: scaleY(1); }
}

/* Preview: Provider Profile */
.preview-profile {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-profile .mini-avatar {
    width: 20px;
    height: 20px;
    background: var(--border);
    border-radius: 50%;
}

.preview-profile .mini-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.preview-profile .mini-lines span {
    height: 3px;
    background: var(--border);
    border-radius: 1px;
}

.preview-profile .mini-lines span:first-child { width: 24px; }
.preview-profile .mini-lines span:last-child { width: 16px; opacity: 0.6; }

/* Preview: Payments */
.preview-payments {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 50px;
}

.preview-payments .payment-row {
    height: 6px;
    background: var(--border-light);
    border-radius: 2px;
}

.preview-payments .payment-row.highlight {
    background: var(--primary);
    opacity: 0.8;
}

.feature-row:hover .preview-payments .payment-row.highlight {
    animation: highlightPulse 0.6s ease;
}

@keyframes highlightPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; transform: scaleX(1.05); }
}

/* Preview: Map Cluster */
.preview-map .map-cluster {
    position: relative;
    width: 24px;
    height: 24px;
}

.preview-map .cluster-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.preview-map .cluster-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0.3;
}

.feature-row:hover .preview-map .cluster-ring {
    animation: ringPulse 1s infinite;
}

@keyframes ringPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* Preview: Saved Items */
.preview-saved {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-saved .saved-item {
    width: 40px;
    height: 8px;
    background: var(--border-light);
    border-radius: 2px;
}

.preview-saved .saved-item.active {
    background: var(--primary-light);
    border-left: 2px solid var(--primary);
}

/* Preview: Watchlist */
.preview-watch {
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-watch .watch-icon svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.preview-watch .watch-count {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 5px;
    border-radius: 8px;
}

/* Preview: Export */
.preview-export .export-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    transition: color 0.2s ease, transform 0.2s ease;
}

.feature-row:hover .preview-export .export-icon svg {
    color: var(--primary);
    animation: downloadBounce 0.4s ease;
}

@keyframes downloadBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Preview: Team Avatars */
.preview-team .team-avatars {
    display: flex;
}

.preview-team .avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -6px;
}

.preview-team .avatar:first-child { margin-left: 0; }
.preview-team .a1 { background: var(--primary); }
.preview-team .a2 { background: #10b981; }
.preview-team .a3 { background: #f59e0b; }

/* Preview: Health Systems */
.preview-systems .mini-org {
    display: flex;
    align-items: center;
    gap: 3px;
}

.preview-systems .org-node {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--primary);
    opacity: 0.6;
}

.preview-systems .org-node.parent {
    width: 10px;
    height: 10px;
    opacity: 1;
}

.preview-systems .org-line {
    width: 6px;
    height: 1px;
    background: var(--border);
}

.feature-row:hover .preview-systems .org-node {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Preview: Research & Publications */
.preview-research .mini-pub {
    display: flex;
    align-items: center;
    gap: 3px;
}

.preview-research .pub-line {
    height: 3px;
    background: var(--border);
    border-radius: 1px;
}

.preview-research .pub-line.long { width: 20px; }
.preview-research .pub-line.short { width: 12px; opacity: 0.6; }

.preview-research .pub-badge {
    font-size: 7px;
    background: var(--primary);
    color: white;
    padding: 1px 3px;
    border-radius: 6px;
    font-weight: 600;
}

/* Preview: Hospital Financials */
.preview-financials .mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 24px;
    position: relative;
}

.preview-financials .chart-bar {
    width: 6px;
    background: var(--primary);
    border-radius: 1px 1px 0 0;
    opacity: 0.6;
    transition: height 0.3s ease;
}

.preview-financials .b1 { height: 10px; }
.preview-financials .b2 { height: 16px; }
.preview-financials .b3 { height: 22px; }

.preview-financials .chart-trend {
    position: absolute;
    width: 100%;
    height: 1px;
    background: #10b981;
    bottom: 14px;
    transform: rotate(-15deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-row:hover .preview-financials .chart-bar { opacity: 1; }
.feature-row:hover .preview-financials .chart-trend { opacity: 1; }

/* Preview: Influence Scoring */
.preview-influence .mini-score {
    position: relative;
    width: 28px;
    height: 28px;
}

.preview-influence .score-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    border-bottom-color: var(--primary);
}

.preview-influence .score-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: var(--primary);
}

.feature-row:hover .preview-influence .score-ring {
    animation: scoreGrow 0.6s ease;
}

@keyframes scoreGrow {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Preview: Built-in CRM */
.preview-crm .mini-pipeline {
    display: flex;
    gap: 2px;
}

.preview-crm .pipe-stage {
    width: 10px;
    height: 6px;
    background: var(--border);
    border-radius: 1px;
}

.preview-crm .pipe-stage.filled {
    background: var(--primary);
}

.feature-row:hover .preview-crm .pipe-stage:last-child {
    background: var(--primary);
    opacity: 0.5;
    transition: all 0.3s ease;
}

/* Preview: Territory Management */
.preview-territory .mini-territory {
    display: flex;
    gap: 1px;
}

.preview-territory .territory-block {
    width: 10px;
    height: 10px;
    border-radius: 1px;
    opacity: 0.6;
}

.preview-territory .t1 { background: var(--primary); }
.preview-territory .t2 { background: #10b981; }
.preview-territory .t3 { background: #f59e0b; }

.feature-row:hover .preview-territory .territory-block {
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Preview: Signals & Alerts */
.preview-signals .mini-bell {
    position: relative;
    color: var(--text-light);
}

.preview-signals .bell-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: bellPulse 2s infinite;
}

@keyframes bellPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Preview: HubSpot Integration */
.preview-hubspot .mini-sync {
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-hubspot .sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.preview-hubspot .sync-dot.left { background: var(--primary); }
.preview-hubspot .sync-dot.right { background: #f59e0b; }

.preview-hubspot .sync-arrows {
    color: var(--text-light);
}

.feature-row:hover .preview-hubspot .sync-arrows {
    animation: syncPulse 1s ease infinite;
}

@keyframes syncPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Features Callout */
.features-callout {
    max-width: 700px;
    margin: 3rem auto 0;
    text-align: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.features-callout p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.5;
}

/* Features Plans Link */
.features-plans {
    text-align: center;
    margin-top: 2rem;
}

.features-plans p {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-light);
}

.features-plans a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.features-plans a:hover {
    text-decoration: underline;
}

.features-plans .arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.features-plans a:hover .arrow {
    transform: translateX(3px);
}

/* Responsive: Stack phases on mobile */
@media (max-width: 900px) {
    .workflow-phases {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .phase-connector {
        padding: 0;
        transform: rotate(90deg);
    }

    .feature-preview {
        display: none;
    }
}

/* Pricing Preview (Landing) */
.pricing-preview {
    text-align: center;
    background: var(--bg);
}

.pricing-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.pricing-preview-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    text-align: center;
    position: relative;
    transition: all var(--transition);
}

.pricing-preview-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pricing-preview-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.pricing-preview-card.featured:hover {
    transform: scale(1.05) translateY(-2px);
}

.pricing-preview-card .featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-preview-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
}

.pricing-preview-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.pricing-preview-card .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
}

.pricing-preview-card p {
    margin: 0.5rem 0 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Final CTA */
.final-cta {
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 3rem;
}

.final-cta h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.final-cta p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}


/* Pricing Page */
.pricing-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-header h1 {
    font-size: 2.25rem;
    margin: 0 0 0.5rem;
}

.pricing-header p {
    color: var(--text-light);
    font-size: 1.125rem;
    margin: 0;
}

.trial-expired-notice {
    background: #fef2f2;
    color: #991b1b;
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}

/* Billing Toggle */
.pricing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.toggle-label {
    font-size: 0.9375rem;
    color: var(--text-light);
    transition: color 0.2s;
}

.toggle-label.active {
    color: var(--text);
    font-weight: 500;
}

.save-badge {
    background: var(--success-light);
    color: #166534;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 999px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Pricing Cards */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pricing-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
}

.pricing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

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

.pricing-card .featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.pricing-card .card-header {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 1rem;
}

.pricing-card .card-header h2 {
    font-size: 1.5rem;
    margin: 0 0 0.25rem;
    text-align: left;
}

.card-description {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin: 0;
}

.card-price {
    margin-bottom: 1.5rem;
}

.card-price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.card-price .period {
    font-size: 1rem;
    color: var(--text-light);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9375rem;
}

.feature-list li.included::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 600;
}

.feature-list li.not-included {
    color: var(--text-light);
    text-decoration: line-through;
}

.feature-list li.not-included::before {
    content: "×";
    position: absolute;
    left: 0;
    color: var(--text-light);
}

.feature-list li.coming-soon::before {
    content: "○";
    position: absolute;
    left: 0;
    color: var(--warning);
}

.feature-list li.coming-soon::after {
    content: "Soon";
    background: var(--warning-light);
    color: #92400e;
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
    border-radius: 999px;
    margin-left: 0.5rem;
}

.feature-list li.highlight {
    font-weight: 500;
    color: var(--primary);
}

.pricing-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 3rem;
}

/* Pricing FAQ */
.pricing-faq {
    max-width: 800px;
    margin: 0 auto;
}

.pricing-faq h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.faq-item h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.faq-item p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin: 0;
}

/* Billing Page */
.billing-page {
    max-width: none;
}

.billing-page h1 {
    margin: 0 0 1.5rem;
}

.billing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.billing-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.billing-card h2 {
    font-size: 1.125rem;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.billing-card form {
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.plan-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 600;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: var(--success-light);
    color: #166534;
}

.status-trial {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.status-canceled {
    background: var(--warning-light);
    color: #92400e;
}

.status-expiring {
    background: var(--warning-light);
    color: #92400e;
}

.status-expired {
    background: #fef2f2;
    color: #991b1b;
}

.plan-details {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.plan-price {
    margin-top: 1.5rem;
}

.plan-price .price-line {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.plan-price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.plan-price .period {
    font-size: 1rem;
    color: var(--text-light);
}

.plan-price .price-details {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.plan-price .total-price {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
}

.plan-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.plan-actions form {
    margin: 0;
}

.change-plan-link {
    margin-top: 1rem;
    text-align: center;
}

.change-plan-link a {
    color: var(--primary);
    font-size: 0.875rem;
}

.features-included ul {
    margin: 0;
    padding-left: 1.25rem;
}

.features-included li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.upgrade-prompt {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.upgrade-prompt p {
    margin: 0;
    color: var(--text);
}

/* Export Button */
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.export-btn .pro-badge {
    background: var(--warning-light);
    color: #92400e;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .landing-hero {
        min-height: auto;
        padding: 3rem 1.5rem;
    }

    .hero-content {
        text-align: center;
        margin-left: 0;
        padding: 0;
        max-width: 100%;
    }

    .hero-cta {
        align-items: center;
    }

    .hero-globe {
        display: none;
    }

    .landing-hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .landing-section {
        padding: 3rem 1.5rem;
    }

    .pricing-preview-card.featured {
        transform: none;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        order: -1;
    }

    .billing-grid {
        grid-template-columns: 1fr;
    }

    .upgrade-prompt {
        flex-direction: column;
        text-align: center;
    }

    .data-sources-section {
        padding: 3rem 1.5rem;
    }

    .final-cta {
        padding: 3rem 1.5rem;
    }
}

/* Export Button */
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.export-btn svg {
    flex-shrink: 0;
}

.export-locked {
    opacity: 0.7;
    cursor: pointer;
}

.export-locked:hover {
    opacity: 0.9;
}

.pro-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
}

/* ============================================
   FOOTER STYLES (Compact)
   ============================================ */

.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 0.5rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.footer-brand {
    font-weight: 600;
    color: var(--text);
}

.footer-sep {
    color: var(--text-light);
}

.footer-row a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-row a:hover {
    color: var(--primary);
}

.footer-note {
    color: var(--text-light);
    font-size: 0.75rem;
    margin: 0;
}

/* ============================================
   LOADING STATES FOR FORMS
   ============================================ */

.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

.btn-primary.loading::after {
    border-top-color: white;
}

.btn-secondary.loading::after {
    border-top-color: var(--text);
}

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

/* ============================================
   LEGAL PAGES (Privacy, Terms)
   ============================================ */

.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.legal-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.legal-updated {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.legal-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 80px;
}

.legal-section h2 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--text);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.legal-section h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--text);
}

.legal-section p {
    color: var(--text);
    line-height: 1.75;
    margin: 0 0 1rem;
}

.legal-section ul {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.legal-section li {
    margin-bottom: 0.625rem;
    line-height: 1.65;
    color: var(--text);
}

.legal-section li strong {
    color: var(--text);
}

.legal-section a {
    color: var(--primary);
}

.legal-section a:hover {
    text-decoration: underline;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.contact-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.contact-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.contact-header p {
    color: var(--text-light);
    font-size: 1.0625rem;
    margin: 0;
}

/* Success State */
.contact-success {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.contact-success svg {
    color: var(--success);
    margin-bottom: 1rem;
}

.contact-success h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text);
}

.contact-success p {
    color: var(--text-light);
    margin: 0 0 1.5rem;
    font-size: 1.0625rem;
}

/* Contact Container (form + sidebar) */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        order: -1;
    }
}

/* Contact Form */
.contact-form {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.contact-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.9375rem;
}

.contact-form .required {
    color: var(--danger);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
    font-family: inherit;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}

.contact-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5l3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.contact-form .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.contact-form .turnstile-container {
    margin-bottom: 1.25rem;
}

.contact-form .btn-lg {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Contact Info Sidebar */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-info-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.contact-info-card h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text);
}

.contact-info-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.contact-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info-card li {
    margin-bottom: 0.5rem;
}

.contact-info-card li:last-child {
    margin-bottom: 0;
}

.contact-info-card a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.contact-info-card a:hover {
    text-decoration: underline;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.contact-method svg {
    color: var(--text-light);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.contact-method strong {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.125rem;
}

/* Legal and Contact Page Responsive - Small screens */
@media (max-width: 640px) {
    .legal-page {
        padding: 1.5rem 1rem 3rem;
    }

    .legal-page h1 {
        font-size: 1.75rem;
    }

    .legal-toc ul {
        grid-template-columns: 1fr;
    }

    .legal-section h2 {
        font-size: 1.25rem;
    }

    .contact-page {
        padding: 1.5rem 1rem 3rem;
    }

    .contact-header h1 {
        font-size: 1.75rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

.contact-method a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9375rem;
}

.contact-method a:hover {
    text-decoration: underline;
}

/* ============================================
   INTELLIGENCE ENGINE SECTION
   Show, don't describe — with live preview
   ============================================ */

.engine-section {
    padding: 6rem 2rem;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.engine-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Asymmetric Layout */
.engine-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

/* Left: Text content */
.engine-text h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 1.25rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.engine-lead {
    font-size: 1.0625rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.engine-sources {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.engine-sources li {
    font-size: 0.8125rem;
    color: #9ca3af;
    position: relative;
    padding-left: 0.875rem;
}

.engine-sources li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 4px;
    height: 4px;
    background: #d1d5db;
    border-radius: 50%;
}

/* Right: Preview Window */
.engine-preview {
    position: relative;
}

.preview-window {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 12px 32px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Window chrome */
.preview-toolbar {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 1px solid #e5e7eb;
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5e7eb;
}

.preview-dots span:first-child {
    background: #fca5a5;
}

.preview-dots span:nth-child(2) {
    background: #fcd34d;
}

.preview-dots span:last-child {
    background: #86efac;
}

.preview-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    margin-left: auto;
    margin-right: auto;
    padding-right: 2rem;
}

/* Search bar */
.preview-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.preview-search-icon {
    color: #9ca3af;
    display: flex;
    flex-shrink: 0;
}

.preview-search-text {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #111;
    font-family: inherit;
}

.preview-search-location {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
}

/* Results header */
.preview-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.preview-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
}

.preview-sort {
    font-size: 0.6875rem;
    color: #9ca3af;
}

/* Results list */
.preview-results {
    padding: 0.375rem;
}

.preview-card {
    padding: 0.75rem 0.875rem;
    border-radius: 8px;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.preview-card:hover {
    background: #f9fafb;
}

.preview-card-highlight {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.preview-card-highlight:hover {
    background: #dbeafe;
}

.preview-card-fade {
    opacity: 0.4;
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.preview-card + .preview-card {
    margin-top: 0.25rem;
}

.preview-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.125rem;
}

.preview-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111;
}

.preview-rank {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: #2563eb;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.preview-card-highlight .preview-rank {
    background: #1d4ed8;
}

.preview-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.625rem;
}

/* Stats row */
.preview-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.preview-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.preview-stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111;
    font-variant-numeric: tabular-nums;
}

.preview-stat-label {
    font-size: 0.625rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Tags */
.preview-tags {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.preview-tag {
    font-size: 0.625rem;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.1875rem 0.5rem;
    border-radius: 4px;
}

.preview-card-highlight .preview-tag {
    background: #dbeafe;
    color: #1e40af;
}

/* Stats */
.engine-stats {
    display: flex;
    justify-content: center;
    gap: 5rem;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.stat-block {
    text-align: center;
    min-width: 5rem;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    color: #111;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-number::after {
    content: '+';
    color: #2563eb;
    font-weight: 400;
}

.stat-label {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Closing */
.engine-closing {
    text-align: center;
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    font-style: italic;
}

/* Responsive */
@media (max-width: 900px) {
    .engine-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .engine-text {
        text-align: center;
    }

    .engine-sources {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .engine-section {
        padding: 4rem 1.25rem;
    }

    .engine-text h2 {
        font-size: 1.625rem;
    }

    .engine-lead {
        font-size: 0.9375rem;
    }

    .engine-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ============================================
   SPRINT 7: WATCHLISTS & CODE SEARCH VOLUME
   ============================================ */

/* Watchlists Page */
.watchlists-page {
    max-width: 900px;
    margin: 0 auto;
}

.watchlists-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.watchlists-page h1 {
    margin: 0;
}

.watchlists-grid {
    display: grid;
    gap: 1rem;
}

.watchlist-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.watchlist-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.watchlist-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.watchlist-count {
    font-size: 0.875rem;
    color: var(--text-light);
    background: var(--bg);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
}

.watchlist-meta {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.watchlist-actions {
    display: flex;
    gap: 0.5rem;
}

/* Watchlist Detail Page */
.watchlist-detail-page {
    max-width: 1100px;
    margin: 0 auto;
}

.watchlist-detail-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.breadcrumb {
    font-size: 0.9375rem;
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.watchlist-stats {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.providers-table-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.providers-table {
    width: 100%;
    border-collapse: collapse;
}

.providers-table th,
.providers-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.providers-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-light);
}

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

.providers-table .provider-link {
    font-weight: 500;
    color: var(--primary);
}

.providers-table .provider-npi {
    font-size: 0.75rem;
    color: var(--text-light);
    font-family: monospace;
}

.providers-table .notes-display {
    color: var(--text-light);
}

.providers-table .edit-notes-btn {
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.15s;
}

.providers-table tr:hover .edit-notes-btn {
    opacity: 1;
}

/* Watchlist Picker Modal */
.watchlist-picker {
    max-width: 380px;
}

.picker-provider-name {
    font-weight: 500;
    color: var(--text);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.watchlist-options {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.watchlist-options .loading,
.watchlist-options .error,
.watchlist-options .no-watchlists {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
}

.watchlist-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
}

.watchlist-option:hover {
    background: var(--bg);
    border-color: var(--primary);
}

.watchlist-option .watchlist-name {
    font-size: 0.9375rem;
    font-weight: 500;
}

.watchlist-option .watchlist-count {
    font-size: 0.75rem;
    background: none;
    padding: 0;
}

.new-watchlist-row {
    display: flex;
    gap: 0.5rem;
}

.new-watchlist-row input {
    flex: 1;
}

/* Locked Nav Link */
.nav-locked {
    color: var(--text-light) !important;
    position: relative;
}

.nav-locked::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* Code Search Volume Badge */
.code-result-volume {
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--bg);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
    margin-left: auto;
    white-space: nowrap;
}

.code-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-result-desc {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Provider cell with inline watchlist button - use inline-table for reliable side-by-side */
.provider-cell-content {
    display: inline-table;
}

.provider-cell-content > .watchlist-add-btn,
.provider-cell-content > .provider-info {
    display: table-cell;
    vertical-align: middle;
}

.provider-cell-content > .watchlist-add-btn {
    padding-right: 12px;
}

button.watchlist-add-btn,
a.watchlist-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    padding: 0;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

button.watchlist-add-btn:hover,
a.watchlist-add-btn:hover {
    color: var(--primary);
}

.watchlist-add-btn.locked {
    opacity: 0.5;
    cursor: default;
}

/* Mobile Card Footer */
.card-footer {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: var(--success);
}

.toast-warning {
    background: var(--warning);
}

.toast-error {
    background: #ef4444;
}

/* Button sizes */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Provider Header Actions */
.provider-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Locked button styling */
.btn.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile responsiveness for watchlist pages */
@media (max-width: 640px) {
    .watchlists-page .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .watchlist-detail-page .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .providers-table-container {
        overflow-x: auto;
    }
    
    .providers-table th,
    .providers-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .provider-header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ===== Sprint 7 UI Polish ===== */

/* Auth form spacing - more space before login button */
.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .btn-full {
    margin-top: 0.75rem;
}

/* Watchlist picker modal improvements */
.watchlist-picker h3 {
    margin-bottom: 0.75rem;
}

.watchlist-picker .new-watchlist-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.watchlist-picker .modal-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Watchlists main page spacing */
.watchlists-page .page-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.watchlist-card {
    padding: 1.5rem;
}

.watchlist-card .watchlist-header {
    margin-bottom: 0.5rem;
}

.watchlist-card .watchlist-meta {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.watchlist-card .watchlist-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Watchlist detail page spacing */
.watchlist-detail-page .breadcrumb {
    margin-bottom: 0.5rem;
}

.watchlist-detail-page .watchlist-stats {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.watchlist-detail-page .page-actions {
    margin-bottom: 1rem;
}

.providers-table-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.providers-table {
    width: 100%;
    border-collapse: collapse;
}

.providers-table th {
    background: var(--bg);
    text-align: left;
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.providers-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

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

.providers-table .provider-link {
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.providers-table .provider-link:hover {
    text-decoration: underline;
}

.providers-table .provider-npi {
    font-size: 0.75rem;
    color: var(--text-light);
    font-family: var(--font-mono);
    margin-top: 0.25rem;
}

/* Toast warning visibility improvement */
.toast-warning {
    background: #f59e0b;
    color: #fff;
    font-weight: 500;
}

/* Empty state improvements */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-state h3 {
    margin: 0 0 0.5rem;
    color: var(--text);
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ===== Global Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    /* Translucent so the page shows through faded rather than being fully
       replaced — less jarring on quick loads (issue #16). Light blur only. */
    background: rgba(255, 255, 255, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(1px);
}

.loading-content {
    text-align: center;
    padding: 2rem;
}

.loading-spinner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.loading-spinner-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: loadingDot 1.4s infinite ease-in-out both;
}

.loading-spinner-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-spinner-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-message {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    min-height: 1.5em;
    transition: opacity 0.2s;
}

.loading-submessage {
    font-size: 0.875rem;
    color: var(--text-light);
    min-height: 1.25em;
    transition: opacity 0.2s;
}

/* Auth form loading overlay style */
.auth-card {
    position: relative;
}

.auth-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    z-index: 10;
}

.auth-loading-overlay .loading-spinner-dots {
    margin-bottom: 1rem;
}

.auth-loading-overlay .loading-message {
    font-size: 1rem;
}

/* ===== Inline Loading Indicator ===== */
.inline-loading {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border-radius: 0.5rem;
    border: 1px solid #bfdbfe;
}

.inline-loading-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inline-loading-dots {
    display: flex;
    gap: 4px;
}

.inline-loading-dots span {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: inlineDot 1.4s infinite ease-in-out both;
}

.inline-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.inline-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.inline-loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes inlineDot {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.inline-loading-text {
    color: #1e40af;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== Team Dashboard ===== */
.team-dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    margin: 0 0 0.25rem;
}

.org-role {
    color: var(--text-light);
    margin: 0;
}

/* Seat Usage Card */
.seat-usage-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.seat-usage-card h2 {
    font-size: 1.125rem;
    margin: 0 0 1rem;
}

.seat-bar {
    height: 12px;
    background: var(--bg);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.seat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #4f46e5 100%);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.seat-text {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text-light);
}

.seats-available {
    color: var(--success);
}

.seats-full {
    color: var(--warning);
}

/* Invite Section */
.invite-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.invite-section h2 {
    font-size: 1.125rem;
    margin: 0 0 1rem;
}

.invite-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.invite-form input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
}

.invite-form select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    background: var(--bg-white);
}

.invite-note {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0.75rem 0 0;
}

/* Members Section */
.members-section,
.invites-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.members-section h2,
.invites-section h2 {
    font-size: 1.125rem;
    margin: 0 0 1rem;
}

/* Team Table */
.team-table-container {
    overflow-x: auto;
}

.team-table {
    width: 100%;
    border-collapse: collapse;
}

.team-table th,
.team-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.team-table th {
    font-weight: 500;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

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

.member-info {
    display: flex;
    flex-direction: column;
}

.member-info strong {
    font-weight: 500;
}

.member-email {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.team-table .actions-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.inline-form {
    display: inline;
}

.role-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg-white);
}

.owner-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.role-owner {
    background: #fef3c7;
    color: #92400e;
}

.role-admin {
    background: #dbeafe;
    color: #1e40af;
}

.role-member {
    background: var(--bg);
    color: var(--text-light);
}

/* Team Setup Page */
.team-setup-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.setup-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.setup-card h1 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
    text-align: center;
}

.setup-subtitle {
    color: var(--text-light);
    text-align: center;
    margin: 0 0 2rem;
}

.setup-form .form-group {
    margin-bottom: 1.5rem;
}

.setup-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.setup-form input[type="text"],
.setup-form input[type="number"],
.setup-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.setup-form small {
    display: block;
    color: var(--text-light);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.price-calculator {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.price-period {
    font-size: 1rem;
    color: var(--text-light);
}

.price-breakdown {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

/* Invite Accept Page */
.invite-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 1rem;
}

.invite-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    text-align: center;
    max-width: 450px;
    width: 100%;
}

.invite-card h1 {
    font-size: 1.75rem;
    margin: 0 0 1.5rem;
}

.invite-details {
    margin-bottom: 2rem;
}

.invite-org-name {
    color: var(--text-light);
    margin: 0 0 0.5rem;
}

.invite-details .org-name {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    color: var(--text);
}

.invite-role {
    margin: 0;
    color: var(--text-light);
}

.accept-form {
    margin-bottom: 1rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.invite-note {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

.invite-warning,
.invite-mismatch {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.invite-warning p,
.invite-mismatch p {
    margin: 0 0 1rem;
    color: #92400e;
}

.invite-warning p:last-child,
.invite-mismatch p:last-child {
    margin-bottom: 0;
}

.invite-auth {
    text-align: center;
}

.invite-auth p {
    margin: 0 0 0.5rem;
}

.invite-email-note {
    margin-bottom: 1.5rem !important;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* Invalid Invite */
.invite-invalid .invalid-icon {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.invalid-message {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.invalid-reasons {
    text-align: left;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.invalid-reasons p {
    margin: 0 0 0.75rem;
    font-weight: 500;
}

.invalid-reasons ul {
    margin: 0;
    padding-left: 1.25rem;
}

.invalid-reasons li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.invalid-actions p {
    color: var(--text-light);
    margin: 0 0 1rem;
}

/* Account Organization Section */
.account-section.org-section {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.org-section h2 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
    color: var(--text-light);
}

.org-section .org-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.org-section .org-role {
    margin: 0 0 1rem;
}

/* Account Competitor Section */
/* Competitor Companies (compact tag-based layout) */
.competitor-card {
    padding: 1rem 1.25rem;
}

.competitor-card .section-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0 0 0.75rem;
}

.competitor-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    background: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
}

.competitor-form input {
    flex: 1;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.competitor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.competitor-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.2rem 0.125rem 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
}

.competitor-tag .inline-form {
    display: inline-flex;
    background: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
}

.competitor-tag-remove {
    background: none;
    border: none;
    color: #991b1b;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.25rem;
    opacity: 0.5;
    min-width: auto;
    min-height: auto;
    box-shadow: none;
    border-radius: 0;
}

.competitor-tag-remove:hover {
    opacity: 1;
}

.no-competitors {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0;
}

/* Button variants - btn-danger uses soft styling defined earlier */
.btn-sm.btn-danger {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

/* Team responsive */
@media (max-width: 640px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }

    .invite-form {
        flex-direction: column;
    }

    .invite-form input[type="email"] {
        min-width: 0;
    }

    .team-table .actions-cell {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-buttons {
        flex-direction: column;
    }

    .team-table th,
    .team-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* Empty state */
.no-data {
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 1rem 0;
}

.no-data-small {
    color: var(--text-light);
    font-size: 0.8125rem;
    padding: 0.5rem 0;
}

/* ==========================================
   Team Dashboard Styles
   ========================================== */

.page-container {
    max-width: 1000px;
    margin: 0 auto;
}

.page-container > .page-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: none;
}

.page-container > .page-header h1 {
    margin: 0;
    font-size: 1.75rem;
}

.page-container .page-subtitle {
    margin: 0.25rem 0 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Dashboard grid layout */
.page-container > .dashboard-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem;
    margin-bottom: 0;
}

.page-container > .dashboard-grid > .card {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .page-container > .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Card component */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.card-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-body-table {
    padding: 0;
}

/* Seat progress indicator */
.seat-progress {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.seat-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.seat-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.seat-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.seat-count {
    color: var(--text);
}

.seat-available {
    color: var(--success);
    font-weight: 500;
}

.seat-full {
    color: var(--warning);
    font-weight: 500;
}

/* Invite form inline */
form.invite-form-inline {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    align-items: flex-end !important;
}

form.invite-form-inline > .form-group {
    flex: 1 1 200px !important;
    margin-bottom: 0 !important;
}

form.invite-form-inline > .form-group.form-group-sm {
    flex: 0 0 120px !important;
}

form.invite-form-inline > .form-group.form-group-btn {
    flex: 0 0 auto !important;
}

form.invite-form-inline .form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

form.invite-form-inline .form-group input,
form.invite-form-inline .form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
}

form.invite-form-inline .form-group input:focus,
form.invite-form-inline .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

form.invite-form-inline .form-group input:disabled,
form.invite-form-inline .form-group select:disabled {
    background: var(--bg);
    cursor: not-allowed;
}

.form-hint {
    margin: 0.75rem 0 0;
    font-size: 0.813rem;
    color: var(--text-light);
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    background: var(--bg);
}

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

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

.user-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.user-cell strong {
    font-weight: 500;
}

.user-email {
    font-size: 0.813rem;
    color: var(--text-light);
}

.team-table .actions-col {
    text-align: right;
    white-space: nowrap;
}

.team-table .actions-col form {
    display: inline-block;
}

/* Role badges */
.role-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    text-transform: capitalize;
}

.role-owner {
    background: #fef3c7;
    color: #92400e;
}

.role-admin {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.role-member {
    background: var(--bg);
    color: var(--text-light);
}

/* Small buttons */
.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: 0.813rem;
}

/* Small select */
.select-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.813rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
}

/* Inline form for actions */
.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

/* Text utilities */
.text-muted {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Alert styles */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: var(--success-light);
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Override card styling for forms inside tables */
table form,
td form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

/* ============================================
   Intelligence Score Badge
   ============================================ */
.intelligence-score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    color: white;
    margin-right: 1rem;
}

.intelligence-score-badge .score-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.intelligence-score-badge .score-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.9;
}

/* ============================================
   Publications Section
   ============================================ */
.publications-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.publications-section h2 {
    margin-bottom: 0.25rem;
}

.publications-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 1.5rem;
}

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

.publications-list h4,
.coauthors-panel h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.publication-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

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

.pub-title a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}

.pub-title a:hover {
    color: var(--primary);
}

.pub-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.author-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.author-badge.first {
    background: #dbeafe;
    color: #1e40af;
}

.author-badge.last {
    background: #fef3c7;
    color: #92400e;
}

.pub-coauthors {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.coauthors-panel {
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius);
}

.coauthor-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.coauthor-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.coauthor-list li:last-child {
    border-bottom: none;
}

.coauthor-list a {
    color: var(--primary);
    text-decoration: none;
}

.coauthor-list a:hover {
    text-decoration: underline;
}

.paper-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.research-badges {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.research-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius);
    flex: 1;
}

.research-badge.active {
    background: #dcfce7;
    color: #166534;
}

.research-badge .badge-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.research-badge .badge-icon {
    font-size: 1.25rem;
}

.research-badge .badge-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.research-badge.active .badge-label {
    color: #166534;
}

/* ============================================
   Hospital Facilities Section
   ============================================ */
.facilities-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.facilities-list {
    margin-top: 1rem;
}

.facility-item {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.facility-item:last-child {
    margin-bottom: 0;
}

.facility-name {
    font-weight: 600;
    font-size: 1rem;
}

.primary-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--primary);
    color: white;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.facility-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.facility-system {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.facility-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.facility-link:hover {
    text-decoration: underline;
}

.badge-teaching {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--success-light);
    color: var(--success);
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.badge-trauma {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--warning-light);
    color: var(--warning);
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Competitor Warning - styled to match page aesthetic */
.competitor-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text);
}

.competitor-warning .warning-icon {
    font-size: 1.25rem;
    color: var(--warning);
    flex-shrink: 0;
}

.competitor-warning strong {
    color: var(--warning);
}

/* ============================================
   Clinical Trials Section
   ============================================ */
.trials-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.trials-list {
    margin-top: 1rem;
}

.trial-item {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.trial-item:last-child {
    margin-bottom: 0;
}

.trial-item.recruiting {
    border-color: #86efac;
    background: #f0fdf4;
}

.trial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.trial-id {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
}

.trial-id:hover {
    text-decoration: underline;
}

.trial-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.trial-status.status-recruiting {
    background: #dcfce7;
    color: #166534;
}

.trial-status.status-completed {
    background: #e0e7ff;
    color: #3730a3;
}

.trial-status.status-active-not-recruiting {
    background: #fef3c7;
    color: #92400e;
}

.trial-title {
    font-weight: 500;
    line-height: 1.4;
}

.trial-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ============================================
   Provider Influence Section (Compact)
   ============================================ */
.influence-section-compact {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.influence-section-compact h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.influence-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .influence-bars {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .influence-bars {
        grid-template-columns: 1fr;
    }
}

.influence-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.influence-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.influence-bar-container {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.influence-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #60a5fa 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.influence-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

/* =========================================
   Sprint 16: DRG Volume Badges & Confidence
   ========================================= */

/* Volume Type Badges */
.volume-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.volume-badge.direct {
    background: #dbeafe;
    color: #1e40af;
}

.volume-badge.estimated {
    background: #fef3c7;
    color: #92400e;
}

/* Volume Type Badge (inline label in search results) */
.volume-type-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 4px;
}
.volume-type-badge.estimated {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

/* DRG Type Badges */
.badge-surgical {
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-medical {
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Confidence Level Indicators */
.confidence-high {
    color: #16a34a;
}

.confidence-medium {
    color: #ca8a04;
}

.confidence-low {
    color: #dc2626;
}

.confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.confidence-badge.high {
    background: #dcfce7;
    color: #166534;
}

.confidence-badge.medium {
    background: #fef9c3;
    color: #854d0e;
}

.confidence-badge.low {
    background: #fee2e2;
    color: #991b1b;
}

/* Source Type Badges (Inpatient/Outpatient) */
.source-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.source-badge.source-inpatient {
    background: #dbeafe;
    color: #1e40af;
}

.source-badge.source-outpatient {
    background: #f3e8ff;
    color: #7c3aed;
}

.source-badge.source-direct {
    background: #dcfce7;
    color: #166534;
}

.source-badge.source-estimated {
    background: #fef3c7;
    color: #92400e;
}

.drg-code-hint,
.code-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 0.2rem;
}

.source-cell {
    min-width: 100px;
}

.details-cell {
    font-size: 0.85rem;
}

.details-cell .facility-link-small {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.details-cell .year-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.details-cell .provider-count-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.direct-row {
    background: rgba(220, 252, 231, 0.15);
}

/* Estimated Volume Section Styling */
.estimated-section {
    border-left: 3px solid #f59e0b;
}

.estimated-section .section-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.estimated-note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #92400e;
    margin-bottom: 1rem;
}

/* DRG Volume Table Enhancements */
.drg-code-cell {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

.drg-description {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Facility Link in Estimated Volumes */
.facility-link {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
}

.facility-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Providers Filter Controls */
.providers-filters {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.providers-filters .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.providers-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 150px;
}

.providers-filters .filter-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.providers-filters .filter-input,
.providers-filters .filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg-white);
    min-width: 180px;
}

.providers-filters .filter-input:focus,
.providers-filters .filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.providers-filters .filter-actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    min-width: auto;
}

.providers-filters .filter-actions .btn {
    padding: 0.5rem 1rem;
}

/* Providers Header */
.providers-header {
    margin-bottom: 0.75rem;
}

.providers-header .results-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.providers-header .results-count {
    font-size: 0.9375rem;
}

.providers-header .results-showing {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Table Loading and Error States */
.loading-cell,
.error-cell,
.no-results-cell {
    text-align: center;
    padding: 2rem !important;
    color: var(--text-muted);
    font-style: italic;
}

.error-cell {
    color: var(--danger);
}

/* Responsive Filters */
@media (max-width: 768px) {
    .providers-filters .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .providers-filters .filter-group {
        min-width: 100%;
    }

    .providers-filters .filter-input,
    .providers-filters .filter-select {
        min-width: 100%;
    }

    .providers-filters .filter-actions {
        flex-direction: row;
        justify-content: flex-start;
    }

    .providers-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .providers-header .results-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* =============================================
   Hospital Financial Summary (Sprint 18)
   ============================================= */

.financials-card {
    margin-bottom: 1.5rem;
}

.financials-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.financials-card .card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0.25rem 0 1rem 0;
}

.year-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius);
}

.financials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem;
}

.financials-grid .info-row {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-light);
}

.financials-grid .info-row:last-child {
    border-bottom: none;
}

.financials-grid .info-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Operating Margin Value */
.margin-value {
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
}

.margin-value.positive {
    color: var(--success);
    background: var(--success-light);
}

.margin-value.negative {
    color: var(--danger);
    background: var(--danger-light);
}

/* Year-over-Year Indicators */
.yoy-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
    cursor: help;
}

.yoy-indicator.positive {
    color: var(--success);
    background: var(--success-light);
}

.yoy-indicator.negative {
    color: var(--danger);
    background: var(--danger-light);
}

.yoy-indicator.neutral {
    color: var(--text-light);
    background: var(--border-light);
}

/* FTE Breakdown */
.fte-breakdown {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

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

/* ============================================
   Sprint 28: Responsive Sidebar + Icon System
   ============================================ */

/* Sidebar hidden on small screens */
@media (max-width: 768px) {
    .nav-sidebar {
        display: none;
    }
}

/* Lucide icon size utilities */
[data-lucide] {
    width: 20px;
    height: 20px;
}

.icon-sm [data-lucide],
[data-lucide].icon-sm {
    width: 16px;
    height: 16px;
}

.icon-lg [data-lucide],
[data-lucide].icon-lg {
    width: 24px;
    height: 24px;
}

/* Footer adjustments for new layout */
.site-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 0.375rem 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer-content {
    max-width: none;
}

.footer-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-row a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-row a:hover {
    color: var(--primary);
}

.footer-brand {
    font-weight: 600;
    color: var(--text);
}

.footer-sep {
    color: var(--border);
}

.footer-note {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Compact map attribution — keep required OSM/CARTO credits, minimize visual weight */
.leaflet-control-attribution {
    font-size: 9px !important;
    opacity: 0.35;
    transition: opacity 0.2s;
    background: rgba(255, 255, 255, 0.5) !important;
    padding: 0 5px !important;
    line-height: 1.4 !important;
}

.leaflet-control-attribution:hover {
    opacity: 0.85;
}
