@font-face {
    font-family: Geist;
    src: url("fonts/geist-latin-ext.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 750;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Geist;
    src: url("fonts/geist-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 750;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Material Symbols";
    src: url("fonts/material-symbols.woff2") format("woff2");
    font-style: normal;
    font-weight: 350;
    font-display: block;
}

:root {
    color-scheme: light;
    --ink: #171717;
    --muted: #626262;
    --paper: #f0f0f0;
    --white: #fff;
    --line: #e7e7e7;
    --border: #c7c7c7;
    --surface: #f6f6f6;
    --focus: #3159b2;
    --success-ink: #126241;
    --success-bg: #e4f6ec;
    --progress-ink: #4e3784;
    --progress-bg: #f1edfc;
    --attention-ink: #72530b;
    --attention-bg: #fff5d1;
    --frame-space: clamp(0rem, 2vw, 2rem);
    --page-space: clamp(1.35rem, 3vw, 3rem);
    font: 15px/1.5 Geist, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 2.45vw, 2.15rem); letter-spacing: -.045em; font-weight: 650; line-height: 1.12; overflow-wrap: anywhere; }
h2 { font-size: 1.1rem; margin-block-end: 1rem; font-weight: 640; letter-spacing: -.025em; }
p { color: var(--muted); }
a { color: var(--ink); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.icon {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
    overflow: hidden;
    vertical-align: middle;
    font: 350 1.2em/1 "Material Symbols";
    font-feature-settings: "liga";
    letter-spacing: normal;
    white-space: nowrap;
    text-transform: none;
}
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 3; padding: .6rem .85rem; background: var(--white); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.app-shell {
    display: grid;
    grid-template-columns: 215px minmax(0, 1fr);
    max-width: 1720px;
    min-height: calc(100dvh - 2 * var(--frame-space));
    margin: var(--frame-space) auto;
    width: calc(100% - 2 * var(--frame-space));
    background: var(--white);
    border: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: baseline; gap: .45rem; width: fit-content; color: var(--ink); font-weight: 750; letter-spacing: -.065em; font-size: 1.6rem; text-decoration: none; }
.wordmark span { font-size: .74rem; font-weight: 650; letter-spacing: .035em; color: var(--muted); }
.sidebar {
    position: sticky;
    top: var(--frame-space);
    height: calc(100dvh - 2 * var(--frame-space) - 2px);
    min-height: 450px;
    display: flex;
    flex-direction: column;
    gap: 2.65rem;
    padding: 1.65rem .8rem 1rem;
    border-right: 1px solid var(--line);
    overflow: auto;
}
.sidebar .wordmark { margin-inline-start: .7rem; }
.navigation { display: grid; gap: .2rem; }
.navigation a { display: flex; align-items: center; gap: .75rem; min-height: 43px; padding: .58rem .7rem; border-radius: 6px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.navigation a[aria-current], .navigation a:hover { background: var(--surface); color: var(--ink); }
.navigation a[aria-current] { font-weight: 620; }
.management { margin-top: auto; border-top: 1px solid var(--line); padding-top: .7rem; }
.workspace-shell { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: .9rem; padding: .95rem var(--page-space); min-height: 70px; border-bottom: 1px solid var(--line); }
.top-search { display: flex; align-items: center; gap: .6rem; min-width: 0; width: min(100%, 350px); min-height: 42px; padding: 0 .75rem; background: var(--surface); color: var(--muted); }
.top-search input { min-width: 0; padding: .6rem 0; border: 0; background: transparent; }
.top-search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.top-search input:focus-visible { outline: none; }
.keyboard-shortcut { flex: none; padding: .05rem .3rem; border: 1px solid var(--line); background: var(--white); border-radius: 4px; font: inherit; font-size: .72rem; }
.profile-menu { position: relative; flex: none; }
.profile-menu summary { display: flex; align-items: center; gap: .55rem; padding: .2rem; list-style: none; border-radius: 5px; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu summary:hover { background: var(--surface); }
.profile-name { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.monogram { display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: #e9edef; color: #303940; font-size: .8rem; font-weight: 650; }
.profile-options { position: absolute; inset: calc(100% + .35rem) 0 auto auto; z-index: 2; min-width: 9rem; border: 1px solid var(--line); padding: .35rem; background: var(--white); box-shadow: 0 4px 20px #00000012; }
.profile-options .quiet { width: 100%; justify-content: flex-start; padding: .5rem; }
.workspace { padding: 1.9rem var(--page-space) 3rem; }
.guest { width: min(calc(100% - 2rem), 450px); margin: clamp(2rem, 9vh, 8rem) auto; padding: clamp(1.4rem, 4vw, 2.55rem); background: var(--white); border: 1px solid var(--line); }
.guest h1 { margin: 2rem 0 1.4rem; }
.guest form.panel { padding: 0; border: 0; margin: 0; }
.guest form button { width: 100%; margin-top: .45rem; }

.page-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-heading > :first-child { min-width: 0; }
.page-heading > .button, .page-heading > form { flex: none; }
.section-heading { margin-bottom: 1rem; }
.section-heading h2 { margin: 0; }
.back { display: inline-block; margin-bottom: .75rem; font-size: .88rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; }
.record-path { display: flex; align-items: center; padding-block-end: .95rem; margin-block-end: 1.55rem; border-bottom: 1px solid var(--line); }
.record-path a { display: inline-flex; align-items: center; gap: .55rem; font-weight: 530; text-decoration: none; }
.record-path a:hover { text-decoration: underline; }
.record-identity { display: flex; align-items: center; gap: 1rem; }
.record-identity .status { margin-top: .45rem; }
.record-symbol { display: grid; place-items: center; flex: none; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--surface); color: #444; font-size: 1.3rem; }
.panel { padding: 1.25rem; border: 1px solid var(--line); border-radius: 4px; background: var(--white); margin-bottom: 1rem; min-width: 0; }
.stack { display: grid; gap: .95rem; }
.stack h2 { margin-bottom: 0; }
.narrow { max-width: 700px; }
.columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.inline-form { margin-bottom: 1rem; max-width: 280px; }
label { display: grid; gap: .35rem; font-size: .87rem; font-weight: 590; }
input, textarea, select { font: inherit; font-weight: 400; color: var(--ink); padding: .6rem .7rem; border: 1px solid var(--border); border-radius: 4px; background: var(--white); width: 100%; }
input::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--ink); }
.check { display: flex; align-items: center; gap: .35rem; font-weight: 450; }
button, .button { width: fit-content; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-size: .9rem; font-weight: 590; text-decoration: none; min-height: 40px; padding: .55rem .85rem; border: 1px solid var(--ink); border-radius: 4px; color: var(--white); background: var(--ink); cursor: pointer; }
button:hover, .button:hover { background: #383838; }
.secondary { color: var(--ink); background: var(--white); border-color: var(--border); }
.quiet { color: var(--ink); background: transparent; border-color: transparent; }
.secondary:hover, .quiet:hover { background: var(--surface); }
.compact { font-size: .85rem; white-space: nowrap; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; border-radius: 4px; padding: .55rem .72rem; color: var(--muted); white-space: nowrap; }
.tabs a[aria-current], .tabs a:hover { background: var(--surface); color: var(--ink); }
.tabs a[aria-current] { font-weight: 620; }
.record-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; padding: 1rem .5rem; gap: 1rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.record-row:last-child { border-bottom: 0; }
.record-row:hover { background: var(--surface); }
.record-row > .icon { color: var(--muted); }
.record-row .customer-name > span, .record-row .customer-meta, .record-row > time { font-size: .86rem; color: var(--muted); }
.record-row strong { font-weight: 620; }
.empty { padding: .8rem 0; }
.notice { background: var(--success-bg); color: var(--success-ink); border-radius: 4px; padding: .7rem .9rem; margin-bottom: .9rem; }
.notice.error { background: #fcece9; color: #7e2620; }
.notice.error p { color: inherit; }
fieldset { border: 1px solid var(--line); border-radius: 4px; padding: .75rem; min-width: 0; }
legend { font-weight: 620; padding-inline: .2rem; }
.rule-row { display: grid; gap: .6rem; margin-bottom: .75rem; }
.rule-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.field-options { display: flex; flex-wrap: wrap; gap: .6rem 1rem; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(92px, 1fr) minmax(0, 2fr); gap: .65rem 1rem; font-size: .9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.fact-value { white-space: pre-wrap; }
summary { cursor: pointer; font-weight: 590; }
details > form, .history-row > dl, .history-row > form { margin-top: .75rem; }
.history-row { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-row time { display: block; margin-inline-start: 1rem; font-size: .79rem; font-weight: 400; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .78rem .7rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .84rem; font-weight: 600; background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface); }
.qr { width: fit-content; max-width: 100%; }

.directory-controls, .directory-summary, .calendar-toolbar, .calendar-period {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
}
.directory-controls { margin-bottom: .85rem; }
.directory-controls .tabs, .calendar-toolbar .tabs { margin: 0; }
.view-tabs { padding: .15rem; border: 1px solid var(--line); border-radius: 4px; }
.directory-search { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; }
.directory-search label:first-of-type { flex: 1 1 220px; }
.directory-search label:nth-of-type(2) { flex: 0 1 180px; }
.directory-search input, .directory-search select { min-height: 41px; }
.directory-summary { margin: 1.15rem 0 .75rem; font-size: .88rem; }
.customer-name { display: grid; gap: .25rem; min-width: 0; overflow-wrap: anywhere; }
.customer-meta { display: flex; justify-content: end; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.category { padding: .16rem .48rem; border-radius: 4px; background: var(--surface); color: var(--ink); }
.baskent, .customer-meta .baskent { color: var(--progress-ink); background: var(--progress-bg); }
.customer-table td:first-child a { font-weight: 620; }
.customer-table th, .customer-table td { white-space: nowrap; }
.calendar-toolbar { margin-bottom: .9rem; }
.calendar-period h2 { margin: 0; }
.calendar-period .button { padding: .25rem .65rem; min-width: 2.25rem; font-size: 1.15rem; }
.calendar-scroll { overflow-x: auto; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 610px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-weekday, .calendar-day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .5rem; }
.calendar-weekday { color: var(--muted); font-size: .82rem; background: var(--surface); }
.calendar-day { min-height: 5rem; }
.calendar-outside { background: var(--surface); color: var(--muted); }
.calendar-day time { display: inline-grid; place-items: center; min-width: 1.55rem; height: 1.55rem; font-size: .88rem; }
.calendar-day time[aria-current] { color: var(--white); background: var(--ink); border-radius: 50%; }
.calendar-customer { display: block; padding: .23rem .36rem; margin-top: .28rem; border-radius: 4px; font-size: .82rem; text-decoration: none; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.calendar-customer.baskent { background: var(--progress-bg); color: var(--progress-ink); }
.calendar-customer:hover { text-decoration: underline; }

.status { display: inline-flex; width: fit-content; align-items: center; padding: .14rem .45rem; border-radius: 4px; font-size: .77rem; line-height: 1.45; font-weight: 540; white-space: nowrap; }
.status-neutral { background: var(--surface); color: #4f4f4f; }
.status-success { background: var(--success-bg); color: var(--success-ink); }
.status-progress { background: var(--progress-bg); color: var(--progress-ink); }
.status-attention { background: var(--attention-bg); color: var(--attention-ink); }
.detail-layout { display: grid; grid-template-columns: minmax(235px, 29%) minmax(0, 1fr); align-items: start; border-top: 1px solid var(--line); }
.detail-layout-single { grid-template-columns: minmax(0, 700px); }
.detail-aside { min-width: 0; padding: 1.35rem 1.4rem 0 0; }
.detail-layout-single .detail-aside { padding-right: 0; }
.detail-main { min-width: 0; align-self: stretch; border-left: 1px solid var(--line); padding-left: 1.4rem; }
.detail-tabs { flex-wrap: nowrap; gap: .75rem; overflow-x: auto; padding: 0 .15rem .15rem; border-bottom: 1px solid var(--line); margin-bottom: 1.35rem; }
.detail-tabs a { padding: .85rem .5rem .8rem; border-bottom: 2px solid transparent; border-radius: 0; }
.detail-tabs a[aria-selected="true"], .detail-tabs a:hover { color: var(--ink); }
.detail-tabs a[aria-selected="true"] { border-bottom-color: var(--ink); font-weight: 620; }
.detail-tabs a:focus-visible { outline-offset: -2px; }
.detail-aside > .panel { padding: 0 0 1.2rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.detail-aside .facts { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
.detail-aside .facts dd { margin-bottom: .6rem; }
.detail-aside .facts dd:last-child { margin-bottom: 0; }
.detail-main > .panel { padding: 0; border: 0; }
.detail-main .table-wrap { border: 1px solid var(--line); }
.detail-main .work-row, .work-section .work-row { margin-top: .65rem; padding: .95rem 1rem; border: 1px solid var(--line); border-radius: 3px; }
.record-actions { display: grid; gap: .65rem; margin-top: .25rem; }
.record-actions details { border-top: 1px solid var(--line); padding-top: .65rem; }
.work-actions a { border: 1px solid var(--line); }
.work-section { max-width: 920px; }
.work-meta { display: grid; gap: .35rem; justify-items: end; color: var(--muted); font-size: .83rem; white-space: nowrap; }
.calendar-entry-label { display: block; font-size: .72rem; color: var(--muted); }

@media (max-width: 1000px) {
    .app-shell { grid-template-columns: 185px minmax(0, 1fr); }
    .detail-layout { grid-template-columns: minmax(205px, 31%) minmax(0, 1fr); }
    .detail-layout-single { grid-template-columns: minmax(0, 650px); }
    .detail-aside { padding-right: 1rem; }
    .detail-main { padding-left: 1rem; }
}
@media (max-width: 820px) {
    :root { --frame-space: 0px; --page-space: 1.1rem; }
    .app-shell { display: block; border: 0; }
    .sidebar { position: static; height: auto; min-height: 0; gap: .45rem; padding: .75rem var(--page-space) .55rem; border: 0; border-bottom: 1px solid var(--line); }
    .sidebar .wordmark { margin-inline-start: .05rem; }
    .navigation { display: flex; flex-wrap: wrap; gap: .2rem; }
    .navigation a { gap: .4rem; min-height: 38px; padding: .4rem .55rem; font-size: .86rem; }
    .management { margin-top: 0; padding-top: .35rem; }
    .topbar { min-height: 58px; padding-block: .55rem; }
    .profile-name { display: none; }
    .workspace { padding-block: 1.4rem 2rem; }
    .columns { grid-template-columns: 1fr; gap: 0; }
    .rule-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 590px) {
    .keyboard-shortcut { display: none; }
    .page-heading, .section-heading { gap: .65rem; }
    .record-identity { gap: .65rem; }
    .record-symbol { width: 2.7rem; height: 2.7rem; }
    .directory-search label:nth-of-type(2) { flex-grow: 1; }
    .detail-layout { display: flex; flex-direction: column; gap: 1rem; }
    .detail-aside, .detail-main { width: 100%; padding-inline: 0; border-left: 0; }
    .detail-main { order: -1; }
    .detail-aside .facts { grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr); gap: .45rem .8rem; }
    .detail-aside .facts dd { margin-bottom: 0; }
    .detail-tabs { gap: .45rem; }
    .record-row { grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
    .record-row > .icon { display: none; }
    .customer-meta { max-width: 8rem; }
}
