/* ============================================================
   style.css — Özel Stil Dosyası
   Otobüs Terminali Yönetim Sistemi
   ============================================================ */

/* ─────────────────────────────────────────────────────────
   DEĞİŞKENLER & TEMEL
   ───────────────────────────────────────────────────────── */
:root {
    --otys-primary:     #1a56db;
    --otys-primary-dk:  #1048c8;
    --otys-secondary:   #64748b;
    --otys-success:     #059669;
    --otys-warning:     #d97706;
    --otys-danger:      #dc2626;
    --otys-info:        #0891b2;

    --otys-bg:          #f1f5f9;
    --otys-sidebar-bg:  #1e293b;
    --otys-sidebar-w:   240px;
    --otys-navbar-h:    56px;
    --otys-footer-h:    46px;

    --otys-text:        #1e293b;
    --otys-text-muted:  #64748b;
    --otys-border:      #e2e8f0;
    --otys-card-bg:     #ffffff;
    --otys-radius:      .5rem;
    --otys-shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --otys-shadow-md:   0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

*,::before,::after { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: .9rem;
    background: var(--otys-bg);
    color: var(--otys-text);
    overflow-x: hidden;
}

/* ─────────────────────────────────────────────────────────
   NAVBAR
   ───────────────────────────────────────────────────────── */
.otys-navbar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    height: var(--otys-navbar-h);
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    z-index: 1040;
    padding: 0 1rem;
}

.otys-navbar .navbar-brand {
    font-size: 1rem;
    letter-spacing: .5px;
}

/* Avatar yuvarlak harf */
.otys-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--otys-primary), var(--otys-info));
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────
   SARICI & ANA LAYOUT
   ───────────────────────────────────────────────────────── */
.otys-wrapper {
    margin-top: var(--otys-navbar-h);
    min-height: calc(100vh - var(--otys-navbar-h) - var(--otys-footer-h));
}

/* ─────────────────────────────────────────────────────────
   SIDEBAR
   ───────────────────────────────────────────────────────── */
.otys-sidebar {
    width: var(--otys-sidebar-w);
    min-width: var(--otys-sidebar-w);
    background: var(--otys-sidebar-bg);
    min-height: calc(100vh - var(--otys-navbar-h));
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--otys-navbar-h);
    height: calc(100vh - var(--otys-navbar-h));
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1030;
    transition: transform .25s ease;
}

/* Scrollbar görünümü */
.otys-sidebar::-webkit-scrollbar { width: 4px; }
.otys-sidebar::-webkit-scrollbar-track { background: transparent; }
.otys-sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

.otys-nav { padding: .75rem 0; flex: 1; }

.otys-nav-category {
    padding: .6rem 1rem .25rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #475569;
    margin-top: .25rem;
}

.otys-nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .52rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .18s, color .18s, border-color .18s;
    font-size: .85rem;
}

.otys-nav-link i {
    width: 18px;
    text-align: center;
    font-size: .9rem;
    flex-shrink: 0;
}

.otys-nav-link:hover {
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
    text-decoration: none;
    border-left-color: var(--otys-primary);
}

.otys-nav-link.active {
    background: rgba(26, 86, 219, .18);
    color: #fff;
    border-left-color: var(--otys-primary);
    font-weight: 500;
}

.otys-sidebar-footer {
    padding: .75rem 1rem;
    color: #475569;
    border-top: 1px solid #334155;
    font-size: .75rem;
}

/* ─────────────────────────────────────────────────────────
   ANA İÇERİK
   ───────────────────────────────────────────────────────── */
.otys-content {
    flex: 1;
    padding: 1.25rem 1.5rem;
    min-width: 0;
}

/* ─────────────────────────────────────────────────────────
   SAYFA BAŞLIĞI
   ───────────────────────────────────────────────────────── */
.otys-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding-bottom: .85rem;
    border-bottom: 2px solid var(--otys-border);
}

.otys-page-header h4 {
    color: var(--otys-text);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ─────────────────────────────────────────────────────────
   İSTATİSTİK KARTLARI
   ───────────────────────────────────────────────────────── */
.otys-stat-card {
    background: var(--otys-card-bg);
    border-radius: var(--otys-radius);
    box-shadow: var(--otys-shadow);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid var(--otys-primary);
    transition: box-shadow .2s, transform .2s;
}

.otys-stat-card:hover {
    box-shadow: var(--otys-shadow-md);
    transform: translateY(-2px);
}

.otys-stat-card.stat-success { border-left-color: var(--otys-success); }
.otys-stat-card.stat-warning { border-left-color: var(--otys-warning); }
.otys-stat-card.stat-info    { border-left-color: var(--otys-info);    }
.otys-stat-card.stat-primary { border-left-color: var(--otys-primary); }
.otys-stat-card.stat-danger  { border-left-color: var(--otys-danger);  }

.otys-stat-icon {
    width: 52px; height: 52px;
    border-radius: .5rem;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9;
    font-size: 1.4rem;
    color: var(--otys-primary);
    flex-shrink: 0;
}

.stat-success .otys-stat-icon { color: var(--otys-success); background: #ecfdf5; }
.stat-warning .otys-stat-icon { color: var(--otys-warning); background: #fffbeb; }
.stat-info    .otys-stat-icon { color: var(--otys-info);    background: #ecfeff; }
.stat-danger  .otys-stat-icon { color: var(--otys-danger);  background: #fef2f2; }

.otys-stat-label { font-size: .75rem; color: var(--otys-text-muted); font-weight: 500; }
.otys-stat-value { font-size: 1.45rem; font-weight: 700; color: var(--otys-text); line-height: 1.2; }
.otys-stat-sub   { font-size: .72rem;  color: var(--otys-text-muted); margin-top: .15rem; }

/* ─────────────────────────────────────────────────────────
   KARTLAR
   ───────────────────────────────────────────────────────── */
.otys-card {
    border: 1px solid var(--otys-border);
    border-radius: var(--otys-radius);
    box-shadow: var(--otys-shadow);
    background: var(--otys-card-bg);
}

.otys-card .card-header {
    background: #fff;
    border-bottom: 1px solid var(--otys-border);
    font-weight: 600;
    font-size: .875rem;
    padding: .75rem 1rem;
}

/* ─────────────────────────────────────────────────────────
   TABLO GENEL
   ───────────────────────────────────────────────────────── */
.table th {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--otys-text-muted);
    white-space: nowrap;
}

.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* ─────────────────────────────────────────────────────────
   FORMLAR
   ───────────────────────────────────────────────────────── */
.otys-input {
    border: 1.5px solid var(--otys-border);
    border-radius: .4rem;
    font-size: .875rem;
    transition: border-color .2s, box-shadow .2s;
}

.otys-input:focus {
    border-color: var(--otys-primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,.12);
    outline: none;
}

.font-weight-500 { font-weight: 500; }

/* ─────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────── */
.otys-footer {
    background: #fff;
    border-top: 1px solid var(--otys-border);
    padding: .6rem 1.5rem;
    height: var(--otys-footer-h);
    display: flex;
    align-items: center;
}

/* ─────────────────────────────────────────────────────────
   GİRİŞ SAYFASI
   ───────────────────────────────────────────────────────── */
.otys-login-body {
    min-height: 100vh;
    background: var(--otys-bg);
    display: flex;
    align-items: stretch;
    margin: 0;
}

.otys-login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.otys-login-left {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #1a56db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

/* Arka plan desenli katman */
.otys-login-left::before {
    content: '';
    position: absolute;
    top: -50%;  left: -30%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(26,86,219,.35) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(8,145,178,.25) 0%, transparent 50%);
    pointer-events: none;
}

.otys-login-left-content { position: relative; z-index: 1; max-width: 380px; }

.otys-login-icon {
    width: 90px; height: 90px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
    color: #fbbf24;
    margin-bottom: 1rem;
    backdrop-filter: blur(6px);
}

.otys-login-right {
    flex: 1;
    background: #fff;
    padding: 2rem;
}

.otys-login-card {
    width: 100%;
    max-width: 400px;
}

.otys-btn-login {
    height: 44px;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .3px;
    background: var(--otys-primary);
    border-color: var(--otys-primary);
    transition: background .2s, box-shadow .2s, transform .15s;
}

.otys-btn-login:hover {
    background: var(--otys-primary-dk);
    box-shadow: 0 4px 12px rgba(26,86,219,.35);
    transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────
   YARDIMCI YARDIMCILAR
   ───────────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
code { font-size: .82rem; color: var(--otys-danger); background: #fef2f2; padding: .1em .35em; border-radius: .25rem; }

/* ─────────────────────────────────────────────────────────
   MOBİL RESPONSIVE
   ───────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .otys-sidebar {
        position: fixed;
        top: var(--otys-navbar-h);
        left: 0;
        height: calc(100vh - var(--otys-navbar-h));
        transform: translateX(-100%);
        z-index: 1035;
    }

    .otys-sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 4px 0 16px rgba(0,0,0,.25);
    }

    .otys-content { padding: 1rem; }
    .otys-page-header { flex-direction: column; gap: .75rem; }
}

@media (max-width: 767.98px) {
    .otys-login-right { padding: 1.5rem 1rem; }
}
