/* Dedeoğlu Grup application surface. All assets stay on the same origin. */
:root {
  color-scheme: light;
  --brand-purple: #6b6eb2;
  --brand-purple-light: #9398d3;
  --ink: #17171c;
  --muted: #62626e;
  --line: #e3e3eb;
  --line-strong: #8b8b9b;
  --surface: #ffffff;
  --canvas: #f6f6f9;
  --purple-surface: #ededf7;
  --purple-text: #454879;
  --primary: #50538d;
  --warning-surface: #fff5d4;
  --warning-text: #725300;
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: var(--purple-text); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.3; overflow-wrap: anywhere; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
button:disabled, input:disabled, select:disabled, textarea:disabled {
  cursor: not-allowed;
  opacity: .58;
}
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }
.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 20;
  padding: 8px 14px;
  border: 1px solid var(--primary);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
}
.skip-link:focus { top: 8px; }
.preview-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 9px;
  min-height: 29px;
  padding: 4px 14px;
  border-bottom: 1px solid #ead79c;
  background: var(--warning-surface);
  color: var(--warning-text);
  font-size: 11px;
  line-height: 1.5;
}
.preview-badge strong { font-weight: 600; }
.preview-badge span::before { content: "·"; margin-right: 9px; }
.brand-name { color: #000000; font-size: 16px; font-weight: 700; }
.login-panel {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 29px);
  min-height: calc(100dvh - 29px);
  padding: 28px 16px;
}
.login-card {
  width: min(100%, 380px);
  padding: 30px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand-purple);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 20px #17171c05;
}
.login-card h1 { margin-top: 18px; }
.login-description { margin-top: 7px; color: var(--muted); }
.login-form { display: grid; gap: 18px; margin-top: 25px; }
.login-form > .button { width: 100%; }
.workspace-shell {
  display: grid;
  grid-template-columns: 192px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - 29px);
  min-height: calc(100dvh - 29px);
}
.workspace-header {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  min-height: 70px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.workspace-brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; min-width: 0; text-decoration: none; }
.brand-product { padding-left: 14px; border-left: 1px solid var(--line-strong); color: var(--muted); font-size: 14px; }
.workspace-session { display: flex; align-items: center; gap: 15px; min-width: 0; }
.session-identity { display: grid; min-width: 0; text-align: right; }
.session-user { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.session-role { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.workspace-sidebar { min-width: 0; border-right: 1px solid var(--line); background: var(--surface); padding: 18px 12px; }
.workspace-nav { display: grid; position: sticky; top: 88px; align-content: start; gap: 4px; }
.workspace-nav a {
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 8px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 5px 5px 0;
  color: #4f4f5b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.workspace-nav a:hover { background: var(--canvas); color: var(--ink); }
.workspace-nav a[aria-current="page"], .workspace-nav a[aria-current="true"], .workspace-nav a.is-active, .workspace-nav a.active {
  border-left-color: var(--brand-purple);
  background: var(--purple-surface);
  color: var(--purple-text);
  font-weight: 700;
}
.workspace-main { min-width: 0; padding: 23px 26px 32px; }
.workspace-page-heading { margin-bottom: 20px; }
.workspace-page-heading p { margin-top: 5px; font-size: 13px; }
.workspace-content { min-width: 0; display: grid; gap: 18px; }
.workspace-content > * { min-width: 0; max-width: 100%; }
.workspace-content pre { white-space: pre-wrap; overflow-wrap: anywhere; }
fieldset { min-inline-size: 0; }
.muted { color: var(--muted); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 18px; }
.panel > :last-child { margin-bottom: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 15px; }
.section-heading p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; margin-bottom: 16px; }
.toolbar > * { min-width: 0; max-width: 100%; }
.toolbar .field { flex: 1 1 170px; }
.toolbar input[type="search"] { flex: 1 1 200px; width: auto; }
.toolbar .button { flex-shrink: 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.button:hover:not(:disabled) { background: var(--canvas); border-color: #878794; }
.button--primary { background: var(--primary); border-color: var(--primary); color: #ffffff; }
.button--primary:hover:not(:disabled) { background: #414477; border-color: #414477; }
.button--quiet { border-color: transparent; color: var(--muted); background: transparent; }
.badge { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 8px; border: 1px solid #d6d6e9; border-radius: 4px; background: var(--purple-surface); color: var(--purple-text); font-size: 11px; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
.badge--warn { border-color: #ead79c; background: var(--warning-surface); color: var(--warning-text); }
.badge--muted { border-color: var(--line); background: #f1f1f5; color: #5b5b68; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.field label, label.field { font-size: 12px; font-weight: 600; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 37px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
input::placeholder, textarea::placeholder { color: #777781; opacity: 1; }
textarea { min-height: 84px; resize: vertical; }
.field-help { color: var(--muted); font-size: 12px; font-weight: 400; }
.action-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-width: 0; margin-top: 16px; }
.action-form > .notice, .action-form > .toolbar, .action-form > .button, .action-form > button[type="submit"], .action-form > p { grid-column: 1 / -1; }
.action-form > .button, .action-form > button[type="submit"] { justify-self: start; }
.split-view { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 1.6fr); align-items: start; gap: 18px; min-width: 0; }
.split-view > * { min-width: 0; }
.record-list { display: grid; align-content: start; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.record-list > li { min-width: 0; }
.record-button { display: grid; gap: 5px; width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.record-button:hover { border-color: var(--line-strong); background: #fafafd; }
.record-button[aria-pressed="true"], .record-button[aria-selected="true"], .record-button.is-active, .record-button.active { border-color: var(--brand-purple); background: #f4f4fb; box-shadow: inset 3px 0 var(--brand-purple); }
.record-button strong { font-size: 13px; font-weight: 600; }
.record-button small { color: var(--muted); font-size: 12px; }
.record-detail { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow-wrap: anywhere; }
.record-detail > h2, .record-detail > h3 { margin-bottom: 12px; }
.record-detail > p + p { margin-top: 8px; }
dl { margin: 14px 0; }
dt { margin-top: 10px; color: var(--muted); font-size: 12px; }
dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.data-grid { width: 100%; min-width: 0; margin: 0; }
table { width: 100%; max-width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
caption { margin-bottom: 10px; text-align: left; color: var(--muted); }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { background: #f7f7fa; color: #5e5e6a; font-size: 11px; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafafd; }
td .button { min-height: 30px; padding: 5px 8px; font-size: 12px; }
.empty-state { display: grid; place-content: center; gap: 7px; min-height: 150px; padding: 24px 18px; border: 1px dashed #cfcfdc; border-radius: 6px; background: #fafafd; color: var(--muted); text-align: center; }
.empty-state h2, .empty-state h3, .empty-state strong { color: var(--ink); font-size: 14px; }
.empty-state p { max-width: 52ch; font-size: 13px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.stat-card { min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.stat-card h2, .stat-card h3, .stat-card p, .stat-card dt { margin: 0; color: var(--muted); font-size: 12px; font-weight: 400; }
.stat-card strong, .stat-card dd, .stat-card .stat-value { display: block; margin-top: 5px; color: var(--ink); font-size: 23px; font-weight: 600; line-height: 1.2; }
.stat-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.notice { padding: 10px 12px; border: 1px solid #d6d6e9; border-radius: 5px; background: #f4f4fb; color: var(--purple-text); font-size: 12px; overflow-wrap: anywhere; }
.notice--error { border-color: #e4bcbc; background: #fff3f3; color: #8e2727; }

@media (max-width: 1100px) {
  .workspace-shell { grid-template-columns: 180px minmax(0, 1fr); }
  .workspace-main { padding: 21px 20px 28px; }
  .split-view { grid-template-columns: minmax(190px, .85fr) minmax(0, 1.5fr); gap: 14px; }
  .panel, .record-detail { padding: 15px; }
}
@media (max-width: 800px) {
  .workspace-shell { grid-template-columns: 160px minmax(0, 1fr); }
  .workspace-header { padding: 12px 18px; }
  .workspace-brand { display: grid; gap: 0; }
  .brand-product { border: 0; padding: 0; font-size: 12px; }
  .workspace-sidebar { padding: 15px 8px; }
  .workspace-nav a { padding: 8px 9px; font-size: 12px; }
  .workspace-main { padding: 19px 16px 26px; }
  .split-view { grid-template-columns: minmax(0, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  th, td { padding: 9px 7px; }
}
@media (max-width: 560px) {
  .workspace-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .workspace-header { gap: 10px; padding: 12px 14px; }
  .brand-name { font-size: 14px; }
  .workspace-session { gap: 5px; }
  .session-user { font-size: 12px; }
  .session-role { font-size: 10px; }
  .workspace-session .button { padding: 6px 8px; font-size: 12px; }
  .workspace-sidebar { padding: 9px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-nav { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .workspace-nav a { justify-content: center; min-height: 35px; padding: 6px 3px; border: 0; border-bottom: 2px solid transparent; border-radius: 4px; font-size: 12px; text-align: center; }
  .workspace-nav a[aria-current="page"], .workspace-nav a[aria-current="true"], .workspace-nav a.is-active, .workspace-nav a.active { border-bottom-color: var(--brand-purple); }
  .workspace-main { padding: 18px 12px 24px; }
  h1 { font-size: 20px; }
  .workspace-page-heading { margin-bottom: 16px; }
  .workspace-content { gap: 14px; }
  .panel, .record-detail { padding: 13px; }
  .action-form { grid-template-columns: minmax(0, 1fr); }
  .section-heading { align-items: flex-start; }
  .toolbar { gap: 8px; }
  .toolbar .button { flex-shrink: 1; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 11px 12px; }
  .stat-card strong, .stat-card dd, .stat-card .stat-value { font-size: 21px; }
  .login-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
