/* Rota düzeni, form ve tablo temeli. */
:root {
  --ink-950: var(--rota-text);
  --ink-900: var(--rota-text);
  --ink-800: var(--rota-text);
  --ink-700: var(--rota-secondary-strong);
  --ink-600: var(--rota-secondary-strong);
  --ink-500: var(--rota-secondary);
  --line: var(--rota-line);
  --line-strong: var(--rota-line-strong);
  --surface: var(--rota-card);
  --surface-soft: var(--rota-well);
  --primary: var(--rota-accent);
  --primary-strong: var(--rota-accent);
  --primary-soft: var(--rota-accent-soft);
  --teal: var(--rota-green);
  --teal-soft: var(--rota-green-soft);
  --petrol: var(--rota-green);
  --petrol-soft: var(--rota-green-soft);
  --amber: var(--rota-yellow);
  --amber-soft: var(--rota-yellow-soft);
  --red: var(--rota-yellow);
  --red-soft: var(--rota-yellow-soft);
  --sidebar: var(--rota-card);
  --sidebar-text: var(--rota-text);
  --sidebar-muted: var(--rota-secondary-strong);
  --shadow-sm: none;
  --shadow-md: none;
  --radius-sm: .65rem;
  --radius: 1rem;
  --radius-lg: 1.4rem;
  --sidebar-width: 16.5rem;
  --content-width: 78rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 20rem; scroll-behavior: smooth; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--rota-well);
  color: var(--ink-900);
  font: 400 1rem/1.6 var(--rota-font);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary-strong); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--primary); }
:focus-visible { outline: .2rem solid var(--rota-accent-border); outline-offset: .18rem; }

.skip {
  position: fixed;
  z-index: 1000;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-950);
  box-shadow: var(--shadow-md);
  transform: translateY(-200%);
  transition: transform .16s ease;
}
.skip:focus { transform: translateY(0); }

/* Application shell */
.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 1.25rem 1rem 1rem;
  overflow: hidden;
  background: radial-gradient(circle at 15% 0%, var(--rota-card), transparent 28%), linear-gradient(165deg, var(--rota-card) 0%, var(--sidebar) 72%);
  color: var(--sidebar-text);
}

.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .25rem .25rem 1.4rem; }
.sidebar-heading .brand { flex: 1 1 auto; }
.brand { display: inline-flex; align-items: center; gap: .7rem; min-width: 0; color: var(--rota-text); text-decoration: none; }
.brand:hover { color: var(--rota-text); }

.app-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .2rem;
  min-height: 0;
  padding: .25rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rota-gray) transparent;
}
.nav-caption { margin: 0 0 .45rem; padding: 0 .7rem; color: var(--sidebar-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 2.8rem;
  padding: .64rem .72rem;
  border: 1px solid transparent;
  border-radius: .75rem;
  color: var(--rota-text);
  font-size: .91rem;
  font-weight: 560;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.nav-link:hover { border-color: var(--rota-line); background: var(--rota-well); color: var(--rota-text); }
.nav-link.is-active { border-color: var(--rota-line); background: linear-gradient(135deg, var(--rota-card), var(--rota-card)); color: var(--rota-text); box-shadow: inset .18rem 0 0 var(--rota-shadow); }.logout-button svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-user {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) 2rem;
  align-items: center;
  gap: .65rem;
  margin-top: 1rem;
  padding: .72rem;
  border: 1px solid var(--rota-line);
  border-radius: .9rem;
  background: var(--rota-well);
}
.user-copy { display: flex; flex-direction: column; min-width: 0; color: inherit; line-height: 1.25; text-decoration: none; }
.user-copy strong { overflow: hidden; color: var(--rota-text); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { margin-top: .15rem; color: var(--sidebar-muted); font-size: .73rem; }
.user-copy:hover strong, .user-copy[aria-current="page"] strong { color: var(--rota-text); }
.sidebar-user form { margin: 0; }
.logout-button { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: .6rem; background: transparent; color: var(--sidebar-muted); cursor: pointer; }
.logout-button:hover { background: var(--rota-well); color: var(--rota-text); }

/* Çalışma alanı değiştirici (yalnızca birden fazla üyelikte görünür) */
.workspace-switch { margin-top: 1rem; }
.workspace-switch ul { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.workspace-card { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.workspace-card h2 { margin-bottom: 0; }
.workspace-card p { margin: 0; color: var(--ink-600); font-size: .9rem; }
.workspace-card .btn { margin-top: auto; }

.hasbahce-brand-logo { width: min(100%, 13rem); max-height: 4.25rem; padding: .45rem .55rem; border-radius: .75rem; background: var(--rota-well); object-fit: contain; box-shadow: 0 .6rem 1.6rem var(--rota-shadow); }

.app-main {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
  background: radial-gradient(circle at 98% 0%, var(--rota-card), transparent 24rem), var(--rota-card);
}
.wrap { width: min(100%, var(--content-width)); margin: 0 auto; padding: 2.15rem clamp(1rem, 3vw, 3.2rem) 4rem; flex: 1 0 auto; }
.foot { width: min(100%, var(--content-width)); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 3.2rem) 1.5rem; color: var(--ink-500); font-size: .78rem; }
.foot p { margin: 0; }

/* Type and content */
h1, h2, h3, h4 { color: var(--ink-950); font-weight: 720; line-height: 1.2; letter-spacing: -.025em; }
h1 { margin: 0 0 .45rem; font-size: clamp(1.7rem, 2.8vw, 2.35rem); }
h2 { margin: 1.8rem 0 .7rem; font-size: clamp(1.1rem, 1.7vw, 1.3rem); }
h3 { margin: 1.25rem 0 .5rem; font-size: 1rem; letter-spacing: -.012em; }
h4 { margin: 1rem 0 .4rem; font-size: .95rem; }
p { margin: 0 0 1rem; }
.lead { max-width: 54rem; margin: 0 0 1.6rem; color: var(--ink-600); font-size: 1rem; }
.eyebrow { display: inline-block; margin-bottom: .6rem; color: var(--primary); font-size: .75rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.muted { color: var(--ink-600); }
.small { font-size: .875rem; }
strong { font-weight: 680; }
ul, ol { margin: .55rem 0 1rem; padding-left: 1.35rem; }
li + li { margin-top: .35rem; }

/* Layout and surfaces */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  position: relative;
  min-width: 0;
  margin: 0 0 1rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--rota-line);
  border-radius: var(--radius);
  background: var(--rota-well);
  box-shadow: var(--shadow-sm);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { margin-top: 0; font-size: 1.08rem; }
.card h3:first-child { margin-top: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; margin-bottom: .35rem; }
.spread h1, .spread h2, .spread p { margin-bottom: 0; }
.empty { margin: .75rem 0 0; padding: .95rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--ink-600); font-size: .9rem; }

/* Tables */
table { width: 100%; margin: .35rem 0 0; border-spacing: 0; border-collapse: separate; font-size: .91rem; }
.wrap > table { padding: .3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--rota-well); box-shadow: var(--shadow-sm); }
th, td { padding: .78rem .72rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-soft); color: var(--ink-600); font-size: .75rem; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
thead th:first-child { border-radius: .65rem 0 0 .65rem; }
thead th:last-child { border-radius: 0 .65rem .65rem 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .14s ease; }
tbody tr:hover { background: var(--rota-well); }

/* Status */
.badge { display: inline-flex; align-items: center; min-height: 1.55rem; padding: .18rem .58rem; border: 1px solid var(--rota-line); border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong); font-size: .75rem; font-weight: 680; line-height: 1.25; white-space: nowrap; }
.badge-ok { border-color: var(--rota-line); background: var(--teal-soft); color: var(--rota-text); }
.badge-warn { border-color: var(--rota-line); background: var(--amber-soft); color: var(--rota-text); }
.badge-danger { border-color: var(--rota-line); background: var(--red-soft); color: var(--rota-text); }
.badge-muted { border-color: var(--line); background: var(--rota-well); color: var(--ink-600); }
.badge-petrol { border-color: var(--rota-line); background: var(--petrol-soft); color: var(--petrol); }

/* Forms and actions */
form p { margin: 0 0 1rem; }
label { display: block; margin-bottom: .38rem; color: var(--ink-800); font-size: .875rem; font-weight: 680; }
input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="number"], input[type="url"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 2.8rem;
  padding: .68rem .78rem;
  border: 1px solid var(--line-strong);
  border-radius: .72rem;
  background: var(--surface);
  color: var(--ink-950);
  box-shadow: 0 1px 2px var(--rota-shadow);
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}
textarea { min-height: 7.5rem; resize: vertical; }
select { cursor: pointer; }
input:hover, select:hover, textarea:hover { border-color: var(--rota-line); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 0; box-shadow: 0 0 0 .22rem var(--rota-shadow); }
input[type="checkbox"], input[type="radio"] { width: 1.08rem; height: 1.08rem; margin: 0 .35rem 0 0; accent-color: var(--primary); }
.helptext { display: block; margin-top: .3rem; color: var(--ink-500); font-size: .79rem; }
.errorlist { margin: .3rem 0; padding: 0; list-style: none; color: var(--red); font-size: .84rem; font-weight: 600; }
.form-error { margin-bottom: 1rem; padding: .8rem .9rem; border: 1px solid var(--rota-line); border-radius: .72rem; background: var(--red-soft); color: var(--rota-text); font-size: .88rem; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  min-height: 2.65rem;
  padding: .6rem 1rem;
  border: 1px solid var(--primary);
  border-radius: .72rem;
  background: linear-gradient(135deg, var(--rota-card), var(--primary));
  color: var(--rota-text);
  box-shadow: 0 .45rem 1rem var(--rota-shadow);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 670;
  line-height: 1.25;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease;
}
button:hover, .btn:hover { color: var(--rota-text); box-shadow: 0 .65rem 1.4rem var(--rota-shadow); transform: translateY(-1px); }
button:active, .btn:active { transform: translateY(0); }
button.secondary, .btn.secondary { border-color: var(--line-strong); background: var(--surface); color: var(--ink-800); box-shadow: none; }
button.secondary:hover, .btn.secondary:hover { border-color: var(--rota-line); background: var(--surface-soft); color: var(--primary-strong); box-shadow: none; }
button.danger, .btn.danger { border-color: var(--red); background: var(--red); }
.btn-block { width: 100%; }
.inline-form { display: inline-flex; margin: 0; }
.inline-form select { width: auto; min-height: 2.25rem; padding: .35rem 2rem .35rem .6rem; font-size: .82rem; }
.form-action { margin-top: .65rem; }
.link-btn { min-height: auto; padding: 0; border: 0; background: none; color: var(--primary); box-shadow: none; text-decoration: underline; }
.filter-row { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
.filter-row .link-btn { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 700; }
.filter-row .link-btn.is-active { border-color: var(--primary); background: var(--primary); color: var(--rota-text); }

/* Feedback */
.messages { margin: 0 0 1.15rem; padding: 0; list-style: none; }
.msg { position: relative; margin-bottom: .55rem; padding: .8rem 1rem .8rem 2.6rem; border: 1px solid var(--line-strong); border-radius: .8rem; background: var(--surface); color: var(--ink-800); box-shadow: var(--shadow-sm); font-size: .9rem; }
.msg::before { position: absolute; top: .82rem; left: 1rem; width: .75rem; height: .75rem; border-radius: 999px; background: var(--primary); content: ""; }
.msg-success { border-color: var(--rota-line); background: var(--rota-well); }
.msg-success::before { background: var(--teal); }
.msg-warning { border-color: var(--rota-line); background: var(--rota-well); }
.msg-warning::before { background: var(--amber); }
.msg-error { border-color: var(--rota-line); background: var(--rota-well); }
.msg-error::before { background: var(--red); }

/* Data visuals */
.bar { display: grid; grid-template-columns: minmax(5.8rem, auto) minmax(5rem, 1fr) 3.2rem; align-items: center; gap: .7rem; margin: .55rem 0; font-size: .875rem; }
.bar-label { color: var(--ink-600); }
.bar-track { height: .62rem; overflow: hidden; border-radius: 999px; background: var(--rota-well); }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rota-card), var(--primary)); }
.bar-fill.student { background: linear-gradient(90deg, var(--rota-card), var(--teal)); }
.bar-fill.mentor { background: linear-gradient(90deg, var(--rota-card), var(--primary)); }
.bar-value { color: var(--ink-700); font-size: .82rem; font-weight: 700; text-align: right; }
.series { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.dot { display: inline-grid; place-items: center; min-width: 2rem; min-height: 2rem; padding: .2rem .45rem; border: 1px solid var(--line); border-radius: .58rem; background: var(--surface-soft); color: var(--ink-700); font-size: .8rem; font-weight: 650; }
.dot.student { border-color: var(--rota-line); background: var(--teal-soft); color: var(--rota-text); }

.private-note { padding: 1rem 1.1rem; border: 1px solid var(--rota-line); border-left: .3rem solid var(--amber); border-radius: .8rem; background: var(--rota-well); }
.publish-box { padding: 1.1rem; border: 1px solid var(--rota-line); border-radius: var(--radius); background: linear-gradient(135deg, var(--rota-card), var(--rota-card)); }
.timeline { margin: .5rem 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; margin: 0 0 0 .35rem; padding: 0 0 1.15rem 1.25rem; border-left: 1px solid var(--line-strong); }
.timeline li::before { position: absolute; top: .28rem; left: -.3rem; width: .52rem; height: .52rem; border: .12rem solid var(--surface); border-radius: 999px; background: var(--primary); box-shadow: 0 0 0 1px var(--primary); content: ""; }
.timeline li:last-child { padding-bottom: .2rem; }
.timeline time { display: block; margin-bottom: .18rem; color: var(--ink-500); font-size: .78rem; font-weight: 620; }

/* Signed-out experience */
.auth-body {
  background:
    radial-gradient(circle at 12% 20%, var(--rota-card), transparent 27rem),
    radial-gradient(circle at 87% 78%, var(--rota-card), transparent 25rem),
    var(--rota-card);
}
.auth-shell { position: relative; display: flex; min-height: 100vh; flex-direction: column; overflow: hidden; isolation: isolate; }
.auth-header { width: min(100%, 80rem); margin: 0 auto; padding: 1.35rem 1.5rem; }
.auth-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand-on-light { color: var(--rota-text); }
.brand-on-light:hover { color: var(--rota-text); }
.auth-access-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .42rem .75rem; border: 1px solid var(--rota-line); border-radius: 999px; background: var(--rota-well); color: var(--rota-text); font-size: .75rem; font-weight: 620; backdrop-filter: blur(.5rem); }
.auth-access-chip > span { width: .43rem; height: .43rem; border-radius: 999px; background: var(--rota-well); box-shadow: 0 0 0 .25rem var(--rota-shadow); }
.auth-main { display: grid; width: min(100%, 80rem); flex: 1 0 auto; align-items: center; margin: 0 auto; padding: 1.5rem 1.5rem 2.5rem; }
.auth-footer { width: min(100%, 80rem); margin: 0 auto; padding: 1rem 1.5rem 1.35rem; color: var(--rota-text); font-size: .76rem; text-align: center; }
.auth-footer p { margin: 0; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: .8rem; color: var(--rota-text); font-size: .74rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.auth-eyebrow::before { width: 1.65rem; height: 1px; background: currentColor; content: ""; }
.login-card { position: relative; overflow: hidden; padding: clamp(1.45rem, 3vw, 2rem); border: 1px solid var(--rota-line); border-radius: 1.45rem; background: var(--rota-well); box-shadow: 0 2rem 5rem var(--rota-shadow), 0 0 0 .45rem var(--rota-shadow); }
.login-card::before { position: absolute; top: 0; right: 0; left: 0; height: .22rem; background: linear-gradient(90deg, var(--rota-card), var(--rota-card) 58%, var(--rota-card)); content: ""; }
.login-card form p { margin-bottom: .88rem; }
.login-card label { margin-bottom: .35rem; color: var(--ink-700); font-size: .8rem; }
.login-card input[type="text"], .login-card input[type="password"] { min-height: 3.15rem; padding-inline: .9rem; border-color: var(--rota-line); background: var(--rota-well); }
.auth-help-link { display: block; margin-top: .85rem; color: var(--primary-strong); font-size: .82rem; font-weight: 680; text-align: center; text-decoration: none; }
.auth-help-link:hover { color: var(--primary); text-decoration: underline; }
.auth-card { position: relative; width: min(100%, 34rem); justify-self: center; padding: clamp(1.4rem, 4vw, 2rem); border: 1px solid var(--rota-line); border-radius: 1.35rem; background: var(--rota-well); box-shadow: 0 2rem 5rem var(--rota-shadow); }
.auth-card h1 { margin-bottom: .65rem; }
.auth-card p { color: var(--ink-600); }
.auth-card .auth-eyebrow { color: var(--primary); }
.auth-card-narrow { max-width: 32rem; }
.account-inline-action { margin: .85rem 0 0; }
