* { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; margin: 0; background: #eef2f7; color: #1a1a1a; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: #0b3d66; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 100; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-logo { font-size: 26px; }
.brand-name { font-size: 16px; font-weight: 700; line-height: 1.2; }
.side-nav { display: flex; flex-direction: column; padding: 10px 0; flex: 1; }
.side-nav button { background: transparent; color: #d6e2ee; border: none; text-align: left; padding: 11px 18px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; border-left: 3px solid transparent; }
.side-nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav button.active { background: rgba(255,255,255,.14); color: #fff; border-left-color: #ffb020; font-weight: 600; }
.main-wrap { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; padding: 14px 24px; border-bottom: 1px solid #e3e8ee; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 50; }
.page-title { font-size: 20px; font-weight: 700; color: #0b3d66; }
main { padding: 24px; max-width: 1200px; width: 100%; margin: 0 auto; }
table { width: 100%; border-collapse: collapse; background: #fff; margin-top: 12px; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(16,42,67,.06); }
th, td { border: 1px solid #e3e8ee; padding: 10px 12px; text-align: left; font-size: 14px; }
th { background: #0b3d66; color: #fff; }
tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr:hover { background: #eef3f8; }
td button { padding: 6px 10px; border: none; border-radius: 4px; background: #0b3d66; color: #fff; font-size: 12px; margin-right: 4px; cursor: pointer; }
td button.danger { background: #b00020; }
h2 { color: #0b3d66; font-size: 18px; margin: 4px 0 8px; }
.hidden { display: none; }
main form { background: #fff; padding: 22px; border: 1px solid #e3e8ee; border-radius: 10px; box-shadow: 0 2px 8px rgba(16,42,67,.06); display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 14px 0 20px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: #33475b; font-weight: 700; }
.field label.checkbox { font-weight: 400; }
.field input:not([type=checkbox]), .field select, .field textarea { padding: 10px 12px; border: 1px solid #cdd7e0; border-radius: 6px; font-size: 14px; font-family: inherit; width: 100%; }
.field input:not([type=checkbox]):focus, .field select:focus, .field textarea:focus { border-color: #0b3d66; outline: none; box-shadow: 0 0 0 2px rgba(11,61,102,.12); }
.field input[type=checkbox] { width: auto; }
.actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
main form button, #logoutBtn { padding: 10px 16px; background: #0b3d66; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
main form button:hover, #logoutBtn:hover { background: #0a3558; }
.err { color: #b00020; }
#taskMsg { margin-top: 10px; font-weight: 600; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { max-width: 150px; border: 1px solid #ddd; }
table.small th, table.small td { font-size: 12px; }
a { color: #0b3d66; }
.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: #0b3d66; }
.login-box { background: #fff; padding: 30px; border-radius: 8px; width: 320px; }
.login-box h1 { font-size: 18px; text-align: center; }
.login-box input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; }
.login-box button { width: 100%; padding: 10px; background: #0b3d66; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
#toast-container { position: fixed; top: 70px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #0b3d66; color: #fff; padding: 12px 14px 12px 18px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.25); font-size: 14px; max-width: 380px; display: flex; align-items: center; justify-content: space-between; gap: 12px; opacity: 0; transform: translateX(40px); transition: opacity .35s ease, transform .35s ease; }
.toast-text { flex: 1; }
.toast-close { background: transparent; border: none; color: #fff; font-size: 18px; cursor: pointer; padding: 0 2px; line-height: 1; opacity: .75; }
.toast-close:hover { opacity: 1; }
.toast.show { opacity: 1; transform: translateX(0); }

/* Checkbox grubu */
.checkbox-group { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; border: 1px solid #ddd; padding: 10px; border-radius: 4px; background: #fafafa; }
.checkbox { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; font-size: 13px; }
.checkbox input { margin-top: 2px; flex-shrink: 0; }
.checkbox span { line-height: 1.35; }

/* Mobil uyumluluk */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; position: static; height: auto; }
  .brand { padding: 12px 16px; }
  .side-nav { flex-direction: row; overflow-x: auto; padding: 6px; }
  .side-nav button { white-space: nowrap; padding: 8px 12px; font-size: 13px; border-left: none; border-bottom: 2px solid transparent; }
  .side-nav button.active { border-bottom-color: #ffb020; }
  .main-wrap { margin-left: 0; }
  .topbar { padding: 10px 14px; }
  .page-title { font-size: 17px; }
  main { padding: 14px; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  main form { grid-template-columns: 1fr; padding: 16px; }
  .login-box { width: 90%; }
  #toast-container { right: 10px; left: 10px; top: auto; bottom: 12px; }
  .toast { max-width: none; }
}

tr.inactive td { opacity: .5; }
button.danger { background: #b00020; }
button.secondary { background: #666; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,42,67,.5); display: flex; align-items: center; justify-content: center; z-index: 10000; padding: 20px; }
.modal-overlay.hidden { display: none; }
.modal-box { background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 420px; width: 100%; padding: 24px; }
.modal-title { font-size: 16px; font-weight: 700; color: #0b3d66; margin-bottom: 10px; }
.modal-body { font-size: 14px; color: #33475b; margin-bottom: 20px; white-space: pre-line; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.modal-actions button { padding: 9px 18px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.modal-actions button.primary { background: #0b3d66; color: #fff; }
.modal-actions button.secondary { background: #666; color: #fff; }
.modal-actions button.danger { background: #b00020; color: #fff; }

.weekday-group { display: flex; flex-wrap: wrap; gap: 8px; }
.weekday-group .checkbox { background: #f4f6f9; border: 1px solid #e3e8ee; border-radius: 6px; padding: 6px 10px; font-weight: 400; }

.live-refresh { padding: 9px 16px; background: #0b3d66; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; margin: 10px 0; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 10px 0 20px; }
.live-card { background: #fff; border: 1px solid #e3e8ee; border-radius: 8px; padding: 14px; box-shadow: 0 1px 3px rgba(16,42,67,.06); font-size: 13px; line-height: 1.5; }
.live-card strong { color: #0b3d66; }
.live-plate { background: #0b3d66; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 12px; margin-left: 8px; }
.live-card a { display: inline-block; margin-top: 6px; font-size: 12px; }

/* Profesyonel rötuşlar */
h2 { color: #0b3d66; font-size: 18px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid #e3e8ee; }
h3 { color: #0b3d66; font-size: 15px; margin: 18px 0 8px; }
td button { padding: 5px 10px; font-size: 12px; border-radius: 4px; border: none; cursor: pointer; background: #0b3d66; color: #fff; margin-right: 4px; }
td button:hover { opacity: .88; }
td button.danger { background: #b00020; }
td a { font-size: 12px; }
