/* =====================================================
   operatörün.com — Ana Stil Dosyası -hasancancap
   ===================================================== */

/* ---------- CSS değişkenleri ---------- */
:root {
  --primary:       #f07414;
  --primary-dark:  #d4600e;
  --primary-light: #ff9842;
  --primary-bg:    #fff5ee;
  --dark:          #1a1a2e;
  --text:          #2d2d2d;
  --muted:         #6c757d;
  --border:        #e0e0e0;
  --bg:            #f4f4f8;
  --white:         #ffffff;
  --success:       #22c55e;
  --danger:        #ef4444;
  --shadow-sm:     0 2px 8px rgba(0,0,0,.07);
  --shadow:        0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --radius:        14px;
  --radius-lg:     22px;
  --transition:    .2s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---------- Genel sayfa sarmalayıcı ---------- */
.page-wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 80px 0; /* alt nav için boşluk */
  min-height: 100vh;
}

.page-wrapper-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 80px 16px;
}

/* ---------- Üst bar ---------- */
.top-bar {
  background: var(--white);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar .logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
}

.top-bar .logo span { color: var(--dark); }

/* ---------- Alt navigasyon (mobil) ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 200;
  box-shadow: 0 -2px 10px rgba(0,0,0,.08);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px 8px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 500;
  gap: 4px;
  transition: color var(--transition);
}

.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--primary);
}

.bottom-nav a svg,
.bottom-nav a i {
  font-size: 1.3rem;
}

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

.card-body { padding: 20px; }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: .93rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 48px;
  line-height: 1;
  text-decoration: none;
}

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

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary-bg); }

.btn-dark {
  background: var(--dark);
  color: #fff;
}
.btn-dark:hover { background: #2a2a44; color: #fff; }

.btn-light {
  background: #f0f0f0;
  color: var(--text);
}
.btn-light:hover { background: #e0e0e0; }

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: .82rem; min-height: 38px; }
.btn-lg { padding: 16px 28px; font-size: 1rem; min-height: 56px; }

/* ---------- Form elemanları ---------- */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(240,116,20,.15);
}

.form-control::placeholder { color: #aaa; }

select.form-control { cursor: pointer; }

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

.form-hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }

/* ---------- Onay kutuları (tik listesi) ---------- */
.check-list { display: flex; flex-wrap: wrap; gap: 10px; }

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all var(--transition);
  flex: 1 1 calc(50% - 5px);
  min-width: 140px;
  font-size: .88rem;
  font-weight: 500;
  user-select: none;
}

.check-item input[type="checkbox"] { display: none; }

.check-item .check-box {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: .85rem;
}

.check-item:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.check-item:has(input:checked) .check-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- Makine seçim kartları ---------- */
.machine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 400px) {
  .machine-grid { grid-template-columns: repeat(2, 1fr); }
}

.machine-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 8px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.machine-card.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 3px rgba(240,116,20,.15);
}

.machine-card .machine-icon { font-size: 2rem; line-height: 1; }
.machine-card .machine-name { font-size: .75rem; font-weight: 600; color: var(--text); line-height: 1.3; }

.machine-card .badge-check {
  position: absolute;
  top: 6px; right: 6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: all var(--transition);
}

.machine-card.selected .badge-check {
  opacity: 1;
  transform: scale(1);
}

.machine-qty {
  display: none;
  margin-top: 6px;
  width: 100%;
}

.machine-card.selected .machine-qty { display: block; }

.machine-qty input {
  width: 100%;
  text-align: center;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  padding: 4px;
  font-size: .8rem;
  outline: none;
}

/* ---------- İlan kartları ---------- */
.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition);
}
.listing-card:hover { box-shadow: var(--shadow); }

.listing-card .listing-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.listing-card .listing-meta {
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.listing-card .listing-wage {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

/* ---------- Badge'ler ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 600;
}
.badge-primary  { background: var(--primary-bg); color: var(--primary-dark); }
.badge-success  { background: #f0fdf4; color: #16a34a; }
.badge-warning  { background: #fffbeb; color: #d97706; }
.badge-danger   { background: #fef2f2; color: #dc2626; }
.badge-muted    { background: #f0f0f0; color: var(--muted); }

/* ---------- Ücret özet kutusu ---------- */
.wage-summary {
  background: var(--primary-bg);
  border: 1.5px solid rgba(240,116,20,.3);
  border-radius: var(--radius);
  padding: 16px;
}

.wage-summary .wage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(240,116,20,.15);
  font-size: .88rem;
}
.wage-summary .wage-row:last-child { border-bottom: none; }
.wage-summary .wage-row .wl { color: var(--muted); }
.wage-summary .wage-row .wv { font-weight: 700; color: var(--primary-dark); }
.wage-summary .wage-row.highlight .wv { font-size: 1.1rem; color: var(--primary); }

/* ---------- Landing sayfası ---------- */
.landing-hero {
  background: linear-gradient(135deg, var(--dark) 0%, #2a1a0a 100%);
  padding: 48px 24px 40px;
  text-align: center;
  color: #fff;
}

.landing-hero .hero-logo {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.landing-hero .hero-logo span { color: #fff; }

.landing-hero p {
  font-size: .95rem;
  color: rgba(255,255,255,.7);
  margin: 0;
  line-height: 1.5;
}

.landing-cards {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-type-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  transition: all var(--transition);
}

.landing-type-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.landing-type-card .type-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  display: block;
}

.landing-type-card .type-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}

.landing-type-card .type-desc {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.landing-type-card .btn-group {
  display: flex;
  gap: 10px;
}

/* ---------- Giriş / Kayıt sayfaları ---------- */
.auth-header {
  background: var(--dark);
  padding: 28px 24px 24px;
  text-align: center;
  color: #fff;
}
.auth-header .logo { font-size: 1.6rem; font-weight: 900; color: var(--primary); }
.auth-header p { font-size: .88rem; color: rgba(255,255,255,.6); margin-top: 4px; }

.auth-body {
  padding: 24px 16px;
}

/* ---------- Sekme ---------- */
.tabs {
  display: flex;
  background: #f0f0f0;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.tab-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ---------- Dashboard kartları ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Bölüm başlığı ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}

/* ---------- Boş durum ---------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: .9rem; margin-bottom: 20px; }

/* ---------- Yükleme animasyonu ---------- */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(240,116,20,.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Admin ---------- */
.admin-sidebar {
  background: var(--dark);
  min-height: 100vh;
  padding: 20px 0;
  color: #fff;
}
.admin-logo {
  padding: 0 20px 20px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 10px;
}
.admin-nav a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
  color: #fff;
  background: rgba(240,116,20,.2);
  border-left: 3px solid var(--primary);
}

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.data-table th {
  background: #f8f8f8;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }

/* ---------- Konum input sarmalı ---------- */
.location-wrap { position: relative; }
.location-wrap .form-control { padding-left: 40px; }
.location-wrap .loc-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 1rem;
  pointer-events: none;
}

/* ---------- Ücret periyot kartları ---------- */
.period-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.period-card {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
}
.period-card input[type="radio"] { display: none; }
.period-card .period-label { font-size: .95rem; font-weight: 700; display: block; margin-bottom: 2px; }
.period-card .period-sub   { font-size: .72rem; color: var(--muted); }
.period-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.period-card:has(input:checked) .period-label { color: var(--primary); }

/* ---------- Alert ---------- */
.alert {
  padding: 13px 16px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ---------- Responsive: tablette yan yana ---------- */
@media (min-width: 640px) {
  .machine-grid { grid-template-columns: repeat(4, 1fr); }
  .landing-cards { flex-direction: row; }
  .landing-type-card { flex: 1; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .period-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Üst padding (iOS safe-area) ---------- */
@supports (padding-top: env(safe-area-inset-top)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ---------- d-none utility ---------- */
.d-none { display: none !important; }

/* ---------- Form bölüm etiketi ---------- */
.form-section-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ---------- Dosya yükleme bölgesi ---------- */
.file-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  background: #fafafa;
}
.file-upload-zone:hover,
.file-upload-zone.drag-over { border-color: var(--primary); background: var(--primary-bg); }
.file-upload-zone.has-file   { border-color: var(--success); background: #f0fdf4; }

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-upload-text { font-size: .88rem; font-weight: 600; color: var(--text); margin-top: 6px; }
.file-preview { margin-top: 10px; display: none; }
.file-preview img { max-width: 100%; max-height: 120px; border-radius: 8px; object-fit: cover; }
.file-preview .file-name { font-size: .8rem; color: var(--success); font-weight: 600; margin-top: 4px; }
