/* ==========================================================================
   Kestel Rezervasyon - Panel stilleri
   Derleme (npm/vite) gerektirmez; doğrudan public/css altından yüklenir.
   ========================================================================== */

:root {
    --bg: #eef1f5;
    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --border: #dde2ea;
    --text: #1f2633;
    --muted: #6b7486;
    --topbar: #1e232c;
    --topbar-text: #c9d0dc;

    --primary: #2f6fdf;
    --primary-dark: #2459b8;
    --danger: #d23c3c;
    --success: #1f9d55;

    /* Eski sistemdeki renk anlamları korunur */
    --tentative: #f6a623;      /* Ön rezervasyon - turuncu/sarı */
    --tentative-bg: #fff3dc;
    --confirmed: #34b233;      /* Kesin rezervasyon - yeşil */
    --confirmed-bg: #e3f6e3;
    --day: #a6dcf5;            /* Gündüz (gece griden net ayrılsın diye belirgin mavi) */
    --night: #dfe3ea;          /* Gece */
    --special: #e0383e;        /* Bayram / özel gün - kırmızı */
    --today: #ff8a8a;
    --calendar-text: var(--text); /* Kullanıcı Ayarları > Takvim Yazı Rengi */

    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; line-height: 1.25; }

.container { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 16px; }
.page { flex: 1; padding-top: 20px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.d-block { display: block; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.inline { display: inline; }

/* ---------- Üst menü ---------- */
.topbar { background: var(--topbar); color: var(--topbar-text); position: sticky; top: 0; z-index: 50; }
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 56px; }
.topbar__toggle { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }

.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand__mark {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #7b5cff); color: #fff; font-weight: 700; font-size: 18px;
}
.brand__mark--lg { width: 56px; height: 56px; font-size: 28px; border-radius: 14px; }
.brand__logo { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: block; background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.brand__logo--lg { width: 96px; height: 96px; margin: 0 auto; box-shadow: 0 4px 14px rgba(16, 24, 40, .15); }
.brand__text { font-weight: 700; font-size: 16px; display: flex; flex-direction: column; line-height: 1.05; }
.brand__text small { font-weight: 400; font-size: 11px; color: var(--topbar-text); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav__link {
    color: var(--topbar-text); padding: 8px 12px; border-radius: 6px; font-weight: 600;
    background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer;
}
.nav__link:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.nav__link.is-active { color: #fff; background: rgba(255,255,255,.12); }
.nav__link.is-disabled { opacity: .35; cursor: not-allowed; }
.nav__link.is-disabled:hover { background: none; color: var(--topbar-text); }
.nav__links { display: flex; align-items: center; gap: 4px; margin: 0 auto; } /* logo ile kullanıcı alanı arasında ortalı */
.nav__logout { display: flex; align-items: center; gap: 14px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.1); }

/* Kullanıcı bilgisi (avatar + isim) */
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-chip__avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .02em;
    background: linear-gradient(135deg, var(--primary), #7b5cff);
    box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}
.user-chip__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.user-chip__text strong { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.user-chip__text small { color: var(--topbar-text); font-size: 11.5px; opacity: .75; }

/* Çıkış düğmesi */
.logout-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 8px; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 600;
    color: var(--topbar-text); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
    transition: background .15s, border-color .15s, color .15s;
}
.logout-btn:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.logout-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Genel bileşenler ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
}
.card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card__header h2 { font-size: 17px; }

.page-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-header h1 { font-size: 22px; font-weight: 600; }
.page-header .inline-form { margin-left: auto; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert--success { background: #e7f7ee; border-color: #b6e5c9; color: #14633a; }
.alert--error { background: #fdecec; border-color: #f5c2c2; color: #8f1f1f; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { background: transparent; }
.btn--small { padding: 5px 10px; font-size: 13px; }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font-size: 15px; cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--surface-2); text-decoration: none; border-color: var(--primary); }
.icon-btn--danger:hover { border-color: var(--danger); background: #fdecec; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.type-tentative { background: var(--tentative-bg); color: #9a5b00; border: 1px solid #f7d08a; }
.pill.type-confirmed { background: var(--confirmed-bg); color: #1b6e1b; border: 1px solid #a9dfa9; }
.pill--muted { background: #eceff3; color: var(--muted); }

/* ---------- Sekmeler / takvim başlığı ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs__item {
    padding: 10px 22px; font-weight: 700; color: var(--muted); border-radius: 8px 8px 0 0;
    border: 1px solid transparent; margin-bottom: -2px;
}
.tabs__item:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.tabs__item.is-active { color: var(--primary); background: var(--surface); border-color: var(--border); border-bottom-color: var(--surface); }

.calendar-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 20px; margin-bottom: 8px; }
.calendar-head__title { font-size: 30px; font-weight: 300; text-align: right; color: #e98b00; }
.calendar-head__title span { font-weight: 600; }
.hint { grid-column: 1 / -1; margin: 0; color: var(--muted); font-style: italic; }

.year-nav { display: flex; align-items: center; gap: 4px; }
.year-nav a { padding: 6px 12px; border-radius: 6px; font-weight: 700; color: var(--muted); }
.year-nav a:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.year-nav a.year-nav__year.is-active,
.year-nav a.year-nav__year.is-active:hover { background: var(--primary); color: #fff; cursor: default; }
.year-nav__arrow { font-size: 18px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 14px; font-size: 13px; color: var(--muted); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend--chips { gap: 6px; margin: 4px 0 12px; }
.legend-chip { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 13px; font-weight: 600; color: #333; }
.legend-chip.type-tentative { background: var(--tentative-bg); color: #9a5b00; border: 1px solid #f7d08a; }
.legend-chip.type-confirmed { background: var(--confirmed-bg); color: #1b6e1b; border: 1px solid #a9dfa9; }
.legend-chip.time-day { background: var(--day); border: 1px solid rgba(0,0,0,.08); }
.legend-chip.time-night { background: var(--night); border: 1px solid rgba(0,0,0,.08); }
.dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }
.dot.type-tentative { background: var(--tentative); }
.dot.type-confirmed { background: var(--confirmed); }
.dot.time-day { background: var(--day); }
.dot.time-night { background: var(--night); }
.dot.special { background: var(--special); }
.dot.today { background: var(--today); }

/* ---------- Yıllık takvim ---------- */
.year-calendar {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px;
}
.month { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 10px 12px; box-shadow: var(--shadow); }
.month__name { font-size: 16px; font-weight: 700; color: #5b5f97; margin: 2px 4px 6px; }
.month__grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.month__grid th { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.month__grid th.is-saturday { color: #2340b6; }
.month__grid th.is-sunday { color: var(--special); }
.month__grid td { padding: 1px; height: 30px; }

.day {
    width: 100%; height: 100%; min-height: 28px; display: flex; align-items: center; justify-content: center; gap: 2px;
    border: 1px solid transparent; background: none; border-radius: 6px; cursor: pointer;
    font: inherit; font-weight: 600; font-size: 13px; color: var(--calendar-text); padding: 0 1px;
}
.day:hover { border-color: var(--primary); background: #eef4ff; }
.day.has-reservation { background: #eceef3; }
.day.is-special .day__number { color: var(--special); }
.day.is-today { background: var(--today); color: #fff; }
.day.is-today .day__number { color: #fff; }
.day__badge {
    display: inline-grid; place-items: center; min-width: 14px; height: 16px; padding: 0 3px;
    border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 1; color: #10240f;
}
.day__badge.type-confirmed { background: var(--confirmed); color: #fff; }
.day__badge.type-tentative { background: #ffd400; color: #3b3000; }

/* Geçmiş günler soluk gösterilir (tıklanınca "tarih geçti" uyarısı çıkar) */
.day.is-past { opacity: .45; }
.day.is-past:hover { border-color: var(--border); background: none; }
.day.is-past.has-reservation:hover { background: #eceef3; border-color: var(--primary); }

.modal__dialog:has(.notice) { width: min(440px, 100%); }
.notice { text-align: center; padding: 12px 8px 4px; }
.notice__icon { font-size: 40px; color: #e98b00; line-height: 1; }
.notice h2 { margin: 10px 0 6px; font-size: 20px; }
.notice p { margin: 0 0 18px; color: var(--muted); }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { background: #2b313c; color: #e6ea9a; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.table tbody tr:hover { background: #f7f9fc; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot th { background: var(--surface-2); }
.table .num { text-align: right; }
.table .actions { white-space: nowrap; text-align: right; width: 1%; }
.table .actions > * { margin-left: 4px; }
.table td.time-day { background: var(--day); color: #0b3a55; font-weight: 600; }
.table td.time-night { background: var(--night); }
.table tr.is-highlight td { background: #fff8e1; }
.table--compact th, .table--compact td { padding: 6px 10px; }
.empty { text-align: center; color: var(--muted); padding: 24px !important; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar__perpage { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.toolbar__perpage select { width: auto; padding: 5px 8px; }
.toolbar__search { display: flex; gap: 6px; }
.toolbar__search input { width: 280px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; color: var(--muted); }
.pagination__links { display: flex; gap: 4px; flex-wrap: wrap; }
.page-link { padding: 5px 11px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; }
.page-link:hover { text-decoration: none; border-color: var(--primary); }
.page-link.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.is-disabled { opacity: .45; }

/* ---------- Formlar ---------- */
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.form-col { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-col legend { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--border); width: 100%; margin-bottom: 12px; }

.field { margin-bottom: 14px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 5px; }
.field label b, .field .label b { color: var(--danger); }
.field__help { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.field__error { margin: 4px 0 0; font-size: 12.5px; color: var(--danger); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input[type=text], input[type=search], input[type=password], input[type=date], input[type=time],
input[type=datetime-local], input[type=number], input[type=tel], select, textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #c9d0db; border-radius: 7px;
    background: #fff; font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,223,.15); }
input.is-readonly, input[readonly] { background: var(--surface-2); color: var(--muted); }
input.is-invalid { border-color: var(--danger); }
textarea { resize: vertical; }

.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-suffix span { display: grid; place-items: center; padding: 0 10px; border: 1px solid #c9d0db; border-left: 0; border-radius: 0 7px 7px 0; background: var(--surface-2); color: var(--muted); }

.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 7px; cursor: pointer; font-weight: 600; margin: 0 !important; }
.radio:has(input:checked) { border-color: var(--primary); background: #eef4ff; }
.radio--type-tentative:has(input:checked) { border-color: var(--tentative); background: var(--tentative-bg); }
.radio--type-confirmed:has(input:checked) { border-color: var(--confirmed); background: var(--confirmed-bg); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }

.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 8px; }
.form-actions--sticky { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.inline-form { display: flex; gap: 6px; }
.inline-form input { width: 240px; }

.summary-box { display: grid; gap: 6px; padding: 12px; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 8px; margin-bottom: 14px; }
.summary-box div { display: flex; justify-content: space-between; }
.summary-box .btn { justify-self: end; }

/* ---------- Menüler ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.menu-card { margin: 0; }
.menu-card__title { display: block; font-weight: 700; margin-bottom: 8px; }

/* ---------- Tahsilat ---------- */
.payment-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.summary h3 { font-size: 16px; }
.summary p { margin: 4px 0 10px; }
.summary__totals { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 16px 0; font-size: 15px; }
.summary__totals dt { color: var(--muted); }
.summary__totals dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- Gün penceresi (modal) ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 20, 30, .55); }
.modal__dialog {
    position: relative; width: min(1100px, 100%); max-height: 90vh; overflow: auto;
    background: var(--surface); border-radius: 12px; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.3);
    border-top: 6px solid #ffa500;
}
.modal__close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.day-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-right: 30px; }
.day-modal__head h2 { font-size: 19px; }
.day-modal__head p { margin: 2px 0 0; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Giriş ---------- */
.guest { background: var(--surface); }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }

/* Sol tanıtım paneli: logodaki lacivert-turkuaz tonlarında */
.login__hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(circle at 85% 10%, rgba(56, 189, 218, .35), transparent 45%),
        radial-gradient(circle at 10% 95%, rgba(47, 111, 223, .45), transparent 50%),
        linear-gradient(160deg, #0f2a4a 0%, #123a63 55%, #0d5a7a 100%);
}
.login__hero::after { /* hafif nokta deseni */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.login__hero-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px 56px; }
.login__org { display: flex; align-items: center; gap: 14px; }
.login__org strong { display: block; font-size: 18px; letter-spacing: .01em; }
.login__org span { display: block; font-size: 13px; color: rgba(255,255,255,.72); margin-top: 2px; }
.login__logo { width: 72px; height: 72px; border-radius: 50%; background: #fff; flex-shrink: 0; box-shadow: 0 0 0 4px rgba(255,255,255,.14), 0 10px 30px rgba(0,0,0,.3); }
.login__pitch h1 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.2; font-weight: 700; max-width: 16em; margin: 0 0 28px; }
.login__features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.login__features li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255,255,255,.88); }
.login__features svg {
    width: 38px; height: 38px; padding: 8px; flex-shrink: 0; border-radius: 10px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
    fill: none; stroke: #7fdcf0; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.login__copy { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.55); }

/* Sağ form paneli */
.login__panel { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.login__card { width: min(400px, 100%); }
.login__head { margin-bottom: 28px; }
.login__head h2 { font-size: 28px; margin: 0; letter-spacing: -.01em; }
.login__head p { color: var(--muted); margin: 6px 0 0; }

.login__alert {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 11px 14px;
    border-radius: var(--radius); background: #fdecec; border: 1px solid #f5c2c2; color: #a12a2a; font-size: 14px;
}
.login__alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.login__input { position: relative; }
.login__input > svg {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; pointer-events: none;
    fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.login__input input { height: 46px; padding-left: 42px; border-radius: var(--radius); background: var(--surface); font-size: 15px; }
.login__input:focus-within > svg { stroke: var(--primary); }
.login__input input#password { padding-right: 46px; }
.login__reveal {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
    display: grid; place-items: center; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--muted);
}
.login__reveal:hover { background: var(--surface-2); color: var(--text); }
.login__reveal:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.login__reveal svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login__reveal .icon-hide, .login__reveal[aria-pressed="true"] .icon-show { display: none; }
.login__reveal[aria-pressed="true"] .icon-hide { display: block; }
.login__caps { margin: 6px 0 0; font-size: 12.5px; color: #b26a00; font-weight: 600; }

.login__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; }
.login__row .check { margin: 0; }
.login__forgot { font-size: 14px; font-weight: 600; color: var(--primary); }
.login__forgot:hover { color: var(--primary-dark); }
.login__help a { font-weight: 600; }
.login__submit { height: 48px; font-size: 15px; font-weight: 600; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 16px rgba(47,111,223,.28); }
.login__submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.login__submit:hover svg { transform: translateX(3px); }
.login__submit:disabled { opacity: .7; cursor: progress; }
.login__help { margin: 24px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* Tablet / telefon: tanıtım paneli üstte kısa başlık olur */
@media (max-width: 860px) {
    .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .login__hero-inner { padding: 22px 20px; gap: 0; }
    .login__pitch, .login__copy { display: none; }
    .login__logo { width: 52px; height: 52px; }
    .login__panel { place-items: start center; padding: 32px 16px; }
}

/* ---------- Alt bilgi ---------- */
.footer { background: var(--topbar); color: #8d95a5; padding: 14px 0; font-size: 12.5px; text-align: center; }
.footer__brand { color: #fff; font-weight: 700; letter-spacing: .02em; }
.footer__brand:hover { color: #fff; text-decoration: underline; }

/* ---------- Yazdırma sayfası ---------- */
.print-page { background: #e9ecf1; display: block; }
.print-actions { display: flex; gap: 8px; justify-content: center; padding: 16px; }
.sheet { background: #fff; width: min(210mm, 100%); margin: 0 auto 40px; padding: 18mm 16mm; box-shadow: var(--shadow); }
.sheet__header { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--text); padding-bottom: 12px; margin-bottom: 16px; }
.sheet__header h1 { font-size: 22px; }
.sheet__brand { display: flex; align-items: center; gap: 14px; }
.sheet__logo { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet__org { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.sheet__header p { margin: 4px 0 0; color: var(--muted); }
.sheet__meta { display: grid; gap: 4px; text-align: right; }
.sheet__meta span { color: var(--muted); margin-right: 6px; }
.sheet__section { margin-bottom: 18px; }
.sheet__section h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.sheet__section h3 { font-size: 13px; margin: 10px 0 4px; }
.sheet__grid { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; margin: 0; }
.sheet__grid dt { color: var(--muted); }
.sheet__grid dd { margin: 0; font-weight: 600; }
.sheet__text { white-space: pre-line; }
.sheet__signatures { display: flex; justify-content: space-between; margin-top: 50px; text-align: center; }
.sheet__signatures div { width: 40%; border-top: 1px solid var(--text); padding-top: 6px; font-weight: 600; }
.sheet__signatures span { font-weight: 400; color: var(--muted); }

@media print {
    .print-actions { display: none; }
    .print-page { background: #fff; }
    .sheet { box-shadow: none; margin: 0; width: auto; padding: 0; }
    .table thead th { background: #eee !important; color: #000 !important; }
}

/* ---------- Rapor ---------- */
.report-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.report-filters .field { margin-bottom: 0; }
.report-filters__actions { display: flex; gap: 6px; }
.table td.cell-due { background: #fbe1e1; color: #a12626; font-weight: 700; }
.table td.cell-paid { background: #e3f6e3; color: #1b6e1b; font-weight: 700; }
.report-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.report-summary__group { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.report-summary__group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
.report-summary__group dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; }
.report-summary__group dt { display: flex; align-items: center; gap: 6px; }
.report-summary__group dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Üst menü: açılır menü ---------- */
.nav__dropdown { position: relative; }
.nav__menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; z-index: 60;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.nav__dropdown.is-open .nav__menu { display: block; }
/* Masaüstünde üzerine gelince açılsın; düğme ile menü arasındaki boşlukta kapanmasın diye görünmez köprü */
.nav__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
@media (hover: hover) and (min-width: 1001px) {
    .nav__dropdown:hover .nav__menu { display: block; animation: nav-menu-in .14s ease-out; }
    .nav__dropdown:hover > .nav__link { color: #fff; background: rgba(255,255,255,.07); }
}
@keyframes nav-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nav__menu-item { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text); font-weight: 600; }
.nav__menu-item:hover { background: var(--surface-2); text-decoration: none; }
.nav__menu-item.is-active { color: var(--primary); background: #eef4ff; }

/* ---------- Ayarlar / kullanıcılar ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.color-field { display: flex; align-items: center; gap: 12px; }
.color-field input[type=color] { width: 64px; height: 40px; padding: 2px; border: 1px solid #c9d0db; border-radius: 7px; background: #fff; cursor: pointer; }
.color-field code { font-size: 14px; color: var(--muted); text-transform: uppercase; }
.card--narrow { max-width: 760px; }
.page-header__action { margin-left: auto; }

/* ---------- Anlık arama ---------- */
[data-live-results] { transition: opacity .15s; }
[data-live-results].is-loading { opacity: .45; pointer-events: none; }
.toolbar__search { position: relative; }
.toolbar__search .search-spinner { position: absolute; right: 10px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.toolbar__search.is-searching .search-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Panel (dashboard) ---------- */
.dash-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-hero h1 { font-size: 24px; font-weight: 700; margin: 0; }
.dash-hero p { margin: 4px 0 0; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--primary); }
.stat__label { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat__value { font-size: 26px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat__hint { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-up { color: var(--success); font-weight: 700; }
.trend-down { color: var(--danger); font-weight: 700; }

.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dash-grid .card { margin-bottom: 0; }
.dash-card--wide { grid-row: span 2; }
.dash-link { font-size: 13px; font-weight: 600; }
.dash-subtitle { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 8px; }
.dash-empty { color: var(--muted); padding: 10px 0; margin: 0; }
.dash-note { font-size: 12.5px; margin: -6px 0 10px; }
.badge-count { background: var(--tentative); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }

/* Etkinlik satırı */
.event-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; color: var(--text); border: 1px solid transparent; }
.event-row + .event-row { margin-top: 4px; }
.event-row:hover { background: var(--surface-2); border-color: var(--border); text-decoration: none; }
.event-row__time { min-width: 108px; padding: 6px 10px; border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; display: flex; flex-direction: column; }
.event-row__time small { font-weight: 600; font-size: 11.5px; color: var(--muted); }
.event-row__time.time-day { background: var(--day); }
.event-row__time.time-night { background: var(--night); }
.event-row__body, .follow__body, .pay-row__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.event-row__body small, .follow__body small, .pay-row__body small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ön rezervasyon takibi */
.follow { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; color: var(--text); }
.follow:hover { background: var(--surface-2); text-decoration: none; }
.follow__date { width: 44px; flex-shrink: 0; text-align: center; border-radius: 8px; background: var(--tentative-bg); border: 1px solid #f7d08a; padding: 3px 0; line-height: 1.1; }
.follow__date strong { display: block; font-size: 16px; color: #9a5b00; }
.follow__date small { font-size: 11px; color: #9a5b00; text-transform: uppercase; }
.follow__days { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* Doluluk çubukları */
.meter { display: block; color: var(--text); padding: 6px 0; }
.meter + .meter { margin-top: 8px; }
.meter:hover { text-decoration: none; }
.meter:hover .meter__fill { background: var(--primary-dark); }
.meter__head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.meter__head span { color: var(--muted); font-variant-numeric: tabular-nums; }
.meter__track { display: block; height: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.meter__fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s; }

/* Aylık sütun grafiği (tek seri) */
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 190px; align-items: end; padding-top: 18px; border-bottom: 1px solid var(--border); }
.bars__col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; cursor: default; }
.bars__bar { width: 100%; max-width: 26px; background: color-mix(in srgb, var(--primary) 55%, white); border-radius: 4px 4px 0 0; transition: background .15s; }
.bars__col.is-current .bars__bar, .bars__col:hover .bars__bar, .bars__col:focus .bars__bar { background: var(--primary); }
.bars__value { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.bars__label { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); }
.bars__col.is-current .bars__label { color: var(--text); font-weight: 700; }
.bars__tip {
    position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
    background: var(--topbar); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 2;
}
.bars__col:hover .bars__tip, .bars__col:focus .bars__tip { opacity: 1; }
.dash-card .bars { margin-bottom: 22px; }

/* Son tahsilatlar */
.pay-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.pay-row + .pay-row { border-top: 1px solid var(--border); }
.pay-row__amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--success); }

/* ---------- Bayram / Özel Günler ---------- */
.special-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.special-layout .card { margin-bottom: 0; }
.special-preview { font-size: 12.5px; min-height: 1em; margin: -6px 0 12px; }
.special-recurring { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
input.input--compact { padding: 5px 8px; width: auto; }
input.input--wide { width: 100%; min-width: 220px; }
.table--compact td small.muted { margin-left: 6px; }

/* ---------- Duyarlı tasarım ---------- */
@media (max-width: 1200px) {
    .year-calendar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .stat-grid, .dash-grid { grid-template-columns: 1fr; }
    .dash-card--wide { grid-row: auto; }
}
@media (max-width: 1000px) {
    .topbar__toggle { display: block; }
    .topbar__inner { flex-wrap: wrap; }
    .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
    .nav.is-open { display: flex; }
    .nav__links { flex-direction: column; align-items: stretch; margin: 0; }
    .nav__logout { margin-left: 0; justify-content: space-between; padding: 12px 0 0; margin-top: 8px; border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
    .form-grid, .menu-grid, .payment-layout, .report-summary, .settings-grid, .special-layout { grid-template-columns: 1fr; }
    .nav__menu { position: static; box-shadow: none; margin: 4px 0 4px 12px; background: transparent; border: 0; }
    .nav__menu-item { color: var(--topbar-text); }
    .nav__menu-item:hover, .nav__menu-item.is-active { background: rgba(255,255,255,.08); color: #fff; }
    .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .year-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .year-calendar { grid-template-columns: 1fr; }
    .calendar-head { grid-template-columns: 1fr; }
    .calendar-head__title { text-align: left; }
    .field-row, .report-filters { grid-template-columns: 1fr; }
    .toolbar__search input, .inline-form input { width: 100%; }
    .page-header .inline-form { margin-left: 0; width: 100%; }
}
