/* Global Styles */
:root {
    /* Base Colors (User Provided + Dark Mode Expansion) */
    --bg-body: #ffffff;
    --bg-sidebar: #f7f6f3;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --overlay-bg: rgba(255, 255, 255, 0.9);

    /* Text Colors */
    --text-primary: #37352f;
    --text-secondary: #9b9a97;

    /* Borders */
    --border-color: #e9e9e7;
    --card-border-color: #e9e9e7;
    --card-hover-border: #d3d1cb;
    --border-hover: #d3d1cb;

    /* Brand Colors */
    --primary-color: #2383e2;
    --bg-hover: #efefef;
    --bg-light: #f8f9fa;
    --bg-modal: #ffffff;

    /* Status Colors */
    --success-bg: #e6fcf5;
    --success-text: #087f5b;
    --info-bg: #e7f5ff;
    --info-text: #1971c2;
    --warning-bg: #fff3e0;
    --warning-text: #e65100;
    --danger-bg: #fff5f5;
    --danger-text: #e03131;
    --sku-bg: #f1f3f5;
    --sku-text: #495057;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body.dark-mode {
    /* Dark Mode Overrides */
    --bg-body: #191919;
    --bg-sidebar: #202020;
    --bg-card: #252525;
    --bg-input: #2d2d2d;
    --overlay-bg: rgba(37, 37, 37, 0.9);

    --text-primary: #d4d4d4;
    --text-secondary: #9ca3af;

    --border-color: #333333;
    --card-border-color: #333333;
    --card-hover-border: #454545;
    --border-hover: #454545;

    --primary-color: #3b82f6;
    --bg-hover: #2f2f2f;
    --bg-light: #2d2d2d;
    --bg-modal: #252525;

    /* Dimmed Status Colors for Dark Mode */
    --success-bg: rgba(8, 127, 91, 0.2);
    --success-text: #69db7c;
    --info-bg: rgba(25, 113, 194, 0.2);
    --info-text: #74c0fc;
    --warning-bg: rgba(230, 81, 0, 0.2);
    --warning-text: #ffa94d;
    --danger-bg: rgba(224, 49, 49, 0.2);
    --danger-text: #ff8787;
    --sku-bg: #343a40;
    --sku-text: #adb5bd;

    /* Bootstrap Overrides */
    --bs-body-bg: #191919;
    --bs-body-color: #d4d4d4;
    --bs-card-bg: #252525;
    --bs-border-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

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

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background-color 0.3s;
    z-index: 1000;
}

.sidebar.collapsed {
    transform: translateX(-260px);
}

.sidebar-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.workspace-icon {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.workspace-icon i {
    color: white;
    font-size: 10px;
}

.workspace-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-toggle {
    padding: 4px;
    color: var(--text-secondary);
    border: none;
    background: none;
    font-size: 12px;
}

.sidebar-toggle:hover {
    background-color: var(--bg-hover);
    border-radius: 3px;
}

/* Search Styles */
.search-container {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
    transition: border-color 0.2s ease;
}

.search-box:hover {
    border-color: var(--border-hover);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.1);
}

.search-box i {
    color: var(--text-secondary);
    font-size: 12px;
    margin-right: 6px;
}

.search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    width: 100%;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Navigation Styles */
.sidebar-nav {
    flex: 1;
    padding: 4px 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 1px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

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

.nav-link.active {
    background-color: var(--bg-hover);
    /* Notion style active state */
    color: var(--text-primary);
}

.nav-link i {
    width: 16px;
    margin-right: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Pages Section */
.pages-section {
    margin-top: 16px;
    padding: 0 6px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    margin-bottom: 2px;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-page-btn {
    padding: 2px 4px;
    color: var(--text-secondary) !important;
    border: none;
    background: none;
    font-size: 10px;
    border-radius: 3px;
}

.add-page-btn:hover {
    background-color: var(--bg-hover);
}

/* User Section */
.user-section {
    padding: 8px 6px;
    border-top: 1px solid var(--border-color);
}

.user-link {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

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

.user-avatar {
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.user-avatar i {
    color: white;
    font-size: 10px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    background-color: var(--bg-body);
}

.main-content.sidebar-collapsed {
    margin-left: 0;
}

/* Top Bar */
.top-bar {
    padding: 8px 96px 8px 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-body);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

.breadcrumb {
    margin: 0;
    font-size: 12px;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

.page-actions .btn {
    font-size: 12px;
    padding: 4px 8px;
}

/* Page Content */
.page-content {
    padding: 24px;
    min-height: calc(100vh - 60px);
}

/* From Product Detail: Ensure padding bottom for scrolling */
.page-content {
    padding-bottom: 60px;
}


.content-layout {
    margin-bottom: 15px;
}

.page-title-section {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

.page-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 24px;
    color: var(--text-secondary);
}

.page-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    line-height: 1.2;
}

.page-title:focus {
    outline: none;
}

/* Content Blocks */
.content-blocks {
    space-y: 4px;
}

.content-block {
    margin-bottom: 4px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.content-block:hover {
    background-color: var(--bg-light);
}

.block-content {
    padding: 3px 2px;
}

.block-content h2,
.block-content h3,
.block-content h4,
.block-content h5,
.block-content h6 {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    outline: none;
}

.block-content h2 {
    font-size: 24px;
}

.block-content h3 {
    font-size: 20px;
}

.block-content p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 8px;
    outline: none;
}

.block-content p.lead {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Action Cards */
.action-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
}

.action-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.card-icon i {
    color: white;
    font-size: 18px;
}

.action-card h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.action-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Todo List */
.todo-list {
    margin-top: 12px;
}

.todo-item {
    display: flex;
    align-items: flex-start;
    padding: 4px 0;
    margin-bottom: 4px;
}

.todo-item input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 2px;
}

.todo-item span {
    flex: 1;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    cursor: text;
}

.todo-item span.completed {
    text-decoration: line-through;
    color: var(--text-secondary);
}

/* Add Block Button */
.add-block-container {
    margin-top: 16px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.add-block-container:hover {
    opacity: 1;
}

.add-block-btn {
    color: var(--text-secondary);
    font-size: 14px;
    border: none;
    background: none;
    padding: 4px 0;
}

.add-block-btn:hover {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-260px);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .page-content {
        padding: 16px;
    }

    .page-title {
        font-size: 28px;
    }

    .top-bar {
        padding: 8px 16px;
    }

    .page-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .table-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .table-actions {
        align-self: stretch;
        justify-content: space-between;
    }

    .table-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .table-pagination {
        justify-content: center;
    }
}

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

    .stat-card {
        padding: 16px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
        font-size: 16px;
    }

    .stat-number {
        font-size: 24px;
    }

    .modern-table th,
    .modern-table td {
        padding: 8px 12px;
    }
}

@media (max-width: 1200px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .right-content {
        order: -1;
    }
}

/* Smooth Animations */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Custom Scrollbar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #d3d1cb;
    border-radius: 2px;
}

body.dark-mode .sidebar-nav::-webkit-scrollbar-thumb {
    background: #444;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #b8b6b0;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: 6px;
    padding: 4px;
    font-size: 14px;
    background-color: var(--bg-card);
}

.dropdown-item {
    padding: 6px 8px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.dropdown-item i {
    width: 16px;
    margin-right: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

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

/* Stats Container (Generic) */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card-individual {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.stat-card-individual:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.stat-icon.customers {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.appointments {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.tasks {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-icon.vehicles {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Stats Grid (Detailed, from Product Page) */
.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 10px;
}

.stat-widget {
    background: var(--bg-card);
    border: 1px solid var(--card-border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-widget-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.icon-sales {
    background: var(--info-bg);
    color: var(--info-text);
}

.icon-return {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.icon-revenue {
    background: var(--success-bg);
    color: var(--success-text);
}

.stat-widget-content {
    flex: 1;
}

.stat-widget-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-widget-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Section Headers */
.section-header {
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Quick Actions & Action Buttons */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.quick-actions-grid .action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 4px;
}

.btn-action {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-sidebar);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-action:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Activity List */
.activity-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-hover);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Tables */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.table-content {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.modern-table th {
    background: var(--bg-sidebar);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

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

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

.table-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-light);
}

.table-info {
    font-size: 12px;
    color: var(--text-secondary);
}

.table-pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

.table-pagination .btn {
    min-width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Customer & Status Badges */
.customer-info {
    display: flex;
    align-items: center;
}

.customer-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.customer-details {
    min-width: 0;
}

.customer-name {
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

.customer-email {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-badge.pending {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.status-badge.inactive {
    background: var(--bg-light);
    color: var(--text-secondary);
}

/* Product Detail Styles (Moved from Inline) */
.product-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.product-title-group h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.product-meta-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.meta-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-badge.stock {
    background: var(--success-bg);
    color: var(--success-text);
}

.meta-badge.category {
    background: var(--info-bg);
    color: var(--info-text);
}

.meta-badge.sku {
    background: var(--sku-bg);
    color: var(--sku-text);
    font-family: monospace;
}

.product-gallery {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--overlay-bg);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.premium-card {
    background: var(--bg-card);
    border: 1px solid var(--card-border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.premium-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.card-title-sm {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Info Rows for Details */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-light);
}

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

.info-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    text-align: right;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Submenu & Interactive styles */
.nav-item.expandable {
    position: relative;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.nav-item.expanded .submenu-arrow {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-item.expanded .submenu {
    max-height: 200px;
}

.sub-item {
    margin: 0 0 0 20px;
}

.sub-item .nav-link {
    padding: 2px 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

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

.sub-item .nav-link i {
    width: 12px;
    font-size: 10px;
    margin-right: 6px;
}

.add-submenu-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: none;
    background: var(--bg-sidebar);
    border-radius: 50%;
    font-size: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.nav-item.expandable:hover .add-submenu-btn {
    opacity: 1;
}

.add-submenu-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clickable:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.drag-handle {
    opacity: 0;
    margin-right: 4px;
    cursor: grab;
    transition: opacity 0.2s ease;
}

.nav-item:hover .drag-handle {
    opacity: 0.5;
}

.nav-item.dragging {
    opacity: 0.5;
}

.nav-item.drag-over {
    border-top: 2px solid var(--primary-color);
}

.settings-tabs .nav-tabs {
    border-bottom: 1px solid var(--border-color);
}

.settings-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    border-bottom: 2px solid transparent;
}

.settings-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

.settings-tabs .tab-content {
    padding: 20px 0;
}

.customer-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 30px;
}

.activity-timeline {
    max-height: 200px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-light);
}

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

.timeline-date {
    width: 100px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.sidebar-open-btn {
    padding: 4px 8px;
    color: var(--text-secondary);
    border: none;
    background: none;
    font-size: 16px;
    border-radius: 4px;
}

.sidebar-open-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.form-control {
    font-size: 14px;
    background-color: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-control:focus {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-hover);
    box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.1);
}

[contenteditable]:focus {
    outline: none;
    background-color: rgba(35, 131, 226, 0.05);
    /* Keep generic or make var */
    border-radius: 3px;
}

::selection {
    background-color: rgba(35, 131, 226, 0.2);
}

/* Command Palette Utils */
.command-palette-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    backdrop-filter: blur(2px);
    display: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.command-palette-backdrop.show {
    display: block;
    opacity: 1;
}

.command-palette-modal {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: 600px;
    max-width: 90%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    padding: 0;
    overflow: hidden;
    display: none;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0;
}

.command-palette-modal.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.cp-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.cp-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.cp-input::placeholder {
    color: var(--text-secondary);
}

.cp-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.cp-group-title {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.cp-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s;
    justify-content: space-between;
}

.cp-item:hover,
.cp-item.active {
    background-color: var(--primary-color);
    color: white;
}

.cp-item i {
    width: 20px;
    text-align: center;
    margin-right: 12px;
    font-size: 14px;
}

.cp-item:hover i,
.cp-item:hover .cp-shortcut,
.cp-item.active i,
.cp-item.active .cp-shortcut {
    color: white;
}

.cp-shortcut {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 4px;
}
/* Price Tag */
.price-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.old-price {
    font-size: 16px;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-left: 8px;
}

/* Tabs Styling */
.custom-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    padding: 12px 20px;
    font-weight: 500;
    position: relative;
    background: transparent;
}

.custom-tabs .nav-link.active {
    color: var(--text-primary);
}

.custom-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
}

.tab-content-area {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 30px;
    min-height: 200px;
}

/* Kanban Board (from todo.html) */
.kanban-board {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 20px;
    height: calc(100vh - 180px);
}

.kanban-col {
    min-width: 320px;
    width: 320px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.kanban-header {
    padding: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-count {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 13px;
    margin-left: 8px;
}

.kanban-content {
    padding: 0 12px 12px 12px;
    overflow-y: auto;
    flex: 1;
}

.task-card {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    cursor: grab;
    color: var(--text-primary);
}

.task-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.task-card:active {
    cursor: grabbing;
}

.task-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.tag-dev { background: var(--info-bg); color: var(--info-text); }
.tag-design { background: #fff0f6; color: #c026d3; } /* Custom */
.tag-marketing { background: var(--warning-bg); color: var(--warning-text); }

/* Reports (from reports.html) */
.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    transition: all 0.2s ease;
}

.report-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.metric-change {
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
}

.metric-change.positive {
    color: var(--success-text);
    background: var(--success-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

.metric-change.negative {
    color: var(--danger-text);
    background: var(--danger-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

.chart-container {
    height: 300px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px dashed var(--border-color);
}

.report-list-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--bg-light);
    transition: background 0.2s;
    color: var(--text-primary);
}

.report-list-item:hover {
    background: var(--bg-light);
}

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

.report-icon {
    width: 40px;
    height: 40px;
    background: var(--info-bg);
    color: var(--info-text);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

/* More Reports Styles */
.report-icon.pdf { background: var(--danger-bg); color: var(--danger-text); }
.report-icon.xls { background: var(--success-bg); color: var(--success-text); }

.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

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

.filter-btn.active {
    background: var(--border-color);
    color: var(--text-primary);
}

/* More Todo Styles */
.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--bg-light);
}

.assigned-users { display: flex; }

.user-dot {
    width: 20px;
    height: 20px;
    background: #ccc;
    border-radius: 50%;
    border: 1px solid var(--bg-card);
    margin-left: -6px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.user-dot:first-child { margin-left: 0; }

.add-task-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    width: 100%;
    text-align: left;
    border-radius: 4px;
    font-size: 14px;
}
.add-task-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Analytics Styles */
.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
}

.metric-trend {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
}

.trend-up { color: var(--success-text); }
.trend-down { color: var(--danger-text); }

.chart-card-lg {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    height: 400px;
}

.map-placeholder {
    background: var(--bg-light);
    border-radius: 8px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* Calendar Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-header {
    background: var(--bg-light);
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
}

.calendar-day {
    background: var(--bg-card);
    min-height: 120px;
    padding: 8px;
    position: relative;
    color: var(--text-primary);
}

.calendar-day.other-month {
    background: var(--bg-light); /* slightly darker/lighter than card */
    color: var(--text-secondary);
}

.day-number {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.calendar-day.today {
    background: var(--info-bg);
}

.today .day-number {
    background: var(--info-text);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-chip {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    border-left: 3px solid rgba(0, 0, 0, 0.1);
}

.event-primary { background: var(--info-bg); color: var(--info-text); border-color: var(--info-text); }
.event-success { background: var(--success-bg); color: var(--success-text); border-color: var(--success-text); }
.event-warning { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning-text); }
.event-danger { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-text); }
/* Login/Auth Styles */
.auth-container {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

.auth-banner {
    flex: 1;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px;
    position: relative;
}

.auth-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-card);
}

.auth-form-card {
    width: 100%;
    max-width: 400px;
}

.brand-logo {
    font-weight: 700;
    font-size: 24px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.testimonial {
    max-width: 480px;
}

.testimonial-text {
    font-size: 24px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* Auth version of form control */
.auth-form-card .form-control {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    transition: all 0.2s;
    background-color: var(--bg-input);
    height: 42px;
    color: var(--text-primary);
}

.auth-form-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.1);
    outline: none;
}
.brand-logo {
    font-weight: 700;
    font-size: 24px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.testimonial { max-width: 480px; }
.testimonial-text {
    font-size: 24px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* Auth version of form control */
.auth-form-card .form-control {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    transition: all 0.2s;
    background-color: var(--bg-input);
    height: 42px;
    color: var(--text-primary);
}

.auth-form-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.1);
    outline: none;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

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

/* Login Residuals */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before { margin-right: .5em; }
.divider:not(:empty)::after { margin-left: .5em; }

.abstract-shape {
    position: absolute;
    background: rgba(35, 131, 226, 0.05);
    border-radius: 50%;
}

@media (max-width: 900px) {
    .auth-banner {
        display: none;
    }
}

.table-actions {
    display: flex;
    gap: 8px;
}
