/* style.css - Deep Purple SaaS Theme */
:root {
    /* Colors - Dark Purple/Magenta Theme based on Image */
    --bg-main: #2a1645;
    --bg-sidebar: rgba(35, 18, 55, 0.6);
    --bg-card: rgba(50, 25, 80, 0.4);
    
    --text-main: #ffffff;
    --text-muted: #bfafe3;
    
    --primary: #c33fc7; /* Magenta from Mind logo */
    --primary-hover: #d253d6;
    --primary-light: rgba(195, 63, 199, 0.25);
    --primary-text: #fbb6fd;
    
    --success: #2bc2d5; /* Cyan from logo */
    --success-light: rgba(43, 194, 213, 0.25);
    --success-text: #8bf0fc;
    
    --warning: #fb923c;
    --warning-light: rgba(251, 146, 60, 0.25);
    --warning-text: #fdba74;
    
    --danger: #f43f5e;
    --danger-light: rgba(244, 63, 94, 0.25);
    --danger-text: #fda4af;
    
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    
    --glass-blur: blur(12px);
    
    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
    
    --font-family: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    /* Mimicking the image gradient */
    background: radial-gradient(circle at top right, #4c2d73 0%, #291546 50%, #170d2b 100%);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    /* Adding subtle circles background effect */
    background-image: radial-gradient(circle at 75% 15%, rgba(255,255,255,0.02) 1%, transparent 1.5%), 
                      radial-gradient(circle at 75% 15%, rgba(255,255,255,0.01) 2%, transparent 2.5%),
                      radial-gradient(circle at 75% 15%, rgba(255,255,255,0.01) 3%, transparent 3.5%);
    background-size: 100% 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    color: var(--success); /* Cyan icon to match the image accent */
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 8px var(--success-light));
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
    background: linear-gradient(90deg, #A881E6, #2BC2D5);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-text);
    box-shadow: inset 0 0 0 1px rgba(195, 63, 199, 0.3);
}

.sidebar-footer {
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--border-color);
}

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

/* Topbar */
.topbar {
    height: 70px;
    background-color: rgba(30, 15, 50, 0.4);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 5;
    box-shadow: var(--shadow-sm);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-full);
    width: 350px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-bar:focus-within {
    border-color: var(--primary);
    background-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 10px var(--primary-light);
}

.search-bar i {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 0.5rem;
    width: 100%;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
}
.search-bar input::placeholder {
    color: rgba(255,255,255,0.4);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    border: 2px solid #231238;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.user-profile:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

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

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

/* UI Components */

/* Stat Card (Glassmorphism) */
.stat-card {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.875rem;
    box-shadow: 0 4px 10px rgba(195, 63, 199, 0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(195, 63, 199, 0.5);
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.action-btn:hover {
    color: var(--success);
    background-color: var(--success-light);
}
.text-danger:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

/* Tables */
.table-container {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.data-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.1);
}
.status-aktif { background-color: var(--success-light); color: var(--success-text); border-color: var(--success); }
.status-beklemede { background-color: var(--warning-light); color: var(--warning-text); border-color: var(--warning); }
.status-pasif { background-color: var(--danger-light); color: var(--danger-text); border-color: var(--danger); }

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    height: calc(100vh - 200px);
    align-items: flex-start;
}

.kanban-column {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    width: 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    border: 1px solid var(--border-color);
}

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

.kanban-header h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
}

.kanban-count {
    background-color: rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.kanban-cards {
    padding: 0 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.kanban-card {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    cursor: grab;
    transition: var(--transition);
}

.kanban-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    border-color: var(--primary);
    transform: translateY(-2px);
}

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

.card-client {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.75rem;
}

.card-value {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--success-text);
}

/* Tasks */
.task-list {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.task-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.task-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.task-checkbox {
    margin-right: 1rem;
    padding-top: 0.2rem;
}

.task-checkbox input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    display: block;
    margin-bottom: 0.35rem;
    transition: color 0.3s ease;
}

.task-done .task-title {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.3);
}

.task-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    align-items: center;
}

.task-due {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-due i {
    width: 12px;
    height: 12px;
}

.task-priority {
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.1);
}

.priority-yüksek { background-color: var(--danger-light); color: var(--danger-text); border-color: var(--danger); }
.priority-orta { background-color: var(--warning-light); color: var(--warning-text); border-color: var(--warning); }
.priority-düşük { background-color: var(--success-light); color: var(--success-text); border-color: var(--success); }

/* Scrollbar customization for dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --- YENİ SIDEBAR MENU AGACI STILLERI --- */

.sidebar-user-profile {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}
.sidebar-user-profile:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.user-avatar-initials {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    color: #fff;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: #22c55e;
    border: 2px solid var(--bg-sidebar);
    border-radius: 50%;
}
.user-info-sidebar {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.user-name-sidebar {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}
.user-company-sidebar {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.dropdown-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}
.nav-badge {
    background-color: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
    margin-left: auto;
}

/* Nav Groups */
.nav-group {
    margin-top: 0.5rem;
}
.nav-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.02);
}
.nav-group-toggle {
    transition: transform 0.3s ease;
}
.nav-group-items {
    display: flex;
    flex-direction: column;
}
.nav-group-items .nav-item {
    border-radius: 0;
    padding-left: 2.75rem; /* Hierarchy indent */
    font-size: 0.85rem;
}
/* Purple active state (From User Image) */
.nav-group-items .nav-item.active {
    background-color: #8b5cf6; 
    color: white;
    box-shadow: none;
}

/* --- Modal (Popup) Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 650px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 0.25rem;
}
.close-modal-btn:hover {
    color: var(--danger);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* --- ZEN MODE --- */
body.zen-mode .sidebar {
    display: none !important;
}
body.zen-mode .topbar {
    display: none !important;
}
body.zen-mode .page-content {
    padding-top: 1rem;
    height: 100vh;
}
body.zen-mode .app-container {
    background-image: none;
    background: #0f081c; 
}

/* --- COMMAND PALETTE --- */
.cmd-item:hover {
    background: rgba(255,255,255,0.05);
}

/* --- Form Groups (Modal Forms) --- */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.form-control {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
    background-color: rgba(0, 0, 0, 0.4);
}
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Select specific styling */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23bfafe3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}
select.form-control option {
    background-color: var(--bg-main);
    color: var(--text-main);
}
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

.form-row {
    display: flex;
    gap: 1rem;
}
.form-row .form-group {
    flex: 1;
}

/* Secondary Button Support */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.875rem;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}





