/* --- 1. General Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    background-color: #f4f7f9;
}

body {
    display: flex;
    min-height: 100vh;
}

/* --- 2. Sidebar (Fixed & Scrollable) --- */
.sidebar {
    width: 260px;
    background: #1a1c23;
    color: white;
    padding: 20px;
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 10px;
}

.logo h2 {
    color: #4f46e5;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.nav-links {
    list-style: none;
}
.nav-links li {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: 0.2s;
    cursor: pointer;
    color: #a0aec0;
}
.nav-links li.active, .nav-links li:hover {
    background: #4f46e5;
    color: white;
}
.nav-links a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
}

/* --- 3. Auth & User Profile Boxes --- */
.auth-sidebar-box, .user-sidebar-box {
    background: #2a2d37;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    flex-shrink: 0;
}

.auth-sidebar-box h3 {
    font-size: 0.8rem;
    margin-bottom: 10px;
    color: #4f46e5;
    text-transform: uppercase;
}
.auth-sidebar-box input {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    background: #1a1c23;
    border: 1px solid #3f3f46;
    color: white;
    border-radius: 4px;
}

.auth-btn, .logout-btn {
    width: 100%;
    padding: 10px;
    background: #4f46e5;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.logout-btn {
    background: #3f3f46;
    margin-top: 10px;
}
.auth-footer {
    font-size: 0.85rem;
    margin-top: 18px;
    text-align: center;
    color: #cbd5e0;
}
.auth-footer a {
    color: #a5b4fc;
    text-decoration: underline;
    font-weight: 600;
}
.user-name {
    font-weight: bold;
    color: #fff;
    display: block;
    margin-bottom: 5px;
}

/* --- 4. Main Content Area --- */
.main-content {
    margin-inline-start: 260px;
    padding: 40px;
    flex: 1;
    min-width: 0;
    transition: margin-inline-start 0.3s ease;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* --- 5. Landing View (Logged Out) --- */
.dashboard-content {
    display: none;
}
body.is-logged-in .dashboard-content {
    display: block;
}
body.is-logged-in .landing-view {
    display: none;
}

.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: #1a1c23;
    margin-bottom: 15px;
}
.hero-section .accent {
    color: #4f46e5;
}
.hero-section p {
    color: #64748b;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: 0.3s ease;
    border: 1px solid #f1f5f9;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: #4f46e5;
}
.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.feature-card h3 {
    color: #1a1c23;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* --- 6. Shopping List System --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.list-card {
    cursor: pointer;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}
.list-card:hover {
    border-color: #4f46e5;
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
}

.list-card .list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.list-title {
    font-size: 1.2rem;
    color: #1a1c23;
    margin-bottom: 20px;
    flex-grow: 1;
}

.type-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    vertical-align: middle;
}
.badge-blue {
    background: #e0e7ff;
    color: #4338ca;
}
.badge-grey {
    background: #f1f5f9;
    color: #475569;
}
.badge-green {
    background: #f0fdf4;
    color: #16a34a;
}
.badge-red {
    background: #fef2f2;
    color: #dc2626;
}
.badge-muted {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

.badge-teal {
    background: #ccfbf1;
    color: #0f766e;
}

.badge-row {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.item-count {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Integrated Footer Styles */
.list-card-footer, .footer-flex {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 0.8rem;
}

.date-group {
    display: flex;
    gap: 5px;
}
.date-label {
    color: #94a3b8;
    font-weight: 500;
}
.date-value {
    color: #64748b;
    font-weight: 600;
}

/* --- 7. Single List Table & States --- */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.items-table th {
    text-align: inline-start;
    font-size: 0.8rem;
    color: #64748b;
    padding: 10px;
    border-bottom: 2px solid #f1f5f9;
    text-transform: uppercase;
}
.items-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    vertical-align: middle;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.2s;
    margin-inline-start: 5px;
    text-transform: uppercase;
}
.btn-taken {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}
.btn-notfound {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.notes-row td {
    border-bottom: 2px solid #f1f5f9 !important;
    padding-top: 0 !important;
    color: #94a3b8;
    font-size: 0.8rem;
    font-style: italic;
}

.row-taken tr td {
    text-decoration: line-through;
    font-style: italic;
    color: #94a3b8;
}
.row-taken .action-btn {
    opacity: 0.5;
}

.row-notfound tr td:first-child {
    border-inline-start: 4px solid #dc2626;
    color: #dc2626;
}
.row-notfound .btn-notfound {
    background-color: #dc2626;
    color: white;
}

/* --- 8. Small Icon Buttons (Edit/Delete) --- */
.edit-icon-btn, .delete-icon-btn {
    border: none;
    padding: 4px 10px;
    margin: 0 2px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.edit-icon-btn {
    background: #f1f5f9;
    color: #4f46e5;
}
.edit-icon-btn:hover {
    background: #e0e7ff;
    color: #4338ca;
    transform: translateY(-1px);
}

.delete-icon-btn {
    background: #fef2f2;
    color: #dc2626;
}
.delete-icon-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* --- 9. General UI Components & Modals --- */
.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.card h3 {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-link-styled {
    display: block;
    width: 100%;
    max-width: 200px;
    padding: 12px;
    background: #4f46e5;
    color: white !important;
    text-decoration: none !important;
    border-radius: 4px;
    border: 2px solid black;
    text-align: center;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-link-styled:hover {
    background: #4338ca;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 30px;
}

.back-link {
    text-decoration: none;
    color: #4f46e5;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

.link-reset {
    text-decoration: none !important;
    color: inherit !important;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.section-divider {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* --- 10. Auth Forms & Item Creator --- */
.auth-style-card {
    transition: all 0.25s ease;
    border: 1px solid transparent;
    max-width: 400px;
    margin: 40px auto;
}
.auth-style-card:hover {
    border-color: #4f46e5;
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
}
.auth-style-card h3 {
    text-align: center;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.auth-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.2s;
    background: #ffffff;
}
.auth-input:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.item-creator {
    margin-bottom: 30px;
    margin-top: 20px;
}
.item-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.grid-span-2 {
    grid-column: span 2;
}
.grid-span-4 {
    grid-column: span 4;
}
.grid-column-1 {
    grid-column: span 1;
}

.select-style {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%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%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1em;
    padding-inline-end: 30px !important;
    cursor: pointer;
    color: #64748b;
}

/* --- 11. Responsive (Mobile) --- */
.mobile-header {
    display: none;
    background: #1a1c23;
    color: white;
    padding: 15px 20px;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1100;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .mobile-header {
        display: flex;
    }
    .desktop-only {
        display: none;
    }
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 0;
        position: fixed;
        top: 60px;
        inset-inline-start: 0;
        padding: 0 20px;
        opacity: 0;
    }
    .sidebar.active {
        max-height: calc(100vh - 60px);
        padding: 20px;
        opacity: 1;
    }
    .main-content {
        margin-inline-start: 0;
        padding: 20px;
    }

    /* Mobile Table Stacking */
    .items-table thead {
        display: none;
    }
    .items-table tbody {
        display: block;
        margin-bottom: 15px;
        border-bottom: 2px solid #f1f5f9;
        padding-bottom: 10px;
    }
    .items-table tr {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        border: none;
    }
    .item-name {
        flex: 1;
        border: none !important;
    }
    .item-qty {
        width: auto;
        text-align: end;
        border: none !important;
    }
    .item-actions {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        padding-top: 10px !important;
        border: none !important;
        order: 3;
    }
    .notes-row {
        display: block;
        width: 100%;
        order: 2;
    }
    .notes-row td {
        display: block;
        width: 100%;
        border: none !important;
        padding: 5px 10px !important;
    }

    .item-form-grid {
        grid-template-columns: 1fr;
    }
    .grid-span-2, .grid-span-4, .grid-column-1 {
        grid-column: span 1;
    }
}

/* --- 12. Alert & Validation Styles --- */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.error-text {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: -15px;
    margin-bottom: 15px;
    display: block;
    font-weight: 600;
}

/* --- 13. AJAX Loading States --- */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.btn-loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

/* --- 14. RTL Specific Overrides --- */
[dir="rtl"] .select-style {
    background-position: left 10px center;
    padding-inline-end: 12px !important;
    padding-inline-start: 30px !important;
}

[dir="rtl"] .items-table th,
[dir="rtl"] .items-table td {
    text-align: right;
}

[dir="rtl"] .row-notfound tr td:first-child {
    border-inline-start: none;
    border-inline-end: 4px solid #dc2626;
}

/* --- 15. Language Selection & Icons --- */
.sidebar-header-with-icon {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.lang-icon {
    color: #4f46e5;
    margin-inline-end: 8px;
}

.lang-button-group {
    display: flex;
    gap: 8px;
}

.lang-btn {
    flex: 1;
    padding: 8px 5px;
    background: #1a1c23;
    border: 1px solid #3f3f46;
    color: #a0aec0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: block;
}

.lang-btn:hover {
    border-color: #4f46e5;
    color: white;
}

.lang-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

[dir="rtl"] .lang-button-group {
    flex-direction: row;
}

/* --- 16. Site Footer --- */
.site-footer {
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #4f46e5;
}

[dir="rtl"] .footer-content {
    flex-direction: row;
}

/* --- 17. Career Module Extensions --- */
.main-header-bordered {
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.btn-base {
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-width: 140px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-cancel {
    background: white;
    border-color: #cbd5e1;
    color: #64748b;
}

.btn-cancel:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.btn-save-primary {
    background: #4f46e5;
    color: white;
}

.btn-save-primary:hover {
    background: #4338ca;
}

.textarea-styled {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

/* --- Detail Page Patterns --- */
.section-title {
    margin-bottom: 5px;
}

.section-subtitle {
    color: #64748b;
    font-size: 0.85rem;
}

.page-section-heading {
    font-size: 1.8rem;
    color: #1a1c23;
}

.card-mb {
    margin-bottom: 20px;
}

.detail-card-title {
    color: #1a1c23 !important;
    font-size: 1.5rem !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin-bottom: 0 !important;
}

.detail-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 3px;
}

.detail-location {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 2px;
}

.detail-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-actions {
    display: flex;
    gap: 8px;
}

.detail-label {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    margin-top: 5px;
}

.detail-value-text {
    margin-top: 5px;
    font-weight: 600;
    color: #1a1c23;
}

.detail-link {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}

.notes-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.label-accent {
    color: #4f46e5;
}

.notes-text {
    margin-top: 10px;
    color: #475569;
    line-height: 1.6;
}

.input-group-lg {
    margin-bottom: 25px;
}

/* --- Utility --- */
.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

.th-center {
    text-align: center;
}

.th-end {
    text-align: end;
}

/* --- Table Cell Patterns --- */
.table-cell-title {
    font-weight: 600;
    color: #1a1c23;
}

.table-cell-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}

.table-cell-text {
    color: #64748b;
    font-size: 0.9rem;
}

.text-accent {
    color: #4f46e5;
    font-weight: 600;
}

.rating-stars {
    color: #f59e0b;
}

.tr-clickable {
    cursor: pointer;
}

/* --- Initial / Avatar Badges --- */
.initial-badge {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.initial-badge-md {
    width: 36px;
    height: 36px;
}

.initial-badge-lg {
    width: 42px;
    height: 42px;
    font-size: 1rem;
}

.initial-badge-green {
    background: #f0fdf4;
    color: #16a34a;
}

.initial-badge-indigo {
    background: #f0f4ff;
    color: #4f46e5;
}

.initial-badge-grey {
    background: #f1f5f9;
    color: #4f46e5;
}

.initial-badge-company {
    background: #e0e7ff;
    color: #4338ca;
}

/* --- Hint Box --- */
.hint-box {
    margin-top: 25px;
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.hint-text {
    color: #64748b;
    font-size: 0.9rem;
}

/* --- Select Button Override --- */
.select-icon-btn {
    background: #4f46e5 !important;
    color: white !important;
}

.select-icon-btn:hover {
    background: #4338ca !important;
    color: white !important;
}

/* --- Listing Badges --- */
.listing-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.listing-title-line {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1c23;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.listing-title-connector {
    font-size: 1.5rem;
    color: #94a3b8;
    font-weight: 400;
}

.listing-title-connector-sm {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
}

.listing-title-link {
    cursor: pointer;
    transition: color 0.2s;
}
.listing-title-link:hover {
    color: #4f46e5;
}

.via-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.interaction-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.interaction-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.icon-blue  {
    background: #e0e7ff;
}
.icon-green {
    background: #f0fdf4;
}
.icon-red   {
    background: #fef2f2;
}
.icon-grey  {
    background: #f1f5f9;
}

.interaction-body {
    flex: 1;
}

.interaction-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1c23;
    display: flex;
    align-items: center;
    gap: 6px;
}

.interaction-next-step {
    font-size: 0.8rem;
    color: #4f46e5;
    font-weight: 600;
    margin-top: 4px;
}

.add-interaction-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.add-interaction-form-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1c23;
    margin-bottom: 15px;
}

/* --- Listings Filter Pills --- */
.listings-filter {
    margin-bottom: 20px;
}

.filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.filter-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-pill:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.filter-pill-active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

.filter-pill-active:hover {
    background: #4338ca;
    border-color: #4338ca;
}

.btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.btn-danger:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.tr-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Onboarding hero --- */
.onboarding-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 24px;
}

.onboarding-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: white;
}

.onboarding-subtitle {
    opacity: 0.9;
    max-width: 580px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.onboarding-cta-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.onboarding-btn-primary {
    padding: 10px 24px;
    background: white;
    color: #4f46e5;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.onboarding-btn-primary:hover {
    background: #f0f4ff;
}

.onboarding-btn-secondary {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.onboarding-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.onboarding-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.onboarding-step {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.onboarding-step-num {
    width: 32px;
    height: 32px;
    background: #f0f4ff;
    color: #4f46e5;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 12px;
}

.onboarding-step-title {
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: #1a1c23;
}

.onboarding-step-text {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .onboarding-steps {
        grid-template-columns: 1fr;
    }
}

/* --- Dashboard --- */
.dashboard-greeting {
    padding: 16px 0 24px;
}

.dashboard-greeting-title {
    font-size: 1.5rem;
    color: #1a1c23;
    margin-bottom: 6px;
}

.dashboard-greeting-subtitle {
    color: #64748b;
    font-size: 0.85rem;
}

.dashboard-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 0.5px solid #e2e8f0;
}

.dashboard-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1c23;
}

.dashboard-card-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 3px;
}

/* Pipeline funnel */
.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
}

.pipeline-stage {
    padding: 12px 6px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.pipeline-stage:hover {
    background: #f8fafc;
}

.pipeline-stage-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1c23;
    line-height: 1;
}

.pipeline-stage-label {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 6px;
}

.pipeline-stage-bar {
    height: 4px;
    border-radius: 2px;
    margin-top: 8px;
}

.pipeline-bar-grey  { background: #cbd5e1; }
.pipeline-bar-blue  { background: #6366f1; }
.pipeline-bar-amber { background: #f59e0b; }
.pipeline-bar-green { background: #22c55e; }
.pipeline-bar-red   { background: #ef4444; }

/* 2-column grid for action items + recent activity */
.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Activity feed rows */
.dashboard-activity-row {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: flex-start;
}

.dashboard-activity-row:last-child {
    border-bottom: none;
}

.dashboard-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.dashboard-activity-body {
    flex: 1;
}

.dashboard-activity-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a1c23;
    display: flex;
    gap: 6px;
    align-items: center;
}

.dashboard-activity-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.dashboard-activity-time {
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Action items rows */
.dashboard-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f8fafc;
}

.dashboard-action-warn {
    background: #fee2e2;
}

.dashboard-action-info {
    background: #dbeafe;
}

.dashboard-action-success {
    background: #dcfce7;
}

.dashboard-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.dashboard-action-body {
    flex: 1;
}

.dashboard-action-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a1c23;
}

.dashboard-action-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

/* Quick navigation pills */
.dashboard-quick-nav-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-quick-nav-pill {
    padding: 8px 16px;
    background: #f1f5f9;
    color: #4f46e5;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.dashboard-quick-nav-pill:hover {
    background: #e0e7ff;
}

.dashboard-quick-nav-count {
    background: white;
    padding: 2px 8px;
    border-radius: 10px;
    color: #1a1c23;
    font-size: 0.75rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .pipeline-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }
}