:root {
  --navy-950: #0b1526;
  --navy-900: #0f1f38;
  --navy-800: #16294a;
  --navy-700: #1e355c;
  --teal: #14b8a6;
  --blue: #2f8fff;
  --purple: #7c5cff;
  --accent: #2f8fff;
  --accent-dark: #1a6fe0;
  --brand-gradient: linear-gradient(90deg, var(--teal), var(--blue));
  --brand-gradient-diag: linear-gradient(135deg, var(--teal), var(--blue) 55%, var(--purple));
  --ok-green: #16a34a;
  --ok-red: #dc2626;
  --bg-page: #f4f6fb;
}

* { box-sizing: border-box; }

body {
  background-color: var(--bg-page);
  background-image:
    radial-gradient(circle at 8% 8%, rgba(20,184,166,0.10), transparent 40%),
    radial-gradient(circle at 92% 15%, rgba(124,92,255,0.09), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(47,143,255,0.07), transparent 45%);
  background-attachment: fixed;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1c2536;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.content-area { animation: fadeInUp 0.35s ease; }

/* Marka: kucuk nokta ayracli "eyebrow" rozet (ikalpyazilim.com'daki gibi) */
.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e6eaf2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #445070;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(15,31,56,0.05);
}
.eyebrow-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; display:inline-block; }

/* Ustte renkli ince gradyan cizgi (kart baslik detayi) */
.gradient-topbar { height: 4px; background: linear-gradient(90deg, var(--blue), var(--teal), #f59e0b); border-radius: 4px 4px 0 0; }

/* ===================== SIDEBAR ===================== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  min-width: 250px;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 60%, var(--navy-800));
  color: #dbe6f8;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease, min-width 0.2s ease;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}
.sidebar::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 5px; height: 100vh;
  background: linear-gradient(180deg, var(--teal), var(--blue), var(--purple));
  z-index: 1001;
}
.sidebar.collapsed { width: 72px; min-width: 72px; }
.sidebar.collapsed .nav-link { justify-content: center; }

.sidebar-label, .sidebar-brand .brand-text, .sidebar-footer .user-text {
  display: inline-block;
  opacity: 1;
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.25s ease, max-width 0.25s ease, margin 0.25s ease;
  vertical-align: middle;
}
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .user-text {
  opacity: 0;
  max-width: 0;
  margin: 0 !important;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}
.sidebar-brand .brand-icon {
  font-size: 1.3rem;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-gradient);
  border-radius: 10px;
  flex-shrink: 0;
}
.sidebar-brand .brand-text { font-weight: 700; letter-spacing: 0.3px; font-size: 1.0rem; line-height: 1.2; }
.sidebar-brand .brand-sub { font-size: 0.68rem; color: #93a7c9; letter-spacing: 0.8px; }

.sidebar-toggle {
  background: transparent;
  border: none;
  color: #9db3d6;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
}
.sidebar-toggle:hover { color: #fff; }

.sidebar-nav { flex: 1; padding: 6px 0; }
.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b9c8e4;
  padding: 11px 20px;
  font-size: 0.93rem;
  border-left: 3px solid transparent;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-nav .nav-link:hover {
  background: linear-gradient(90deg, rgba(20,184,166,0.14), rgba(47,143,255,0.10));
  color: #fff;
}
.sidebar-nav .nav-link.active {
  background: linear-gradient(90deg, rgba(20,184,166,0.28), rgba(47,143,255,0.22));
  border-left-color: var(--teal);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(20,184,166,0.15);
}
.sidebar-nav .nav-icon { width: 19px; height: 19px; flex-shrink: 0; }
.sidebar-toggle .nav-icon { width: 16px; height: 16px; vertical-align: middle; }
.sidebar-footer .nav-icon { width: 16px; height: 16px; flex-shrink: 0; }
.topbar .nav-icon { width: 18px; height: 18px; }

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 18px;
}
.sidebar-footer .user-name { font-weight: 600; font-size: 0.9rem; color: #fff; }
.sidebar-footer .user-role { font-size: 0.78rem; color: #93a7c9; }
.sidebar-footer .btn-logout {
  margin-top: 10px;
  width: 100%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sidebar-footer .btn-logout:hover { background: rgba(255,255,255,0.18); }

/* ===================== MAIN CONTENT ===================== */
.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: #fff;
  border-bottom: 1px solid #e6eaf2;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .page-title { font-weight: 700; font-size: 1.15rem; color: var(--navy-900); }

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

/* ===================== CARDS / GENERAL ===================== */
.card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 31, 56, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card { border-radius: 14px; position: relative; overflow: hidden; }
.stat-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--teal), #f59e0b);
}
table.table { border-radius: 10px; overflow: hidden; }
table.table thead { background-color: var(--navy-900); color: #fff; }
.btn-dark { background-color: var(--navy-900); border-color: var(--navy-900); }
.btn-dark:hover { background-color: var(--navy-800); border-color: var(--navy-800); }
.btn-outline-dark { color: var(--navy-900); border-color: var(--navy-900); }
.btn-outline-dark:hover { background-color: var(--navy-900); border-color: var(--navy-900); }

/* ===================== VEHICLE CARDS ===================== */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.vehicle-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(15, 31, 56, 0.07);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.vehicle-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--teal), #f59e0b);
  opacity: 0; transition: opacity 0.2s ease;
}
.vehicle-card:hover::before { opacity: 1; }
.vehicle-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(15, 31, 56, 0.14); }
.vehicle-card .van-icon { width: 92px; height: 92px; margin: 0 auto 10px; display: block; }
.vehicle-card .van-icon.active-van path.body { fill: #dff5e6; stroke: var(--ok-green); }
.vehicle-card .van-icon.inactive-van path.body { fill: #fde2e2; stroke: var(--ok-red); }
.plate-badge {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 6px;
}
.plate-badge.active { background: var(--ok-green); }
.plate-badge.inactive { background: var(--ok-red); }
.vehicle-card .meta { color: #6b7688; font-size: 0.83rem; margin-bottom: 10px; }
.vehicle-card .actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.vehicle-card .actions form { display: inline; }

@media (max-width: 768px) {
  .sidebar { position: fixed; left: -260px; height: 100%; z-index: 1100; box-shadow: 4px 0 20px rgba(0,0,0,0.25); }
  .sidebar.mobile-open { left: 0; }
  .main-content { width: 100%; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1050; }
  .sidebar-overlay.show { display: block; }
  .content-area { padding: 14px; }
  .topbar { padding: 12px 14px; }
  .vehicle-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  table.table { display: block; overflow-x: auto; white-space: nowrap; }
  .row.g-2, .row.g-3 { gap: 10px; }
  .card.p-4 { padding: 18px !important; }
}
@media (min-width: 769px) {
  .sidebar-overlay { display: none !important; }
}

/* =====================================================================
   KENDI ICIMIZDE BARINDIRILAN TEMEL STIL KUTUPHANESI
   (Bootstrap CDN'e olan bagimliligi kaldirmak icin - sunucunun dis
   internete (CDN) erisimi olmasa bile tasarim calisir)
   ===================================================================== */

/* --- Grid (CSS Grid tabanli - gap ile taşma sorunu yaşanmaz) --- */
.row { display: grid; grid-template-columns: repeat(12, 1fr); margin: 0; align-items: start; }
.row.g-2 { gap: 8px; }
.row.g-3 { gap: 14px; }
[class^="col-md-"], [class*=" col-md-"] { grid-column: span 12; }
@media (min-width: 768px) {
  .col-md-1 { grid-column: span 1; }
  .col-md-2 { grid-column: span 2; }
  .col-md-3 { grid-column: span 3; }
  .col-md-4 { grid-column: span 4; }
  .col-md-5 { grid-column: span 5; }
  .col-md-6 { grid-column: span 6; }
  .col-md-7 { grid-column: span 7; }
  .col-md-8 { grid-column: span 8; }
  .col-md-9 { grid-column: span 9; }
  .col-md-12 { grid-column: span 12; }
}

/* --- Flex utilities --- */
.d-flex { display: flex; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }
@media (max-width: 767px) { .d-md-none { display: inline-block; } }
@media (min-width: 768px) { .d-md-none { display: none; } }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
  line-height: 1.4;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; border-radius: 6px; }
.btn-dark {
  background: var(--brand-gradient);
  background-size: 160% 100%;
  background-position: 0% 0%;
  color: #fff;
  border: none;
  box-shadow: 0 3px 10px rgba(47,143,255,0.25);
}
.btn-dark:hover { background-position: 100% 0%; color: #fff; box-shadow: 0 5px 16px rgba(47,143,255,0.35); transform: translateY(-1px); }
.btn { transition: all .2s ease; }
.btn:active { transform: translateY(0); }
.btn-success { background: var(--ok-green); color: #fff; }
.btn-success:hover { color:#fff; }
.btn-link { background: transparent; color: var(--accent-dark); border: none; padding: 8px 6px; }
.btn-outline-primary { background: transparent; color: var(--accent-dark); border-color: var(--accent-dark); }
.btn-outline-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline-secondary { background: transparent; color: #495057; border-color: #ced4da; }
.btn-outline-secondary:hover { background: #495057; color: #fff; }
.btn-outline-danger { background: transparent; color: var(--ok-red); border-color: var(--ok-red); }
.btn-outline-danger:hover { background: var(--ok-red); color: #fff; }
.btn-outline-dark { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn-outline-dark:hover { background: var(--navy-900); color: #fff; }
.btn-outline-success { background: transparent; color: var(--ok-green); border-color: var(--ok-green); }
.btn-outline-success:hover { background: var(--ok-green); color: #fff; }

/* --- Forms --- */
.form-label { display: block; font-weight: 600; font-size: 0.87rem; margin-bottom: 6px; color: #33415c; }
.form-control, .form-select {
  display: block;
  width: 100%;
  padding: 9px 12px;
  font-size: 0.93rem;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  background: #fff;
  color: #1c2536;
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47,143,255,0.15);
}
.form-text { font-size: 0.78rem; color: #7c8798; margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.form-check-input { width: 16px; height: 16px; }
.form-check-label { font-size: 0.9rem; }

/* --- Table --- */
table.table { width: 100%; border-collapse: collapse; background: #fff; }
table.table th, table.table td { padding: 11px 14px; text-align: left; font-size: 0.9rem; }
table.table thead th { font-weight: 600; }
table.table-striped tbody tr:nth-child(odd) { background: #f7f9fc; }
table.table-sm th, table.table-sm td { padding: 6px 10px; font-size: 0.85rem; }

/* --- Alerts --- */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.92rem; }
.alert-success { background: #e6f6ec; color: #146c34; border: 1px solid #bfe8cd; }
.alert-danger { background: #fdecec; color: #a11c1c; border: 1px solid #f5c2c2; }
.alert-info { background: #e8f2ff; color: #1a4d8f; border: 1px solid #c3ddfb; }

/* --- Badges --- */
.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.76rem; font-weight: 700; color: #fff; }
.bg-success { background: var(--ok-green) !important; }
.bg-danger { background: var(--ok-red) !important; }
.bg-secondary { background: #6b7688 !important; }
.bg-warning { background: #f59e0b !important; color: #3a2a00; }
.bg-success-subtle { background: #e6f6ec !important; }
.bg-danger-subtle { background: #fdecec !important; }
.bg-primary-subtle { background: #e8f2ff !important; }
.bg-white { background: #fff !important; }

/* --- List group (basit) --- */
.list-group { list-style: none; margin: 0; padding: 0; border: 1px solid #e6eaf2; border-radius: 8px; overflow: hidden; }
.list-group-item { padding: 10px 14px; border-bottom: 1px solid #e6eaf2; background: #fff; }
.list-group-item:last-child { border-bottom: none; }

/* --- Spacing / text utilities --- */
.mb-0{margin-bottom:0}.mb-1{margin-bottom:6px}.mb-2{margin-bottom:10px}.mb-3{margin-bottom:16px}.mb-4{margin-bottom:22px}
.mt-3{margin-top:16px}.mt-4{margin-top:22px}.mt-5{margin-top:32px}
.ms-2{margin-left:8px}
.p-2{padding:10px}.p-3{padding:16px}.p-4{padding:22px}
.w-100{width:100%}
.h-100{height:100%}

/* ===================== TAKVIM ===================== */
.calendar-card { background:#fff; border-radius:16px; padding:18px; box-shadow:0 2px 10px rgba(15,31,56,0.06); }
.calendar-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; gap:8px; }
.calendar-head h5 { margin:0; font-weight:800; color:var(--navy-900); text-transform:capitalize; font-size:1rem; white-space:nowrap; }
.calendar-grid { display:grid; grid-template-columns:repeat(7, 1fr); gap:6px; }
.calendar-daylabel { text-align:center; font-size:0.7rem; font-weight:700; color:#8a94a6; text-transform:uppercase; padding-bottom:2px; }
.calendar-day {
  position:relative;
  min-height:62px;
  width:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:5px 3px 4px;
  border-radius:9px;
  background:#f4f6fb;
  text-decoration:none;
  color:#1c2536;
  transition:transform .12s ease, box-shadow .12s ease;
  overflow:hidden;
}
.calendar-day .day-num { font-weight:700; font-size:1.05rem; line-height:1.2; }
.calendar-day .day-title {
  font-size:0.6rem;
  line-height:1.15;
  color:#8a6d00;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:100%;
  margin-top:3px;
}
.calendar-day.today .day-title { color:rgba(255,255,255,0.9); }
.calendar-day:hover { transform:translateY(-1px); box-shadow:0 3px 10px rgba(15,31,56,0.15); color:#1c2536; text-decoration:none; }
.calendar-day.empty { background:transparent; pointer-events:none; }
.calendar-day.today { background:var(--brand-gradient); color:#fff; box-shadow:0 3px 10px rgba(47,143,255,0.35); }
.calendar-day.today .day-num { color:#fff; }
.calendar-day.has-reminder:not(.today) { background:#fff3cd; }
.calendar-day .day-count {
  position:absolute; top:-4px; right:-4px; font-size:0.6rem; font-weight:800;
  background:var(--ok-red); color:#fff; border-radius:8px; min-width:16px; height:16px;
  display:flex; align-items:center; justify-content:center; line-height:1;
}

/* --- Bildirimler paneli --- */
.notif-panel { max-height: 520px; overflow-y: auto; }
.notif-item { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid #eef1f6; }
.notif-item:last-child { border-bottom:none; }
.notif-icon { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:0.9rem; }
.notif-text { font-size:0.85rem; }
.notif-time { font-size:0.72rem; color:#8a94a6; }
.text-center{text-align:center}.text-end{text-align:right}
.text-muted{color:#7c8798}
.text-success{color:var(--ok-green)}
.text-danger{color:var(--ok-red)}
.text-dark{color:#1c2536}
.small{font-size:0.85rem}
.fw-bold{font-weight:700}
.fs-2{font-size:1.9rem}.fs-3{font-size:1.6rem}.fs-4{font-size:1.3rem}
.rounded{border-radius:10px}
.shadow{box-shadow:0 2px 10px rgba(15,31,56,0.08)}
.border{border:1px solid #e6eaf2}
