/* ============================================================================
   inKind Partner Portal - Custom Styles
   Luxury Restaurant Theme
   Brand Colors:
   - Deep Brown: #1a1512
   - Warm Gold: #c9a227
   - Amber: #d4a574
   - Cream: #f5f0e8
   ============================================================================ */

/* Import Rethink Sans for consistent typography */
@import url('https://fonts.googleapis.com/css2?family=Rethink+Sans:ital,wght@0,400..800;1,400..800&display=swap');

:root {
    --inkind-black: #1a1512;
    --inkind-yellow: #c9a227;
    --inkind-gold: #c9a227;
    --inkind-amber: #d4a574;
    --inkind-cream: #f5f0e8;
    --inkind-off-white: #f5f0e8;
    --inkind-dark-bg: rgba(26, 21, 18, 0.92);
    --inkind-card-bg: rgba(30, 25, 22, 0.88);
    --inkind-border: rgba(201, 162, 39, 0.15);
    --inkind-text: rgba(245, 240, 232, 0.95);
    --inkind-text-muted: rgba(212, 165, 116, 0.7);
    --inkind-glow: rgba(201, 162, 39, 0.3);
}

/* ============================================================================
   GLOBAL BACKGROUND & BASE TYPOGRAPHY - Applied to ALL pages
   ============================================================================ */

body,
[data-bs-theme=dark] body,
[data-bs-theme=light] body {
    font-family: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: var(--inkind-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Luxury restaurant background with warm overlay */
    background: linear-gradient(
        135deg,
        rgba(26, 21, 18, 0.88) 0%,
        rgba(20, 16, 14, 0.92) 50%,
        rgba(26, 21, 18, 0.90) 100%
    ), url('../images/luxury-bg.jpg?v=2') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    min-height: 100vh;
}

/* Force consistent font family across ALL elements */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
p, span, div, a, label,
input, select, textarea, button,
th, td, li,
.card-title, .card-header, .card-body,
.stat-value, .stat-label, .stat-title,
.page-title, .header-title,
.btn, .badge, .nav-link,
.dropdown-item, .form-label, .form-control,
.table, .modal-title, .modal-body,
.funnel-label, .funnel-date {
    font-family: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Consistent heading weights */
h1, .h1 { font-weight: 700 !important; }
h2, .h2 { font-weight: 600 !important; }
h3, .h3 { font-weight: 600 !important; }
h4, .h4 { font-weight: 600 !important; }
h5, .h5 { font-weight: 500 !important; }
h6, .h6 { font-weight: 500 !important; }

/* Stat card text consistency */
.stat-value, .stat-number, .fw-bold {
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

.stat-label, .stat-title, .text-uppercase {
    font-weight: 500 !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ============================================================================
   GLOBAL ANIMATIONS
   ============================================================================ */

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

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px var(--inkind-glow); }
    50% { box-shadow: 0 0 40px var(--inkind-glow), 0 0 60px rgba(201, 162, 39, 0.15); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--inkind-off-white);
    line-height: 1.3;
}

p {
    color: var(--inkind-text);
}

.text-muted, .text-secondary {
    color: var(--inkind-text-muted) !important;
}

/* Override Bootstrap dark theme variables */
[data-bs-theme="dark"] {
    --bs-body-bg: transparent;
    --bs-body-color: var(--inkind-text);
    --bs-border-color: var(--inkind-border);
    --bs-tertiary-bg: rgba(255, 255, 255, 0.03);
    --bs-secondary-color: var(--inkind-text-muted);
}

.page-content {
    background: transparent !important;
    padding-top: 2.5rem !important;
}

.page-content .page-container {
    padding: 0 2rem !important;
}

/* First content section after topbar needs breathing room */
.page-content .page-container > .d-flex:first-child,
.page-content .page-container > .row:first-child,
.page-content .page-container > div:first-child {
    margin-top: 0.5rem;
}

/* Increase spacing for section headers (e.g., "My Pipeline") */
.page-content .mb-4 {
    margin-bottom: 2rem !important;
}

.page-content h4.mb-1 {
    margin-bottom: 0.5rem !important;
}

.wrapper {
    background: transparent !important;
}

/* ============================================================================
   TOPBAR - Luxury Glass Bar
   ============================================================================ */

.app-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(
        90deg,
        rgba(22, 18, 15, 0.95) 0%,
        rgba(26, 21, 18, 0.92) 50%,
        rgba(22, 18, 15, 0.95) 100%
    ) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 162, 39, 0.15) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    z-index: 1050 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Push page content below the fixed topbar */
.page-content {
    padding-top: 70px !important;
}

/* Remove rounded corners and gaps from topbar-menu */
.app-topbar .topbar-menu {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 64px !important;
    width: 100% !important;
}

/* Topbar items alignment */
.app-topbar .topbar-menu .topbar-item {
    display: flex !important;
    align-items: center !important;
    height: auto !important;
}

/* Dropdown menus */
.app-topbar .dropdown-menu {
    z-index: 1060 !important;
    background: rgba(20, 20, 20, 0.98) !important;
    border: 1px solid var(--inkind-border) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(20px) !important;
}

/* Hide light/dark mode toggle - we only use dark theme */
#light-dark-mode {
    display: none !important;
}

/* Consistent topbar user display */
.app-topbar .nav-user {
    display: flex !important;
    align-items: center !important;
}

.app-topbar .nav-user .account-user-name,
.app-topbar .nav-user .fw-semibold {
    color: var(--inkind-off-white) !important;
    font-size: 0.875rem;
}

.app-topbar .nav-user .nav-link,
.app-topbar .nav-user > .dropdown > a {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    color: var(--inkind-off-white) !important;
}

.app-topbar .nav-user img {
    border: 2px solid var(--inkind-yellow) !important;
}

.app-topbar .topbar-link {
    color: var(--inkind-text-muted);
    transition: color 0.2s ease;
    display: flex !important;
    align-items: center !important;
    padding: 0.5rem !important;
}

.app-topbar .topbar-link:hover {
    color: var(--inkind-yellow);
}

.app-topbar .page-title {
    color: var(--inkind-off-white) !important;
}

/* Sidenav toggle button alignment */
.app-topbar .sidenav-toggle-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem !important;
    color: var(--inkind-text-muted) !important;
    background: transparent !important;
    border: none !important;
}

.app-topbar .sidenav-toggle-button:hover {
    color: var(--inkind-yellow) !important;
}

/* Logo alignment in topbar */
.app-topbar .logo {
    display: flex !important;
    align-items: center !important;
}

.app-topbar .logo img {
    max-height: 32px !important;
    width: auto !important;
}

/* ============================================================================
   SIDENAV - Luxury Dark Panel
   ============================================================================ */

.sidenav-menu {
    background: linear-gradient(
        180deg,
        rgba(22, 18, 15, 0.98) 0%,
        rgba(18, 14, 12, 0.99) 100%
    ) !important;
    border-right: 1px solid rgba(201, 162, 39, 0.1) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

.sidenav-menu .nav-link,
.sidenav-menu .side-nav-link {
    color: var(--inkind-amber) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    margin: 4px 12px;
    padding: 12px 16px !important;
    position: relative;
    overflow: hidden;
}

.sidenav-menu .nav-link::before,
.sidenav-menu .side-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--inkind-gold);
    border-radius: 0 2px 2px 0;
    transition: height 0.3s ease;
}

.sidenav-menu .nav-link:hover,
.sidenav-menu .side-nav-link:hover {
    color: var(--inkind-cream) !important;
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.12) 0%, transparent 100%) !important;
}

.sidenav-menu .nav-link:hover::before,
.sidenav-menu .side-nav-link:hover::before {
    height: 60%;
}

.sidenav-menu .nav-link.active,
.sidenav-menu .side-nav-link.active {
    color: var(--inkind-gold) !important;
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.18) 0%, transparent 100%) !important;
}

.sidenav-menu .nav-link.active::before,
.sidenav-menu .side-nav-link.active::before {
    height: 70%;
    box-shadow: 0 0 10px var(--inkind-gold);
}

.side-nav-title {
    color: rgba(250, 247, 247, 0.4) !important;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 1rem 0.5rem !important;
}

/* ============================================================================
   CARDS - Luxury Glass Morphism
   ============================================================================ */

.card {
    background: linear-gradient(
        135deg,
        rgba(30, 25, 22, 0.9) 0%,
        rgba(25, 20, 18, 0.95) 100%
    ) !important;
    border: 1px solid var(--inkind-border) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(201, 162, 39, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: rgba(201, 162, 39, 0.25) !important;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(201, 162, 39, 0.08),
        inset 0 1px 0 rgba(201, 162, 39, 0.15);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-header {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid var(--inkind-border) !important;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    color: var(--inkind-off-white) !important;
    font-weight: 600;
}

/* ============================================================================
   BUTTONS - Brand Colors
   ============================================================================ */

/* Primary Button - Luxury Gold */
.btn-primary {
    background: linear-gradient(135deg, var(--inkind-gold) 0%, #b8922a 100%) !important;
    border: none !important;
    color: var(--inkind-black) !important;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d4ad2e 0%, var(--inkind-gold) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
    color: var(--inkind-black) !important;
}

/* inKind Button - Yellow/Gold */
.btn-inkind {
    background: linear-gradient(135deg, var(--inkind-yellow) 0%, #d4a73d 100%) !important;
    border: none !important;
    color: var(--inkind-black) !important;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-inkind:hover {
    background: linear-gradient(135deg, #f0c45a 0%, var(--inkind-yellow) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 184, 74, 0.4);
    color: var(--inkind-black) !important;
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    border: none !important;
}

/* Outline Buttons */
.btn-outline-primary {
    border: 1px solid var(--inkind-yellow) !important;
    color: var(--inkind-yellow) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: rgba(230, 184, 74, 0.15) !important;
    color: var(--inkind-yellow) !important;
}

.btn-outline-light {
    border: 1px solid rgba(250, 247, 247, 0.3) !important;
    color: var(--inkind-off-white) !important;
}

.btn-outline-light:hover {
    background: rgba(250, 247, 247, 0.1) !important;
    border-color: rgba(250, 247, 247, 0.5) !important;
}

/* ============================================================================
   FORMS - Elegant Inputs
   ============================================================================ */

.form-control,
.form-select {
    background: rgba(30, 25, 22, 0.8) !important;
    border: 1px solid rgba(201, 162, 39, 0.2) !important;
    color: var(--inkind-off-white) !important;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--inkind-yellow) !important;
    box-shadow: 0 0 0 3px rgba(230, 184, 74, 0.15) !important;
    color: var(--inkind-off-white) !important;
}

.form-control::placeholder {
    color: rgba(250, 247, 247, 0.4) !important;
}

.form-label {
    color: rgba(250, 247, 247, 0.8) !important;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--inkind-yellow) !important;
    border-color: var(--inkind-yellow) !important;
}

/* ============================================================================
   DROPDOWNS
   ============================================================================ */

.dropdown-menu {
    background: rgba(20, 20, 20, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--inkind-border) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px;
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--inkind-off-white) !important;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(230, 184, 74, 0.15) !important;
    color: var(--inkind-yellow) !important;
}

.dropdown-divider {
    border-color: var(--inkind-border) !important;
    margin: 0.5rem 0;
}

/* ============================================================================
   TABLES - Luxury Data Display
   ============================================================================ */

.table {
    color: var(--inkind-cream) !important;
    --bs-table-bg: transparent;
}

.table thead th {
    background: rgba(201, 162, 39, 0.05) !important;
    border-bottom: 1px solid rgba(201, 162, 39, 0.15) !important;
    color: var(--inkind-gold) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.8px;
    padding: 1rem;
}

.table tbody tr {
    border-bottom: 1px solid rgba(201, 162, 39, 0.08) !important;
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.08) 0%, transparent 100%) !important;
    transform: translateX(4px);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* ============================================================================
   BADGES - Elegant Status Pills
   ============================================================================ */

.badge {
    font-weight: 500;
    padding: 0.5em 1em;
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--inkind-gold) 0%, #b8922a 100%) !important;
    color: var(--inkind-black) !important;
    box-shadow: 0 2px 10px rgba(201, 162, 39, 0.3);
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.badge.bg-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(22, 163, 74, 0.3) 100%) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge.bg-warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(245, 158, 11, 0.3) 100%) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge.bg-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(79, 70, 229, 0.3) 100%) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Status badges for dark theme */
.status-badge, .status-pill {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-weight: 500;
}

.status-pending, .status-badge.pending {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fbbf24 !important;
}

.status-paid, .status-badge.paid {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
}

.status-missing_info, .status-badge.error {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

/* ============================================================================
   MODALS
   ============================================================================ */

.modal-content {
    background: rgba(20, 20, 20, 0.98) !important;
    border: 1px solid var(--inkind-border) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
}

.modal-header {
    border-bottom: 1px solid var(--inkind-border) !important;
    padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
    color: var(--inkind-off-white);
}

.modal-header.bg-primary {
    background: linear-gradient(135deg, var(--inkind-yellow) 0%, #d4a73d 100%) !important;
    color: var(--inkind-black) !important;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--inkind-border) !important;
    padding: 1rem 1.5rem;
}

/* ============================================================================
   ALERTS & INFO BOXES
   ============================================================================ */

.alert {
    border: none !important;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.alert-light {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--inkind-off-white) !important;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
}

.alert-warning, .info-box {
    background: rgba(251, 191, 36, 0.1) !important;
    border: 1px solid rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24 !important;
}

.info-box ul li {
    color: rgba(251, 191, 36, 0.8) !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

.alert-info {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #a5b4fc !important;
}

/* KPI Cards for dark theme */
.kpi-card {
    background: var(--inkind-card-bg) !important;
    border: 1px solid var(--inkind-border) !important;
    backdrop-filter: blur(20px);
    border-radius: 14px !important;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(230, 184, 74, 0.2) !important;
}

.kpi-icon {
    background: rgba(230, 184, 74, 0.15);
    color: var(--inkind-yellow);
}

/* Commission positive color */
.commission-positive, .text-success {
    color: #4ade80 !important;
}

/* ============================================================================
   PIPELINE / STAT CARDS
   ============================================================================ */

.stat-card {
    background: var(--inkind-card-bg);
    border: 1px solid var(--inkind-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border-color: rgba(230, 184, 74, 0.2);
}

.stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--inkind-off-white);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: rgba(250, 247, 247, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.stat-card.highlight {
    border-color: var(--inkind-yellow);
    background: linear-gradient(135deg, rgba(230, 184, 74, 0.1) 0%, rgba(25, 25, 25, 0.9) 100%);
}

.stat-card.highlight .stat-value {
    color: var(--inkind-yellow);
}

/* Pipeline items */
.pipeline-item {
    background: transparent;
    border-bottom: 1px solid var(--inkind-border) !important;
    transition: all 0.2s;
}

.pipeline-item:hover {
    background: rgba(230, 184, 74, 0.05) !important;
}

.pipeline-item .opp-name {
    color: var(--inkind-off-white) !important;
    font-weight: 600;
}

.pipeline-item .opp-details {
    color: var(--inkind-text-muted) !important;
}

.opp-commission {
    color: #4ade80 !important;
}

/* Lead items */
.lead-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--inkind-border);
    color: var(--inkind-text) !important;
}

.lead-item:hover {
    background: rgba(230, 184, 74, 0.1) !important;
    border-color: rgba(230, 184, 74, 0.3);
    color: var(--inkind-yellow) !important;
}

/* ============================================================================
   VIDEO WIDGET
   ============================================================================ */

.video-widget {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--inkind-border);
}

.video-widget video {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================================
   CHARTS
   ============================================================================ */

.chart-container {
    background: var(--inkind-card-bg);
    border: 1px solid var(--inkind-border);
    border-radius: 16px;
    padding: 1.5rem;
}

/* ============================================================================
   SCROLLBAR
   ============================================================================ */

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(230, 184, 74, 0.4);
}

/* ============================================================================
   TEXT UTILITIES
   ============================================================================ */

.text-inkind-yellow {
    color: var(--inkind-yellow) !important;
}

.text-inkind-coral {
    color: var(--inkind-yellow) !important;
}

.text-muted {
    color: rgba(250, 247, 247, 0.5) !important;
}

/* ============================================================================
   PAGE TITLE
   ============================================================================ */

.page-title {
    color: var(--inkind-off-white) !important;
    font-weight: 600;
}

/* ============================================================================
   WELCOME SECTION
   ============================================================================ */

.welcome-card {
    background: rgba(25, 25, 25, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(230, 184, 74, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   ACCORDION
   ============================================================================ */

.accordion-item {
    background: var(--inkind-card-bg) !important;
    border: 1px solid var(--inkind-border) !important;
    margin-bottom: 0.5rem;
    border-radius: 12px !important;
    overflow: hidden;
    transition: all 0.2s ease;
}

.accordion-item:hover {
    border-color: rgba(230, 184, 74, 0.2) !important;
}

.accordion-button {
    background: transparent !important;
    color: var(--inkind-off-white) !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.accordion-button:hover {
    background: rgba(230, 184, 74, 0.05) !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(230, 184, 74, 0.1) !important;
    color: var(--inkind-yellow) !important;
    box-shadow: none !important;
}

.accordion-button:focus {
    box-shadow: none !important;
}

.accordion-button::after {
    filter: invert(0.8);
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
    filter: invert(0.7) sepia(1) saturate(3) hue-rotate(10deg);
}

.accordion-body {
    background: rgba(0, 0, 0, 0.15);
    color: rgba(250, 247, 247, 0.8);
    animation: fadeIn 0.3s ease;
}

/* ============================================================================
   NAV PILLS / TABS
   ============================================================================ */

.nav-pills .nav-link {
    color: rgba(250, 247, 247, 0.7);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
    color: var(--inkind-off-white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-pills .nav-link.active {
    background: var(--inkind-yellow) !important;
    color: var(--inkind-black) !important;
}

/* ============================================================================
   LINKS
   ============================================================================ */

a {
    color: var(--inkind-yellow);
    transition: color 0.15s ease;
}

a:hover {
    color: #f0c45a;
}

/* ============================================================================
   MISC
   ============================================================================ */

.avatar-md {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.border-dashed {
    border-style: dashed !important;
}

hr {
    border-color: var(--inkind-border);
    opacity: 1;
}

/* Selection */
::selection {
    background: var(--inkind-yellow);
    color: var(--inkind-black);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: rgba(13, 13, 13, 0.95) !important;
    border-top: 1px solid var(--inkind-border);
    color: var(--inkind-text-muted);
    padding: 1rem 0;
    margin-top: 2rem;
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.spinner-border {
    color: var(--inkind-yellow) !important;
}

/* Loading skeleton */
.loading-skeleton {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.03) 0%, 
        rgba(255,255,255,0.08) 50%, 
        rgba(255,255,255,0.03) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================================
   CONSISTENT PAGE HEADERS
   ============================================================================ */

.page-header {
    margin-bottom: 2rem;
    padding-top: 0.5rem;
    animation: fadeInUp 0.4s ease-out;
}

.page-header h2, .page-header h4 {
    color: var(--inkind-off-white);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--inkind-text-muted);
    margin-bottom: 0;
}

/* Add spacing between major sections */
.card {
    margin-bottom: 1.5rem;
}

.card + .card {
    margin-top: 0.5rem;
}

/* Page title spacing in topbar - align with content cards */
.app-topbar .topbar-item.d-none.d-md-flex {
    margin-left: 2.5rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.app-topbar .page-title {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Hide sidebar logo - topbar has the logo and stays fixed */
.sidenav-menu > .logo {
    display: none !important;
}

/* Add top padding to sidebar content so it shows below fixed topbar */
.sidenav-menu [data-simplebar] {
    padding-top: 70px !important;
}

/* Hamburger menu and left side items alignment */
.app-topbar .sidenav-toggle-button {
    margin-left: 0.5rem !important;
}

.app-topbar .d-flex.align-items-center.gap-2 {
    gap: 0.75rem !important;
}

/* ============================================================================
   CARD BORDERS FOR STAGES
   ============================================================================ */

.card.border-warning {
    border-color: rgba(251, 191, 36, 0.3) !important;
}

.card.border-info {
    border-color: rgba(99, 102, 241, 0.3) !important;
}

.card.border-primary {
    border-color: rgba(230, 184, 74, 0.3) !important;
}

.card.border-success {
    border-color: rgba(34, 197, 94, 0.3) !important;
}

/* Stage card headers - dark theme compatible */
.bg-warning-subtle {
    background: rgba(251, 191, 36, 0.1) !important;
}

.bg-info-subtle {
    background: rgba(99, 102, 241, 0.1) !important;
}

.bg-primary-subtle {
    background: rgba(230, 184, 74, 0.1) !important;
}

.bg-success-subtle {
    background: rgba(34, 197, 94, 0.1) !important;
}

.bg-danger-subtle {
    background: rgba(239, 68, 68, 0.1) !important;
}

.text-warning-emphasis {
    color: #fbbf24 !important;
}

.text-info-emphasis {
    color: #818cf8 !important;
}

.text-primary-emphasis {
    color: var(--inkind-yellow) !important;
}

.text-success-emphasis {
    color: #4ade80 !important;
}

.text-danger-emphasis {
    color: #f87171 !important;
}

/* ============================================================================
   TABLE ENHANCEMENTS
   ============================================================================ */

.table-light {
    --bs-table-bg: rgba(255, 255, 255, 0.03) !important;
    --bs-table-color: var(--inkind-text-muted) !important;
}

.table-hover tbody tr:hover {
    background: rgba(230, 184, 74, 0.05) !important;
}

/* ============================================================================
   FORM IMPROVEMENTS
   ============================================================================ */

.form-control-sm, .form-select-sm {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--inkind-border) !important;
    color: var(--inkind-off-white) !important;
}

.form-control-sm:focus, .form-select-sm:focus {
    border-color: var(--inkind-yellow) !important;
    box-shadow: 0 0 0 2px rgba(230, 184, 74, 0.15) !important;
}

/* ============================================================================
   PAGINATION
   ============================================================================ */

.pagination .page-link {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--inkind-border);
    color: var(--inkind-text);
}

.pagination .page-link:hover {
    background: rgba(230, 184, 74, 0.1);
    border-color: rgba(230, 184, 74, 0.3);
    color: var(--inkind-yellow);
}

.pagination .page-item.active .page-link {
    background: var(--inkind-yellow);
    border-color: var(--inkind-yellow);
    color: var(--inkind-black);
}

.pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--inkind-border);
    color: var(--inkind-text-muted);
}

/* ============================================================================
   PIPELINE & LEAD ITEMS
   ============================================================================ */

.pipeline-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--inkind-border);
    transition: all 0.2s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

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

.pipeline-item:hover {
    background: rgba(230, 184, 74, 0.05);
    transform: translateX(4px);
}

.pipeline-item .opp-name {
    font-weight: 600;
    color: var(--inkind-off-white);
    margin-bottom: 0.25rem;
}

.pipeline-item .opp-details {
    font-size: 0.8rem;
    color: var(--inkind-text-muted);
}

.opp-commission {
    font-weight: 600;
    color: #4ade80 !important;
}

.lead-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    border: 1px solid var(--inkind-border);
    text-decoration: none;
    color: var(--inkind-text);
    transition: all 0.2s ease;
}

.lead-item:hover {
    background: rgba(230, 184, 74, 0.1);
    border-color: rgba(230, 184, 74, 0.3);
    color: var(--inkind-yellow);
    transform: translateY(-2px);
}

/* ============================================================================
   KPI CARDS (Commissions page)
   ============================================================================ */

.kpi-card {
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================================================
   STATUS BADGES (Commissions page)
   ============================================================================ */

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.status-pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.status-paid {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.status-missing_info {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* ============================================================================
   INFO BOX (Commissions page)
   ============================================================================ */

.info-box {
    background: rgba(230, 184, 74, 0.08);
    border: 1px solid rgba(230, 184, 74, 0.2);
    border-radius: 0.75rem;
}

.info-box h6 {
    color: var(--inkind-yellow) !important;
}

.info-box ul {
    margin-bottom: 0;
}

.info-box li {
    color: var(--inkind-text-muted);
}

.commission-positive {
    color: #4ade80 !important;
    font-weight: 600;
}

/* ============================================================================
   CHAT / MESSAGES
   ============================================================================ */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
}

.message-bubble {
    max-width: 75%;
    margin-bottom: 1rem;
    clear: both;
    animation: fadeInUp 0.3s ease-out;
}

.message-bubble.sent {
    float: right;
}

.message-bubble.received {
    float: left;
}

.message-bubble .bubble {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
}

.message-bubble.sent .bubble {
    background: var(--inkind-yellow);
    color: var(--inkind-black);
    border-bottom-right-radius: 0.25rem;
}

.message-bubble.received .bubble {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--inkind-border);
    color: var(--inkind-text);
    border-bottom-left-radius: 0.25rem;
}

.message-bubble .meta {
    font-size: 0.75rem;
    color: var(--inkind-text-muted);
    margin-top: 0.25rem;
}

.message-bubble.sent .meta {
    text-align: right;
}

.chat-input-area {
    padding: 1rem;
    background: rgba(18, 18, 18, 0.9);
    border-top: 1px solid var(--inkind-border);
    border-radius: 0 0 0.5rem 0.5rem;
}

.empty-chat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--inkind-text-muted);
}

.typing-indicator {
    display: none;
    padding: 0.5rem 1rem;
    color: var(--inkind-text-muted);
    font-size: 0.875rem;
}

/* ============================================================================
   NOTIFICATIONS
   ============================================================================ */

.list-group-item {
    background: transparent;
    border-color: var(--inkind-border);
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: rgba(230, 184, 74, 0.05);
}

.list-group-item.bg-light {
    background: rgba(230, 184, 74, 0.08) !important;
}

.avatar-md {
    width: 48px;
    height: 48px;
}

.avatar-title {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   PROFILE PAGE
   ============================================================================ */

#profile-photo {
    border: 3px solid var(--inkind-border) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Camera button */
label[for="photo-upload"] {
    background: var(--inkind-yellow) !important;
    color: var(--inkind-black) !important;
    transition: all 0.2s ease;
}

label[for="photo-upload"]:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(230, 184, 74, 0.4);
}

/* ============================================================================
   DOCUMENTS PAGE
   ============================================================================ */

.document-upload-zone {
    border: 2px dashed var(--inkind-border);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.document-upload-zone:hover {
    border-color: var(--inkind-yellow);
    background: rgba(230, 184, 74, 0.05);
}

.document-upload-zone.dragover {
    border-color: var(--inkind-yellow);
    background: rgba(230, 184, 74, 0.1);
}

/* ============================================================================
   RESOURCES PAGE
   ============================================================================ */

.resource-card {
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.resource-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: rgba(230, 184, 74, 0.15);
    color: var(--inkind-yellow);
}

/* ============================================================================
   POLISH & MICRO-INTERACTIONS
   ============================================================================ */

/* Smooth hover for all clickable elements */
.btn, .card, .nav-link, .dropdown-item, .list-group-item, .pipeline-item, .lead-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button press effect */
.btn:active:not(:disabled) {
    transform: scale(0.97);
}

/* Card lift on hover */
.card.hover-lift:hover,
.kpi-card:hover,
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Icon rotation on hover */
.btn i, .nav-link i {
    transition: transform 0.2s ease;
}

.btn:hover i {
    transform: scale(1.1);
}

/* Ripple effect for buttons */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:active::after {
    transform: scale(60);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

/* Glow effect on focus */
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(230, 184, 74, 0.1), 0 0 20px rgba(230, 184, 74, 0.08);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(230, 184, 74, 0.3);
}

/* Loading indicator */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 13, 13, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Text selection */
::selection {
    background: var(--inkind-yellow);
    color: var(--inkind-black);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--inkind-yellow);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    .page-title {
        font-size: 1rem !important;
    }
    
    .stat-card, .kpi-card {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .hero-section {
        grid-template-columns: 1fr !important;
    }
    
    .bottom-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================================
   MODERN UTILITY CLASSES
   ============================================================================ */

/* Glass Effect */
.glass {
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Consistent Button Sizing */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* Gap Utilities */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

/* Modern Hover States */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Consistent Spacing */
.section-spacing {
    margin-bottom: 1.5rem;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

.toast {
    background: rgba(20, 20, 20, 0.98) !important;
    border: 1px solid var(--inkind-border) !important;
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Focus States - Accessibility */
.btn:focus-visible,
.form-control:focus-visible,
a:focus-visible {
    outline: 2px solid var(--inkind-yellow);
    outline-offset: 2px;
}

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online { background: #4ade80; }
.status-dot.offline { background: #ef4444; }
.status-dot.pending { background: #fbbf24; }

/* Smooth Page Transitions */
.page-content {
    animation: fadeInUp 0.4s ease-out;
}

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

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

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

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

/* Animation Utility Classes */
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-fade-up { animation: fadeInUp 0.4s ease-out; }
.animate-slide-right { animation: slideInRight 0.4s ease-out; }
.animate-slide-left { animation: slideInLeft 0.4s ease-out; }
.animate-scale { animation: scaleIn 0.3s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }

/* Staggered animations for lists */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* Card animations */
.card {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.row .card:nth-child(1) { animation-delay: 0s; }
.row .card:nth-child(2) { animation-delay: 0.1s; }
.row .card:nth-child(3) { animation-delay: 0.2s; }
.row .card:nth-child(4) { animation-delay: 0.3s; }

/* Smooth hover transitions for all interactive elements */
a, button, .btn, .card, .dropdown-item, .nav-link {
    transition: all 0.2s ease;
}

/* Consistent Icon Sizing */
.icon-sm { font-size: 1rem; }
.icon-md { font-size: 1.25rem; }
.icon-lg { font-size: 1.5rem; }
.icon-xl { font-size: 2rem; }

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: rgba(250, 247, 247, 0.5);
}

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

/* Dividers */
.divider {
    height: 1px;
    background: var(--inkind-border);
    margin: 1rem 0;
}

/* Text Truncation */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================================
   RESPONSIVE — Mobile-first overrides
   ============================================================================ */

/* Tablet and below */
@media (max-width: 991.98px) {
    .card-body {
        padding: 1rem;
    }
    
    .stat-card-modern .stat-value {
        font-size: 1.5rem;
    }
    
    /* Reduce topbar padding */
    .app-topbar .topbar-menu {
        padding: 0 1rem !important;
        min-height: 56px !important;
    }
    
    /* Reduce page content top padding when topbar is shorter */
    .page-content {
        padding-top: 1.5rem !important;
    }
}

/* Small phone */
@media (max-width: 575.98px) {
    .page-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .page-content .page-container {
        padding: 0 0.75rem !important;
    }
    
    .btn-inkind {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Topbar: hide "Submit Lead" text, show just icon on very small screens */
    .app-topbar .btn-inkind .me-1 + span {
        display: none;
    }
    
    /* Card rounded corners slightly smaller */
    .card {
        border-radius: 12px !important;
    }
    
    /* Reduce table font sizes */
    .table {
        font-size: 0.825rem;
    }
    .table thead th {
        font-size: 0.65rem;
        padding: 0.75rem 0.5rem;
    }
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Form elements: full width on mobile */
    .form-control, .form-select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    /* Badges: slightly smaller */
    .badge {
        font-size: 0.65rem;
        padding: 0.35em 0.75em;
    }
    
    /* Dropdowns: wider on mobile for easier tapping */
    .dropdown-menu {
        min-width: 180px;
    }
    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Disable tooltips on touch devices — they can't hover */
@media (hover: none) and (pointer: coarse) {
    [data-tip]::after,
    [data-tip]::before {
        display: none !important;
    }
}

/* Prevent horizontal overflow on any screen */
html, body {
    overflow-x: hidden;
}
.page-content, .wrapper {
    overflow-x: hidden;
}

/* =========================================
   Pure CSS Tooltips (Luxury Theme)
   No JavaScript, no Popper.js, no positioning bugs
   ========================================= */
[data-tip] {
    position: relative;
    cursor: default;
}

/* Tooltip bubble */
[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) scale(0.96);
    background: linear-gradient(135deg, rgba(30, 27, 22, 0.98) 0%, rgba(45, 38, 28, 0.98) 100%);
    color: #f5f0e8;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(230, 184, 74, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 12px rgba(230, 184, 74, 0.08);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0.2px;
    text-align: left;
    white-space: normal;
    width: max-content;
    max-width: 260px;
    z-index: 1080;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

/* Arrow */
[data-tip]::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(30, 27, 22, 0.98);
    z-index: 1081;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

/* Show on hover */
[data-tip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}
[data-tip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Bottom placement variant */
[data-tip-pos="bottom"]::after {
    bottom: auto;
    top: calc(100% + 10px);
}
[data-tip-pos="bottom"]::before {
    bottom: auto;
    top: calc(100% + 4px);
    border-top-color: transparent;
    border-bottom-color: rgba(30, 27, 22, 0.98);
}

/* Bottom-left placement — tooltip anchored to left edge */
[data-tip-pos="bottom-start"]::after {
    bottom: auto;
    top: calc(100% + 10px);
    left: 0;
    transform: translateX(0) scale(0.96);
}
[data-tip-pos="bottom-start"]:hover::after {
    transform: translateX(0) scale(1);
}
[data-tip-pos="bottom-start"]::before {
    bottom: auto;
    top: calc(100% + 4px);
    left: 16px;
    transform: translateX(0);
    border-top-color: transparent;
    border-bottom-color: rgba(30, 27, 22, 0.98);
}

/* Ensure containers don't clip the tooltip */
.stat-card[data-tip],
.kpi-card[data-tip],
.deal-stat-card[data-tip] {
    overflow: visible;
}

/* Glass cards with tooltip headers need visible overflow */
.glass-card:has([data-tip]),
.card:has([data-tip]) {
    overflow: visible;
}
.glass-card-header:has([data-tip]),
.card-header:has([data-tip]) {
    overflow: visible;
}

/* For browsers that don't support :has, use a fallback class */
.glass-card,
.card.mb-4 {
    overflow: visible;
}

/* Ensure Bootstrap row/col parents don't clip KPI tooltips */
.row:has([data-tip]),
[class*="col"]:has([data-tip]) {
    overflow: visible;
}
.kpi-card[data-tip] .card-body {
    overflow: visible;
}
/* Fallback for browsers without :has — KPI card row */
.row.g-3.mb-4 {
    overflow: visible;
    position: relative;
    z-index: 10;
}
.row.g-3.mb-4 > [class*="col"] {
    overflow: visible;
}

/* KPI cards with tooltips need their own stacking context above sibling cards */
.kpi-card[data-tip] {
    position: relative;
    z-index: 10;
}
.kpi-card[data-tip]:hover {
    z-index: 1090;
}

/* Prevent stat-card transform from misplacing tooltip — use margin instead */
.stat-card[data-tip]:hover {
    transform: none;
    margin-top: -3px;
    margin-bottom: 3px;
}

/* Topbar Submit Referral button */
.topbar-menu .btn-inkind.btn-sm {
    background: linear-gradient(135deg, #e6b84a 0%, #d4a73a 100%);
    border: none;
    color: #1a1510;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(230, 184, 74, 0.3);
    transition: all 0.25s ease;
}

.topbar-menu .btn-inkind.btn-sm:hover {
    background: linear-gradient(135deg, #f0c85a 0%, #e6b84a 100%);
    box-shadow: 0 4px 16px rgba(230, 184, 74, 0.45);
    transform: translateY(-1px);
}

.topbar-menu .btn-inkind.btn-sm:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(230, 184, 74, 0.3);
}

/* ── Smart Nudge Cards ───────────────────────────────── */
.nudge-card {
    background: linear-gradient(135deg, rgba(30, 25, 18, 0.95) 0%, rgba(45, 38, 25, 0.9) 100%);
    border: 1px solid rgba(230, 184, 74, 0.25);
    border-left: 4px solid #e6b84a;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: nudge-slide-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nudge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(230, 184, 74, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.nudge-card:hover {
    border-color: rgba(230, 184, 74, 0.45);
    box-shadow: 0 4px 20px rgba(230, 184, 74, 0.1);
}

.nudge-card + .nudge-card {
    margin-top: 0.75rem;
}

.nudge-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.nudge-icon.nudge-urgent {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

.nudge-icon.nudge-info {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.nudge-icon.nudge-success {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.nudge-icon.nudge-motivate {
    background: rgba(230, 184, 74, 0.2);
    color: #e6b84a;
}

.nudge-body {
    flex: 1;
    position: relative;
    z-index: 1;
}

.nudge-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nudge-title .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.nudge-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.nudge-text strong {
    color: #e6b84a;
    font-weight: 600;
}

.nudge-action {
    margin-top: 0.5rem;
}

.nudge-action a {
    font-size: 0.78rem;
    color: #e6b84a;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
}

.nudge-action a:hover {
    color: #f0c85a;
    gap: 0.5rem;
}

.nudge-dismiss {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
    z-index: 2;
    transition: color 0.2s;
}

.nudge-dismiss:hover {
    color: rgba(255, 255, 255, 0.7);
}

@keyframes nudge-slide-in {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger animation for multiple nudges */
.nudge-card:nth-child(2) { animation-delay: 0.1s; }
.nudge-card:nth-child(3) { animation-delay: 0.2s; }
.nudge-card:nth-child(4) { animation-delay: 0.3s; }

/* ── Opportunity Detail Nudge Banner ───────────────── */
.opp-nudge-banner {
    background: linear-gradient(135deg, rgba(30, 25, 18, 0.95) 0%, rgba(45, 38, 25, 0.9) 100%);
    border: 1px solid rgba(230, 184, 74, 0.25);
    border-left: 4px solid #e6b84a;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    animation: nudge-slide-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    position: relative;
    overflow: hidden;
}

.opp-nudge-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(230, 184, 74, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.opp-nudge-banner .nudge-stat {
    display: inline-block;
    background: rgba(230, 184, 74, 0.15);
    color: #e6b84a;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.82rem;
}
