:root {
  color-scheme: light;
  --navy-950: #071b2e;
  --navy-900: #102a43;
  --navy-800: #173f5f;
  --blue-700: #1167b1;
  --blue-600: #1684d6;
  --blue-100: #e8f3fc;
  --blue-50: #f4f9fd;
  --coral-600: #d8543d;
  --coral-100: #fff0eb;
  --green-700: #24734f;
  --green-100: #e8f6ef;
  --amber-700: #96620c;
  --amber-100: #fff5d8;
  --ink: #152536;
  --muted: #617388;
  --line: #dbe4ec;
  --surface: #ffffff;
  --canvas: #f4f7fa;
  --shadow: 0 18px 55px rgba(15, 42, 65, .12);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body { margin: 0; color: var(--ink); background: var(--canvas); }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
a { color: inherit; }
[hidden] { display: none !important; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--navy-900);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 8px 20px rgba(17, 103, 177, .24);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.4px;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: -.35px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; letter-spacing: .55px; text-transform: uppercase; }
.brand-light, .brand-light small { color: white; }
.brand-light small { opacity: .62; }

.eyebrow {
  margin: 0 0 8px;
  color: #8acbff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.35px;
  text-transform: uppercase;
}
.eyebrow.ink { color: var(--blue-700); }
.muted { color: var(--muted); }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 46%) 1fr; }

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 72px);
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 80% 15%, rgba(41, 151, 235, .28), transparent 31%),
    radial-gradient(circle at 12% 85%, rgba(216, 84, 61, .18), transparent 28%),
    linear-gradient(150deg, #071b2e 0%, #102f4d 55%, #123b5e 100%);
}

.auth-story::after {
  content: "";
  position: absolute;
  right: -125px;
  bottom: 70px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.015);
}

.story-copy { position: relative; z-index: 1; max-width: 570px; }
.story-copy h1 { max-width: 550px; margin: 0; font-size: clamp(38px, 4.6vw, 68px); line-height: 1.01; letter-spacing: -2.3px; }
.story-copy > p:not(.eyebrow) { max-width: 520px; margin: 26px 0; color: #c7d8e7; font-size: 17px; line-height: 1.7; }
.feature-list { display: grid; gap: 13px; margin: 30px 0 0; padding: 0; list-style: none; color: #e3edf5; }
.feature-list li { display: flex; align-items: center; gap: 10px; }
.feature-list span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: white; background: rgba(22,132,214,.7); font-size: 12px; font-weight: 900; }
.auth-foot { position: relative; z-index: 1; margin: 0; color: #8fa6b9; font-size: 12px; }

.auth-panel { display: grid; place-items: center; min-height: 100vh; padding: 40px; background: #f7f9fb; }
.auth-card { display: grid; gap: 22px; width: min(430px, 100%); padding: 40px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow); }
.auth-card h2 { margin: 0; font-size: 31px; letter-spacing: -.9px; }
.auth-card p { margin-bottom: 0; line-height: 1.55; }
.invite-summary { padding: 17px 18px; border: 1px solid #cfe0ee; border-radius: 14px; background: var(--blue-50); }
.invite-summary h2 { margin: 3px 0 6px; font-size: 23px; }
.invite-summary p { margin: 0; color: var(--muted); }

label { display: grid; gap: 8px; color: #31465b; font-size: 13px; font-weight: 700; }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #cbd8e2;
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: white;
  transition: border .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(22,132,214,.12); }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.button.primary { color: white; background: var(--blue-700); box-shadow: 0 6px 16px rgba(17,103,177,.19); }
.button.primary:hover { background: #0c5b9f; }
.button.secondary { color: var(--blue-700); border-color: #c6dceb; background: white; }
.button.secondary:hover { background: var(--blue-50); }
.button.ghost { color: var(--muted); background: transparent; }
.button.danger { color: var(--coral-600); border-color: #f1c9c1; background: white; }
.button.small { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.button.wide { width: 100%; }
.form-error { margin: -8px 0 0 !important; padding: 10px 12px; border-radius: 9px; color: #9d3323; background: var(--coral-100); font-size: 13px; }
.form-note { margin: -6px 0 0 !important; text-align: center; color: var(--muted); font-size: 12px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 246px;
  padding: 28px 20px 20px;
  border-right: 1px solid var(--line);
  background: white;
}
.sidebar > .brand { margin: 0 10px 38px; }
.nav { display: grid; gap: 5px; }
.nav-item {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 0;
  border-radius: 10px;
  color: #52677c;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.nav-item span { width: 19px; color: #8396a8; text-align: center; font-size: 17px; }
.nav-item:hover { color: var(--navy-900); background: var(--blue-50); }
.nav-item.active { color: var(--blue-700); background: var(--blue-100); }
.nav-item.active span { color: var(--blue-700); }
.nav-item.quiet { margin-top: 9px; border-top: 1px solid var(--line); border-radius: 0; }
.sidebar-bottom { margin-top: auto; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-radius: 12px; background: #f7f9fb; }
.user-card .avatar { flex: 0 0 auto; }
.user-card strong, .user-card small { display: block; max-width: 138px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card strong { font-size: 12px; }
.user-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: white; background: var(--navy-800); font-size: 11px; font-weight: 800; }
.avatar.blue { background: var(--blue-700); }
.avatar.coral { background: var(--coral-600); }
.avatar.green { background: var(--green-700); }

.workspace { min-height: 100vh; margin-left: 246px; }
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 18px clamp(24px, 3.4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(10px);
}
.topbar h1 { margin: 0; font-size: 25px; letter-spacing: -.65px; }
.topbar .eyebrow { margin-bottom: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.date-chip { padding: 9px 12px; border-radius: 10px; color: var(--muted); background: #f3f6f8; font-size: 12px; font-weight: 700; }
.content { max-width: 1520px; margin: 0 auto; padding: 32px clamp(24px, 3.4vw, 52px) 60px; outline: none; }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-intro h2 { margin: 0 0 7px; font-size: 22px; }
.page-intro p { margin: 0; color: var(--muted); line-height: 1.5; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 12px; font-weight: 750; }
.filter-button.active { color: var(--blue-700); border-color: #b9d7ec; background: var(--blue-100); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { position: relative; min-height: 128px; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.stat-card::after { content: ""; position: absolute; right: -23px; top: -23px; width: 75px; height: 75px; border-radius: 50%; background: var(--blue-100); }
.stat-card.coral::after { background: var(--coral-100); }
.stat-card.green::after { background: var(--green-100); }
.stat-card.amber::after { background: var(--amber-100); }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-value { display: block; margin: 12px 0 2px; color: var(--navy-900); font-size: 31px; font-weight: 850; letter-spacing: -1px; }
.stat-sub { color: #8b9aaa; font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .8fr); gap: 20px; }
.stack { display: grid; align-content: start; gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 4px 16px rgba(15,42,65,.035); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 8px 20px; }
.panel-body.flush { padding: 0; }

.meeting-list, .task-list, .activity-list { display: grid; }
.meeting-row, .task-row, .activity-row { display: grid; align-items: center; gap: 15px; padding: 16px 20px; border-bottom: 1px solid #edf1f4; }
.meeting-row:last-child, .task-row:last-child, .activity-row:last-child { border-bottom: 0; }
.meeting-row { grid-template-columns: 61px minmax(0, 1fr) auto; }
.date-box { display: grid; place-items: center; min-height: 58px; border-radius: 11px; color: var(--navy-900); background: var(--blue-50); }
.date-box strong { font-size: 22px; line-height: 1; }
.date-box span { margin-top: -5px; color: var(--blue-700); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.row-title { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.row-meta span { display: inline-flex; align-items: center; gap: 4px; }
.row-actions { display: flex; align-items: center; gap: 7px; }

.badge { display: inline-flex; width: fit-content; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; color: var(--blue-700); background: var(--blue-100); font-size: 10px; font-weight: 800; }
.badge.green { color: var(--green-700); background: var(--green-100); }
.badge.coral { color: var(--coral-600); background: var(--coral-100); }
.badge.amber { color: var(--amber-700); background: var(--amber-100); }
.badge.gray { color: #5b6976; background: #eef2f5; }
.badge.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.task-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.task-check { display: grid; place-items: center; width: 25px; height: 25px; border: 1.5px solid #b8c7d3; border-radius: 8px; color: transparent; background: white; font-size: 13px; font-weight: 900; }
.task-check.done { color: white; border-color: var(--green-700); background: var(--green-700); }
.task-row.done .row-title { color: #8795a2; text-decoration: line-through; }
.assignee { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.assignee .avatar { width: 24px; height: 24px; font-size: 8px; }

.activity-row { grid-template-columns: auto 1fr; padding-left: 0; padding-right: 0; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-600); box-shadow: 0 0 0 5px var(--blue-100); }
.activity-row p { margin: 0; font-size: 12px; line-height: 1.5; }
.activity-row time { display: block; margin-top: 3px; color: #91a0ae; font-size: 10px; }

.progress-card { padding: 20px; }
.progress-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.progress-top strong { font-size: 20px; }
.progress-top span { color: var(--muted); font-size: 11px; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e8eef3; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-700), var(--blue-600)); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 16px; border-bottom: 1px solid #edf1f4; text-align: left; vertical-align: middle; }
.data-table th { color: #768798; background: #fbfcfd; font-size: 10px; letter-spacing: .55px; text-transform: uppercase; }
.data-table td { font-size: 12px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdff; }
.table-person { display: flex; min-width: 170px; align-items: center; gap: 10px; }
.table-person strong, .table-person small { display: block; }
.table-person small { margin-top: 3px; color: var(--muted); }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }

.empty { display: grid; place-items: center; min-height: 210px; padding: 30px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 13px; border-radius: 16px; color: var(--blue-700); background: var(--blue-100); font-size: 22px; }
.empty h3 { margin: 0 0 6px; font-size: 15px; }
.empty p { max-width: 380px; margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.settings-card { padding: 22px; }
.settings-card h3 { margin: 0 0 6px; font-size: 16px; }
.settings-card > p { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.settings-form { display: grid; gap: 14px; }
.account-lines { display: grid; gap: 0; }
.account-line { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.account-line:last-child { border-bottom: 0; }
.account-line span { color: var(--muted); }

.modal {
  width: min(720px, calc(100vw - 30px));
  max-height: min(880px, calc(100vh - 30px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: white;
  box-shadow: 0 24px 90px rgba(7,27,46,.34);
}
.modal::backdrop { background: rgba(7, 27, 46, .6); backdrop-filter: blur(3px); }
.modal > form, .modal:not(.detail-modal) { padding: 24px; }
.modal.compact { width: min(510px, calc(100vw - 30px)); }
.detail-modal { width: min(910px, calc(100vw - 30px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.modal-head h2 { margin: 0; font-size: 23px; letter-spacing: -.55px; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 39px; height: 39px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: white; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.copy-field { display: flex; gap: 8px; }
.copy-field input { min-width: 0; }

.detail-header { padding: 26px 28px 22px; color: white; background: linear-gradient(145deg, var(--navy-950), var(--navy-800)); }
.detail-header .modal-head { margin-bottom: 18px; }
.detail-header h2 { max-width: 670px; color: white; font-size: 26px; }
.detail-header .eyebrow { color: #8acbff; }
.detail-header .icon-button { color: white; border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.08); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 9px 22px; color: #c8d8e5; font-size: 12px; }
.detail-meta strong { color: white; }
.detail-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, .75fr); gap: 0; }
.detail-main { padding: 26px 28px; }
.detail-aside { padding: 26px 24px; border-left: 1px solid var(--line); background: #f8fafc; }
.detail-section + .detail-section { margin-top: 27px; }
.detail-section h3 { margin: 0 0 12px; font-size: 14px; }
.agenda-list { display: grid; gap: 8px; margin: 0; padding: 0; counter-reset: agenda; list-style: none; }
.agenda-list li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; color: #3e5265; font-size: 12px; line-height: 1.5; }
.agenda-list li::before { counter-increment: agenda; content: counter(agenda); display: grid; place-items: center; width: 21px; height: 21px; border-radius: 6px; color: var(--blue-700); background: var(--blue-100); font-size: 9px; font-weight: 900; }
.decision-list { display: grid; gap: 10px; }
.decision-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.decision-card > p { margin: 0 0 10px; font-size: 12px; font-weight: 700; line-height: 1.55; }
.decision-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.decision-form { display: grid; gap: 13px; padding: 17px; border: 1px solid #cfe0ee; border-radius: 13px; background: var(--blue-50); }
.decision-form h3 { margin: 0; font-size: 14px; }
.decision-form .form-grid { gap: 11px; }
.detail-aside dl { display: grid; gap: 14px; margin: 0; }
.detail-aside dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.detail-aside dd { margin: 4px 0 0; font-size: 12px; line-height: 1.5; }
.detail-actions { display: grid; gap: 8px; margin-top: 25px; }

.toast-region { position: fixed; z-index: 100; right: 18px; top: 18px; display: grid; gap: 8px; width: min(370px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 13px 15px; border: 1px solid #c7dde9; border-radius: 12px; color: #17435b; background: #f1f9fd; box-shadow: 0 12px 30px rgba(7,27,46,.16); font-size: 12px; font-weight: 700; animation: toast-in .2s ease-out; }
.toast.error { color: #8e321f; border-color: #f0c9c0; background: #fff5f2; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } }

.mobile-only, .sidebar-scrim { display: none; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .date-chip { display: none; }
}

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: 340px; padding: 30px; }
  .story-copy { margin: 55px 0 30px; }
  .story-copy h1 { font-size: clamp(34px, 10vw, 52px); }
  .feature-list, .auth-foot { display: none; }
  .auth-panel { min-height: auto; padding: 28px 18px 50px; }
  .auth-card { padding: 26px; box-shadow: 0 10px 35px rgba(15,42,65,.08); }

  .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(7,27,46,.2); }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 25; inset: 0; border: 0; background: rgba(7,27,46,.45); }
  .app-shell.menu-open .sidebar-scrim { display: block; }
  .workspace { margin-left: 0; }
  .mobile-only { display: grid; }
  .topbar { min-height: 76px; padding: 13px 17px; }
  .topbar > div:nth-child(2) { flex: 1; }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 20px; }
  .topbar-actions .button.secondary { display: none; }
  .topbar-actions .button { min-height: 39px; padding: 8px 11px; }
  .content { padding: 22px 16px 45px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .settings-grid { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-aside { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 570px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 112px; padding: 15px; }
  .stat-value { font-size: 26px; }
  .meeting-row { grid-template-columns: 53px minmax(0, 1fr); padding: 13px 14px; }
  .meeting-row .row-actions { grid-column: 2; }
  .task-row { grid-template-columns: auto minmax(0, 1fr); padding: 13px 14px; }
  .task-row > .row-actions { grid-column: 2; }
  .panel-head { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: 1; }
  .modal > form, .modal:not(.detail-modal) { padding: 19px; }
  .detail-header, .detail-main { padding: 21px 19px; }
  .detail-aside { padding: 21px 19px; }
  .topbar-actions .button.primary { font-size: 0; }
  .topbar-actions .button.primary::after { content: "+ Toplantı"; font-size: 12px; }
  .page-intro .button { width: 100%; }
  .data-table th, .data-table td { padding: 12px; }
}
