/* RAWDOOR Saha Operasyonları - ortak stil (cariler/servis/gorevlerim/muhasebe).
   Renk paleti ve genel görsel dil admin.html ile birebir aynı tutulur. */
:root {
  --bg: #080a10;
  --surface: #0f1118;
  --card: #141720;
  --card2: #1a1e2e;
  --card3: #1f2438;
  --border: #252a3f;
  --border2: #2e3450;
  --accent: #c8960c;
  --accent2: #e8b422;
  --gold: linear-gradient(135deg, #c8960c 0%, #e8b422 40%, #f5d060 70%, #c8960c 100%);
  --text: #eef0ff;
  --text2: #8892b0;
  --text3: #4a5068;
  --danger: #ff4b4b;
  --success: #00d26a;
  --info: #4b88ff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Inter', sans-serif; background-color: var(--bg); color: var(--text); min-height: 100vh; }
button, input, select, textarea { touch-action: manipulation; font-family: inherit; }
a { color: inherit; }

/* Sol menü (admin.html'in .sidebar'ıyla aynı yerleşim - tüm yönetim
   ekranlarında menü hep solda olsun diye buradaki .topbar/.topnav görsel
   olarak dikey/sabit-sol bir sidebar gibi davranıyor, HTML/JS'e dokunmadan). */
body { padding-left: 260px; }
.topbar { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 22px 0; background: var(--card); border-bottom: none; border-right: 1px solid var(--border); z-index: 500; overflow-y: auto; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 20px 18px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.brand img { height: 36px; width: auto; }
.brand strong { display: block; font-size: 15px; font-weight: 900; letter-spacing: .5px; }
.brand small { display: block; color: var(--text2); font-size: 12px; }
.topnav { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 0 12px; }
.topnav a { color: var(--text2); text-decoration: none; font-weight: 700; font-size: 13px; padding: 12px 14px; border-radius: 9px; transition: .2s; }
.topnav a:hover { color: var(--text); background: var(--surface); }
.topnav a.active { color: var(--accent); background: var(--surface); }
.topnav a[hidden] { display: none; }
.icon-btn { padding: 9px 12px; border-radius: 9px; color: var(--text2); text-decoration: none; font-weight: 700; font-size: 13px; }
.topbar-logout { margin: auto 12px 0; }

/* Sayfa iskeleti */
main.page { max-width: 1320px; margin: 0 auto; padding: 28px 24px 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 6px; font-size: 26px; font-weight: 900; }
.page-head p { margin: 0; color: var(--text2); font-size: 14px; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* İstatistik kartları */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.stat span { display: block; color: var(--text2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.stat strong { display: block; font-size: 26px; font-weight: 900; }

/* Panel / bölüm kartı */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-bottom: 22px; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--accent); }
.panel-head p { margin: 4px 0 0; color: var(--text2); font-size: 13px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }

/* Sekmeler (gorevlerim.html: Hepsi/Montaj/Servis/Keşif) */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text2); font-weight: 700; font-size: 13px; cursor: pointer; transition: .2s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--gold); color: #1a0f00; border-color: transparent; }
.done-group { margin-bottom: 18px; }
.done-group:last-child { margin-bottom: 0; }
.done-group h3 { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; }
.done-group.empty-group { display: none; }

/* Form alanları */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--text2); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
input, select, textarea {
  padding: 11px 13px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500;
}
input::placeholder, textarea::placeholder { color: var(--text3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,150,12,.18); }
textarea { resize: vertical; }
input[type="file"] { padding: 8px; }

/* Form grid (modallar) */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* Butonlar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: none; background: var(--gold); color: #1a0f00; font-weight: 800; font-size: 13px; cursor: pointer; transition: .2s; text-decoration: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(200,150,12,.28); }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { box-shadow: none; border-color: var(--border2); }
.btn.success { background: var(--success); color: #04150c; }
.btn.danger { background: var(--danger); color: #2a0505; }
@media (hover: none) { .btn:hover { transform: none; box-shadow: none; } }

/* Kart listeleri (iş kartları) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.job-card { display: flex; flex-direction: column; gap: 10px; background: var(--card2); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.job-card h3 { margin: 0; font-size: 16px; font-weight: 800; }
.job-card p { margin: 0; color: var(--text2); font-size: 13px; line-height: 1.5; }
.job-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.job-meta small { color: var(--text3); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.job-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* Tablolar */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 15px; background: var(--card); }
table { width: 100%; min-width: 640px; border-collapse: collapse; }
th { background: var(--card2); padding: 14px 16px; text-align: left; font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: .6px; font-weight: 800; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface); }

/* Rozetler */
.badge { display: inline-block; padding: 5px 11px; border-radius: 20px; font-size: 11px; font-weight: 800; background: rgba(200,150,12,.18); color: var(--accent); white-space: nowrap; }
.badge.success { background: rgba(0,210,106,.16); color: var(--success); }
.badge.warning { background: rgba(232,180,34,.18); color: var(--accent2); }
.badge.danger { background: rgba(255,75,75,.16); color: var(--danger); }
.badge.info { background: rgba(75,136,255,.16); color: var(--info); }

/* Bildirim / boş durum */
.notice { background: rgba(200,150,12,.1); border: 1px solid rgba(200,150,12,.28); color: var(--text2); padding: 12px 15px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.notice.hidden { display: none; }
.panel.hidden { display: none; }
.empty { text-align: center; color: var(--text3); padding: 44px 16px; font-size: 14px; grid-column: 1 / -1; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 9999; }
.modal.hidden { display: none; }
.modal-box { width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 26px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 18px; color: var(--accent); }
.close { background: transparent; border: none; color: var(--text2); font-size: 26px; line-height: 1; cursor: pointer; padding: 0; }
.close:hover { color: var(--danger); }
.col-12.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* Toast */
.toast { position: fixed; bottom: 26px; right: 26px; max-width: 320px; background: var(--card2); color: var(--text); padding: 14px 20px; border-radius: 10px; border-left: 4px solid var(--success); box-shadow: 0 14px 32px rgba(0,0,0,.5); font-weight: 600; font-size: 13px; z-index: 10000; }
.toast.error { border-left-color: var(--danger); }
.toast.hidden { display: none; }

/* Mobil - dar ekranda sol menü sığmaz, üst bara geri döner */
@media (max-width: 860px) {
  body { padding-left: 0; }
  .topbar { position: static; width: auto; flex-direction: row; align-items: center; justify-content: space-between; border-right: none; border-bottom: 1px solid var(--border); padding: 12px 16px; overflow-y: visible; flex-wrap: wrap; }
  .brand { flex-direction: row; align-items: center; padding: 0; margin-bottom: 0; border-bottom: none; }
  .topnav { flex-direction: row; flex-wrap: wrap; padding: 0; gap: 6px; }
}

@media (max-width: 760px) {
  main.page { padding: 18px 14px 48px; }
  .page-head h1 { font-size: 21px; }
  .grid .col-3, .grid .col-4, .grid .col-6, .grid .col-8 { grid-column: span 12; }
  .cards { grid-template-columns: 1fr; }
  .job-meta { grid-template-columns: 1fr 1fr; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-box { max-width: none; width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
  table { min-width: 560px; }
}
