/* Enhanced Style with Dark Mode Support */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Theming */
:root {
    /* Light Mode Colors */
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --accent-color: #8b5cf6;

    --background: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --sidebar-bg: #1e293b;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #cbd5e1;
    --border-color: #e2e8f0;

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --background: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --sidebar-bg: #0a0f1a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-light: #cbd5e1;
    --border-color: #334155;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #0a0f1a 100%);
    color: var(--text-light);
    padding: 0;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.dashboard-logo {
    text-align: center;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.dashboard-logo img {
    border-radius: 8px;
    transition: var(--transition);
}

.dashboard-logo img:hover {
    transform: scale(1.05);
}

.nav-menu {
    list-style: none;
    padding: 16px 0;
}

.nav-menu li {
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
    margin: 4px 12px;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
}

.nav-menu li i {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-menu li:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.nav-menu li.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.nav-menu li.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--secondary-color);
    border-radius: 0 4px 4px 0;
}

/* Main Content Area */
.content {
    flex-grow: 1;
    padding: 32px;
    overflow-y: auto;
    background: var(--background);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: var(--surface);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--background);
    border-radius: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    flex: 1;
    max-width: 400px;
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-bar i {
    color: var(--text-secondary);
    margin-right: 12px;
}

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

.search-bar input[type="text"]::placeholder {
    color: var(--text-secondary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#global-currency-selector {
    background-color: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    margin-right: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

#global-currency-selector:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.add-new-btn,
.theme-toggle-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.add-new-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.theme-toggle-btn {
    background: var(--surface-hover);
    color: var(--text-primary);
    padding: 10px 12px;
    min-width: auto;
}

.theme-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
}

.add-new-btn i {
    margin-right: 6px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.user-profile:hover {
    background: var(--surface-hover);
}

.user-profile span {
    font-weight: 500;
    color: var(--text-primary);
}

.user-profile i {
    font-size: 28px;
    color: var(--primary-color);
}

/* Page Content */
.page {
    min-height: 70vh;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 28px;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: white;
    margin-right: 20px;
    box-shadow: var(--shadow);
}

.customers-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.deals-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.tasks-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.revenue-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-info h3 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-info p {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Recent Activity */
.recent-activity {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.recent-activity h2 {
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Dashboard Charts Grid */
.dashboard-charts {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.chart-row-full {
    grid-template-columns: 1fr;
}

.chart-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.chart-card:hover {
    box-shadow: var(--shadow-lg);
}

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

.chart-card h3 i {
    color: var(--primary-color);
}

.chart-card canvas {
    max-height: 260px;
}


.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    transition: var(--transition);
}

.activity-item:hover {
    background: var(--surface-hover);
    transform: translateX(4px);
}

.activity-item i {
    margin-right: 8px;
    color: var(--primary-color);
}

.activity-item span {
    color: var(--text-secondary);
    font-size: 13px;
}

.no-data {
    color: var(--text-secondary);
    text-align: center;
    padding: 40px 20px;
    font-style: italic;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.add-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.add-btn i {
    margin-right: 6px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-filter {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 14px;
    flex: 1;
    min-width: 250px;
    transition: var(--transition);
}

.search-filter:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-filter i {
    color: var(--text-secondary);
    margin-right: 10px;
}

.search-filter input[type="text"] {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    padding: 6px 0;
    flex: 1;
    color: var(--text-primary);
}

.filter-options select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface);
    outline: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.filter-options select:hover {
    border-color: var(--primary-color);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--background);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--surface-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Tags */
.status-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-tag.active,
.status-tag.completed,
.status-tag.won {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-tag.inactive,
.status-tag.pending,
.status-tag.potential {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.status-tag.in-progress,
.status-tag.contact,
.status-tag.proposal {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btns button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 6px 10px;
    font-size: 14px;
    transition: var(--transition);
    border-radius: 6px;
}

.action-btns button:hover {
    background: rgba(59, 130, 246, 0.1);
}

.action-btns button.delete-btn {
    color: var(--error);
}

.action-btns button.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.action-btns button.calendar-btn {
    color: var(--warning);
}

.action-btns button.calendar-btn:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* Deals Board (Kanban) */
.deals-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.deal-column {
    background: var(--background);
    border-radius: 12px;
    padding: 16px;
    min-height: 400px;
    border: 2px solid var(--border-color);
}

.deal-column h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.deal-column h3 .deal-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.deal-list {
    min-height: 350px;
}

.deal-card {
    background: var(--surface);
    border-left: 4px solid var(--primary-color);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.deal-card:active {
    cursor: grabbing;
    transform: rotate(2deg);
}

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

.deal-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.deal-card .deal-value {
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 8px;
    font-size: 16px;
}

/* Reports */
.reports-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.report-card {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.report-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.chart-container {
    height: 300px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-in;
}

.modal-content {
    background: var(--surface);
    margin: 3% auto;
    padding: 0;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding: 20px 24px;
    background: var(--background);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 20px;
}

.close-modal {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.close-modal:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    padding: 24px;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    display: none;
    /* hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--surface);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: var(--shadow-lg);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    background: var(--background);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    min-height: 100px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    border-top: 2px solid var(--border-color);
    padding-top: 20px;
}

.save-btn,
.cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 14px;
}

.save-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

.cancel-btn {
    background: var(--surface-hover);
    color: var(--text-primary);
}

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

/* SWOT Analysis */
#swot-modal .modal-content {
    max-width: 900px;
}

.swot-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.swot-box {
    border: 2px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
    background: var(--background);
}

.swot-box h3 {
    margin-top: 0;
    font-size: 16px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    border-bottom: 2px dashed var(--border-color);
}

.swot-box:nth-child(1) {
    border-color: var(--success);
}

.swot-box:nth-child(1) h3 {
    color: var(--success);
}

.swot-box:nth-child(2) {
    border-color: var(--error);
}

.swot-box:nth-child(2) h3 {
    color: var(--error);
}

.swot-box:nth-child(3) {
    border-color: var(--primary-color);
}

.swot-box:nth-child(3) h3 {
    color: var(--primary-color);
}

.swot-box:nth-child(4) {
    border-color: var(--warning);
}

.swot-box:nth-child(4) h3 {
    color: var(--warning);
}

.swot-box textarea {
    height: 150px;
    border: none;
    background: var(--surface);
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--surface);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--primary-color);
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
    max-width: 350px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .deals-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .reports-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding-bottom: 80px;
    }

    /* Mobile Bottom Navigation */
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        z-index: 1000;
        background: var(--surface);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
        padding: 0;
        border-top: 1px solid var(--border-color);
        display: flex;
        justify-content: center;
    }

    .dashboard-logo {
        display: none;
    }

    .nav-menu {
        display: flex;
        width: 100%;
        justify-content: space-around;
        padding: 0;
        margin: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-menu li {
        flex-direction: column;
        padding: 8px 4px;
        margin: 0;
        border-radius: 0;
        font-size: 10px;
        color: var(--text-secondary);
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        align-items: center;
        text-align: center;
        position: relative;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hide text on very small screens or when there are too many items to fit */
    @media (max-width: 480px) {
        .nav-menu li {
            font-size: 0;
        }
        .nav-menu li i {
            margin-bottom: 0;
            font-size: 20px;
        }
    }

    .nav-menu li i {
        font-size: 20px;
        margin-right: 0;
        margin-bottom: 3px;
        display: block;
    }

    .nav-menu li.active {
        color: var(--primary-color);
    }

    .nav-menu li.active::before {
        display: none;
    }

    .nav-menu li.active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 0 0 4px 4px;
    }

    /* Content */
    .content {
        padding: 16px;
        padding-bottom: 16px;
        margin-bottom: 70px;
        min-width: 0;
    }

    /* Header */
    header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        margin-bottom: 16px;
    }

    .search-bar {
        width: 100%;
        max-width: none;
        order: 2;
    }

    .user-info {
        width: 100%;
        justify-content: space-between;
        order: 1;
        flex-wrap: wrap;
        gap: 8px;
    }

    #global-currency-selector {
        margin-right: 0;
        font-size: 13px;
        padding: 6px 8px;
    }

    .add-new-btn {
        font-size: 13px;
        padding: 8px 12px;
    }

    .add-new-btn i {
        margin-right: 4px;
    }

    .user-profile span {
        display: none;
    }

    /* Dashboard Stats */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .stat-info h3 {
        font-size: 11px;
    }

    .stat-info p {
        font-size: 20px;
    }

    /* Charts */
    .chart-row {
        grid-template-columns: 1fr;
    }

    /* Tables: Card View */
    .table-container {
        background: transparent;
        box-shadow: none;
        border: none;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: var(--surface);
        margin-bottom: 12px;
        border-radius: 12px;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border-color);
        padding: 12px;
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 9px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 14px;
        word-break: break-word;
    }

    .data-table td:last-child {
        border-bottom: none;
        justify-content: flex-end;
        padding-top: 12px;
        gap: 8px;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        text-align: left;
        margin-right: 12px;
        flex-shrink: 0;
        font-size: 12px;
    }

    /* Deals Board */
    .deals-board {
        grid-template-columns: 1fr;
    }

    .deal-column {
        min-height: auto;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        margin: 8px auto;
        max-height: 92vh;
        overflow-y: auto;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    /* SWOT on mobile */
    .swot-container {
        grid-template-columns: 1fr;
    }

    #swot-modal .modal-content {
        max-width: 100%;
    }

    /* Filters */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filter {
        min-width: 0;
    }

    .filter-options {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
        gap: 8px;
    }

    .filter-options select {
        flex-shrink: 0;
    }

    /* Page header on mobile */
    .page-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 16px;
    }

    /* Login */
    .login-container {
        padding: 24px;
        width: 92%;
    }

    .login-logo {
        width: 140px;
        margin-bottom: 16px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .stat-info p {
        font-size: 18px;
    }

    .user-info {
        gap: 6px;
    }

    #global-currency-selector {
        font-size: 12px;
        padding: 5px 6px;
    }

    .add-new-btn {
        font-size: 12px;
        padding: 7px 10px;
    }

    .nav-menu li {
        padding: 8px 2px;
    }

    .nav-menu li i {
        font-size: 18px;
    }

    .deals-board {
        gap: 12px;
    }

    .chart-card {
        padding: 16px;
    }

    .modal-content {
        width: 98%;
        margin: 4px auto;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .save-btn,
    .cancel-btn {
        width: 100%;
        text-align: center;
    }

    .login-container {
        padding: 20px 16px;
        width: 96%;
    }
}

@media print {

    .sidebar,
    header,
    .add-btn,
    .action-btns,
    .theme-toggle-btn {
        display: none !important;
    }

    .content {
        padding: 0;
    }

    .stat-card,
    .table-container,
    .report-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Login Page Specific Styles */
.login-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #3b82f6 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0;
}

.login-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 180px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    border-radius: 12px;
}

.login-header h1 {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-container .form-group label {
    color: #cbd5e1;
    font-weight: 500;
    margin-bottom: 10px;
}

.login-container .form-group input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 12px;
}

.login-container .form-group input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.4);
    filter: brightness(1.1);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.error-msg {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.1);
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 20px;
    display: none;
    text-align: center;
    border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Scrollbar Styling for modern feel */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* =========================================
   Activity Log Feed (Dashboard)
   ========================================= */

.activity-log-card {
    max-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
    max-height: 360px;
}

.activity-feed::-webkit-scrollbar {
    width: 4px;
}

.activity-feed::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.activity-item {
    display: grid;
    grid-template-columns: 28px 24px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    font-size: 13px;
}

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

.activity-item:hover {
    background: var(--surface-hover);
}

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.activity-icon.action-created {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.activity-icon.action-updated {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.activity-icon.action-deleted {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
}

.activity-entity-icon {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

.activity-detail {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
    text-align: right;
    line-height: 1.5;
}

.activity-meta strong {
    display: block;
    color: var(--text-primary);
    font-size: 12px;
}

.activity-empty,
.activity-loading {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 14px;
}

/* =========================================
   SortableJS Kanban Drag States
   ========================================= */

.sortable-ghost {
    opacity: 0.35;
    border: 2px dashed var(--primary-color) !important;
    background: rgba(59, 130, 246, 0.05) !important;
}

.sortable-chosen {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3) !important;
    transform: scale(1.02) rotate(1deg) !important;
    cursor: grabbing !important;
}

.deal-column.drag-over {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.04);
}