/* Arayüz Tasarım Sistemi (style.css) */

:root {
    /* Renk Paleti - Premium Koyu Tema */
    --bg-darker: #090d16;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-hover: #4f46e5;
    --accent: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Durum Renkleri */
    --color-todo: #f59e0b;
    --color-todo-glow: rgba(245, 158, 11, 0.15);
    --color-active: #3b82f6;
    --color-active-glow: rgba(59, 130, 246, 0.15);
    --color-review: #ec4899;
    --color-review-glow: rgba(236, 72, 153, 0.15);
    --color-completed: #10b981;
    --color-completed-glow: rgba(16, 185, 129, 0.15);
    
    /* Öncelik Renkleri */
    --priority-low: #64748b;
    --priority-medium: #3b82f6;
    --priority-high: #ef4444;

    /* Arayüz Efektleri */
    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar Özelleştirme */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Ana Konteyner Düzeni */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR (SOL MENÜ - MASAÜSTÜ)
   ========================================================================== */
.sidebar {
    width: 260px;
    background-color: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
    transition: var(--transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px 32px 12px;
}

.brand-icon {
    color: var(--primary);
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px var(--primary));
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

.menu-item i {
    width: 20px;
    height: 20px;
}

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

.menu-item.active {
    color: var(--text-main);
    background-color: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.sidebar-sync-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: auto;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.sidebar-sync-badge.local .badge-dot {
    background-color: var(--color-todo);
    box-shadow: 0 0 8px var(--color-todo);
}

.sidebar-sync-badge.cloud .badge-dot {
    background-color: var(--color-completed);
    box-shadow: 0 0 8px var(--color-completed);
    animation: pulse 2s infinite;
}

.badge-text {
    font-size: 13px;
    font-weight: 500;
}

/* ==========================================================================
   MAIN CONTENT AREA (ANA İÇERİK ALANI)
   ========================================================================== */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px 40px 100px 40px; /* Alttaki mobil menü alanı için pay bıraktık */
    min-height: 100vh;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 10% 85%, rgba(139, 92, 246, 0.03) 0%, transparent 40%);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-title-container h1 {
    font-size: 28px;
    font-weight: 700;
}

.sub-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* ==========================================================================
   BUTTONS (BUTONLAR)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--text-main);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background-color: #ef4444;
    color: white;
}

.flex-btn {
    flex: 1;
}

.link-btn {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.link-btn:hover {
    color: var(--accent);
}

/* ==========================================================================
   VIEWS CONTAINER (SEKMELER)
   ========================================================================== */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

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

/* ==========================================================================
   1. DASHBOARD VIEW (PANEL ÖZETİ)
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-card-hover);
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper i {
    width: 26px;
    height: 26px;
}

.stat-icon-wrapper.todo {
    background-color: var(--color-todo-glow);
    color: var(--color-todo);
}

.stat-icon-wrapper.active {
    background-color: var(--color-active-glow);
    color: var(--color-active);
}

.stat-icon-wrapper.review {
    background-color: var(--color-review-glow);
    color: var(--color-review);
}

.stat-icon-wrapper.completed {
    background-color: var(--color-completed-glow);
    color: var(--color-completed);
}

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

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 4px;
}

.dashboard-details {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.detail-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.main-chart-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.main-chart-card h3 {
    margin-bottom: 24px;
    align-self: flex-start;
}

.progress-circle-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 20px;
}

.progress-circle {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.circle-fg {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2; /* 2 * PI * r (r=40) */
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 1s ease-in-out;
}

.progress-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-circle-text span {
    font-size: 32px;
    font-weight: 700;
}

.progress-circle-text small {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.progress-legend {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.done {
    background-color: var(--primary);
}

.dot.pending {
    background-color: rgba(255, 255, 255, 0.1);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.recent-tasks-card {
    min-height: 280px;
}

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

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.urgent-task-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--priority-high);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.urgent-task-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.urgent-task-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

/* ==========================================================================
   2. KANBAN BOARD VIEW (İŞ PANOSU)
   ========================================================================== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.kanban-column {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px 12px 8px;
    border-bottom: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.column-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.column-dot.todo { background-color: var(--color-todo); }
.column-dot.active { background-color: var(--color-active); }
.column-dot.review { background-color: var(--color-review); }
.column-dot.completed { background-color: var(--color-completed); }

.column-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.column-count {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.kanban-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 50vh;
}

/* Görev Kartı */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: grab;
    transition: var(--transition);
    user-select: none;
}

.task-card:active {
    cursor: grabbing;
}

.task-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-main);
}

.card-priority-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
    margin-bottom: 10px;
}

.card-priority-badge.low { background: rgba(100, 116, 139, 0.15); color: var(--priority-low); }
.card-priority-badge.medium { background: rgba(59, 130, 246, 0.15); color: var(--priority-medium); }
.card-priority-badge.high { background: rgba(239, 68, 68, 0.15); color: var(--priority-high); }

.task-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.task-card p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-image-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

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

.card-assignee {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.avatar-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.card-due {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

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

.card-due.overdue {
    color: var(--priority-high);
}

/* Sürükleme Sırasındaki Pano Boşluk Efektleri */
.kanban-cards-container.drag-over {
    background-color: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
}

/* Mobil için Durum Değiştirme Butonları (Kart içi) */
.mobile-card-actions {
    display: none;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

.btn-card-move {
    flex: 1;
    padding: 6px;
    font-size: 11px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 500;
}

.btn-card-move:hover {
    background: var(--primary-glow);
}

/* ==========================================================================
   3. TASK LIST VIEW (GÖREV TABLOSU)
   ========================================================================== */
.list-filters-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-box input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 12px 16px 12px 42px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.filters-flex {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filters-flex select {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    min-width: 160px;
}

.filters-flex select:focus {
    border-color: var(--primary);
}

.tasks-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.tasks-table th,
.tasks-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.tasks-table th {
    background-color: rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
}

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

.tasks-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

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

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.status-badge.todo { background: var(--color-todo-glow); color: var(--color-todo); }
.status-badge.in_progress { background: var(--color-active-glow); color: var(--color-active); }
.status-badge.review { background: var(--color-review-glow); color: var(--color-review); }
.status-badge.completed { background: var(--color-completed-glow); color: var(--color-completed); }

.table-priority-dot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.priority-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.priority-indicator.low { background-color: var(--priority-low); }
.priority-indicator.medium { background-color: var(--priority-medium); }
.priority-indicator.high { background-color: var(--priority-high); }

.table-actions {
    display: flex;
    gap: 8px;
}

.action-btn-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn-circle:hover {
    background: var(--primary-glow);
    color: var(--text-main);
    border-color: var(--primary);
}

.action-btn-circle.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.action-btn-circle i {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   4. PERSONNEL VIEW (PERSONEL YÖNETİMİ)
   ========================================================================= */
.personnel-grid-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: start;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.color-option {
    height: 38px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: var(--transition);
}

.color-option input {
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.color-option:has(input:checked) {
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.personnel-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.personnel-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.personnel-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.personnel-info-flex {
    display: flex;
    align-items: center;
    gap: 16px;
}

.personnel-avatar-large {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.personnel-meta h4 {
    font-size: 16px;
    font-weight: 600;
}

.personnel-meta p {
    color: var(--text-muted);
    font-size: 13px;
}

.personnel-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tasks-count-badge {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* ==========================================================================
   5. SETTINGS VIEW (BAĞLANTI AYARLARI)
   ========================================================================== */
.settings-card {
    max-width: 650px;
    margin: 0 auto;
}

.settings-header {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.settings-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary));
}

.settings-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.toggle-label {
    font-weight: 600;
    font-size: 15px;
}

/* Switch Slider */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.disabled-form {
    opacity: 0.5;
    pointer-events: none;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.sync-status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.sync-status-box.success {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-completed);
}

.sync-status-box.error {
    background-color: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.sync-status-box.loading {
    background-color: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--color-active);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.sync-status-box.success .status-indicator { background-color: var(--color-completed); }
.sync-status-box.error .status-indicator { background-color: #ef4444; }
.sync-status-box.loading .status-indicator { 
    background-color: var(--color-active);
    animation: pulse 1s infinite alternate;
}

.sql-help-card {
    margin-top: 24px;
    padding: 16px;
    background-color: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.6;
}

.sql-help-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sql-help-card h4 i {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.sql-help-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   MODAL DIALOG (AÇILIR PENCERELER)
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-sm {
    max-width: 420px;
}

@keyframes modalSlideUp {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Modal Görsel Ekleme Alanı */
.task-image-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.task-image-section label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.image-preview-box {
    height: 180px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
    transition: var(--transition);
}

.image-preview-box:has(img:not(.hidden)) {
    border-style: solid;
    border-color: var(--border-color);
}

.placeholder-icon {
    width: 44px;
    height: 44px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 8px;
}

.placeholder-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.btn-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.btn-remove-image:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.image-actions-buttons {
    display: flex;
    gap: 12px;
}

/* ==========================================================================
   CANLI KAmera (WEB CANLI AKIŞ) TASARIMI
   ========================================================================== */
.camera-stream-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    background: black;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

#webcam-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Ayna görüntüsü */
}

.camera-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   TOAST NOTIFICATION (BİLDİRİM BALONLARI)
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-main);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 380px;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: var(--transition);
}

.toast.hiding {
    animation: toastSlideOut 0.3s forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toast-success { border-left: 4px solid var(--color-completed); }
.toast-success .toast-icon { color: var(--color-completed); }

.toast-error { border-left: 4px solid #ef4444; }
.toast-error .toast-icon { color: #ef4444; }

.toast-info { border-left: 4px solid var(--color-active); }
.toast-info .toast-icon { color: var(--color-active); }

/* ==========================================================================
   MOBILE NAVIGATION BAR & RESPONSIVE DESIGN (MOBİL UYUM)
   ========================================================================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    z-index: 99;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.4);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.mobile-nav-item i {
    width: 20px;
    height: 20px;
}

.mobile-nav-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

/* ==========================================================================
   ANİMASYONLAR VE EK DÜZENLEMELER
   ========================================================================== */
@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.2); opacity: 0; }
}

.hidden {
    display: none !important;
}

.hidden-element {
    display: none !important;
}

/* ==========================================================================
   MEDYA SORGULARI (BREAKPOINTS)
   ========================================================================== */

/* 1024px Altı - Tablet ve Altı Ekranlar */
@media (max-width: 1024px) {
    .sidebar {
        display: none; /* Yan menüyü gizliyoruz */
    }
    
    .main-content {
        margin-left: 0;
        padding: 24px 20px 90px 20px;
    }
    
    .mobile-nav {
        display: flex; /* Alt menüyü gösteriyoruz */
    }

    .kanban-board {
        grid-template-columns: repeat(2, 1fr); /* Kanbana 2 sütun veriyoruz */
    }

    .dashboard-details {
        grid-template-columns: 1fr; /* İstatistikler tek sütun */
    }
}

/* 768px Altı - Mobil Dikey */
@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions button {
        width: 100%;
    }

    .personnel-grid-layout {
        grid-template-columns: 1fr; /* Personel formu ve listesi tek sütun */
    }

    .list-filters-card {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
        min-width: 0;
    }

    .filters-flex {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .filters-flex select {
        width: 100%;
        min-width: 0;
        padding: 10px;
    }
    
    .filters-flex select:first-child {
        grid-column: span 2; /* Personel filtresi en geniş yer kaplasın */
    }

    .tasks-table-container {
        border: none;
        background: transparent;
    }

    .tasks-table thead {
        display: none; /* Mobilde tablo başlıklarını gizle, kart tasarımı yap */
    }

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

    .tasks-table tr {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        padding: 12px;
    }

    .tasks-table td {
        border: none;
        padding: 6px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 13px;
    }

    .tasks-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
    }

    .tasks-table td.actions-col {
        justify-content: flex-end;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* 480px Altı - Küçük Mobil Ekranlar */
@media (max-width: 480px) {
    .kanban-board {
        grid-template-columns: 1fr; /* Kanban tek sütuna düşüyor */
    }

    .mobile-card-actions {
        display: flex; /* Mobilde sürükleme yerine kolay butonları göster */
    }

    .form-row {
        grid-template-columns: 1fr; /* Formlarda yan yana olan kutuları alt alta getir */
    }

    .image-actions-buttons {
        flex-direction: column; /* Kamera aksiyon butonlarını alt alta al */
    }

    .settings-actions {
        flex-direction: column;
    }

    .settings-actions button {
        width: 100%;
    }
}
