/* BEÜ Ders Çizelgeleme — Dashboard Stilleri */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-input: rgba(15, 23, 42, 0.7);
    --border: rgba(255,255,255,0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-teal: #14b8a6;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius: 10px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header .logo-icon {
    width: 40px; height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-header .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-header h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

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

.nav-item.active {
    background: rgba(59,130,246,0.15);
    color: var(--accent-blue);
}

.nav-icon { font-size: 18px; }

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

.logout-btn {
    width: 100%;
    padding: 10px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(239,68,68,0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
}

.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar h1 {
    font-size: 18px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.content-area { padding: 24px 28px; }

/* Tab system */
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

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

/* Stats Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.stat-icon {
    font-size: 32px;
    width: 56px; height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.blue .stat-icon { background: rgba(59,130,246,0.15); }
.stat-card.green .stat-icon { background: rgba(16,185,129,0.15); }
.stat-card.purple .stat-icon { background: rgba(139,92,246,0.15); }
.stat-card.orange .stat-icon { background: rgba(245,158,11,0.15); }
.stat-card.teal .stat-icon { background: rgba(20,184,166,0.15); }

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.stat-card.blue .stat-number { color: var(--accent-blue); }
.stat-card.green .stat-number { color: var(--accent-green); }
.stat-card.purple .stat-number { color: var(--accent-purple); }
.stat-card.orange .stat-number { color: var(--accent-orange); }
.stat-card.teal .stat-number { color: var(--accent-teal); }

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Tab Header */
.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.tab-header h2 { font-size: 20px; font-weight: 600; }

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

/* Buttons */
.btn {
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}
.btn-primary:hover { background: #2563eb; }

.btn-success {
    background: var(--accent-green);
    color: white;
}
.btn-success:hover { background: #059669; }

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

/* Forms */
.add-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    animation: fadeIn 0.2s ease;
}

.form-input {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    min-width: 160px;
    transition: border-color 0.2s;
}

.form-input:focus { border-color: var(--accent-blue); }
.form-input::placeholder { color: var(--text-muted); }

select.form-input { cursor: pointer; }
select.form-input option { background: var(--bg-secondary); color: var(--text-primary); }

/* Data Table */
.data-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.data-table thead { background: rgba(255,255,255,0.03); }

.data-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 14px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-secondary);
}

.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.data-table input[type="checkbox"] {
    width: 16px; height: 16px;
    cursor: pointer;
    accent-color: var(--accent-blue);
}

/* Hoca dropdown in table */
.hoca-select {
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    min-width: 180px;
}

.hoca-select option { background: var(--bg-secondary); }

/* Import */
.import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
}

.import-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.import-card h3 { font-size: 16px; margin-bottom: 10px; }
.import-card p { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; line-height: 1.6; }
.import-card code {
    background: rgba(59,130,246,0.1);
    color: var(--accent-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.file-input {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    background: var(--bg-input);
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.import-result {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
}

.import-result.success {
    display: block;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    color: #6ee7b7;
}

.import-result.error {
    display: block;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: #fca5a5;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: rgba(16,185,129,0.95);
    color: white;
    box-shadow: 0 8px 24px rgba(16,185,129,0.3);
}

.toast.error {
    background: rgba(239,68,68,0.95);
    color: white;
    box-shadow: 0 8px 24px rgba(239,68,68,0.3);
}

.toast.warning {
    background: rgba(245,158,11,0.95);
    color: white;
    box-shadow: 0 8px 24px rgba(245,158,11,0.3);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .import-grid { grid-template-columns: 1fr; }
}

/* Schedule Block (merged consecutive hours) */
.schedule-block {
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: default;
}

.schedule-block:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 10;
}

.schedule-block .block-badge {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
    opacity: 0.8;
}

.schedule-block .hoca-link {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: opacity 0.2s;
}

.schedule-block .hoca-link:hover {
    opacity: 0.7;
}

/* Hoca Detail Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: none;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show { display: block; }

.hoca-modal {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 520px;
    max-width: 90vw;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 501;
    display: none;
    animation: slideIn 0.3s ease;
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0,0,0,0.3);
}

.hoca-modal.show { display: block; }

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

.modal-close {
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(239,68,68,0.15);
    color: var(--accent-red);
    border-color: rgba(239,68,68,0.3);
}

.modal-body { padding: 24px; }

.modal-section {
    margin-bottom: 24px;
}

.modal-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin: 0 6px 6px 0;
}

/* Hoca Cards Grid */
.hoca-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.hoca-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.hoca-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.hoca-card.selected {
    border-color: var(--accent-green);
    background: rgba(16,185,129,0.05);
}

.hoca-card .card-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.hoca-card .card-unvan {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.hoca-card .card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hoca-card .card-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* PDF Button */
.btn-pdf {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}
.btn-pdf:hover { background: linear-gradient(135deg, #dc2626, #b91c1c); }

/* Print */
@media print {
    .sidebar, .topbar, .add-form, .tab-actions, #cizelge-stats,
    .btn, .toast, .modal-overlay, .hoca-modal { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
    .data-table-container { border: 1px solid #ccc; }
    .data-table th, .data-table td { color: #333 !important; border-color: #ccc !important; }
    .schedule-block { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    body { background: white; color: #333; }
}

/* ============ ARALI LİSTE (ARANABİLİR AÇILIR LİSTE) ============ */
.arali-liste {
    position: relative;
    width: 100%;
}

.arali-liste-kapali {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.arali-liste-kapali:focus { outline: none; border-color: var(--accent-blue); }

.arali-liste-etiket {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arali-liste-etiket.arali-liste-placeholder { color: var(--text-muted); }

.arali-liste-ok {
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

.arali-liste-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    z-index: 50;
    padding: 8px;
    box-sizing: border-box;
}

.arali-liste-ara {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.arali-liste-secenekler {
    max-height: 240px;
    overflow-y: auto;
}

.arali-liste-secenek {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.arali-liste-secenek:hover { background: var(--bg-input); }

.arali-liste-secenek-aktif { color: var(--accent-blue); font-weight: 600; }

.arali-liste-sonuc-yok {
    padding: 8px 12px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}
