/* ============================================
   CRM Rendszer - Elegant Design System
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fb;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 0.875rem; }

/* --- CSS Variables --- */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-bg: rgba(99,102,241,0.08);
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #3b82f6;
    --info-light: #eff6ff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Login Page --- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fb 0%, #eef2ff 100%);
    padding: 1.5rem;
}
.login-container { width: 100%; max-width: 420px; }
.login-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    text-align: center;
}
.login-icon {
    width: 56px; height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    color: var(--primary);
}
.login-card h1 { font-size: 1.375rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.375rem; }
.login-subtitle { font-size: 0.875rem; color: var(--gray-500); margin-bottom: 1.75rem; }
.login-form { text-align: left; }
.login-form .form-group { margin-bottom: 1rem; }

/* --- Alerts --- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    font-weight: 500;
}
.alert-error { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239,68,68,0.15); }
.alert-success { background: var(--success-light); color: #059669; border: 1px solid rgba(16,185,129,0.15); }

/* --- Forms --- */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--gray-800);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    transition: all var(--transition);
    line-height: 1.4;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-danger:hover { background: #fee2e2; }
.btn-success { background: var(--success-light); color: #059669; }
.btn-success:hover { background: #d1fae5; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon {
    width: 32px; height: 32px;
    padding: 0; justify-content: center;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--gray-400);
    transition: all var(--transition);
}
.btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }
.btn-icon.danger:hover { background: var(--danger-light); color: var(--danger); }

/* --- App Layout --- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
}
.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    border-bottom: 1px solid var(--gray-100);
}
.sidebar-toggle {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--gray-500);
    transition: all var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--gray-100); color: var(--gray-700); }
.sidebar-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); white-space: nowrap; }
.sidebar-nav {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 450;
    color: var(--gray-600);
    transition: all var(--transition);
    margin-bottom: 2px;
}
.nav-item:hover { background: var(--gray-50); color: var(--gray-800); }
.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 500;
}
.nav-item.active svg { color: var(--primary); }
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-100);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
}
.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8125rem; font-weight: 600;
    flex-shrink: 0;
}
.user-details { min-width: 0; }
.user-name { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--gray-800); }
.user-role { display: block; font-size: 0.6875rem; color: var(--gray-400); }
.logout-btn { color: var(--danger) !important; }
.logout-btn:hover { background: var(--danger-light) !important; }

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
    transition: margin-left var(--transition);
}

/* --- Mobile Header --- */
.mobile-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    z-index: 90;
}
.mobile-menu-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: transparent;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
}
.mobile-title { font-size: 0.875rem; font-weight: 600; }
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
}

/* --- Page Header --- */
.page-header {
    margin-bottom: 1.5rem;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--gray-900);
}
.page-header p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}
.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- Cards --- */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-body { padding: 1.25rem; }
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-title svg { color: var(--gray-400); width: 16px; height: 16px; }

/* --- Stats Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.stat-card-inner { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 0.8125rem; color: var(--gray-500); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); margin-top: 0.25rem; }
.stat-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.stat-icon.green { background: #ecfdf5; color: #10b981; }
.stat-icon.purple { background: #f5f3ff; color: #8b5cf6; }
.stat-icon.red { background: #fef2f2; color: #ef4444; }

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid transparent;
}
.status-waiting { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-progress { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.status-done { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.priority-normal { background: var(--gray-100); color: var(--gray-600); border-color: var(--gray-200); }
.priority-high { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.badge-project-active { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.badge-project-done { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.badge-project-paused { background: #fef3c7; color: #92400e; border-color: #fde68a; }

/* --- Toolbar --- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    background: white;
    color: var(--gray-700);
    outline: none;
    min-width: 150px;
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.search-input {
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 0.75rem center;
    outline: none;
    min-width: 200px;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

/* --- View Toggle --- */
.view-toggle {
    display: flex;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.view-toggle button {
    width: 36px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: none;
    background: white;
    color: var(--gray-400);
    transition: all var(--transition);
}
.view-toggle button:not(:last-child) { border-right: 1px solid var(--gray-200); }
.view-toggle button.active { background: var(--primary-bg); color: var(--primary); }
.view-toggle button:hover:not(.active) { background: var(--gray-50); color: var(--gray-600); }

/* --- Tables --- */
.table-wrapper { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}
tbody tr:hover { background: var(--gray-50); }
tbody tr.high-priority { background: rgba(239,68,68,0.03); }
tbody tr.high-priority:hover { background: rgba(239,68,68,0.06); }
.td-actions { display: flex; gap: 0.25rem; }
.td-truncate { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-link { color: var(--primary); font-weight: 500; cursor: pointer; }
.td-link:hover { text-decoration: underline; }
.priority-icon { color: var(--warning); font-size: 1.125rem; }

/* --- Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.item-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    cursor: default;
}
.item-card:hover { box-shadow: var(--shadow); border-color: var(--gray-300); }
.item-card.high-priority { border-left: 3px solid var(--warning); }
.item-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.75rem; }
.item-card-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); }
.item-card-subtitle { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.25rem; }
.item-card-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.item-card-notes { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Progress Bar --- */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.progress-track {
    flex: 1;
    height: 6px;
    background: var(--gray-100);
    border-radius: 999px;
    overflow: hidden;
    min-width: 60px;
}
.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--primary);
    transition: width 0.3s ease;
}
.progress-fill.complete { background: var(--success); }
.progress-text { font-size: 0.6875rem; color: var(--gray-500); white-space: nowrap; }

/* ============================================
   KANBAN BOARD
   ============================================ */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    min-height: 400px;
}
.kanban-column {
    min-width: 300px;
    flex: 1;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}
.kanban-column-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
}
.kanban-column-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kanban-column-count {
    font-size: 0.6875rem;
    background: var(--gray-200);
    color: var(--gray-600);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
}
.kanban-column-body {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.kanban-column-body.drag-over {
    background: var(--primary-light);
    border: 2px dashed var(--primary);
    border-radius: 0 0 var(--radius) var(--radius);
}
.kanban-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.875rem;
    cursor: grab;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover { box-shadow: var(--shadow); border-color: var(--gray-300); }
.kanban-card.dragging { opacity: 0.5; transform: rotate(2deg); }
.kanban-card.high-priority { border-left: 3px solid var(--warning); }
.kanban-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.5rem; }
.kanban-card-type { font-size: 0.8125rem; font-weight: 500; color: var(--gray-800); }
.kanban-card-company { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.125rem; }
.kanban-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.625rem; }
.kanban-card-actions { display: flex; gap: 0.25rem; }
.kanban-card-notes { font-size: 0.6875rem; color: var(--gray-400); margin-top: 0.375rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Kanban Color Indicators --- */
.kanban-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.kanban-dot.waiting { background: #f59e0b; }
.kanban-dot.progress { background: #3b82f6; }
.kanban-dot.done { background: #10b981; }
.kanban-dot.active { background: #3b82f6; }
.kanban-dot.paused { background: #f59e0b; }
.kanban-dot.finished { background: #10b981; }

/* --- Modal / Dialog --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(2px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 600; color: var(--gray-800); }
.modal-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: transparent;
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    transition: all var(--transition);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* --- Empty State --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}
.empty-state svg { color: var(--gray-300); margin-bottom: 1rem; }
.empty-state p { color: var(--gray-500); font-size: 0.875rem; margin-bottom: 1rem; }

/* --- Tabs --- */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.25rem;
    gap: 0;
}
.tab-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}
.tab-btn:hover { color: var(--gray-700); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* --- Activity Timeline --- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 0.375rem;
    flex-shrink: 0;
}
.timeline-content { min-width: 0; flex: 1; }
.timeline-text { font-size: 0.8125rem; color: var(--gray-700); }
.timeline-date { font-size: 0.6875rem; color: var(--gray-400); margin-top: 0.25rem; }

/* --- Two-column layout --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* --- Back Link --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    transition: color var(--transition);
}
.back-link:hover { color: var(--primary); }

/* --- Contact Cards --- */
.contact-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}
.contact-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8125rem; font-weight: 600;
    flex-shrink: 0;
}
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); }
.contact-detail { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.125rem; }
.contact-actions { display: flex; gap: 0.25rem; }

/* --- Import Zone --- */
.import-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
}
.import-zone:hover { border-color: var(--primary); background: var(--primary-light); }
.import-zone svg { color: var(--gray-400); margin-bottom: 0.75rem; }
.import-zone p { font-size: 0.875rem; color: var(--gray-500); }
.import-zone .hint { font-size: 0.75rem; color: var(--gray-400); margin-top: 0.375rem; }

/* --- Toast --- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}
.toast.success { background: #059669; color: white; }
.toast.error { background: var(--danger); color: white; }
.toast.info { background: var(--info); color: white; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- Loading Spinner --- */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .mobile-header { display: flex; }
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: calc(56px + 1rem);
    }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: 1fr; }
    .kanban-board { flex-direction: column; }
    .kanban-column { min-width: 100%; max-height: none; }
    .form-row { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-right { margin-left: 0; justify-content: flex-end; }
    .page-header-row { flex-direction: column; }
    .filter-select, .search-input { width: 100%; min-width: auto; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .modal { margin: 0.5rem; max-height: 95vh; }
}
