/* ─── RESET & TOKENS ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:          #0f172a;
  --clr-surface:     #1e293b;
  --clr-surface2:    #334155;
  --clr-border:      rgba(255,255,255,.08);
  --clr-accent:      #6366f1;
  --clr-accent-h:    #4f46e5;
  --clr-text:        #f1f5f9;
  --clr-text-muted:  #94a3b8;
  --clr-danger:      #ef4444;
  --clr-success:     #22c55e;

  --taskbar-h:       48px;
  --radius:          8px;
  --radius-lg:       14px;
  --shadow-win:      0 25px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
  --transition:      .15s ease;
  --font:            'Segoe UI', system-ui, sans-serif;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 14px;
  color: var(--clr-text);
  background: var(--clr-bg);
  user-select: none;
}

.hidden { display: none !important; }

/* ─── LOGIN ──────────────────────────────────────────────────── */
#login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 60% 40%, #1e1b4b 0%, #0f172a 70%);
  z-index: 9999;
}

.login-box {
  background: rgba(30,41,59,.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 360px;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 32px 64px rgba(0,0,0,.5);
}

.login-logo { display: flex; justify-content: center; }

.login-box h1 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.login-subtitle {
  text-align: center;
  color: var(--clr-text-muted);
  font-size: 13px;
  margin-top: -8px;
}

.input-group { display: flex; flex-direction: column; gap: 6px; }

.input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.input-group input {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--clr-text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-group input:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.25);
}

.login-error {
  color: var(--clr-danger);
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.btn-primary {
  background: var(--clr-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover  { background: var(--clr-accent-h); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.login-toggle {
  text-align: center;
  font-size: 13px;
  color: var(--clr-text-muted);
  margin-top: -4px;
}
.login-toggle a {
  color: var(--clr-accent);
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}
.login-toggle a:hover { text-decoration: underline; }

/* ─── ONAY BEKLEME EKRANI ────────────────────────────────────── */
#pending-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 60% 40%, #1e1b4b 0%, #0f172a 70%);
  z-index: 9999;
}
.pending-icon { font-size: 48px; }

/* ─── SİLİK LOGOLAR ──────────────────────────────────────────── */
#desktop-logo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 360px; max-width: 45vw;
  opacity: .15;
  pointer-events: none;
  z-index: 0;
  filter: grayscale(1) brightness(1.6);
  user-select: none;
}
.window-logo {
  position: absolute;
  right: 14px; bottom: 12px;
  width: 70px;
  opacity: .15;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

/* ─── UYGULAMA: SİSTEM KAYITLARI (LOG) ───────────────────────── */
.logs-wrap { display: flex; flex-direction: column; height: 100%; }
.logs-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0;
}
.logs-toolbar select, .logs-search {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  border-radius: var(--radius); color: var(--clr-text); font-size: 13px;
  padding: 6px 10px; outline: none; font-family: var(--font);
}
.logs-toolbar select option { background: var(--clr-surface); }
.logs-search { flex: 1; }
.logs-count { font-size: 12px; color: var(--clr-text-muted); white-space: nowrap; }
.logs-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.log-row {
  display: grid; grid-template-columns: 110px 110px 120px 1fr; gap: 8px;
  padding: 7px 12px; font-size: 12px; align-items: center;
  border-bottom: 1px solid var(--clr-border);
}
.log-time  { color: var(--clr-text-muted); font-size: 11px; }
.log-action {
  font-weight: 700; font-size: 11px; text-align: center;
  padding: 2px 6px; border-radius: 999px;
  background: rgba(148,163,184,.15); color: var(--clr-text-muted);
}
.log-action.log-chat   { background: rgba(139,92,246,.18); color: #c4b5fd; }
.log-action.log-login,
.log-action.log-logout { background: rgba(14,165,233,.16); color: #7dd3fc; }
.log-action.log-board  { background: rgba(236,72,153,.16); color: #f9a8d4; }
.log-action.log-user   { background: rgba(99,102,241,.18); color: #a5b4fc; }
.log-action.log-customer { background: rgba(34,197,94,.16); color: #86efac; }
.log-actor  { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-detail { color: var(--clr-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: text; }

/* ─── ATANAN GÖREV UYARISI (❗) ──────────────────────────────── */
#task-alert {
  position: absolute;
  right: 18px; bottom: 64px;
  z-index: 8000;
  width: 300px;
}
#task-alert.collapsed { width: auto; }

.task-alert-bang { color: #ef4444; font-weight: 800; }

.task-alert-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--clr-surface);
  border: 1px solid rgba(239,68,68,.5);
  border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: taskPulse 2s ease-in-out infinite;
}
.task-alert-count {
  background: #ef4444; color: #fff; font-size: 12px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
@keyframes taskPulse {
  0%,100% { box-shadow: 0 8px 24px rgba(0,0,0,.4); }
  50%     { box-shadow: 0 8px 24px rgba(239,68,68,.45); }
}

#task-alert:not(.collapsed) {
  background: var(--clr-surface);
  border: 1px solid rgba(239,68,68,.4);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 44px rgba(0,0,0,.5);
  overflow: hidden;
}
.task-alert-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: 13px; font-weight: 700;
  background: rgba(239,68,68,.12);
  border-bottom: 1px solid rgba(239,68,68,.25);
}
.task-alert-min {
  background: transparent; border: none; color: var(--clr-text-muted);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px;
}
.task-alert-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.task-alert-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 10px; border-radius: var(--radius);
}
.task-alert-item:hover { background: rgba(255,255,255,.04); }
.task-alert-info { flex: 1; min-width: 0; }
.task-alert-title { font-size: 13px; font-weight: 600; }
.task-alert-detail { font-size: 12px; color: var(--clr-text-muted); white-space: pre-wrap; }
.task-alert-by { font-size: 11px; color: var(--clr-text-muted); margin-top: 2px; }
.task-alert-done {
  background: rgba(34,197,94,.18); color: #4ade80;
  border: 1px solid rgba(34,197,94,.4); border-radius: 8px;
  font-size: 12px; font-weight: 600; padding: 5px 10px; cursor: pointer; white-space: nowrap;
}
.task-alert-done:hover { background: rgba(34,197,94,.3); }

/* ─── GÖREV ATAMA (admin) ────────────────────────────────────── */
.assign-wrap { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
.assign-form {
  padding: 14px; border-bottom: 1px solid var(--clr-border);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.assign-form h3 { font-size: 13px; font-weight: 700; color: var(--clr-text-muted); }
.assign-form input, .assign-form select, .assign-form textarea {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  border-radius: var(--radius); color: var(--clr-text); font-family: var(--font);
  font-size: 13px; padding: 8px 10px; outline: none;
}
.assign-form select option { background: var(--clr-surface); }
.assign-form .form-row select { flex: 1; }
.assign-list { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.assign-card {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 10px 12px;
}
.assign-card-info { flex: 1; min-width: 0; }
.assign-card-title { font-size: 13px; font-weight: 600; }
.assign-card-detail { font-size: 12px; color: var(--clr-text-muted); }
.assign-card-meta { display: flex; gap: 12px; font-size: 11px; color: var(--clr-text-muted); margin-top: 4px; }
.assign-done.complete { color: #4ade80; font-weight: 700; }

/* ─── GENEL ARAMA ────────────────────────────────────────────── */
#search-btn {
  background: transparent; border: none; cursor: pointer;
  font-size: 15px; padding: 4px 6px; border-radius: 8px;
  transition: background var(--transition);
}
#search-btn:hover { background: rgba(255,255,255,.1); }

#search-overlay {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.search-box {
  width: 560px; max-width: 92vw;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
  overflow: hidden;
}
#search-input {
  width: 100%; border: none; outline: none;
  background: transparent; color: var(--clr-text);
  font-size: 16px; padding: 16px 18px;
  border-bottom: 1px solid var(--clr-border);
}
.search-results { max-height: 50vh; overflow-y: auto; padding: 8px; }
.search-hint { padding: 24px; text-align: center; color: var(--clr-text-muted); font-size: 14px; }
.search-group { margin-bottom: 10px; }
.search-group-title { font-size: 11px; font-weight: 700; color: var(--clr-text-muted); text-transform: uppercase; padding: 6px 10px; }
.search-item {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 12px; border-radius: var(--radius); cursor: pointer;
}
.search-item:hover { background: rgba(99,102,241,.15); }
.search-item-label { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-sub { font-size: 12px; color: var(--clr-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── BİLDİRİM ZİLİ + MERKEZİ ────────────────────────────────── */
#notif-bell {
  position: relative;
  background: transparent; border: none; cursor: pointer;
  font-size: 16px; padding: 4px 6px; border-radius: 8px;
  transition: background var(--transition);
}
#notif-bell:hover { background: rgba(255,255,255,.1); }
.notif-bell-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--clr-danger); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}

#notif-panel {
  position: absolute;
  right: 8px; bottom: 56px;
  width: 320px; max-height: 420px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 50px rgba(0,0,0,.55);
  z-index: 9500;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--clr-border);
  font-size: 13px; font-weight: 700;
}
.notif-panel-head button {
  background: transparent; border: none; color: var(--clr-text-muted);
  cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 6px;
}
.notif-panel-head button:hover { background: rgba(255,255,255,.08); color: var(--clr-text); }
.notif-list { overflow-y: auto; padding: 6px; }
.notif-empty { padding: 24px 12px; text-align: center; color: var(--clr-text-muted); font-size: 13px; }
.notif-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 10px; border-radius: var(--radius);
  transition: background var(--transition);
}
.notif-item:hover { background: rgba(255,255,255,.04); }
.notif-item.unread { background: rgba(99,102,241,.1); }
.notif-item-icon {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.notif-item-body { min-width: 0; flex: 1; }
.notif-item-title { font-size: 13px; font-weight: 700; }
.notif-item-text { font-size: 12px; color: var(--clr-text-muted); white-space: pre-wrap; word-break: break-word; }
.notif-item-time { font-size: 10px; color: var(--clr-text-muted); margin-top: 2px; }

/* ─── TOAST BİLDİRİMLER ──────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 10000;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  width: 300px;
  background: rgba(30,41,59,.97);
  backdrop-filter: blur(20px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  padding: 12px 14px;
  transform: translateX(360px);
  opacity: 0;
  transition: transform .28s cubic-bezier(.2,.9,.3,1.2), opacity .28s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-text  { font-size: 12px; color: var(--clr-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-close {
  background: transparent; border: none; color: var(--clr-text-muted);
  font-size: 18px; cursor: pointer; line-height: 1; padding: 2px 4px; flex-shrink: 0;
}
.toast-close:hover { color: var(--clr-text); }

/* ─── DESKTOP ────────────────────────────────────────────────── */
#desktop {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(99,102,241,.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139,92,246,.1) 0%, transparent 50%),
    #0f172a;
  overflow: hidden;
}

/* ─── DESKTOP ICONS ──────────────────────────────────────────── */
#desktop-icons {
  position: absolute;
  inset: 0 0 var(--taskbar-h) 0;
  z-index: 1;
}

.desktop-icon {
  position: absolute;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  width: 80px;
  padding: 10px 6px;
  border-radius: var(--radius);
  cursor: grab;
  transition: background var(--transition);
  text-align: center;
  user-select: none;
}
.desktop-icon:active { cursor: grabbing; }

/* Masaüstü sağ-tık menüsü */
.desk-menu {
  position: fixed; z-index: 9000;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
  padding: 4px; min-width: 180px;
}
.desk-menu button {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none; color: var(--clr-text);
  padding: 9px 12px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.desk-menu button:hover { background: rgba(255,255,255,.08); }

/* Bildirim rozetleri */
.icon-badge, .menu-badge {
  background: var(--clr-danger);
  color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.icon-badge {
  position: absolute; top: 6px; right: 10px;
  box-shadow: 0 0 0 2px var(--clr-bg);
}
.menu-badge { margin-left: auto; }

.desktop-icon:hover  { background: rgba(255,255,255,.08); }
.desktop-icon:active { background: rgba(255,255,255,.12); }

.desktop-icon .icon-img {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.desktop-icon .icon-label {
  font-size: 11px;
  color: var(--clr-text);
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  line-height: 1.3;
  word-break: break-word;
}

/* ─── TASKBAR ────────────────────────────────────────────────── */
#taskbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: var(--taskbar-h);
  background: rgba(15,23,42,.9);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--clr-border);
  display: flex; align-items: center;
  padding: 0 8px;
  gap: 4px;
  z-index: 1000;
}

#start-btn {
  display: flex; align-items: center; gap: 8px;
  background: transparent;
  border: none;
  color: var(--clr-text);
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition);
  flex-shrink: 0;
}
#start-btn:hover { background: rgba(255,255,255,.08); }

#taskbar-items {
  display: flex; align-items: center; gap: 4px;
  flex: 1;
  overflow: hidden;
}

.taskbar-item {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 4px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--clr-text);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--transition), border-color var(--transition);
}
.taskbar-item:hover   { background: rgba(255,255,255,.1); }
.taskbar-item.active  { background: rgba(99,102,241,.2); border-color: rgba(99,102,241,.4); }

#system-tray {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto;
  padding-left: 12px;
  flex-shrink: 0;
}

#tray-user {
  font-size: 12px;
  color: var(--clr-text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tray-clock {
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-text);
  min-width: 48px;
  text-align: right;
}

#logout-btn, #start-logout-btn {
  background: transparent;
  border: none;
  color: var(--clr-text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  padding: 5px;
  display: flex; align-items: center;
  transition: color var(--transition), background var(--transition);
}
#logout-btn:hover { color: var(--clr-danger); background: rgba(239,68,68,.1); }

/* ─── BAŞLAT MENÜSÜ ──────────────────────────────────────────── */
#start-menu {
  position: absolute;
  bottom: calc(var(--taskbar-h) + 8px);
  left: 8px;
  width: 280px;
  background: rgba(15,23,42,.95);
  backdrop-filter: blur(24px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-win);
  z-index: 999;
  overflow: hidden;
}

.start-menu-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--clr-border);
  font-weight: 600;
  font-size: 13px;
  color: var(--clr-text-muted);
}

#start-menu-apps {
  padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  max-height: 340px;
  overflow-y: auto;
}

.start-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
}
.start-menu-item:hover { background: rgba(255,255,255,.07); }
.start-menu-item .icon-img { width: 32px; height: 32px; border-radius: 8px; font-size: 16px; display: flex; align-items: center; justify-content: center; }

.start-menu-footer {
  padding: 10px;
  border-top: 1px solid var(--clr-border);
}

#start-logout-btn {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--clr-danger);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}
#start-logout-btn:hover { background: rgba(239,68,68,.1); }

/* ─── PENCERE (WINDOW) ───────────────────────────────────────── */
.window {
  position: absolute;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-win);
  display: flex; flex-direction: column;
  min-width: 320px;
  min-height: 200px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.window.focused {
  box-shadow: 0 28px 70px rgba(0,0,0,.7), 0 0 0 1px rgba(99,102,241,.3);
}

.window.minimized { display: none; }

/* Pencere Başlık Çubuğu */
.window-titlebar {
  display: flex; align-items: center;
  height: 40px;
  padding: 0 12px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--clr-border);
  cursor: grab;
  flex-shrink: 0;
  gap: 10px;
}
.window-titlebar:active { cursor: grabbing; }

.window-titlebar .win-icon { font-size: 16px; flex-shrink: 0; }

.window-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-controls { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }

.win-btn {
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  transition: opacity var(--transition), transform var(--transition);
  color: rgba(0,0,0,.7);
  font-weight: 700;
}
.win-btn:hover   { opacity: .85; }
.win-btn:active  { transform: scale(.9); }

.win-btn.minimize { background: #f59e0b; }
.win-btn.maximize { background: #22c55e; }
.win-btn.close    { background: #ef4444; }

/* Pencere İçeriği */
.window-content {
  flex: 1;
  overflow: auto;
  position: relative;
}

/* Yeniden boyutlandırma tutamaçları */
.resize-handle {
  position: absolute;
  z-index: 10;
}
.resize-handle.se {
  bottom: 0; right: 0;
  width: 16px; height: 16px;
  cursor: se-resize;
}
.resize-handle.e  { top: 40px; right: 0; width: 6px; bottom: 16px; cursor: e-resize; }
.resize-handle.s  { left: 16px; bottom: 0; right: 16px; height: 6px; cursor: s-resize; }

/* ─── UYGULAMA: NOTEPAD ──────────────────────────────────────── */
.notepad-wrap {
  display: flex; flex-direction: column;
  height: 100%;
}
.notepad-toolbar {
  display: flex; gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--clr-border);
  flex-shrink: 0;
}
.notepad-toolbar button {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--clr-border);
  border-radius: 5px;
  color: var(--clr-text);
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.notepad-toolbar button:hover { background: rgba(255,255,255,.1); }

.notepad-area {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--clr-text);
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.7;
  padding: 14px 16px;
  user-select: text;
}

/* ─── UYGULAMA: KULLANICI YÖNETİMİ ──────────────────────────── */
.usermgr-wrap { padding: 20px; display: flex; flex-direction: column; gap: 20px; }

.usermgr-wrap h2 { font-size: 16px; font-weight: 700; }

.usermgr-form {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}

.usermgr-form h3 { font-size: 13px; font-weight: 600; color: var(--clr-text-muted); }

.form-row { display: flex; gap: 8px; flex-wrap: wrap; }

.form-row input, .form-row select {
  flex: 1;
  min-width: 140px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--clr-text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}
.form-row input:focus, .form-row select:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}
.form-row select option { background: var(--clr-surface); }

.btn-sm {
  background: var(--clr-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}
.btn-sm:hover { background: var(--clr-accent-h); }
.btn-sm.danger { background: var(--clr-danger); }
.btn-sm.danger:hover { background: #dc2626; }

.user-list { display: flex; flex-direction: column; gap: 8px; }

.user-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
}

.user-card-header {
  display: flex; align-items: center; justify-content: space-between;
}

.user-card-info { display: flex; flex-direction: column; gap: 2px; }

.user-card-name { font-weight: 600; font-size: 13px; }
.user-card-email { font-size: 12px; color: var(--clr-text-muted); }

.role-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.role-badge.admin    { background: rgba(99,102,241,.2); color: #818cf8; }
.role-badge.user     { background: rgba(148,163,184,.1); color: var(--clr-text-muted); }

.user-perms {
  display: flex; flex-wrap: wrap; gap: 6px;
}

/* Unvan rozeti */
/* Marka / logo ayarı */
.br-logo-row { display: flex; gap: 12px; align-items: center; }
.br-logo-prev {
  width: 56px; height: 56px; flex-shrink: 0;
  border: 1px solid var(--clr-border); border-radius: var(--radius);
  background: rgba(0,0,0,.2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.br-logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }

#login-logo-img { max-width: 56px; max-height: 56px; border-radius: 12px; object-fit: contain; }

.title-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  vertical-align: middle;
  margin-left: 4px;
}

/* Grup kartı */
.group-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.group-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.group-card-head { display: flex; align-items: center; justify-content: space-between; }

.grp-color-input {
  width: 44px; min-width: 44px; height: 38px; padding: 2px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius); cursor: pointer;
}

.grp-assign {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  color: var(--clr-text); font-size: 12px;
  padding: 5px 8px; outline: none;
}
.grp-assign option { background: var(--clr-surface); }
.user-grp-row { display: flex; align-items: center; gap: 8px; }

.perm-chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.perm-chip.granted {
  background: rgba(34,197,94,.15);
  border-color: rgba(34,197,94,.3);
  color: #4ade80;
}
.perm-chip:hover { border-color: var(--clr-accent); }

/* ─── UYGULAMA: AYARLAR ──────────────────────────────────────── */
.settings-wrap { padding: 18px; display: flex; flex-direction: column; gap: 16px; }

.settings-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.settings-card h3 { font-size: 13px; font-weight: 700; color: var(--clr-text-muted); }
.settings-card .input-group label { font-size: 11px; }

.settings-profile { display: flex; flex-direction: column; gap: 8px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--clr-border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row span { color: var(--clr-text-muted); }
.settings-row b { font-weight: 600; }

.settings-msg { font-size: 12px; min-height: 16px; color: var(--clr-text-muted); }

/* ─── UYGULAMA: HESAP MAKİNESİ ───────────────────────────────── */
.calc-wrap { display: flex; flex-direction: column; height: 100%; padding: 12px; gap: 12px; }

.calc-display {
  background: rgba(0,0,0,.25);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 18px 16px;
  font-size: 28px;
  font-weight: 600;
  text-align: right;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  overflow-x: auto;
  white-space: nowrap;
  min-height: 64px;
  display: flex; align-items: center; justify-content: flex-end;
}

.calc-keys {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calc-key {
  border: 1px solid var(--clr-border);
  background: rgba(255,255,255,.05);
  color: var(--clr-text);
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.calc-key:hover  { background: rgba(255,255,255,.1); }
.calc-key:active { transform: scale(.95); }
.calc-key.calc-op { background: rgba(99,102,241,.2); color: #a5b4fc; }
.calc-key.calc-op:hover { background: rgba(99,102,241,.32); }
.calc-key.calc-fn { background: rgba(148,163,184,.12); color: var(--clr-text-muted); }
.calc-key.calc-wide { grid-column: span 2; }

/* ─── UYGULAMA: ORTAK PANO ───────────────────────────────────── */
.board-wrap { display: flex; flex-direction: column; height: 100%; }

.board-compose {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 12px;
  border-bottom: 1px solid var(--clr-border);
  flex-shrink: 0;
}
.board-input {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  color: var(--clr-text);
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 12px;
  resize: none;
  outline: none;
  user-select: text;
}
.board-input:focus { border-color: var(--clr-accent); box-shadow: 0 0 0 3px rgba(99,102,241,.2); }

.board-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}

.board-post {
  position: relative;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.board-post-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.board-author { font-size: 12px; font-weight: 700; color: #f9a8d4; }
.board-title  { font-weight: 600; opacity: .8; font-size: 11px; }
.board-time   { font-size: 11px; color: var(--clr-text-muted); }
.board-text   { font-size: 13px; line-height: 1.5; color: var(--clr-text); white-space: pre-wrap; word-break: break-word; user-select: text; }

.board-del {
  position: absolute; top: 8px; right: 8px;
  width: 20px; height: 20px;
  border: none; border-radius: 50%;
  background: rgba(239,68,68,.15);
  color: var(--clr-danger);
  cursor: pointer;
  font-size: 14px; line-height: 1;
  opacity: 0;
  transition: opacity var(--transition);
}
.board-post:hover .board-del { opacity: 1; }

/* ─── TEMA SEÇİCİLERİ (Ayarlar) ──────────────────────────────── */
.settings-sub { font-size: 11px; color: var(--clr-text-muted); font-weight: 600; }
.theme-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform var(--transition);
}
.theme-swatch:hover { transform: scale(1.12); }
.theme-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--clr-accent); }
.theme-walls { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-wall {
  width: 64px; height: 40px; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer;
  color: #fff; font-size: 10px; font-weight: 600;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 3px;
  text-shadow: 0 1px 3px rgba(0,0,0,.9);
  transition: transform var(--transition);
}
.theme-wall:hover { transform: scale(1.06); }
.theme-wall.active { border-color: #fff; }

/* ─── UYGULAMA: CRM (MÜŞTERİ TAKİP) ──────────────────────────── */
.crm-wrap { display: flex; flex-direction: column; height: 100%; }
.crm-form {
  padding: 14px; border-bottom: 1px solid var(--clr-border);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.crm-form h3 { font-size: 13px; font-weight: 700; color: var(--clr-text-muted); }
.crm-platforms { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.crm-check { display: flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; }
.crm-notes {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  border-radius: var(--radius); color: var(--clr-text); font-family: var(--font);
  font-size: 13px; padding: 8px 12px; resize: vertical; outline: none; user-select: text;
}
.crm-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0;
}
.crm-search {
  flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  border-radius: var(--radius); color: var(--clr-text); padding: 7px 12px;
  font-size: 13px; font-family: var(--font); outline: none; user-select: text;
}
.crm-count { font-size: 12px; color: var(--clr-text-muted); white-space: nowrap; }
.crm-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.crm-card {
  background: rgba(255,255,255,.03); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
}
.crm-card-top { display: flex; align-items: center; justify-content: space-between; }
.crm-brand { font-weight: 700; font-size: 14px; }
.crm-status {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  margin-left: 8px; text-transform: uppercase;
}
.crm-status-aktif      { background: rgba(34,197,94,.18);  color: #4ade80; }
.crm-status-pasif      { background: rgba(148,163,184,.15); color: var(--clr-text-muted); }
.crm-status-potansiyel { background: rgba(245,158,11,.18);  color: #fbbf24; }
.crm-actions button {
  background: transparent; border: none; cursor: pointer; font-size: 14px; padding: 2px 4px;
  opacity: .7; transition: opacity var(--transition);
}
.crm-actions button:hover { opacity: 1; }
.crm-line { font-size: 13px; color: var(--clr-text); }
.crm-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--clr-text-muted); }
.crm-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.crm-tag {
  background: rgba(14,165,233,.15); color: #38bdf8; border-radius: 999px;
  padding: 2px 9px; font-size: 11px; font-weight: 600;
}
.crm-note {
  font-size: 12px; color: var(--clr-text-muted); background: rgba(0,0,0,.15);
  border-radius: 6px; padding: 6px 10px; white-space: pre-wrap; user-select: text;
}

/* ─── CRM: HİZMET SEÇİCİ ─────────────────────────────────────── */
.crm-svc-pick { display: flex; flex-direction: column; gap: 6px; }
.crm-services { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-svc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--clr-border); cursor: pointer;
  background: rgba(255,255,255,.04);
}
.crm-svc-chip.on { background: rgba(245,158,11,.18); border-color: rgba(245,158,11,.5); color: #fbbf24; }
.crm-svc-chip input { accent-color: var(--clr-accent); }
.crm-svc-total { font-size: 13px; color: var(--clr-text-muted); }
.crm-svc-total b { color: #fbbf24; font-size: 14px; }
.crm-svc-tag {
  background: rgba(245,158,11,.15); color: #fbbf24; border-radius: 999px;
  padding: 2px 9px; font-size: 11px; font-weight: 600;
}
.crm-revenue { font-size: 12px; font-weight: 700; color: #fbbf24; margin-right: 4px; }

/* ─── UYGULAMA: HİZMETLER ────────────────────────────────────── */
.svc-wrap { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
.svc-section { padding: 14px; border-bottom: 1px solid var(--clr-border); }
.svc-section h3 { font-size: 13px; font-weight: 700; color: var(--clr-text-muted); margin-bottom: 10px; }
.svc-form { display: flex; gap: 8px; flex-wrap: wrap; }
.svc-form input { flex: 1; min-width: 120px; }
.svc-price-in { max-width: 110px; }
.svc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.svc-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.03); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 10px 12px;
}
.svc-card-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.svc-card-name { font-weight: 600; font-size: 13px; }
.svc-card-desc { font-size: 12px; color: var(--clr-text-muted); }
.svc-card-price { font-weight: 700; color: #fbbf24; font-size: 13px; white-space: nowrap; }
.svc-card-actions button { background: transparent; border: none; cursor: pointer; font-size: 14px; opacity: .7; }
.svc-card-actions button:hover { opacity: 1; }

.svc-total {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(245,158,11,.05));
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 12px;
}
.svc-total-label { font-size: 13px; color: var(--clr-text-muted); }
.svc-total-value { font-size: 26px; font-weight: 800; color: #fbbf24; }

.svc-report { display: flex; flex-direction: column; }
.svc-rep-head, .svc-rep-row {
  display: grid; grid-template-columns: 1fr 80px 120px; gap: 8px;
  padding: 8px 10px; font-size: 13px; align-items: center;
}
.svc-rep-head { color: var(--clr-text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; border-bottom: 1px solid var(--clr-border); }
.svc-rep-row { border-bottom: 1px solid var(--clr-border); }
.svc-rep-money { text-align: right; font-weight: 700; color: #fbbf24; }

/* ─── UYGULAMA: YÖNETİM PANELİ (DASHBOARD) ───────────────────── */
.dash-wrap { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
.dash-toolbar { padding: 12px 14px 0; }
.dash-section { padding: 14px; border-top: 1px solid var(--clr-border); }
.dash-section h3 { font-size: 13px; font-weight: 700; color: var(--clr-text-muted); margin-bottom: 10px; }
.dash-sub { font-weight: 400; color: var(--clr-text-muted); font-size: 12px; }

.dash-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 14px;
}
.dash-kpi {
  background: rgba(255,255,255,.03); border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg); padding: 14px;
  display: flex; flex-direction: column; gap: 4px;
  border-left: 3px solid var(--clr-border);
}
.dash-kpi-val { font-size: 20px; font-weight: 800; }
.dash-kpi-lbl { font-size: 11px; color: var(--clr-text-muted); }
.dash-kpi.c-blue  { border-left-color: #0ea5e9; } .dash-kpi.c-blue  .dash-kpi-val { color: #38bdf8; }
.dash-kpi.c-green { border-left-color: #22c55e; } .dash-kpi.c-green .dash-kpi-val { color: #4ade80; }
.dash-kpi.c-red   { border-left-color: #ef4444; } .dash-kpi.c-red   .dash-kpi-val { color: #f87171; }

/* Grafikler */
#dash-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-block { background: rgba(255,255,255,.03); border: 1px solid var(--clr-border); border-radius: var(--radius-lg); padding: 14px; }
.chart-title { font-size: 12px; font-weight: 700; color: var(--clr-text-muted); margin-bottom: 12px; }
.chart-bars { display: flex; align-items: flex-end; justify-content: space-around; height: 130px; gap: 4px; }
.cb-group { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; height: 100%; justify-content: flex-end; }
.cb-pair { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.cb-bar { width: 12px; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .4s ease; }
.cb-bar.inc { background: #22c55e; }
.cb-bar.exp { background: #ef4444; }
.cb-label { font-size: 10px; color: var(--clr-text-muted); }
.chart-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--clr-text-muted); margin-top: 10px; justify-content: center; }
.chart-legend .lg { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.chart-legend .lg.inc { background: #22c55e; } .chart-legend .lg.exp { background: #ef4444; margin-left: 8px; }

.hbar-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.hbar-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { background: rgba(255,255,255,.06); border-radius: 999px; height: 14px; overflow: hidden; }
.hbar-fill { height: 100%; background: linear-gradient(90deg, #0ea5e9, #6366f1); border-radius: 999px; transition: width .4s ease; }
.hbar-val { font-size: 12px; font-weight: 700; color: #38bdf8; white-space: nowrap; }

.dash-export { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.dash-payments { display: flex; flex-direction: column; gap: 6px; }
.pay-row {
  display: grid; grid-template-columns: 14px 1fr auto auto auto; gap: 10px; align-items: center;
  background: rgba(255,255,255,.03); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 9px 12px;
}
.pay-dot { width: 10px; height: 10px; border-radius: 50%; }
.pay-row.paid   { border-color: rgba(34,197,94,.4); }
.pay-row.paid   .pay-dot { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.6); }
.pay-row.unpaid .pay-dot { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,.5); }
.pay-name { font-size: 13px; font-weight: 600; }
.pay-amount { font-size: 13px; color: var(--clr-text-muted); }
.pay-status { font-size: 12px; font-weight: 700; }
.pay-row.paid   .pay-status { color: #4ade80; }
.pay-row.unpaid .pay-status { color: #f87171; }

.dash-fin-form { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-fin-form select, .dash-fin-form input {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  border-radius: var(--radius); color: var(--clr-text); font-family: var(--font);
  font-size: 13px; padding: 8px 10px; outline: none;
}
.dash-fin-form select option { background: var(--clr-surface); }
.dash-fin-form input[type=number] { max-width: 110px; }
.dash-fin-form #fin-cat, .dash-fin-form #fin-note { flex: 1; min-width: 120px; }
.dash-fin-list { display: flex; flex-direction: column; margin-top: 10px; }
.fin-row {
  display: grid; grid-template-columns: 92px 1fr auto 24px; gap: 10px; align-items: center;
  padding: 8px 6px; border-bottom: 1px solid var(--clr-border); font-size: 13px;
}
.fin-date { color: var(--clr-text-muted); font-size: 12px; }
.fin-cat { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-amt { font-weight: 700; text-align: right; white-space: nowrap; }
.fin-amt.pos { color: #4ade80; }
.fin-amt.neg { color: #f87171; }
.fin-del { background: transparent; border: none; color: var(--clr-text-muted); cursor: pointer; font-size: 16px; }
.fin-del:hover { color: var(--clr-danger); }

/* ─── UYGULAMA: POSTA (MAIL) ─────────────────────────────────── */
.mail-wrap { display: flex; flex-direction: column; height: 100%; }
.mail-accounts { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.mail-acc {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  color: var(--clr-text-muted); border-radius: 999px; padding: 5px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.mail-acc:hover { color: var(--clr-text); }
.mail-acc.active { background: rgba(14,165,233,.18); border-color: rgba(14,165,233,.5); color: #7dd3fc; }
.mail-tabs { display: flex; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.mail-tab {
  background: transparent; border: none; color: var(--clr-text-muted);
  padding: 11px 16px; cursor: pointer; font-size: 13px; font-weight: 600;
  border-bottom: 2px solid transparent; position: relative;
}
.mail-tab:hover { color: var(--clr-text); }
.mail-tab.active { color: var(--clr-text); border-bottom-color: var(--clr-accent); }
.mail-tab-badge {
  background: var(--clr-danger); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 999px; padding: 0 5px; min-width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center; margin-left: 2px;
}
.mail-body { flex: 1; overflow-y: auto; }
.mail-empty { padding: 40px 20px; text-align: center; color: var(--clr-text-muted); font-size: 14px; }

.mail-list { display: flex; flex-direction: column; }
.mail-row {
  padding: 11px 16px; border-bottom: 1px solid var(--clr-border); cursor: pointer;
  transition: background var(--transition);
}
.mail-row:hover { background: rgba(255,255,255,.04); }
.mail-row.unread { background: rgba(14,165,233,.08); }
.mail-row.unread .mail-subject { font-weight: 700; }
.mail-row.unread .mail-who::before { content: '● '; color: var(--clr-accent); font-size: 10px; }
.mail-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mail-who { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-time { font-size: 11px; color: var(--clr-text-muted); white-space: nowrap; }
.mail-subject { font-size: 13px; color: var(--clr-text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mail-read { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mail-back { align-self: flex-start; background: transparent; border: none; color: var(--clr-accent); cursor: pointer; font-size: 13px; padding: 0; }
.mail-read-subject { font-size: 17px; font-weight: 700; }
.mail-read-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--clr-text-muted); padding-bottom: 10px; border-bottom: 1px solid var(--clr-border); }
.mail-read-body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; user-select: text; padding: 6px 0; }

.mail-compose { padding: 14px; display: flex; flex-direction: column; gap: 10px; height: 100%; }
.mail-compose .form-row { display: flex; gap: 8px; }
.mail-compose select, .mail-compose input, .mail-textarea {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  border-radius: var(--radius); color: var(--clr-text); font-family: var(--font);
  font-size: 13px; padding: 9px 11px; outline: none;
}
.mail-compose select { flex: 1; }
.mail-compose select option { background: var(--clr-surface); }
.mail-compose input { width: 100%; }
.mail-textarea { flex: 1; min-height: 180px; resize: none; line-height: 1.5; user-select: text; }

/* ─── UYGULAMA: İÇERİK TAKVİMİ ───────────────────────────────── */
.cal-wrap { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
.cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0;
}
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-nav button {
  background: rgba(255,255,255,.06); border: 1px solid var(--clr-border);
  color: var(--clr-text); border-radius: 8px; width: 30px; height: 30px; cursor: pointer;
}
.cal-nav button:hover { background: rgba(255,255,255,.12); }
.cal-nav span { font-size: 15px; font-weight: 700; min-width: 130px; text-align: center; }
.cal-toolbar select, .cal-form select, .cal-form input, .cal-notes {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  border-radius: var(--radius); color: var(--clr-text); font-family: var(--font);
  font-size: 13px; padding: 7px 10px; outline: none;
}
.cal-toolbar select option, .cal-form select option { background: var(--clr-surface); }

.cal-grid-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 8px 14px 4px; flex-shrink: 0;
}
.cal-grid-head span { font-size: 11px; font-weight: 700; color: var(--clr-text-muted); text-align: center; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  padding: 0 14px 12px; flex-shrink: 0;
}
.cal-cell {
  min-height: 74px;
  background: rgba(255,255,255,.03); border: 1px solid var(--clr-border);
  border-radius: 8px; padding: 4px 5px; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px;
  transition: background var(--transition);
}
.cal-cell:hover { background: rgba(255,255,255,.07); }
.cal-cell.blank { background: transparent; border: none; cursor: default; }
.cal-cell.today { border-color: var(--clr-accent); box-shadow: inset 0 0 0 1px var(--clr-accent); }
.cal-day { font-size: 12px; font-weight: 700; color: var(--clr-text-muted); }
.cal-items { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal-item {
  font-size: 10px; padding: 2px 5px; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; border-left: 3px solid;
}
.cal-st-planlandi  { background: rgba(99,102,241,.16);  color: #a5b4fc; border-color: #6366f1; }
.cal-st-hazir      { background: rgba(245,158,11,.16);  color: #fbbf24; border-color: #f59e0b; }
.cal-st-yayinlandi { background: rgba(34,197,94,.16);   color: #4ade80; border-color: #22c55e; }
.cal-more { font-size: 10px; color: var(--clr-text-muted); padding-left: 5px; }

.cal-form {
  padding: 14px; border-top: 1px solid var(--clr-border);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.cal-form h3 { font-size: 13px; font-weight: 700; color: var(--clr-text-muted); }
.cal-form .form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-form .form-row select, .cal-form .form-row input { flex: 1; min-width: 110px; }
.cal-notes { resize: vertical; }

/* ─── UYGULAMA: PERFORMANS RAPORU ────────────────────────────── */
.rep-wrap { display: flex; flex-direction: column; height: 100%; }
.rep-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.rep-toolbar select { flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--clr-border); border-radius: var(--radius); color: var(--clr-text); font-size: 13px; padding: 8px 10px; outline: none; }
.rep-toolbar select option { background: var(--clr-surface); }
.rep-body { flex: 1; overflow-y: auto; padding: 14px; }
.rep-empty { padding: 40px; text-align: center; color: var(--clr-text-muted); }

.rep-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.rep-card { background: rgba(168,85,247,.1); border: 1px solid rgba(168,85,247,.25); border-radius: var(--radius-lg); padding: 12px; text-align: center; }
.rep-cv { display: block; font-size: 20px; font-weight: 800; color: #c084fc; }
.rep-cv.pos { color: #4ade80; } .rep-cv.neg { color: #f87171; }
.rep-cl { font-size: 11px; color: var(--clr-text-muted); }

.rep-fgroup { margin-bottom: 14px; }
.rep-fgroup h4 { font-size: 12px; font-weight: 700; color: var(--clr-text-muted); text-transform: uppercase; margin-bottom: 8px; }
.rep-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rep-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--clr-text-muted); }
.rep-field.rep-full { grid-column: 1 / -1; }
.rep-field input, .rep-notes {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border); border-radius: var(--radius);
  color: var(--clr-text); font-family: var(--font); font-size: 13px; padding: 8px 10px; outline: none;
}
.rep-notes { width: 100%; resize: vertical; }
.rep-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ─── MÜŞTERİ 360 DETAY ──────────────────────────────────────── */
.cust-detail { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cd-head { display: flex; align-items: center; justify-content: space-between; }
.cd-brand { font-size: 18px; font-weight: 800; }
.cd-sec { background: rgba(255,255,255,.03); border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 12px 14px; }
.cd-sec h4 { font-size: 12px; font-weight: 700; color: var(--clr-text-muted); text-transform: uppercase; margin-bottom: 8px; }
.cd-info { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.cd-svc { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.cd-svc b { color: #fbbf24; }
.cd-pay { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: var(--radius); }
.cd-pay.paid   { background: rgba(34,197,94,.12); color: #4ade80; }
.cd-pay.unpaid { background: rgba(239,68,68,.12); color: #f87171; }
.cd-payhist { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.cd-payhist div { display: flex; justify-content: space-between; font-size: 12px; color: var(--clr-text-muted); }
.cd-payhist b.pos { color: #4ade80; } .cd-payhist b.neg { color: #f87171; }
.cd-content { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 4px 0; }
.cd-cdate { color: var(--clr-text-muted); font-size: 12px; min-width: 78px; }
.cd-ctitle { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── UYGULAMA: DOSYA / LİNK YÖNETİCİSİ ──────────────────────── */
.files-wrap { display: flex; flex-direction: column; height: 100%; }
.files-form { padding: 14px; border-bottom: 1px solid var(--clr-border); display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.files-form input, .files-form select {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border); border-radius: var(--radius);
  color: var(--clr-text); font-family: var(--font); font-size: 13px; padding: 8px 10px; outline: none;
}
.files-form .form-row { display: flex; gap: 8px; }
.files-form .form-row select { flex: 1; min-width: 0; }
.files-form select option { background: var(--clr-surface); }
.files-toolbar { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.files-toolbar select {
  flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--clr-border); border-radius: var(--radius);
  color: var(--clr-text); font-size: 13px; padding: 6px 10px; outline: none;
}
.files-toolbar select option { background: var(--clr-surface); }
.files-count { font-size: 12px; color: var(--clr-text-muted); white-space: nowrap; }
.files-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 10px 12px; }
.file-icon { font-size: 20px; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11px; color: var(--clr-text-muted); display: flex; flex-wrap: wrap; gap: 4px; }
.file-cat { color: #fbbf24; font-weight: 600; }
.file-del { background: transparent; border: none; color: var(--clr-text-muted); cursor: pointer; font-size: 18px; }
.file-del:hover { color: var(--clr-danger); }

/* ─── UYGULAMA: HATIRLATICI ──────────────────────────────────── */
.rem-wrap { display: flex; flex-direction: column; height: 100%; }
.rem-form { padding: 14px; border-bottom: 1px solid var(--clr-border); display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.rem-form h3 { font-size: 13px; font-weight: 700; color: var(--clr-text-muted); }
.rem-form input, .rem-form select {
  background: rgba(255,255,255,.05); border: 1px solid var(--clr-border); border-radius: var(--radius);
  color: var(--clr-text); font-family: var(--font); font-size: 13px; padding: 8px 10px; outline: none;
}
.rem-form .form-row { display: flex; gap: 8px; }
.rem-form .form-row input, .rem-form .form-row select { flex: 1; min-width: 0; }
.rem-form select option { background: var(--clr-surface); }
.rem-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.rem-item { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 10px 12px; }
.rem-item.fired { opacity: .55; }
.rem-item.past:not(.fired) { border-color: rgba(245,158,11,.4); }
.rem-info { flex: 1; min-width: 0; }
.rem-title { font-size: 13px; font-weight: 600; }
.rem-note-l { font-size: 12px; color: var(--clr-text-muted); }
.rem-when { font-size: 11px; color: #fbbf24; margin-top: 2px; }
.rem-del { background: transparent; border: none; color: var(--clr-text-muted); cursor: pointer; font-size: 18px; }
.rem-del:hover { color: var(--clr-danger); }

/* ─── UYGULAMA: GÖREVLER ─────────────────────────────────────── */
.tasks-wrap { display: flex; flex-direction: column; height: 100%; }
.tasks-add { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.tasks-input {
  flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  border-radius: var(--radius); color: var(--clr-text); padding: 8px 12px;
  font-size: 13px; font-family: var(--font); outline: none; user-select: text;
}
.tasks-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.task-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: var(--radius); transition: background var(--transition);
}
.task-row:hover { background: rgba(255,255,255,.04); }
.task-check { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; user-select: text; }
.task-text { font-size: 13px; }
.task-row.done .task-text { text-decoration: line-through; color: var(--clr-text-muted); }
.task-meta { display: flex; align-items: center; gap: 8px; }
.task-author { font-size: 11px; color: var(--clr-text-muted); }
.task-del {
  background: transparent; border: none; color: var(--clr-text-muted);
  cursor: pointer; font-size: 18px; line-height: 1; opacity: 0; transition: opacity var(--transition);
}
.task-row:hover .task-del { opacity: 1; }
.task-del:hover { color: var(--clr-danger); }

/* ─── UYGULAMA: ÖZEL SOHBET (DM) ─────────────────────────────── */
.chat-app { display: flex; height: 100%; }

.chat-sidebar {
  width: 200px; flex-shrink: 0;
  border-right: 1px solid var(--clr-border);
  overflow-y: auto;
  background: rgba(0,0,0,.15);
}
.chat-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer;
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition);
  position: relative;
}
.chat-user:hover { background: rgba(255,255,255,.05); }
.chat-user.active { background: rgba(139,92,246,.18); }
.chat-user-avatar {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--clr-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.chat-user-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-user-last { font-size: 11px; color: var(--clr-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-unread-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--clr-danger); flex-shrink: 0;
}

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: var(--clr-text-muted); font-size: 14px; padding: 20px; text-align: center;
}
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0;
}
.chat-header-name { font-size: 14px; font-weight: 700; }

.chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { display: flex; }
.chat-msg.mine { justify-content: flex-end; }
.chat-bubble {
  max-width: 78%; background: rgba(255,255,255,.06); border: 1px solid var(--clr-border);
  border-radius: 12px; padding: 7px 12px; display: flex; flex-direction: column; gap: 2px;
}
.chat-msg.mine .chat-bubble { background: rgba(99,102,241,.22); border-color: rgba(99,102,241,.35); }
.chat-author { font-size: 11px; font-weight: 700; color: #a5b4fc; }
.chat-text { font-size: 13px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; user-select: text; }
.chat-time { font-size: 10px; color: var(--clr-text-muted); align-self: flex-end; }
.chat-input-bar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--clr-border); flex-shrink: 0; }
.chat-input {
  flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--clr-border);
  border-radius: var(--radius); color: var(--clr-text); padding: 8px 12px;
  font-size: 13px; font-family: var(--font); outline: none; user-select: text;
}

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* ─── ANIMASYONLAR ───────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(.97) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.window  { animation: fadeIn .18s ease; }
#start-menu { animation: fadeIn .15s ease; }

/* ─── LOADING SPINNER ────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--clr-accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET & MOBİL
   ════════════════════════════════════════════════════════════════ */

/* ── TABLET (≤ 1024px): 4'lü ızgaraları 2'ye indir ── */
@media (max-width: 1024px) {
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  #dash-charts { grid-template-columns: 1fr; }
  .rep-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ── MOBİL / DİKEY TABLET (≤ 820px) ── */
@media (max-width: 820px) {

  /* Pencereler tam ekran açılır (sürükleme/boyutlandırma kapalı) */
  .window {
    position: fixed !important;
    inset: 0 0 var(--taskbar-h) 0 !important;
    width: auto !important; height: auto !important;
    border-radius: 0 !important;
    animation: none;
  }
  .window .resize-handle,
  .window-logo,
  .win-btn.maximize { display: none !important; }
  .window-titlebar { padding: 4px 6px; }
  .window-title { font-size: 13px; }
  .win-btn { width: 30px; height: 30px; }   /* dokunmaya uygun büyük butonlar */

  /* Masaüstü ikonları: sürüklenebilir değil, akan ızgara (taşmaz) */
  #desktop-icons {
    position: absolute; inset: 0 0 var(--taskbar-h) 0;
    display: flex; flex-wrap: wrap; align-content: flex-start;
    gap: 4px; padding: 12px; overflow-y: auto;
  }
  .desktop-icon {
    position: static !important;
    left: auto !important; top: auto !important;
    width: 78px; cursor: pointer;
  }
  .icon-badge { right: 4px; }

  /* Görev çubuğu */
  #start-btn span { display: none; }          /* "Başlat" yazısını gizle */
  #taskbar-items { overflow-x: auto; flex-wrap: nowrap; }
  .taskbar-item { white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
  #tray-user { display: none; }               /* yer kazan */

  /* Başlat menüsü tam genişlik */
  #start-menu {
    left: 8px; right: 8px; width: auto; max-width: none;
    bottom: calc(var(--taskbar-h) + 6px);
  }

  /* Giriş ekranı */
  .login-box { width: 92vw; padding: 28px 22px; }

  /* Formlar alt alta */
  .form-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .form-row select, .form-row input, .form-row button { width: 100%; }

  /* Çok sütunlu ızgaralar tek/çift sütuna */
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .rep-cards { grid-template-columns: repeat(2, 1fr); }
  .rep-fields { grid-template-columns: 1fr; }
  .crm-platforms, .crm-services { gap: 6px 10px; }
  .pay-row { grid-template-columns: 12px 1fr auto; row-gap: 4px; }
  .pay-row .pay-status, .pay-row > button { grid-column: 2 / -1; justify-self: start; }
  .log-row { grid-template-columns: 1fr; gap: 2px; }
  .log-row .log-time { order: -1; }
  .svc-form, .dash-fin-form, .assign-form .form-row { flex-direction: column; }
  .svc-rep-head, .svc-rep-row { grid-template-columns: 1fr 50px 90px; }

  /* CRM/uygulama formları tek sütun */
  .crm-form .form-row, .cal-form .form-row, .mail-compose .form-row { flex-direction: column; }

  /* Sohbet: dar kenar çubuğu */
  .chat-sidebar { width: 132px; }
  .chat-user-avatar { width: 30px; height: 30px; font-size: 12px; }

  /* Bildirim/arama/toast/uyarı: ekran genişliğine sığsın */
  .search-box { width: 94vw; }
  #search-overlay { padding-top: 8vh; }
  #notif-panel { width: calc(100vw - 16px); right: 8px; bottom: calc(var(--taskbar-h) + 8px); }
  #toast-container { left: 8px; right: 8px; top: 8px; }
  #toast-container .toast { width: auto; }
  #task-alert { right: 10px; left: 10px; width: auto; bottom: calc(var(--taskbar-h) + 12px); }
  #task-alert.collapsed { left: auto; width: auto; }

  /* Müşteri detay / kartlar */
  #dash-charts { grid-template-columns: 1fr; }
  .cd-content { flex-wrap: wrap; }
}

/* ── KÜÇÜK TELEFON (≤ 480px) ── */
@media (max-width: 480px) {
  .dash-kpis, .rep-cards { grid-template-columns: 1fr; }
  .mail-acc { font-size: 11px; padding: 4px 8px; }
  .chat-sidebar { width: 110px; }
  .desktop-icon { width: 72px; }
  .dash-kpi-val { font-size: 18px; }
}
