:root {
    --primary-color: #2BBEF4;
    --text-dark: #212121;
    --text-muted: #757575;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.navbar {
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 500;
    color: var(--text-dark) !important;
    gap: 0.75rem;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a9dd9 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.5px;
}

.brand-logo-navbar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
}

.brand-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-dark);
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 400;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(43, 190, 244, 0.08);
}

.user-name {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.brand-logo-large {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a9dd9 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.brand-logo-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: contain;
}

.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: visible;
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 500;
}

.card-body {
    padding: 1.5rem;
    overflow: visible;
}

.metric-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

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

.metric-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
}

.status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-chip {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 12px;
    font-weight: 500;
    border-radius: 16px;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.status-chip.status-lead {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-chip.status-contact {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.status-chip.status-meeting {
    background-color: #fff3e0;
    color: #e65100;
}

.status-chip.status-proposal {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-chip.status-negotiation {
    background-color: #fff9c4;
    color: #f57f17;
}

.status-chip.status-won {
    background-color: #c8e6c9;
    color: #1b5e20;
}

.status-chip.status-lost {
    background-color: #ffcdd2;
    color: #c62828;
}

.table {
    font-size: 14px;
}

.table thead th {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

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

.clickable-row {
    cursor: pointer;
}

.badge {
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    font-size: 12px;
    text-transform: capitalize;
}

.badge.status-lead {
    background-color: #1976d2;
}

.badge.status-contact {
    background-color: #7b1fa2;
}

.badge.status-meeting {
    background-color: #e65100;
}

.badge.status-proposal {
    background-color: #2e7d32;
}

.badge.status-negotiation {
    background-color: #f57f17;
}

.badge.status-won {
    background-color: #1b5e20;
}

.badge.status-lost {
    background-color: #c62828;
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.625rem 0.75rem;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(43, 190, 244, 0.1);
}

.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: #1a9dd9;
    border-color: #1a9dd9;
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-outline-secondary {
    color: var(--text-muted);
    border-color: var(--border-color);
}

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

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

.btn-link:hover {
    color: #1a9dd9;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

.alert {
    border-radius: 4px;
    border: none;
    font-size: 14px;
}

.alert-success {
    background-color: #c8e6c9;
    color: #1b5e20;
}

.alert-danger {
    background-color: #ffcdd2;
    color: #c62828;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1976d2;
}

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

.card-footer {
    padding: 1rem 1.5rem;
}

.chip {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 11px;
    font-weight: 500;
    border-radius: 12px;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.chip-product {
    background-color: #e3f2fd;
    color: #1976d2;
}

.chip-channel {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 0.75rem;
    max-height: calc(100vh - 300px);
}

.kanban-column-wide {
    flex: 0 0 360px;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.kanban-column-header h5 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kanban-column-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 100px;
}

.kanban-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

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

.action-item-card.overdue {
    border-left: 4px solid #c62828;
    background-color: #ffebee;
}

.kanban-card-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.kanban-card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.kanban-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.kanban-card-meta {
    font-size: 12px;
}

.tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 11px;
    font-weight: 500;
    border-radius: 12px;
}

.tag-product {
    background-color: #e3f2fd;
    color: #1976d2;
}

.tag-channel {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.notion-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    background-color: rgba(43, 190, 244, 0.08);
    color: var(--primary-color);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}

.notion-tag-chip:hover {
    background-color: rgba(43, 190, 244, 0.15);
}

.notion-tag-remove {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--primary-color);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.notion-tag-remove:hover {
    opacity: 1;
}

.tag-selector-display {
    min-height: 42px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.tag-selector-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-option-btn {
    padding: 0.375rem 0.75rem;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.tag-option-btn:hover {
    border-color: var(--primary-color);
    background-color: rgba(43, 190, 244, 0.04);
    color: var(--primary-color);
}

.country-selector-display {
    min-height: 42px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.country-search-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.country-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(43, 190, 244, 0.1);
}

.country-dropdown {
    position: relative;
    display: none;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
}

.country-list {
    padding: 0.25rem;
}

.country-option {
    padding: 0.5rem 0.75rem;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.country-option:hover {
    background-color: var(--bg-light);
}

.filter-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 32px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: 13px;
    font-weight: 500;
    border-radius: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    background-color: #1a9dd9;
    box-shadow: var(--shadow-sm);
}

.filter-chip-remove {
    font-size: 16px;
    line-height: 1;
    opacity: 0.8;
}

.filter-chip:hover .filter-chip-remove {
    opacity: 1;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-option-btn {
    padding: 0.375rem 0.75rem;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-option-btn:hover {
    border-color: var(--primary-color);
    background-color: rgba(43, 190, 244, 0.04);
}

.filter-option-btn.selected {
    border-color: var(--primary-color);
    background-color: rgba(43, 190, 244, 0.08);
    color: var(--primary-color);
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group-label {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.notion-filter-bar {
    padding: 0.25rem 0;
}

.notion-filter-pills-scroll {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.notion-filter-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}

.notion-filter-pill:hover {
    background-color: var(--bg-light);
    border-color: var(--text-muted);
}

.notion-filter-pill.has-selection {
    background-color: rgba(43, 190, 244, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-pill-text {
    display: inline;
}

.filter-pill-count {
    display: none;
    font-weight: 600;
    margin-left: 0.125rem;
}

.filter-dropdown {
    position: fixed;
    width: 280px;
    max-height: 420px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    z-index: 9999;
    display: none;
    overflow: visible;
}

.filter-dropdown.active {
    display: block;
}

.filter-dropdown-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    min-height: 24px;
}

.filter-dropdown-chips:empty {
    margin-bottom: 0;
}

.filter-dropdown-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    max-height: 240px;
    overflow-y: auto;
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.filter-checkbox-item:hover {
    background-color: var(--bg-light);
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

.filter-checkbox-label {
    font-size: 13px;
    color: var(--text-dark);
    flex: 1;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    background-color: rgba(43, 190, 244, 0.12);
    color: var(--primary-color);
    border: none;
}

.filter-chip-remove {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: var(--primary-color);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.filter-chip-remove:hover {
    opacity: 1;
}

.clear-filters-btn {
    padding: 0.375rem 0.75rem;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.clear-filters-btn:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border-color: var(--text-muted);
    text-decoration: none;
}

.filter-dropdown-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.filter-apply-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-apply-btn:hover {
    background-color: #1b9ed4;
}

.filter-clear-btn {
    padding: 0.5rem 0.75rem;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-clear-btn:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .metric-value {
        font-size: 24px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .kanban-board {
        flex-direction: column;
    }
    
    .kanban-column,
    .kanban-column-wide {
        flex: 1 1 auto;
        max-height: 400px;
    }
    
    .notion-filter-pills-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
