/* ============================================================
   KOGİAD Arama Sistemi — Ana Stil Dosyası
   ============================================================ */

:root {
    --green:          #1a7a3e;
    --green-dark:     #0f5a2a;
    --green-light:    #e8f5ee;
    --sidebar-bg:     #1e2329;
    --sidebar-width:  250px;
    --topbar-height:  60px;
    --text-main:      #1a1a2e;
    --text-muted:     #6b7280;
    --border:         #e5e7eb;
    --bg-page:        #f3f4f6;
    --white:          #ffffff;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:      0 8px 32px rgba(0,0,0,0.14);
    --radius:         10px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-page);
    margin: 0;
}

/* ============================================================
   LOGIN SAYFASI
   ============================================================ */

body.login-page {
    background: linear-gradient(135deg, var(--green-dark) 0%, #1d6b3a 50%, #22a355 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
}

.login-top {
    background: var(--green-dark);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    position: relative;
}

.login-top::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.login-logo {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 24px;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.25);
}

.login-top h1 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 0.25rem;
}

.login-top p {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    margin: 0;
    letter-spacing: 0.03em;
}

.login-form-area {
    padding: 2rem;
}

.login-form-area .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    display: block;
}

.login-form-area .input-group {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form-area .input-group:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(26,122,62,0.12);
}

.login-form-area .input-group-text {
    background: #f9fafb;
    border: none;
    color: var(--text-muted);
    padding: 0 0.875rem;
    font-size: 15px;
}

.login-form-area .form-control {
    border: none;
    padding: 0.7rem 0.875rem;
    font-size: 0.9rem;
    outline: none;
    box-shadow: none;
    background: #fff;
}

.login-form-area .form-control:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.login-form-area .btn-toggle-pass {
    background: #f9fafb;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0 0.875rem;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.15s;
}

.login-form-area .btn-toggle-pass:hover { color: var(--green); }

.form-check-label { font-size: 0.82rem; color: var(--text-muted); }

.btn-giris {
    width: 100%;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-giris:hover  { background: var(--green-dark); }
.btn-giris:active { transform: scale(0.99); }

.alert-hata {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    padding: 0.7rem 1rem;
    font-size: 0.83rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

/* ============================================================
   LAYOUT — SIDEBAR
   ============================================================ */

.layout {
    display: flex;
    min-height: 100vh;
}

#sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.25s ease;
}

.sidebar-logo {
    padding: 1.1rem 1.25rem 1rem;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
    display: block;
}

.sidebar-logo-name {
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
}

.sidebar-logo-sub {
    color: rgba(255,255,255,0.45);
    font-size: 0.67rem;
    margin-top: 3px;
    letter-spacing: 0.03em;
}

.nav-section {
    padding: 1rem 0 0.25rem;
    flex: 1;
}

.nav-section-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.3);
    padding: 0.5rem 1.25rem 0.4rem;
    user-select: none;
}

.nav-item {
    display: block;
    padding: 0.6rem 1.25rem;
    color: rgba(255,255,255,0.62);
    text-decoration: none;
    font-size: 0.855rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.nav-item .icon {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border-left-color: rgba(26,122,62,0.7);
    text-decoration: none;
}

.nav-item.active {
    color: #fff;
    background: var(--green);
    border-left-color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

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

.sidebar-user-name  { color: #fff; font-size: 0.8rem; font-weight: 600; line-height: 1.2; }
.sidebar-user-role  { color: rgba(255,255,255,0.42); font-size: 0.68rem; }

.sidebar-logout {
    margin-left: auto;
    color: rgba(255,255,255,0.38);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.15s;
    flex-shrink: 0;
}
.sidebar-logout:hover { color: #f87171; }

/* ============================================================
   LAYOUT — MAIN
   ============================================================ */

.main-wrap {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-sm);
}

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.topbar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
    margin: 0;
}

.topbar-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-cikis {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.15s;
}
.btn-cikis:hover {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fff5f5;
    text-decoration: none;
}

.page-content {
    flex: 1;
    padding: 1.5rem;
}

/* ============================================================
   KARTLAR
   ============================================================ */

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-head-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.card-head-green {
    background: var(--green);
    border-bottom: none;
}

.card-head-green .card-head-title { color: #fff; }

.card-body { padding: 1.25rem; }

/* Stat kartları */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-left: 4px solid var(--green);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-num   { font-size: 2rem; font-weight: 700; color: var(--text-main); line-height: 1; }
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 2px; }
.stat-sub   { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ============================================================
   TABLO
   ============================================================ */

.tablo { width: 100%; border-collapse: collapse; }

.tablo th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    background: #f9fafb;
    padding: 0.65rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.tablo td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.845rem;
    color: var(--text-main);
    vertical-align: middle;
}

.tablo tbody tr:last-child td { border-bottom: none; }
.tablo tbody tr:hover td { background: #f9fafb; }

/* ============================================================
   BUTONLAR
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.45rem 0.9rem;
    border-radius: 7px;
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.4;
}

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

.btn-outline  { background: transparent; color: var(--text-main); border-color: var(--border); }
.btn-outline:hover { background: #f9fafb; border-color: #d1d5db; color: var(--text-main); }

.btn-danger   { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.78rem; }

/* ============================================================
   BADGE / DURUM
   ============================================================ */

.badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.badge-secondary { background: #f3f4f6; color: #6b7280; }
.badge-primary   { background: #eff6ff; color: #1d4ed8; }
.badge-success   { background: #f0fdf4; color: #15803d; }
.badge-warning   { background: #fffbeb; color: #b45309; }
.badge-danger    { background: #fef2f2; color: #b91c1c; }
.badge-info      { background: #f0f9ff; color: #0369a1; }
.badge-dark      { background: #1f2937; color: #f9fafb; }

/* ============================================================
   FORM
   ============================================================ */

.form-group { margin-bottom: 1rem; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.55rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-size: 0.875rem;
    color: var(--text-main);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: inherit;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(26,122,62,0.1);
}

textarea.form-control { resize: vertical; min-height: 90px; }

.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--green); cursor: pointer; }
.form-check label { font-size: 0.82rem; color: var(--text-muted); cursor: pointer; }

/* ============================================================
   ALERT
   ============================================================ */

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.845rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #f0f9ff; border: 1px solid #bae6fd; color: #0369a1; }

/* ============================================================
   YARDIMCI SINIFLAR
   ============================================================ */

.text-muted  { color: var(--text-muted) !important; }
.text-green  { color: var(--green) !important; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mb-0        { margin-bottom: 0 !important; }
.mb-1        { margin-bottom: 0.25rem !important; }
.mb-2        { margin-bottom: 0.5rem !important; }
.mb-3        { margin-bottom: 1rem !important; }
.mb-4        { margin-bottom: 1.5rem !important; }
.mt-2        { margin-top: 0.5rem !important; }
.mt-3        { margin-top: 1rem !important; }
.mt-4        { margin-top: 1.5rem !important; }
.d-flex      { display: flex !important; }
.align-center { align-items: center !important; }
.gap-2       { gap: 0.5rem !important; }
.gap-3       { gap: 0.75rem !important; }
.ms-auto     { margin-left: auto !important; }
.w-100       { width: 100% !important; }

/* ============================================================
   MOBİL
   ============================================================ */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
}

@media (max-width: 991px) {
    #sidebar { transform: translateX(-100%); }
    #sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.3); }
    .main-wrap { margin-left: 0; }
    .topbar-toggle { display: block; }
    .sidebar-overlay.open { display: block; }
    .topbar-date { display: none; }
}
