/*
 * Douglas AI - Pipedrive Inspired Theme
 */

 :root {
    --sidebar-bg: #1c2b39;
    --sidebar-active: #0077ff;
    --sidebar-text: #b1c1d0;
    --bg-main: #f4f7f9;
    --text-primary: #2b3d4d;
    --text-secondary: #6e7d8d;
    --card-bg: #ffffff;
    --primary: #0077ff;
    --primary-hover: #0066dd;
    --border: #e2e6ea;
    --danger: #ff4d4d;
    --success: #24b47e;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Outfit', sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
}

.dashboard-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--sidebar-bg);
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: 64px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.logo-icon {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 600;
    flex-shrink: 0;
}

.logo-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: transform 0.3s;
}

.toggle-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar.collapsed .toggle-btn {
    transform: rotate(180deg);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-btn svg {
    flex-shrink: 0;
}

.nav-btn:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.nav-btn.active {
    color: white;
    background: var(--sidebar-active);
}

.sidebar-footer {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    height: 64px;
    background: white;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

#tab-title {
    font-size: 1.25rem;
    font-weight: 500;
}

.tab-pane {
    display: none;
    padding: 2rem;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.tab-pane.active {
    display: block;
}

/* Kanban & Cards */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.kanban-column {
    background: #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    min-height: 500px;
}

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

.column-header h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.task-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.task-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.task-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Calendar Styling */
.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

#calendar-view {
    display: grid;
    gap: 1rem;
}

.item {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
}

.agenda-day {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(28, 43, 57, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal {
    background: white;
    width: 500px;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-group {
    padding: 1rem 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    background: #e9ecef;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.hidden { display: none !important; }

/* Dashboard Login */
.login-card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.btn-link {
    background: #eef5ff;
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #d0e3ff;
    transition: all 0.2s;
    white-space: nowrap;
}

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

