@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --blue: #145C8C;
  --blue-dark: #0C4C75;
  --navy: #0B1220;
  --navy-soft: #141D33;
  --ink: #10172A;
  --ink-soft: #566079;
  --line: #E4E8F1;
  --bg: #F1F4F9;
  --card: #FFFFFF;
  --ok: #17A673;
  --ok-bg: #E7F8F1;
  --warn: #C87F0A;
  --warn-bg: #FDF1DD;
  --danger: #D8375B;
  --danger-bg: #FCE9EE;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,23,43,0.04), 0 8px 24px -12px rgba(16,23,43,0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }

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

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--navy);
  color: #C7CEE6;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { padding: 6px 8px 22px; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 16px; }
.brand-logo-plate { display: inline-block; background: #ffffff; border-radius: 8px; padding: 8px 12px; }
.brand-logo { height: 26px; width: auto; display: block; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-label { color: #5C6788; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 8px 12px 8px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  color: #9AA4C4; transition: background .12s, color .12s;
}
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; flex-shrink: 0; }
.nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav a.active { background: var(--blue); color: #fff; }
.nav a.active .nav-dot { opacity: 1; }
.nav-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 10px 6px; }

.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 14px; margin-top: 10px; }
.me-name { color: #fff; font-size: 13px; font-weight: 600; }
.me-role { color: #7C87AC; font-size: 11.5px; margin-bottom: 8px; }
.logout-link { font-size: 12.5px; color: #E97D95; font-weight: 600; }
.logout-link:hover { color: #fff; }

.main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 62px; flex-shrink: 0;
  background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 5;
}
.topbar-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13.5px; flex-shrink: 0;
}
.tb-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.tb-role { font-size: 11.5px; color: var(--ink-soft); }

.content { flex: 1; padding: 26px 32px 60px; max-width: 1200px; }
.content-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--navy); }

/* ---- Page header ---- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { font-size: 21px; font-weight: 700; }
.page-sub { color: var(--ink-soft); font-size: 13px; margin-top: 3px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .12s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: #C6CEE0; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: #F8D3DE; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }

/* ---- Cards / tables ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { font-size: 12px; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 26px; font-weight: 800; margin-top: 6px; }
.stat-value.warn { color: var(--warn); }
.stat-value.danger { color: var(--danger); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
th { color: var(--ink-soft); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFBFF; }

.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 100px; font-size: 11.5px; font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: #EEF1F8; color: var(--ink-soft); }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 13.5px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,110,246,0.14); }
textarea { resize: vertical; min-height: 80px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---- Auth ---- */
.auth-card { width: 380px; padding: 34px; }
.auth-logo { margin-bottom: 6px; }
.auth-logo-img { height: 34px; width: auto; }
.auth-title { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: 9px; font-size: 13.5px; margin-bottom: 18px; font-weight: 500; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-err { background: var(--danger-bg); color: var(--danger); }

/* ---- Kanban (tasks) ---- */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.kanban-col { background: #EEF1F8; border-radius: var(--radius); padding: 0; min-height: 120px; transition: background-color .15s ease; overflow: hidden; }
.kanban-col.drag-over { background: #DCE4F5; outline: 2px dashed var(--blue); outline-offset: -4px; }
.kanban-col-body { min-height: 40px; padding: 14px; }
.kanban-col h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .03em; margin: 0; padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.kanban-col[data-status="todo"] h3 { background: #E6F1FB; color: var(--blue-dark); }
.kanban-col[data-status="in_progress"] h3 { background: var(--warn-bg); color: var(--warn); }
.kanban-col[data-status="done"] h3 { background: var(--ok-bg); color: var(--ok); }
.kanban-empty-drop {
  border: 1.5px dashed var(--line); border-radius: 10px; min-height: 150px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--ink-soft); font-size: 12.5px; padding: 16px;
}
.task-card { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; padding: 12px 13px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: grab; }
.task-card.dragging { opacity: .4; cursor: grabbing; }
.task-card.priority-high { border-left-color: var(--danger); }
.task-card.priority-medium { border-left-color: var(--warn); }
.task-card.priority-low { border-left-color: #B4BAC9; }
.task-card.status-done { opacity: .7; }
.task-card.status-done .t-title { text-decoration: line-through; color: var(--ink-soft); }
.task-card .t-title { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.task-card .t-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--ink-soft); }
.task-card form { display: inline; }
.task-card select { font-size: 11.5px; padding: 4px 6px; margin-top: 8px; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-soft); }

.bulk-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; background: #EEF4FF; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--blue-dark);
}
.row-check, #selectAll { width: 16px; height: 16px; cursor: pointer; }
.empty-state h3 { font-size: 15px; margin-bottom: 6px; color: var(--ink); }

.top-actions { display: flex; gap: 10px; }
.muted { color: var(--ink-soft); }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }

.mobile-menu-btn { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 880px) {
  .app-shell { flex-direction: column; }

  /* Sidebar artık mobilde satır halinde sıkışmıyor: varsayılan olarak
     ekran dışında duran, hamburger butonuyla açılan kayar bir menüye
     dönüştürüldü. */
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 250px;
    max-width: 82vw; flex-direction: column; align-items: stretch;
    padding: 20px 14px; overflow-y: auto; overflow-x: hidden;
    transform: translateX(-100%); transition: transform .2s ease;
    z-index: 30;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .brand { border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 16px; padding: 6px 8px 22px; }
  .nav { flex-direction: column; }
  .nav-label { display: block; }
  .sidebar-footer { display: block; }

  .sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(11,18,32,0.55);
    z-index: 25;
  }
  body.sidebar-open .sidebar-overlay { display: block; }

  .mobile-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
    background: #fff; font-size: 17px; margin-right: 10px; flex-shrink: 0; cursor: pointer;
  }

  .topbar { padding: 0 16px; }
  .content { padding: 20px; }
  .form-grid, .kanban { grid-template-columns: 1fr; }

  /* Domain/SSL/Hosting/Kullanıcı/Aktivite tabloları geniş sütunlu olduğu için
     mobilde ekrana sığmıyordu; kartın kendisi yatayda kaydırılabilir hale
     getirildi, tablo da içeride minimum genişliğini koruyor. */
  .card:not(.card-pad) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card:not(.card-pad) table { min-width: 640px; }
}