/* =====================================================
   OtoServis - Ana CSS (Koyu / Endüstriyel Tema)
   Font: Rajdhani (başlık) + Nunito (metin)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
  --bg-base:        #0d0f14;
  --bg-surface:     #161923;
  --bg-card:        #1e2330;
  --bg-input:       #131720;
  --bg-hover:       #252c3d;
  --border:         #2a3248;
  --border-light:   #3a4560;
  --accent:         #e8441a;
  --accent-hover:   #ff5a30;
  --accent-dim:     rgba(232,68,26,0.15);
  --accent2:        #f5a623;
  --success:        #27c97c;
  --success-dim:    rgba(39,201,124,0.12);
  --warning:        #f5a623;
  --warning-dim:    rgba(245,166,35,0.12);
  --danger:         #e84141;
  --danger-dim:     rgba(232,65,65,0.12);
  --info:           #4a90d9;
  --info-dim:       rgba(74,144,217,0.12);
  --text-primary:   #e8ecf4;
  --text-secondary: #8b95b0;
  --text-muted:     #525d78;
  --text-dark:      #0d0f14;
  --font-head:      'Rajdhani', sans-serif;
  --font-body:      'Nunito', sans-serif;
  --radius:         8px;
  --radius-lg:      14px;
  --shadow:         0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.6);
  --transition:     0.2s ease;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ─── Sidebar Layout ─── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff; flex-shrink: 0;
}
.sidebar-logo .logo-text {
  font-family: var(--font-head);
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: 1px; color: var(--text-primary);
  line-height: 1.1;
}
.sidebar-logo .logo-sub {
  font-size: 0.65rem; color: var(--text-muted);
  letter-spacing: 2px; text-transform: uppercase;
}

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

.nav-group-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 12px 22px 4px;
}

.nav-item {
  display: flex; align-items: center;
  gap: 10px;
  padding: 10px 22px;
  color: var(--text-secondary);
  font-size: 0.9rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); border-left-color: var(--accent); }
.nav-item .nav-icon { width: 20px; text-align: center; font-size: 1rem; }

.sidebar-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.sidebar-footer .user-info { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sidebar-footer .user-avatar {
  width: 30px; height: 30px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--accent);
}

/* ─── Main Content ─── */
.main-content {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.topbar-title {
  font-family: var(--font-head);
  font-size: 1.4rem; font-weight: 700;
  letter-spacing: 0.5px;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.page-content { padding: 24px 28px; flex: 1; }

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-family: var(--font-head);
  font-size: 1.05rem; font-weight: 600;
  letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 8px;
}
.card-title .card-icon { color: var(--accent); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(232,68,26,0.35); }
.btn-secondary { background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border-light); }
.btn-secondary:hover { background: var(--border); color: var(--text-primary); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-warning { background: var(--warning); color: #000; }
.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-icon { padding: 8px; min-width: unset; }

/* ─── Forms ─── */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; gap: 16px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 5px;
}
label .required { color: var(--accent); margin-left: 2px; }
label .optional { color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 4px; font-size: 0.75rem; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="password"], input[type="number"], input[type="date"],
select, textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body); font-size: 0.9rem;
  padding: 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select option { background: var(--bg-card); }
textarea { resize: vertical; min-height: 80px; }

.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 4px; }
.input-group { position: relative; }
.input-group input { padding-right: 44px; }
.input-group-append {
  position: absolute; right: 0; top: 0;
  height: 100%; width: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer;
}

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

table {
  width: 100%; border-collapse: collapse;
  font-size: 0.875rem;
}
thead tr {
  background: var(--bg-base);
  border-bottom: 2px solid var(--border);
}
thead th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:hover { background: var(--bg-hover); }
tbody td { padding: 11px 14px; color: var(--text-primary); vertical-align: middle; }

/* ─── Badges ─── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  white-space: nowrap;
}
.badge-success  { background: var(--success-dim); color: var(--success); }
.badge-warning  { background: var(--warning-dim); color: var(--warning); }
.badge-danger   { background: var(--danger-dim); color: var(--danger); }
.badge-info     { background: var(--info-dim); color: var(--info); }
.badge-muted    { background: var(--bg-hover); color: var(--text-muted); }
.badge-primary  { background: var(--accent-dim); color: var(--accent); }

/* ─── Alerts ─── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.875rem;
}
.alert-success { background: var(--success-dim); border: 1px solid var(--success); color: var(--success); }
.alert-danger  { background: var(--danger-dim); border: 1px solid var(--danger); color: var(--danger); }
.alert-warning { background: var(--warning-dim); border: 1px solid var(--warning); color: var(--warning); }
.alert-info    { background: var(--info-dim); border: 1px solid var(--info); color: var(--info); }

/* ─── Stats ─── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
}
.stat-card.accent::before { background: var(--accent); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.info::before { background: var(--info); }
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 6px; }
.stat-value { font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.4rem; padding: 4px; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ─── Pagination ─── */
.pagination { display: flex; align-items: center; gap: 4px; margin-top: 16px; }
.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.page-btn:hover, .page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── Search/Filter Bar ─── */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box input { padding-left: 36px; }
.search-box .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; }

/* ─── Tabs ─── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 10px 20px;
  font-size: 0.875rem; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all var(--transition);
  text-decoration: none;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Summary Box ─── */
.summary-box {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-row.total {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 700;
  border-top: 2px solid var(--border); margin-top: 6px; padding-top: 10px;
}
.summary-row.kar { color: var(--success); }
.summary-row.zarar { color: var(--danger); }

/* ─── Print ─── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  body { background: #fff !important; color: #000 !important; }
  .card { border: 1px solid #ccc !important; background: #fff !important; }
  .print-header { display: block !important; }
}
.print-header { display: none; }

/* ─── Auth Pages ─── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '⚙';
  position: fixed; right: -80px; bottom: -80px;
  font-size: 350px; opacity: 0.03; pointer-events: none;
  line-height: 1;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  text-align: center; margin-bottom: 28px;
}
.auth-logo .icon {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 10px;
}
.auth-logo h1 {
  font-family: var(--font-head);
  font-size: 1.6rem; font-weight: 700; letter-spacing: 1px;
}
.auth-logo p { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }
.auth-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; text-align: center; }

/* ─── Hamburger (Mobile) ─── */
.hamburger {
  display: none;
  background: none; border: none;
  color: var(--text-primary); font-size: 1.3rem;
  cursor: pointer; padding: 4px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 99;
  }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .topbar { padding: 12px 16px; }
  .page-content { padding: 16px; }
  .hamburger { display: block; }
  .form-row.cols-2, .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .auth-card { padding: 24px 18px; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* ─── Utilities ─── */
.text-accent   { color: var(--accent); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-danger   { color: var(--danger); }
.text-muted    { color: var(--text-muted); }
.text-right    { text-align: right; }
.text-center   { text-align: center; }
.fw-bold       { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.d-none { display: none !important; }
.w-100 { width: 100%; }

/* ─── İşlem tipleri renkleri ─── */
.islem-parcadegisimi { color: var(--warning); }
.islem-bakim         { color: var(--info); }
.islem-onarim        { color: var(--success); }
.islem-elektrik      { color: #b088f9; }
.islem-kaporta       { color: #f06292; }
.islem-boya          { color: #4dd0e1; }
.islem-diger         { color: var(--text-muted); }

/* Sıra tutamaç */
.drag-handle { cursor: grab; color: var(--text-muted); padding: 0 6px; }
.drag-handle:active { cursor: grabbing; }

/* Kalem satırı */
.kalem-row { background: var(--bg-surface); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; border: 1px solid var(--border); }

/* Toplam vurgu */
.toplam-vurgu {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.toplam-vurgu .etiket { font-size: 0.85rem; color: var(--text-secondary); }
.toplam-vurgu .deger { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
