/* IveHub CRM Premium Design System & Theme Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0F766E;
    --primary-hover: #0D635C;
    --primary-light: #F0FDFA;
    --secondary-color: #2563EB;
    --success-color: #22C55E;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --font-family: 'Outfit', sans-serif;
    
    /* Light Mode variables */
    --bg-app: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --sidebar-text: #475569;
    --sidebar-hover-bg: #F1F5F9;
    --sidebar-active-bg: #0F766E;
    --sidebar-active-text: #FFFFFF;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

[data-bs-theme="dark"] {
    /* Dark Mode variables */
    --bg-app: #0F172A;
    --bg-card: #1E293B;
    --bg-sidebar: #1E293B;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --border-color: #334155;
    --sidebar-text: #CBD5E1;
    --sidebar-hover-bg: #334155;
    --sidebar-active-bg: #0F766E;
    --sidebar-active-text: #FFFFFF;
    --primary-light: #115E59;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-app);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Card custom styles */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
}

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

.card-title {
    color: var(--text-main);
    font-weight: 600;
}

/* Rounded Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.55rem 1.25rem;
    transition: all 0.2s ease;
}

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

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.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);
    color: #FFFFFF;
}

/* Layout Wrapper */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Styling */
#sidebar {
    min-width: 260px;
    max-width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    transition: all 0.3s, background-color 0.3s, border-color 0.3s;
    z-index: 1000;
}

#sidebar .sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

#sidebar ul.components {
    padding: 1rem 0;
}

#sidebar ul li {
    padding: 0.2rem 1rem;
}

#sidebar ul li a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

#sidebar ul li a i {
    width: 24px;
    margin-right: 10px;
    font-size: 1.1rem;
}

#sidebar ul li a:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--primary-color);
}

#sidebar ul li.active > a {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text) !important;
}

#sidebar ul li.active > a:hover {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text) !important;
}

/* Main Content Area */
#content {
    width: 100%;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

/* Navbar Customization */
.navbar-custom {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
}

.search-bar {
    max-width: 380px;
    position: relative;
}

.search-bar input {
    border-radius: 20px;
    padding-left: 2.2rem;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Dashboard Metrics Card */
.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card .metric-icon {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    font-size: 2.5rem;
    opacity: 0.15;
    transition: all 0.3s ease;
}

.metric-card:hover .metric-icon {
    transform: scale(1.15);
}

/* Table Style custom */
.table-responsive {
    border: none;
}

.table {
    color: var(--text-main);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    background-color: var(--bg-app) !important;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    vertical-align: middle;
    border-color: var(--border-color);
}

/* Badge styles */
.badge {
    padding: 0.45em 0.8em;
    font-weight: 500;
    border-radius: 6px;
}

/* Dark Mode Theme Switcher button */
.theme-toggle-btn {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    border: none;
    background: none;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.theme-toggle-btn:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--text-main);
}

/* Login styling */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-app);
}

.login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    padding: 2.5rem;
}

/* Responsive sidebar */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -260px;
    }
    #sidebar.active {
        margin-left: 0;
    }
}

/* Kanban Board Styling */
.kanban-board {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    align-items: flex-start;
    min-height: 70vh;
    width: 100%;
}

/* Custom scrollbar styling for board horizontal scrollbar */
.kanban-board::-webkit-scrollbar {
    height: 10px;
}
.kanban-board::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}
.kanban-board::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 6px;
}
.kanban-board::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.kanban-column {
    flex: 0 0 320px;
    background-color: var(--sidebar-hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    box-shadow: var(--shadow-sm);
}

.kanban-column.add-group-column {
    height: 160px;
    max-height: none;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.kanban-column-title {
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    font-size: 1.05rem;
}

.kanban-column-count {
    background-color: var(--border-color);
    color: var(--text-muted);
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.kanban-cards-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 0.25rem;
}

/* Scrollbar styling for cards container */
.kanban-cards-container::-webkit-scrollbar {
    width: 6px;
}
.kanban-cards-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.kanban-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

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

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

.kanban-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.kanban-card-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
}

.kanban-card-badge.has-items {
    color: var(--primary-color);
    font-weight: 600;
}

/* Trello-like Modal Custom Styling */
.trello-modal .modal-content {
    border-radius: 16px;
    border: none;
    background-color: var(--bg-app);
    box-shadow: var(--shadow-lg);
}

.trello-modal .modal-header {
    border-bottom: none;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.trello-modal .modal-title {
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.trello-modal .modal-body {
    padding: 1.5rem;
}

.trello-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.trello-column-header {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.trello-item-block {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.trello-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: rgba(0,0,0,0.04);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    width: 100%;
    padding: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.trello-add-btn:hover {
    background-color: rgba(0,0,0,0.08);
    color: var(--text-main);
    border-color: var(--primary-color);
}

[data-bs-theme="dark"] .trello-add-btn {
    background-color: rgba(255,255,255,0.04);
}
[data-bs-theme="dark"] .trello-add-btn:hover {
    background-color: rgba(255,255,255,0.08);
}

/* Inline form styling */
.trello-inline-form {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
}

.kanban-card.selected-card {
    border-color: #3b82f6 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.btn-add-member-trigger {
    color: #475569 !important;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 8px;
}
.btn-add-member-trigger:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
    color: #1e293b !important;
}

.add-member-inline-form {
    border-color: #e2e8f0 !important;
}

