:root {
    --bg: #ffffff;
    --bg-soft: #f7f7f8;
    --card: #ffffff;
    --text: #0d0d0d;
    --muted: #6e6e80;
    --primary: #0d0d0d;
    --primary-dark: #000000;
    --primary-soft: #f0f0f0;
    --danger: #c41c1c;
    --ok: #0f7b4a;
    --border: #e5e5e5;
    --border-strong: #d0d0d0;
    --sidebar: #f7f7f8;
    --sidebar-text: #353740;
    --sidebar-active: #ececf1;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --sidebar-w: 280px;
    --radius: 10px;
    --radius-sm: 8px;
    --radius-pill: 999px;
    --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.app-body { overflow-x: hidden; background: var(--bg); }

.guest-body {
    background:
        radial-gradient(circle at 10% 0%, #f0f0f3 0, transparent 45%),
        linear-gradient(180deg, #fafafa, #fff);
}

/* ===== Shell / Sidebar (OpenAI tarzı açık) ===== */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    border-right: 1px solid var(--border);
    transition: transform .22s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .95rem .9rem .85rem;
    gap: .5rem;
}

.sidebar .brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    text-decoration: none;
}

.brand-logo {
    height: 3.35rem;
    width: auto;
    max-width: 15.5rem;
    object-fit: contain;
    display: block;
}

.sidebar-close {
    display: none;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: var(--radius-sm);
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: .25rem .7rem 1rem;
    -webkit-overflow-scrolling: touch;
}

.nav-group { margin-bottom: 1.15rem; }

.nav-group-title {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8e8ea0;
    padding: .2rem .7rem .45rem;
    font-weight: 700;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
    color: var(--sidebar-text);
    font-size: .95rem;
    font-weight: 500;
    padding: .55rem .7rem;
    border-radius: var(--radius-sm);
    margin-bottom: .1rem;
    transition: background .12s ease, color .12s ease;
}

.nav-ico {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: .75;
}

.nav-ico svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
}

.sidebar-nav a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text);
}

.sidebar-nav a.active {
    background: var(--sidebar-active);
    color: var(--text);
    font-weight: 650;
}

.sidebar-nav a.active .nav-ico { opacity: 1; }

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #111;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}

.user-meta strong {
    font-size: .88rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.user-meta small {
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.2;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 35;
}

.app-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg);
}

.content-top {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.5rem;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.menu-toggle {
    display: none !important;
}

.icon-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: var(--radius-sm);
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.content-top-title {
    flex: 1;
    margin: 0;
    font-size: 1.35rem;
    font-weight: 750;
    color: var(--text);
    letter-spacing: -.02em;
    line-height: 1.2;
}

.content-top-heading {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.content-top-heading .content-top-title {
    flex: none;
}

.content-top-sub {
    margin: 0;
    font-size: .88rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.35;
    max-width: 42rem;
}

.header-user {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

.header-user-btn {
    display: flex;
    align-items: center;
    gap: .55rem;
    border: 1px solid var(--border);
    background: #fff;
    padding: .3rem .55rem .3rem .35rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    color: var(--text);
    transition: background .12s ease, border-color .12s ease;
}

.header-user-btn:hover,
.header-user.open .header-user-btn {
    background: var(--bg-soft);
    border-color: var(--border-strong);
}

.header-user-caret {
    opacity: .45;
    flex-shrink: 0;
    transition: transform .15s ease;
}

.header-user.open .header-user-caret {
    transform: rotate(180deg);
}

.header-user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + .4rem);
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: .35rem;
    z-index: 30;
}

.header-user-item {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: .55rem .7rem;
    border-radius: 6px;
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
}

.header-user-item:hover {
    background: var(--bg-soft);
}

.page-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.15rem;
    flex-wrap: wrap;
}

.page-toolbar .toolbar-search {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}

.page-toolbar .toolbar-search .input {
    width: 100%;
    padding-left: 2.5rem;
    border-radius: var(--radius-sm);
    min-height: 2.85rem;
}

.page-toolbar .toolbar-search .search-ico {
    position: absolute;
    left: .85rem;
    width: 1.1rem;
    height: 1.1rem;
    color: var(--muted);
    pointer-events: none;
}

.page-toolbar .btn {
    min-height: 2.85rem;
    flex-shrink: 0;
}

.page-toolbar .toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)) auto;
    gap: .75rem;
    align-items: end;
    margin: 0 0 1.15rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filter-bar .filter-customer { min-width: 0; }
.filter-bar .filter-customer .picker { margin: 0; }

.filter-bar label {
    display: block;
    font-size: .8rem;
    font-weight: 650;
    color: var(--muted);
    margin-bottom: .35rem;
}

.filter-bar .filter-actions {
    display: flex;
    align-items: end;
}

.filter-bar .filter-actions .btn {
    width: 100%;
    min-height: 2.85rem;
}

@media (max-width: 1100px) {
    .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .filter-bar { grid-template-columns: 1fr; }
}

.page-toolbar .btn svg,
.btn .btn-ico {
    width: 1.05rem;
    height: 1.05rem;
    display: block;
    flex-shrink: 0;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.split-layout .card,
.split-layout .panel-lite {
    margin-bottom: 0;
}

.split-stack {
    display: grid;
    gap: 1rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.form-actions .btn { min-height: 2.85rem; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--muted);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.back-link:hover { color: var(--text); }

.top-accept { white-space: nowrap; }

.main {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 1.5rem 1.5rem 2.5rem;
}

.main-center {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.page-title {
    font-size: 1.75rem;
    margin: 0 0 .35rem;
    letter-spacing: -.03em;
    font-weight: 750;
}

.muted {
    color: var(--muted);
    margin-top: 0;
    font-size: .95rem;
    line-height: 1.5;
}

.card,
.panel-lite {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.panel-lite[hidden] { display: none !important; }

.panel-lite-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-lite-head h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.login-card {
    width: min(400px, 100%);
    text-align: center;
    box-shadow: var(--shadow-md);
    border-radius: 14px;
}

.login-logo {
    width: min(340px, 100%);
    height: auto;
    object-fit: contain;
    margin: 0 auto .85rem;
    display: block;
}

.login-card h1 {
    margin: 0;
    color: var(--text);
    font-size: 1.85rem;
    letter-spacing: -.04em;
}

.form { display: grid; gap: .85rem; text-align: left; }

.form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: .85rem;
}

.grow { min-width: 0; }

label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: .35rem;
    color: var(--text);
}

.input,
select.input,
textarea.input {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: .72rem .9rem;
    font-size: .98rem;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color .12s, box-shadow .12s;
}

.input-xl {
    font-size: 1.2rem;
    padding: .85rem 1rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    font-weight: 650;
}

.input:focus,
select.input:focus,
textarea.input:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}

.input.is-invalid,
select.input.is-invalid,
textarea.input.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
    background: #fff5f5;
}

.field-error {
    display: block;
    margin-top: .35rem;
    color: #dc2626;
    font-size: .82rem;
    font-weight: 600;
}

.check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
    font-size: .92rem;
}

/* ===== Buttons ===== */
.btn {
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: .65rem 1.05rem;
    font-size: .92rem;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    transition: background .12s, border-color .12s, opacity .12s;
    line-height: 1.2;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
    background: #2a2a2a;
}

.btn-light,
.btn-ghost {
    background: #fff;
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-light:hover,
.btn-ghost:hover {
    background: var(--bg-soft);
}

.btn-block { width: 100%; }

.btn-xl {
    font-size: 1rem;
    padding: .85rem 1.25rem;
    min-height: 2.85rem;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-sm {
    padding: .4rem .75rem;
    font-size: .85rem;
}

/* ===== Şık dosya seçici ===== */
.file-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin: 0;
    cursor: pointer;
}

.file-picker input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.file-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #111;
    color: #fff;
    border-radius: var(--radius-sm);
    padding: .72rem 1.1rem;
    font-size: .92rem;
    font-weight: 650;
    white-space: nowrap;
    transition: background .12s;
    user-select: none;
}

.file-picker:hover .file-picker-btn,
.file-picker:focus-within .file-picker-btn {
    background: #2a2a2a;
}

.file-picker-btn svg {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
}

.file-picker-name {
    font-size: .88rem;
    color: var(--muted);
    font-weight: 500;
    min-width: 0;
    word-break: break-all;
}

.file-picker.has-file .file-picker-name {
    color: var(--text);
    font-weight: 600;
}

.file-picker-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.form-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    margin: 0 0 .85rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.form-grid .full { grid-column: 1 / -1; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .85rem;
    margin: 1rem 0 1.35rem;
}

.stat {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.05rem;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    margin-bottom: .3rem;
    font-weight: 600;
}

.stat-value {
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -.02em;
}

.stat-link {
    color: inherit;
    text-decoration: none;
}

.stat-link:hover {
    text-decoration: underline;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 0 0 1.25rem;
}

.dash-list {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.dash-item {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: .65rem;
    align-items: start;
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
}

.dash-item:last-child { border-bottom: 0; padding-bottom: 0; }
.dash-item:first-child { padding-top: 0; }

.dash-item strong {
    font-size: .85rem;
    color: var(--muted);
    font-weight: 650;
    padding-top: .1rem;
}

.dash-item span {
    display: block;
    font-weight: 650;
    font-size: .95rem;
}

.dash-item small {
    display: block;
    color: var(--muted);
    margin-top: .15rem;
    font-size: .82rem;
}

@media (max-width: 1100px) {
    .dash-grid { grid-template-columns: 1fr; }
    .dash-grid .card[style*="span 2"] { grid-column: auto; }
}

.table-wrap {
    overflow-x: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.table th,
.table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: .92rem;
}

.table th {
    background: var(--bg-soft);
    font-size: .8rem;
    color: var(--muted);
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.table tr:last-child td { border-bottom: 0; }

.table-link {
    color: var(--brand, #0f766e);
    font-weight: 650;
    text-decoration: none;
}

.table-link:hover,
.main .table a:not(.btn):hover {
    text-decoration: underline;
}

.main .table a:not(.btn) {
    color: var(--brand, #0f766e);
    font-weight: 650;
    text-decoration: none;
}

.badge {
    display: inline-block;
    color: #fff;
    padding: .25rem .55rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 650;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-end;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .85rem;
}

.info-grid span {
    display: block;
    color: var(--muted);
    margin-bottom: .2rem;
    font-weight: 550;
    font-size: .82rem;
}

.info-grid strong {
    font-size: 1rem;
    font-weight: 650;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 1.35rem;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    padding: .85rem 1.2rem;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 550;
    z-index: 80;
    max-width: min(92vw, 420px);
    box-shadow: var(--shadow-md);
}

.toast.ok { background: var(--ok); }
.toast.error { background: var(--danger); }

.notice {
    padding: .85rem 1rem;
    border-radius: 10px;
    font-size: .92rem;
    line-height: 1.45;
}

.notice-warn {
    background: #fff8f0;
    color: #8a4b12;
    border: 1px solid #f0d9b8;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--muted);
    font-size: .98rem;
    background: var(--bg-soft);
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
}

.empty-state strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: .35rem;
}

.tabs {
    display: flex;
    gap: .15rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab {
    border: 0;
    background: transparent;
    border-radius: 0;
    padding: .7rem .95rem;
    font-size: .92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab.active {
    color: var(--text);
    border-bottom-color: #111;
    background: transparent;
}

.pill {
    display: inline-block;
    padding: .3rem .65rem;
    border-radius: var(--radius-pill);
    font-size: .8rem;
    font-weight: 650;
    color: #fff;
}

.pill-row { display: flex; flex-wrap: wrap; gap: .45rem; }

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    margin-bottom: 1rem;
}

.action-row .grow { flex: 1; min-width: 160px; }

.search-bar {
    display: flex;
    gap: .65rem;
    align-items: stretch;
    margin-bottom: 1rem;
}

.search-bar .input {
    flex: 1;
    border-radius: var(--radius-pill);
    padding: .75rem 1.1rem;
    background: var(--bg-soft);
    border-color: var(--border);
}

.file-list { list-style: none; padding: 0; margin: 0; }

.file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .9rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .95rem;
}

.appt-list { display: grid; gap: .65rem; }

.appt-item {
    display: grid;
    grid-template-columns: 4.5rem 1fr auto;
    gap: .85rem;
    align-items: center;
    padding: .9rem 1rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.appt-time {
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--text);
}

.appt-meta { font-size: .95rem; }
.appt-meta small { display: block; color: var(--muted); }

.save-bar {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--border);
    padding: .9rem 1.15rem;
    margin: 1.15rem -1.35rem -1.25rem;
    backdrop-filter: blur(10px);
    z-index: 5;
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.save-bar .btn-save {
    flex: 1;
    min-width: 180px;
    font-size: 1rem;
    padding: .9rem 1.1rem;
    min-height: 3rem;
}

.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .85rem;
    margin: 1rem 0;
}

.report-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.05rem;
    text-align: center;
}

.report-card strong {
    display: block;
    font-size: 1.45rem;
    margin-top: .35rem;
    color: var(--text);
    letter-spacing: -.02em;
}

.ai-result {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.15rem;
    font-size: .95rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.picker { position: relative; }

.picker-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + .25rem);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    z-index: 30;
    max-height: 240px;
    overflow-y: auto;
}

.picker-results button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: .8rem 1rem;
    font-size: .95rem;
    font-family: inherit;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.picker-results button:hover { background: var(--bg-soft); }
.picker-results button strong { display: block; }
.picker-results button small { color: var(--muted); }

.picker-selected {
    margin-top: .4rem;
    padding: .6rem .8rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 650;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}

.picker-selected[hidden] { display: none !important; }

.picker-clear {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    padding: .3rem .6rem;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    color: var(--text);
    font-size: .8rem;
}

body.sidebar-open { overflow: hidden; }
body.sidebar-open .sidebar-overlay { display: block; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-105%);
        width: min(280px, 88vw);
        box-shadow: var(--shadow-md);
    }

    body.sidebar-open .sidebar { transform: translateX(0); }

    .sidebar-close { display: inline-flex; }
    .menu-toggle { display: inline-flex !important; }

    .app-content { margin-left: 0; }

    .form-grid { grid-template-columns: 1fr; }

    .split-layout { grid-template-columns: 1fr; }

    .main { padding: 1.15rem 1rem 2rem; }
    .content-top { padding: .65rem 1rem; }
}

@media (max-width: 720px) {
    .form-row { grid-template-columns: 1fr; }
    .page-title { font-size: 1.45rem; }
    .appt-item { grid-template-columns: 1fr; }
    .save-bar {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .card,
    .panel-lite { padding: 1rem; }
    .file-picker-btn {
        width: 100%;
        justify-content: center;
        min-height: 2.85rem;
    }
    .file-picker-row { width: 100%; }
    .file-picker-row .btn { width: 100%; }
    .ocr-actions .btn { width: 100%; }
}

@media (max-width: 420px) {
    .content-top-title { font-size: 1.05rem; }
    .content-top-sub { font-size: .78rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .header-user .user-meta,
    .header-user-caret { display: none; }
    .header-user-btn {
        padding: .25rem;
        border-radius: 50%;
    }
}

/* ===== AI doldurulmuş alanlar ===== */
.input.ai-filled,
select.input.ai-filled,
textarea.input.ai-filled {
    background: #fffbeb;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}

.ai-field-wrap { position: relative; }
.ai-field-wrap .ai-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: #f59e0b;
    color: #fff;
    padding: .15rem .45rem;
    border-radius: 6px;
    z-index: 1;
}

/* ===== Modal ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.modal-backdrop[hidden] { display: none !important; }

.modal-card {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem 1.4rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
    text-align: center;
}

.modal-icon {
    width: 3.2rem;
    height: 3.2rem;
    margin: 0 auto .9rem;
    border-radius: 50%;
    background: #fff7ed;
    color: #c2410c;
    display: grid;
    place-items: center;
}

.modal-icon svg { width: 1.5rem; height: 1.5rem; }

.modal-card h2 {
    margin: 0 0 .5rem;
    font-size: 1.25rem;
    letter-spacing: -.02em;
}

.modal-card p {
    margin: 0 0 1.2rem;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: .65rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Ruhsat OCR paneli ===== */
.ocr-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.15rem;
    background:
        linear-gradient(160deg, #fafafa 0%, #fff 55%);
}

.ocr-panel-ai {
    background: linear-gradient(160deg, #f0fdf4 0%, #ecfdf5 50%, #fff 100%);
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
}

.ocr-panel-ai .ocr-head-icon {
    background: #059669;
}

.ocr-head {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.ocr-head-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    background: #111;
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.ocr-head-icon svg { width: 1.2rem; height: 1.2rem; }

.ocr-head strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -.02em;
    margin-bottom: .15rem;
}

.ocr-head span {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.35;
}

.ocr-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin: 0;
    padding: 1.5rem 1rem;
    border: 1.5px dashed var(--border-strong);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.ocr-drop input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.ocr-drop:hover,
.ocr-drop:focus-within {
    border-color: #111;
    background: #fafafa;
    box-shadow: var(--shadow);
}

.ocr-drop.has-file {
    border-style: solid;
    border-color: #111;
    background: #f7f7f8;
}

.ocr-drop-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text);
    display: grid;
    place-items: center;
    margin-bottom: .25rem;
}

.ocr-drop-icon svg { width: 1.15rem; height: 1.15rem; }

.ocr-drop-title {
    font-size: .95rem;
    font-weight: 650;
    color: var(--text);
}

.ocr-drop-name {
    font-size: .82rem;
    color: var(--muted);
    font-weight: 500;
    max-width: 100%;
    word-break: break-all;
}

.ocr-drop.has-file .ocr-drop-name {
    color: var(--text);
    font-weight: 600;
}

.ocr-pick {
    display: grid;
    gap: .65rem;
    padding: 1rem;
    border: 1.5px dashed var(--border-strong);
    border-radius: 12px;
    background: #fff;
}
.ocr-pick.has-file {
    border-style: solid;
    border-color: #111;
    background: #f7f7f8;
}
.ocr-pick-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}
.ocr-pick .ocr-drop-name {
    text-align: center;
    font-size: .88rem;
    color: var(--muted);
}
.ocr-pick.has-file .ocr-drop-name {
    color: var(--text);
    font-weight: 650;
}
@media (max-width: 520px) {
    .ocr-pick-btns { grid-template-columns: 1fr; }
}

.ocr-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .85rem 1.15rem;
}

.ocr-hint {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: 0;
    flex: 1;
    min-width: 200px;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.45;
}

.ocr-dot {
    width: .55rem;
    height: .55rem;
    margin-top: .35rem;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
}

.ocr-panel .notice { margin: 0; }

/* ===== Araç kabul CTA kartı ===== */
.accept-cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    min-height: 100%;
    text-decoration: none;
    color: inherit;
    border: 1px dashed var(--border-strong);
    background: linear-gradient(145deg, #fafafa 0%, #f3f3f5 100%);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.accept-cta:hover {
    border-color: #111;
    border-style: solid;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.accept-cta-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.accept-cta-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 14px;
    background: #111;
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.accept-cta-icon svg { width: 1.45rem; height: 1.45rem; }

.accept-cta-body { min-width: 0; flex: 1; }

.accept-cta-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .65rem;
    margin-bottom: .45rem;
}

.accept-cta strong {
    display: inline;
    font-size: 1.12rem;
    font-weight: 750;
    letter-spacing: -.02em;
    margin: 0;
    color: #0d0d0d;
}

.accept-cta-desc {
    margin: 0;
    color: #4b5563;
    font-size: .92rem;
    line-height: 1.45;
}

.accept-cta-ai {
    background: #fff;
    border: 2px solid #10b981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, .12);
}

.accept-cta-ai:hover {
    border-color: #059669;
    box-shadow: 0 10px 28px rgba(16, 185, 129, .18);
    transform: translateY(-1px);
}

.accept-cta-ai .accept-cta-icon {
    background: #10b981;
    color: #fff;
}

.ai-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .28rem .7rem;
    border-radius: 999px;
    background: #10b981;
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.accept-card-head {
    display: grid;
    gap: .25rem;
    margin-bottom: .95rem;
}
.accept-card-head strong { font-size: 1.05rem; }
.accept-card-head span { color: var(--muted); font-size: .88rem; line-height: 1.4; }

/* ===== Dosya listesi ===== */
.file-grid {
    display: grid;
    gap: .75rem;
}

.file-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.file-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.file-thumb-icon {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    gap: .15rem;
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .04em;
    color: #fff;
    text-transform: uppercase;
}

.file-thumb-icon svg { width: 1.35rem; height: 1.35rem; }
.file-thumb-icon.pdf { background: #b91c1c; }
.file-thumb-icon.doc { background: #1d4ed8; }
.file-thumb-icon.xls { background: #15803d; }
.file-thumb-icon.zip { background: #6d28d9; }
.file-thumb-icon.other { background: #374151; }

.file-meta strong {
    display: block;
    font-size: .95rem;
    font-weight: 650;
    word-break: break-word;
}

.file-meta small {
    display: block;
    color: var(--muted);
    font-size: .8rem;
    margin-top: .2rem;
}

.file-format {
    display: inline-block;
    margin-top: .35rem;
    padding: .15rem .45rem;
    border-radius: 6px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: .72rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
}

.file-actions {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .file-row {
        grid-template-columns: 56px 1fr;
    }
    .file-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }
    .file-actions .btn { flex: 1; }
}

/* ===== Servis kartı / teslim ===== */
.service-debt {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .75rem 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}
.service-debt > div:first-child {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.service-debt strong { font-size: .85rem; font-weight: 600; }
.service-debt > div:first-child span {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.service-debt.is-debt {
    background: #fff7ed;
    border-color: #fdba74;
}
.service-debt.is-debt > div:first-child span { color: #c2410c; }
.service-debt.is-paid {
    background: #f0fdf4;
    border-color: #86efac;
}
.service-debt.is-paid > div:first-child span { color: #15803d; }
.service-debt.is-empty {
    background: #f8fafc;
    border-color: var(--border);
}
.service-debt.is-empty > div:first-child span { color: var(--text); }

.service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 0;
    align-items: center;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-end;
}

.svc-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .65rem;
    margin-bottom: .85rem;
}

.svc-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .7rem .85rem;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04));
}

.svc-card span {
    display: block;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 600;
    margin-bottom: .2rem;
}

.svc-card strong {
    display: block;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.svc-card-wide {
    grid-column: 1 / -1;
}

.svc-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 1rem;
    align-items: start;
}

.svc-col-side {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.svc-col-side .service-debt,
.svc-col-side .svc-toolbar,
.svc-col-side > .card {
    margin: 0;
}

.svc-items-card {
    min-height: 420px;
}

.svc-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    padding: 1rem 1.15rem;
}

.svc-status-block {
    flex: 1;
    min-width: 0;
    max-width: none;
}

.svc-status-block label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: .35rem;
}

.form-grid-2 {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 980px) {
    .svc-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .svc-cards { grid-template-columns: 1fr 1fr; }
    .svc-toolbar { flex-direction: column; align-items: stretch; }
    .svc-status-block { max-width: none; }
    .form-grid-2 { grid-template-columns: 1fr; }
}

.status-select-wrap {
    --status-color: #2563eb;
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.status-select-ico {
    position: absolute;
    left: .75rem;
    z-index: 1;
    font-size: 1.05rem;
    pointer-events: none;
    line-height: 1;
}

.status-select {
    width: 100%;
    padding-left: 2.4rem !important;
    font-weight: 650;
    border-left: 4px solid var(--status-color) !important;
    background: #fff;
    cursor: pointer;
}

.item-check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    user-select: none;
}

.item-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #16a34a;
    cursor: pointer;
}

.item-row.is-done td {
    background: #f0fdf4;
}

.strike {
    text-decoration: line-through;
    color: var(--muted);
    font-weight: 550 !important;
}

/* Tablo sıralama */
.th-sort {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.th-sort:hover { color: var(--text); }
.th-sort.is-sorted { color: var(--text); font-weight: 700; }

/* Teklif formu */
.quote-items-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.quote-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .35rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.quote-totals > div {
    display: flex;
    gap: 2rem;
    min-width: 220px;
    justify-content: space-between;
    font-size: .92rem;
}
.quote-totals-grand {
    font-size: 1.1rem;
    font-weight: 700;
    padding-top: .4rem;
    border-top: 2px solid #111;
    margin-top: .25rem;
}

/* Teklif çıktı şablonu */
.quote-sheet { max-width: 860px; }
.quote-doc {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}
.quote-doc-head {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 2px solid #111;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}
.quote-doc-brand {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.quote-doc-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: .5rem;
}
.quote-doc-meta {
    text-align: right;
    font-size: .9rem;
}
.quote-doc-meta span {
    display: inline-block;
    min-width: 72px;
    color: var(--muted);
    margin-right: .35rem;
}
.quote-doc-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.quote-doc-parties h4 {
    margin: 0 0 .35rem;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-weight: 650;
}
.quote-doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
.quote-doc-table th,
.quote-doc-table td {
    padding: .65rem .5rem;
    border-bottom: 1px solid #e8e8e8;
    text-align: left;
}
.quote-doc-table th {
    border-bottom: 2px solid #111;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.quote-doc-table .num { text-align: right; white-space: nowrap; }
.quote-doc-totals {
    margin: 1.25rem 0 0 auto;
    width: min(280px, 100%);
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.quote-doc-totals > div {
    display: flex;
    justify-content: space-between;
    font-size: .92rem;
}
.quote-doc-totals .grand {
    border-top: 2px solid #111;
    padding-top: .5rem;
    margin-top: .25rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.quote-doc-notes {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
}
.quote-doc-notes h4 { margin: 0 0 .35rem; }
.quote-doc-notes p { margin: 0; }
.quote-doc-foot {
    margin-top: 2.5rem;
    font-size: .8rem;
    color: var(--muted);
}
.quote-sign {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}
.quote-sign > div {
    border-top: 1px solid #ccc;
    padding-top: .5rem;
    text-align: center;
}

/* Borçlular / yazdırma */
.print-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.print-brand {
    font-size: 1.2rem;
    font-weight: 800;
}
.print-total-box {
    text-align: right;
    background: #111;
    color: #fff;
    padding: .75rem 1rem;
    border-radius: 10px;
}
.print-total-box span {
    display: block;
    font-size: .75rem;
    opacity: .75;
}
.print-total-box strong {
    font-size: 1.25rem;
}

@media print {
    .sidebar,
    .sidebar-overlay,
    .content-top,
    .topbar,
    .page-toolbar,
    .back-link,
    .no-print,
    .sidebar-close,
    .action-row.no-print,
    .form-actions,
    .toast { display: none !important; }
    .app-shell { display: block !important; }
    .app-content { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; }
    .main, .content { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; }
    .quote-doc, .print-sheet, .quote-sheet {
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-width: none !important;
    }
    body { background: #fff !important; }
    a[href]::after { content: none !important; }
}

/* Flatpickr — tarih/saat seçici */
.flatpickr-alt {
    width: 100%;
    cursor: pointer;
}
.flatpickr-calendar {
    font-family: inherit;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.16);
    border: 1px solid var(--border, #e5e5e5);
    overflow: hidden;
}
.flatpickr-months {
    padding-top: .35rem;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
    background: #111;
    border-color: #111;
}
.flatpickr-day.today {
    border-color: #111;
}
.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
    background: #f5f5f5;
}
.flatpickr-time {
    max-height: 48px;
    border-top: 1px solid var(--border, #e5e5e5);
}
.flatpickr-time input {
    font-weight: 650;
    font-size: 1.05rem;
}
.numInputWrapper span {
    opacity: .7;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 650;
}

/* Destek + duyuru */
.badge-ok { background: #0f766e; }
.badge-warn { background: #d97706; }
.badge-muted { background: #94a3b8; }
.badge-info { background: #2563eb; }
.badge-danger { background: #dc2626; }

.admin-banners { display: grid; gap: .65rem; padding: .85rem 1rem 0; }
.admin-banner {
    display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between;
    border-radius: 12px; padding: .95rem 1.1rem; border: 1px solid transparent;
}
.admin-banner strong { display: block; margin: .2rem 0 .25rem; font-size: 1.02rem; }
.admin-banner p { margin: 0; line-height: 1.45; font-size: .93rem; }
.admin-banner-tag {
    display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; padding: .15rem .45rem; border-radius: 999px; background: rgba(255,255,255,.25);
}
.admin-banner-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.admin-banner-warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.admin-banner-critical {
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    border-color: #991b1b; color: #fff;
    box-shadow: 0 10px 30px rgba(185, 28, 28, .28);
    animation: adminBannerPulse 1.6s ease-in-out infinite;
}
.admin-banner-critical .btn { color: #7f1d1d; }
@keyframes adminBannerPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(185, 28, 28, .38); }
}

.help-fab { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: .55rem; }
.help-fab-btn {
    display: inline-flex; align-items: center; gap: .55rem;
    border: 0; border-radius: 999px; padding: .8rem 1.05rem;
    background: #0b3a5b; color: #fff; font-weight: 700; cursor: pointer;
    box-shadow: 0 12px 30px rgba(11, 58, 91, .28);
    max-width: min(280px, calc(100vw - 2rem));
}
.help-fab-text { font-size: .92rem; line-height: 1.2; text-align: left; }
.help-fab-panel {
    position: relative; width: min(340px, calc(100vw - 2rem));
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    padding: 1.05rem 1.05rem .95rem; box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
    display: grid; gap: .55rem;
}
.help-fab-panel[hidden] { display: none !important; }
.help-fab-close {
    position: absolute; top: .45rem; right: .55rem;
    border: 0; background: transparent; color: var(--muted);
    font-size: 1.35rem; line-height: 1; cursor: pointer; padding: .15rem .4rem;
}
.help-fab-panel strong { font-size: 1.05rem; padding-right: 1.5rem; }
.help-fab-panel p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.help-fab-link { font-size: .88rem; font-weight: 650; color: #0f766e; text-align: center; }
@media (max-width: 520px) {
    .help-fab { right: .85rem; bottom: .85rem; }
    .help-fab-text { font-size: .84rem; }
}

.support-thread { display: grid; gap: .7rem; }
.support-bubble {
    max-width: min(640px, 100%); padding: .85rem 1rem; border-radius: 14px;
    border: 1px solid var(--border); background: #fff;
}
.support-bubble.mine { justify-self: start; background: #f8fafc; }
.support-bubble.staff { justify-self: end; background: #ecfeff; border-color: #a5f3fc; }
.support-bubble-meta { font-size: .8rem; color: var(--muted); margin-bottom: .35rem; font-weight: 600; }

.note-tag {
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text);
    border-radius: 999px;
    padding: .35rem .75rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.note-tag:hover { background: #eef2ff; border-color: #c7d2fe; }

.check-row {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .75rem .9rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffbeb;
    cursor: pointer;
}
.check-row input { margin-top: .2rem; width: 1.1rem; height: 1.1rem; }

.photo-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: .55rem;
}
.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f1f5f9;
}
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-del {
    position: absolute;
    top: .25rem;
    right: .25rem;
    width: 1.5rem;
    height: 1.5rem;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}
.photo-empty {
    padding: 1.1rem;
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
    font-size: .9rem;
}
.photo-upload { cursor: pointer; }

.claim-timeline { display: grid; gap: .65rem; }
.claim-event {
    padding: .75rem .85rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    display: grid;
    gap: .2rem;
}
.claim-event strong { font-size: .95rem; }
.claim-event > span { font-size: .82rem; color: var(--muted); }

@media (max-width: 720px) {
    .photo-cols { grid-template-columns: 1fr; }
}
