/* =========================================================
   Dentiva panel teması
   ========================================================= */
:root {
    --dv-primary: #0f766e;
    --dv-primary-600: #0d6560;
    --dv-primary-50: #e6f4f2;
    --dv-ink: #0f172a;
    --dv-muted: #64748b;
    --dv-bg: #f4f6f8;
    --dv-card: #ffffff;
    --dv-border: #e5e9ee;
    --dv-sidebar: #0b1f2a;
    --dv-sidebar-2: #12303f;
    --sidebar-w: 256px;

    --bs-primary: #0f766e;
    --bs-primary-rgb: 15, 118, 110;
    --bs-link-color: #0f766e;
    --bs-link-color-rgb: 15, 118, 110;
    --bs-link-hover-color: #0d6560;
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: #1e293b;
    --bs-border-radius: .6rem;
}

.btn-primary {
    --bs-btn-bg: var(--dv-primary); --bs-btn-border-color: var(--dv-primary);
    --bs-btn-hover-bg: var(--dv-primary-600); --bs-btn-hover-border-color: var(--dv-primary-600);
    --bs-btn-active-bg: #0a524d; --bs-btn-active-border-color: #0a524d;
    --bs-btn-disabled-bg: var(--dv-primary); --bs-btn-disabled-border-color: var(--dv-primary);
}
.btn-outline-primary {
    --bs-btn-color: var(--dv-primary); --bs-btn-border-color: var(--dv-primary);
    --bs-btn-hover-bg: var(--dv-primary); --bs-btn-hover-border-color: var(--dv-primary);
    --bs-btn-active-bg: var(--dv-primary); --bs-btn-active-border-color: var(--dv-primary);
}
.text-primary { color: var(--dv-primary) !important; }
.bg-primary-subtle { background: var(--dv-primary-50) !important; }
.form-control:focus, .form-select:focus { border-color: #5eb3aa; box-shadow: 0 0 0 .2rem rgba(15,118,110,.15); }
.form-check-input:checked { background-color: var(--dv-primary); border-color: var(--dv-primary); }
.nav-pills .nav-link.active { background: var(--dv-primary); }
.page-item.active .page-link { background: var(--dv-primary); border-color: var(--dv-primary); }
.page-link { color: var(--dv-primary); }

body.panel { background: var(--dv-bg); min-height: 100vh; }

/* ---------- Kenar çubuğu ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040;
    background: linear-gradient(180deg, var(--dv-sidebar), var(--dv-sidebar-2));
    color: #cbd5e1; display: flex; flex-direction: column; transition: transform .25s ease;
}
.sidebar-head { display: flex; align-items: center; padding: 1rem 1rem .9rem; border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: .5rem; }
.sidebar-logo { flex: 1; min-width: 0; height: 72px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: .6rem; padding: .5rem .75rem; text-decoration: none; }
.sidebar-logo img { max-width: 100%; max-height: 56px; object-fit: contain; mix-blend-mode: multiply; }
.sidebar-logo-empty { background: transparent; border: 1px dashed rgba(255,255,255,.35); color: #e2e8f0; gap: .5rem; font-size: .85rem; }
.sidebar-logo-empty:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-logo-text { background: rgba(255,255,255,.06); color: #fff; font-weight: 600; text-align: center; line-height: 1.25; font-size: .95rem; }
.print-logo { max-height: 60px; max-width: 220px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 .75rem 1rem; }
.sidebar .nav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .45; padding: .9rem .6rem .35rem; }
.sidebar .nav-link {
    display: flex; align-items: center; gap: .7rem; color: #cbd5e1; padding: .55rem .7rem;
    border-radius: .5rem; font-size: .925rem; margin-bottom: 2px;
}
.sidebar .nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .85; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar .nav-link.active { background: rgba(45,212,191,.16); color: #fff; box-shadow: inset 3px 0 0 #2dd4bf; }
.sidebar-foot { padding: .75rem 1.25rem; }
.sidebar-backdrop { display: none; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 1020; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--dv-border); display: flex; align-items: center; gap: .75rem; padding: .6rem 1.5rem;
}
.topbar-search { flex: 1; max-width: 520px; }
.topbar-search > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--dv-muted); }
.topbar-search input { padding-left: 2.2rem; background: var(--dv-bg); border-color: transparent; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border-radius: .6rem; display: none; overflow: hidden; border: 1px solid var(--dv-border); max-height: 420px; overflow-y: auto; }
.search-results.show { display: block; }
.search-results a { display: flex; gap: .75rem; padding: .6rem .9rem; color: inherit; text-decoration: none; border-bottom: 1px solid var(--dv-border); align-items: center; }
.search-results a:hover, .search-results a.focus { background: var(--dv-primary-50); }

.content { padding: 1.5rem; flex: 1; }

.avatar {
    width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 600; font-size: .8rem; flex-shrink: 0;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.35rem; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; }
    .sidebar.open + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
    .main { margin-left: 0; }
    .content { padding: 1rem; }
    .topbar { padding: .6rem 1rem; }
}

/* ---------- Bileşenler ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.45rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.page-head .sub { color: var(--dv-muted); font-size: .9rem; }

.card { border: 1px solid var(--dv-border); border-radius: .8rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.card-header { background: transparent; border-bottom: 1px solid var(--dv-border); font-weight: 600; padding: .85rem 1.1rem; }
.card-header.d-flex { align-items: center; }
.table { --bs-table-hover-bg: #f6faf9; }
.table > thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--dv-muted); font-weight: 600; background: #f8fafb; border-bottom-width: 1px; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-card { margin: 0; }
.table-card td:first-child, .table-card th:first-child { padding-left: 1.1rem; }
.table-card td:last-child, .table-card th:last-child { padding-right: 1.1rem; }

.stat-card { padding: 1.1rem 1.2rem; display: flex; gap: 1rem; align-items: center; height: 100%; }
.stat-card .icon { width: 48px; height: 48px; border-radius: .8rem; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat-card .label { color: var(--dv-muted); font-size: .85rem; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--dv-muted); }
.empty-state i { font-size: 2.4rem; display: block; margin-bottom: .5rem; opacity: .6; }

.kv dt { font-weight: 500; color: var(--dv-muted); font-size: .82rem; }
.kv dd { margin-bottom: .7rem; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: .35rem; top: .4rem; bottom: -.2rem; width: 2px; background: var(--dv-border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: .25rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--dv-primary); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--dv-border); }

.nav-tabs .nav-link { color: var(--dv-muted); }
.nav-tabs .nav-link.active { color: var(--dv-primary); font-weight: 600; }

.required::after { content: " *"; color: #dc3545; }
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }
.fs-7 { font-size: .85rem; }
.text-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Diş şeması ---------- */
.tooth-chart { overflow-x: auto; padding-bottom: .5rem; }
.tooth-chart .jaw { display: flex; justify-content: center; gap: 4px; min-width: 720px; }
.tooth-chart .jaw + .jaw { margin-top: 10px; }
.tooth-chart .half { display: flex; gap: 4px; }
.tooth-chart .half.right { padding-right: 10px; border-right: 2px dashed #cbd5e1; }
.tooth-chart .half.left { padding-left: 10px; }
.tooth {
    width: 42px; cursor: pointer; text-align: center; user-select: none; border-radius: .45rem; padding: 3px 0;
    transition: transform .1s, background .15s;
}
.tooth:hover { background: var(--dv-primary-50); transform: translateY(-2px); }
.tooth.selected { background: #ccfbf1; outline: 2px solid var(--dv-primary); }
.tooth svg { width: 34px; height: 46px; display: block; margin: 0 auto; }
.tooth .no { font-size: .72rem; font-weight: 600; color: var(--dv-muted); }
.tooth .crown-shape { stroke: #475569; stroke-width: 1.4; }
.tooth.missing svg { opacity: .3; }
.tooth .has-plan { position: absolute; }
.tooth-wrap { position: relative; }
.tooth-wrap .plan-dot { position: absolute; top: 0; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; border: 1px solid #fff; }
.legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid #94a3b8; margin-right: 4px; vertical-align: -2px; }

/* ---------- Takvim ---------- */
.fc { --fc-border-color: var(--dv-border); --fc-today-bg-color: #f0fdfa; --fc-button-bg-color: #fff; --fc-button-text-color: #334155; --fc-button-border-color: var(--dv-border); --fc-button-hover-bg-color: #f1f5f9; --fc-button-hover-border-color: #cbd5e1; --fc-button-active-bg-color: var(--dv-primary); --fc-button-active-border-color: var(--dv-primary); --fc-event-border-color: transparent; }
.fc .fc-button-primary:not(:disabled).fc-button-active { color: #fff; }
.fc .fc-toolbar-title { font-size: 1.15rem; font-weight: 650; }
.fc-event { cursor: pointer; font-size: .78rem; }
.fc .fc-timegrid-slot { height: 2.1em; }
.fc-event.st-cancelled { opacity: .45; text-decoration: line-through; }
.fc-event.st-no_show { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.15) 0 6px, transparent 6px 12px); }

.slot-btn { min-width: 74px; }

/* ---------- Giriş ---------- */
.login-page { min-height: 100vh; background: #fff; color: var(--dv-ink); }
.lg-wrap { display: flex; min-height: 100vh; }

/* Sol: marka alanı */
.lg-aside {
    position: relative; flex: 0 0 54%; overflow: hidden; color: #e2e8f0;
    background: linear-gradient(150deg, #081c27 0%, #0d3141 45%, #11545e 80%, #168383 100%);
}
.lg-aside::before {
    content: ""; position: absolute; inset: 0; opacity: .55;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 56px 56px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.lg-orb { position: absolute; border-radius: 50%; filter: blur(10px); pointer-events: none; }
.lg-orb-1 { width: 520px; height: 520px; right: -160px; top: -180px; background: radial-gradient(circle, rgba(45,212,191,.28), transparent 65%); }
.lg-orb-2 { width: 620px; height: 620px; left: -240px; bottom: -300px; background: radial-gradient(circle, rgba(20,184,166,.22), transparent 65%); }
.lg-aside-inner { position: relative; z-index: 1; height: 100%; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem clamp(2rem, 5vw, 4.5rem); }
.lg-logo-card { display: inline-flex; align-items: center; background: #fff; border-radius: 1rem; padding: 1rem 1.5rem; box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); }
.lg-logo-card img { height: 72px; max-width: 320px; object-fit: contain; mix-blend-mode: multiply; }
.lg-logo-text { font-size: 1.6rem; font-weight: 700; color: #fff; }
.lg-hero { max-width: 560px; padding: 2.5rem 0; }
.lg-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #99f6e4; background: rgba(45,212,191,.1); border: 1px solid rgba(45,212,191,.25); padding: .35rem .8rem; border-radius: 2rem; }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 0 4px rgba(45,212,191,.2); }
.lg-hero h1 { font-size: clamp(1.8rem, 2.7vw, 2.6rem); line-height: 1.18; font-weight: 700; color: #fff; letter-spacing: -.025em; margin: 1.25rem 0 1rem; }
.lg-hero h1 span { background: linear-gradient(90deg, #5eead4, #99f6e4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-hero p { color: #94a3b8; font-size: 1.02rem; line-height: 1.6; max-width: 500px; margin-bottom: 2rem; }
.lg-features { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.lg-feature { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; border-radius: .9rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.lg-feature:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.lg-feature i { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: .65rem; background: linear-gradient(135deg, rgba(45,212,191,.25), rgba(45,212,191,.08)); color: #5eead4; font-size: 1.05rem; }
.lg-feature strong { display: block; color: #f1f5f9; font-size: .9rem; font-weight: 600; margin-bottom: .15rem; }
.lg-feature span { display: block; color: #94a3b8; font-size: .78rem; line-height: 1.4; }
.lg-aside-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.08); }
.lg-badges { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .78rem; color: #cbd5e1; }
.lg-badges i { color: #5eead4; margin-right: .35rem; }
.lg-copy { font-size: .78rem; color: #64748b; }

/* Sağ: form alanı */
.lg-main { flex: 1; display: flex; flex-direction: column; padding: 1.75rem clamp(1.25rem, 4vw, 3.5rem); background: #fff; }
.lg-top { display: flex; justify-content: flex-end; }
.lg-top a, .lg-bottom { font-size: .82rem; color: #64748b; text-decoration: none; }
.lg-top a:hover { color: var(--dv-primary); }
.lg-form-wrap { flex: 1; width: 100%; max-width: 410px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; padding: 2rem 0; }
.lg-mobile-logo { display: none; margin-bottom: 1.75rem; }
.lg-mobile-logo img { max-height: 64px; max-width: 260px; object-fit: contain; mix-blend-mode: multiply; }
.lg-badge { align-self: flex-start; display: inline-flex; gap: .4rem; align-items: center; font-size: .75rem; font-weight: 600; color: var(--dv-primary); background: var(--dv-primary-50); border-radius: 2rem; padding: .3rem .8rem; }
.lg-form-wrap h2 { font-size: 1.9rem; font-weight: 700; letter-spacing: -.025em; margin: 1rem 0 .4rem; color: #0f2a38; }
.lg-sub { color: var(--dv-muted); margin-bottom: 2rem; }
.lg-form-wrap .form-label { font-size: .82rem; font-weight: 600; color: #334155; margin-bottom: .4rem; }
.lg-forgot { font-size: .8rem; color: var(--dv-primary); cursor: pointer; }
.lg-forgot:hover { text-decoration: underline; }
.login-input { position: relative; }
.login-input > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.login-input .form-control { height: 52px; padding-left: 2.75rem; padding-right: 2.9rem; border-radius: .75rem; border-color: #d9e1e8; background: #f8fafc; font-size: .95rem; transition: border-color .15s, box-shadow .15s, background .15s; }
.login-input .form-control:focus { background: #fff; border-color: #1f9a9a; box-shadow: 0 0 0 .25rem rgba(31,154,154,.15); }
.login-eye { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #64748b; width: 40px; height: 40px; border-radius: .55rem; }
.login-eye:hover { background: #eef2f6; color: var(--dv-ink); }
.login-caps { font-size: .78rem; color: #b45309; margin-top: .45rem; }
.login-submit {
    height: 52px; margin-top: 1.75rem; border-radius: .75rem; font-weight: 600; font-size: 1rem; display: flex; align-items: center; justify-content: center; gap: .5rem; border: 0;
    background: linear-gradient(135deg, #0f766e, #1f9a9a); box-shadow: 0 10px 24px -10px rgba(15,118,110,.65);
}
.login-submit:hover { background: linear-gradient(135deg, #0d6560, #198a8a); }
.login-submit i { transition: transform .15s; }
.login-submit:hover i { transform: translateX(3px); }
.lg-note { display: flex; gap: .65rem; margin-top: 1.75rem; padding: .9rem 1rem; border-radius: .75rem; background: #f6f8fa; border: 1px solid #edf1f5; font-size: .8rem; color: #64748b; line-height: 1.45; transition: background .3s, border-color .3s; }
.lg-note i { color: var(--dv-primary); font-size: 1rem; }
.lg-note-hl { background: #ecfdf5; border-color: #99f6e4; }
.lg-bottom { display: flex; justify-content: space-between; color: #94a3b8; font-size: .78rem; }
@media (max-width: 1199.98px) { .lg-aside { flex-basis: 50%; } .lg-features { grid-template-columns: 1fr; } }
@media (max-width: 991.98px) {
    .lg-aside { display: none; }
    .lg-mobile-logo { display: block; }
    .login-page, .lg-main { background: #f6f8fa; }
    .lg-form-wrap { background: #fff; border-radius: 1.1rem; padding: 2rem 1.5rem; box-shadow: 0 20px 45px -20px rgba(15,23,42,.2); flex: 0 0 auto; margin: auto; }
}

@media print {
    .sidebar, .topbar, .no-print, .btn { display: none !important; }
    .main { margin: 0; }
    .content { padding: 0; }
    .card { border: 0; box-shadow: none; }
}

/* ---------- Logo yükleme alanı ---------- */
.logo-drop { position: relative; width: 260px; height: 130px; margin: 0; display: flex; align-items: center; justify-content: center; border: 2px dashed #cbd5e1; border-radius: .75rem; background: #f8fafc; cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s; }
.logo-drop:hover, .logo-drop.dragging { border-color: var(--dv-primary); background: #f0fdfa; }
.logo-drop img { max-width: 230px; max-height: 105px; object-fit: contain; }
.logo-drop-empty { display: flex; flex-direction: column; align-items: center; text-align: center; color: #64748b; gap: .1rem; padding: .5rem; }
.logo-drop-empty i { font-size: 1.9rem; color: var(--dv-primary); }
.logo-drop-empty small { font-size: .75rem; }
.logo-drop-hover { position: absolute; inset: auto 0 0 0; background: rgba(15,23,42,.72); color: #fff; font-size: .78rem; text-align: center; padding: .3rem; transform: translateY(100%); transition: transform .15s; }
.logo-drop.has-logo:hover .logo-drop-hover { transform: none; }
.logo-drop.uploading { opacity: .6; pointer-events: none; }
