/* ============================================================
   Sürücü Kursu Yönetim Sistemi - Ana Stil Dosyası
   Primary: #f57c00 | Secondary: #ff9800
   ============================================================ */

:root {
    --primary:      #f57c00;
    --primary-dark: #e65100;
    --primary-light:#fff3e0;
    --secondary:    #ff9800;
    --bg:           #ffffff;
    --light-gray:   #f5f5f5;
    --border:       #e0e0e0;
    --text-dark:    #333333;
    --text-muted:   #757575;
    --sidebar-w:    260px;
    --topbar-h:     60px;
    --shadow:       0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg:    0 4px 20px rgba(0,0,0,0.12);
    --radius:       8px;
    --radius-lg:    12px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--light-gray);
    margin: 0;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: none; }

h1,h2,h3,h4,h5,h6 { font-weight: 600; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: var(--topbar-h);
}

.sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-brand .brand-icon i {
    color: #fff;
    font-size: 18px;
}

.sidebar-brand .brand-text {
    overflow: hidden;
}

.sidebar-brand .brand-text h6 {
    color: #fff;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.sidebar-brand .brand-text small {
    color: rgba(255,255,255,0.45);
    font-size: 10px;
}

/* Sidebar menü */
.sidebar-menu {
    flex: 1;
    padding: 12px 0;
    list-style: none;
    margin: 0;
}

.sidebar-menu .menu-label {
    padding: 12px 20px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    gap: 10px;
}

.sidebar-menu li a:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    text-decoration: none;
}

.sidebar-menu li a.active {
    background: rgba(245,124,0,0.15);
    color: var(--secondary);
    border-left-color: var(--primary);
}

.sidebar-menu li a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-menu li a .badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 7px;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    transition: color 0.2s;
}

.sidebar-footer a:hover { color: var(--primary); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow);
    gap: 12px;
}

.topbar-left { flex: 1; display: flex; align-items: center; gap: 12px; }

.topbar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.topbar-toggle:hover { background: var(--light-gray); }

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.topbar-right { display: flex; align-items: center; gap: 8px; }

/* Bildirim zili */
.topbar-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-gray);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 15px;
    transition: all 0.2s;
}
.topbar-icon-btn:hover { background: var(--primary-light); color: var(--primary); }
.topbar-icon-btn .notif-count {
    position: absolute;
    top: -2px; right: -2px;
    background: #e53935;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Kullanıcı avatar */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 20px;
    transition: background 0.2s;
}
.topbar-user:hover { background: var(--light-gray); }

.topbar-user .avatar {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.topbar-user .user-info .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
}
.topbar-user .user-info .role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
    padding: 24px;
    flex: 1;
}

/* Sayfa başlığı */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.page-header .breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    font-size: 12px;
}

.page-header .breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ============================================================
   KARTLAR
   ============================================================ */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-header h5, .card-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.card-body { padding: 20px; }
.card-footer { background: #fff; border-top: 1px solid var(--border); padding: 12px 20px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* İstatistik kartları */
.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}
.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: #43a047; }
.stat-card.info::before    { background: #1e88e5; }
.stat-card.warning::before { background: #fb8c00; }
.stat-card.danger::before  { background: #e53935; }
.stat-card.purple::before  { background: #8e24aa; }

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-card.primary .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card.success .stat-icon { background: #e8f5e9; color: #43a047; }
.stat-card.info .stat-icon    { background: #e3f2fd; color: #1e88e5; }
.stat-card.warning .stat-icon { background: #fff3e0; color: #fb8c00; }
.stat-card.danger .stat-icon  { background: #ffebee; color: #e53935; }
.stat-card.purple .stat-icon  { background: #f3e5f5; color: #8e24aa; }

.stat-card .stat-info {}
.stat-card .stat-info .stat-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-dark);
}
.stat-card .stat-info .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.stat-card .stat-info .stat-trend {
    font-size: 11px;
    margin-top: 2px;
}

/* ============================================================
   TABLOLAR
   ============================================================ */
.table-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-card .table-toolbar {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: #fff;
}

.table-card .table-toolbar h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.table { margin: 0; }
.table thead th {
    background: var(--light-gray);
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    white-space: nowrap;
}

.table tbody tr {
    transition: background 0.15s;
}
.table tbody tr:hover { background: #fafafa; }
.table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    border-color: var(--border);
    font-size: 13.5px;
}

/* ============================================================
   FORMLAR
   ============================================================ */
.form-control, .form-select {
    border-color: var(--border);
    border-radius: 8px;
    font-size: 13.5px;
    padding: 8px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245,124,0,0.15);
    outline: none;
}

label { font-weight: 600; font-size: 12.5px; color: var(--text-dark); margin-bottom: 5px; }

.form-group { margin-bottom: 18px; }

.required::after { content: ' *'; color: #e53935; }

/* ============================================================
   BUTONLAR
   ============================================================ */
.btn {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,124,0,0.35);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

.btn-action {
    width: 30px; height: 30px;
    padding: 0;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* ============================================================
   BADGE
   ============================================================ */
.badge {
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
}

/* ============================================================
   ARAMA KUTUSU
   ============================================================ */
.search-box {
    position: relative;
    min-width: 200px;
}
.search-box input {
    padding-left: 34px;
    background: var(--light-gray);
    border-color: transparent;
}
.search-box input:focus { background: #fff; }
.search-box .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-bar select, .filter-bar input {
    font-size: 12.5px;
    padding: 6px 10px;
    height: auto;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-header {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header .close { color: #fff; opacity: 0.8; }
.modal-header .close:hover { opacity: 1; }
.modal-title { font-weight: 700; font-size: 15px; }
.modal-content { border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar-sm {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-md {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================
   HAZIRLIK DURUMU
   ============================================================ */
.readiness-ready {
    color: #43a047;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.readiness-warning {
    color: #fb8c00;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ============================================================
   TAKVİM (Direksiyon Dersleri)
   ============================================================ */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.calendar-day {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px;
    min-height: 80px;
    background: #fff;
}
.calendar-day.today { border-color: var(--primary); background: var(--primary-light); }
.calendar-day.other-month { background: var(--light-gray); opacity: 0.6; }
.calendar-day .day-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.calendar-day.today .day-num { color: var(--primary); }
.calendar-event {
    background: var(--primary);
    color: #fff;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 10px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.calendar-event.completed { background: #43a047; }
.calendar-event.cancelled { background: #e53935; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress { height: 6px; border-radius: 10px; background: var(--light-gray); }
.progress-bar { border-radius: 10px; background: var(--primary); }

/* ============================================================
   GİRİŞ SAYFASI
   ============================================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    width: 64px; height: 64px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 12px;
}

.login-logo h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    text-align: center;
}

.login-logo p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.page-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 14px 24px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================================
   TIMELINE (Kursiyer detay)
   ============================================================ */
.timeline {
    position: relative;
    padding-left: 24px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    margin-bottom: 16px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px; top: 4px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary);
}
.timeline-item .time { font-size: 11px; color: var(--text-muted); }
.timeline-item .content { font-size: 13px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .sidebar-overlay.show { display: block; }
}

@media (max-width: 767px) {
    .page-content { padding: 16px; }
    .topbar { padding: 0 16px; }
    .stat-card .stat-info .stat-number { font-size: 22px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .table-card .table-toolbar { flex-direction: column; align-items: flex-start; }
    .calendar-grid { grid-template-columns: repeat(7, 1fr); }
}

/* ============================================================
   YARDIMCI SINIFLAR
   ============================================================ */
.text-primary { color: var(--primary) !important; }
.bg-primary { background: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.cursor-pointer { cursor: pointer; }

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.no-data i { font-size: 40px; margin-bottom: 10px; opacity: 0.3; }
.no-data p { font-size: 14px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--light-gray); }
::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
