/* DtAsim - Clinical Sanctuary tema (Bootstrap 5 + Material) */

:root {
    --primary: #00685d;
    --primary-container: #008376;
    --primary-fixed: #8df5e4;
    --primary-fixed-dim: #70d8c8;
    --secondary: #006876;
    --secondary-container: #58e6ff;
    --secondary-fixed: #a1efff;
    --tertiary: #7b5500;
    --tertiary-fixed: #ffdeac;
    --error: #ba1a1a;
    --error-container: #ffdad6;
    --surface: #ebfdff;
    --surface-dim: #c7dee1;
    --surface-bright: #ebfdff;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #e1f8fb;
    --surface-container: #dbf2f5;
    --surface-container-high: #d6ecef;
    --surface-container-highest: #d0e7ea;
    --on-surface: #091f21;
    --on-surface-variant: #3d4946;
    --outline: #6d7a77;
    --outline-variant: #bcc9c5;
    --shadow-soft: 0 12px 32px rgba(0, 107, 95, 0.06);
    --shadow-card: 0 4px 16px rgba(0, 107, 95, 0.05);
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

* { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; }

html, body {
    background: var(--surface);
    color: var(--on-surface);
    min-height: 100vh;
    margin: 0;
}

a { text-decoration: none; }

/* ===== Layout ===== */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--surface-container-low);
    padding: 1.75rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-sidebar .brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 2rem 2rem;
}
.app-sidebar .brand-logo {
    width: 42px; height: 42px;
    background: var(--primary);
    color: #fff;
    border-radius: .85rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0,107,95,.25);
}
.app-sidebar .brand h1 {
    font-size: 1.15rem; font-weight: 800; margin: 0;
    color: #0a3a36; letter-spacing: -.01em;
}
.app-sidebar .brand small {
    font-size: .65rem; font-weight: 700; letter-spacing: .15em;
    text-transform: uppercase; color: var(--primary); opacity: .7;
}

.app-sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.app-sidebar nav a {
    display: flex; align-items: center; gap: .85rem;
    padding: .8rem 2rem;
    margin-left: 1rem;
    color: rgba(9, 31, 33, .55);
    font-weight: 500; font-size: .9rem;
    border-radius: 9999px 0 0 9999px;
    transition: all .25s ease;
}
.app-sidebar nav a:hover {
    background: rgba(255,255,255,.55);
    color: var(--on-surface);
}
.app-sidebar nav a.active {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    box-shadow: var(--shadow-card);
}
.app-sidebar nav a .material-symbols-outlined { font-size: 22px; }

.app-sidebar .sidebar-foot {
    padding: 1rem 1.5rem 0;
    border-top: 1px solid rgba(188,201,197,.15);
    margin-top: 1rem;
}

/* Sidebar nav group (submenu) */
.app-sidebar .nav-group { display: flex; flex-direction: column; }
.app-sidebar .nav-group-toggle {
    display: flex; align-items: center; gap: .85rem;
    padding: .8rem 2rem;
    margin-left: 1rem;
    background: none; border: none;
    color: rgba(9, 31, 33, .55);
    font-weight: 500; font-size: .9rem;
    border-radius: 9999px 0 0 9999px;
    cursor: pointer;
    transition: all .25s ease;
    text-align: left;
    width: calc(100% - 1rem);
    font-family: inherit;
}
.app-sidebar .nav-group-toggle:hover {
    background: rgba(255,255,255,.55);
    color: var(--on-surface);
}
.app-sidebar .nav-group-toggle.active {
    color: var(--primary);
    font-weight: 700;
}
.app-sidebar .nav-group-toggle .material-symbols-outlined { font-size: 22px; }
.app-sidebar .nav-arrow {
    transition: transform .25s ease;
    font-size: 20px !important;
    margin-left: auto;
}
.app-sidebar .nav-group.open .nav-arrow { transform: rotate(180deg); }

.app-sidebar .nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.app-sidebar .nav-group.open .nav-sub { max-height: 300px; padding: .25rem 0 .5rem; }
.app-sidebar .nav-sub a {
    display: flex; align-items: center; gap: .65rem;
    padding: .55rem 2rem .55rem 3.4rem;
    margin-left: 1rem;
    font-size: .82rem;
    font-weight: 500;
    color: rgba(9,31,33,.5);
    border-radius: 9999px 0 0 9999px;
    transition: all .2s ease;
}
.app-sidebar .nav-sub a:hover {
    background: rgba(255,255,255,.45);
    color: var(--on-surface);
}
.app-sidebar .nav-sub a.active {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    box-shadow: var(--shadow-card);
}
.app-sidebar .nav-sub a .material-symbols-outlined { font-size: 18px; }

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-header {
    background: #fff;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-soft);
}
.app-header .search-box {
    position: relative;
    width: 360px;
    max-width: 100%;
}
.app-header .search-box input {
    width: 100%;
    background: var(--surface);
    border: none;
    border-radius: 9999px;
    padding: .65rem 1rem .65rem 2.6rem;
    font-size: .9rem;
    outline: none;
}
.app-header .search-box input:focus { box-shadow: 0 0 0 3px rgba(0,107,95,.15); }
.app-header .search-box .material-symbols-outlined {
    position: absolute; left: .9rem; top: 50%;
    transform: translateY(-50%); color: var(--outline);
}
.app-header .user-area {
    display: flex; align-items: center; gap: 1rem;
}
.app-header .user-chip {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--surface-container-low);
    padding: .4rem .9rem;
    border-radius: 9999px;
    font-size: .85rem; font-weight: 600;
    color: #0a4a44;
}
.app-header .user-chip .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary-container);
}
.app-header .user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-container));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .85rem;
    box-shadow: 0 4px 14px rgba(0,107,95,.25);
}
.app-header .user-avatar-img {
    object-fit: cover;
    background: var(--surface-container-low);
}

.app-content {
    padding: 2rem;
    flex: 1;
}

/* ===== Cards ===== */
.dt-card {
    background: var(--surface-container-lowest);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.75rem;
}
.dt-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem;
}
.dt-card-header h2 {
    font-size: 1.3rem; font-weight: 800; margin: 0;
    color: var(--on-surface);
}
.dt-card-header p { color: var(--on-surface-variant); font-size: .85rem; margin: .25rem 0 0; }

/* Stats grid card */
.stat-card {
    background: var(--surface-container-lowest);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    transition: transform .2s ease;
    height: 100%;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: .75rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(141,245,228,.35);
    color: var(--primary);
    margin-bottom: 1rem;
}
.stat-card .stat-label {
    font-size: .72rem; text-transform: uppercase;
    letter-spacing: .08em; font-weight: 600;
    color: var(--on-surface-variant);
}
.stat-card .stat-value {
    font-size: 2rem; font-weight: 800; color: var(--on-surface);
    margin: .35rem 0 .25rem;
}
.stat-card .stat-foot { font-size: .75rem; color: rgba(9,31,33,.55); }

/* ===== Buttons ===== */
.btn {
    border-radius: .75rem;
    font-weight: 600;
    padding: .65rem 1.4rem;
    transition: all .2s ease;
    border: none;
    display: inline-flex; align-items: center; gap: .5rem;
}
.btn .material-symbols-outlined { font-size: 20px; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,107,95,.18);
}
.btn-primary:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 8px 22px rgba(0,107,95,.28); }
.btn-secondary {
    background: var(--surface-container-high);
    color: var(--on-surface);
}
.btn-secondary:hover { background: var(--surface-container-highest); color: var(--on-surface); }
.btn-danger {
    background: var(--error);
    color: #fff;
}
.btn-soft {
    background: var(--surface-container-low);
    color: var(--primary);
}
.btn-soft:hover { background: var(--primary-fixed); color: var(--primary); }
.btn-outline {
    background: transparent;
    color: var(--primary);
    box-shadow: inset 0 0 0 1.5px rgba(0,107,95,.25);
}
.btn-outline:hover { background: rgba(0,107,95,.06); color: var(--primary); }
.btn-icon {
    width: 38px; height: 38px;
    padding: 0;
    justify-content: center;
}

/* ===== Forms ===== */
.form-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--on-surface-variant);
    margin-bottom: .35rem;
}
.form-control, .form-select {
    background: var(--surface-container-highest);
    border: none;
    border-radius: .75rem;
    padding: .85rem 1rem;
    font-size: .92rem;
    color: var(--on-surface);
}
.form-control:focus, .form-select:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,107,95,.18);
    border: none;
}
textarea.form-control { min-height: 90px; }
.form-text { color: rgba(9,31,33,.55); font-size: .78rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

.input-with-icon { position: relative; }
.input-with-icon .material-symbols-outlined {
    position: absolute; left: .9rem; top: 50%;
    transform: translateY(-50%); color: var(--outline-variant);
    pointer-events: none;
}
.input-with-icon .form-control { padding-left: 2.85rem; }

/* ===== Tables ===== */
.dt-table {
    width: 100%;
    background: var(--surface-container-lowest);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border-collapse: separate;
    border-spacing: 0;
}
.dt-table thead th {
    background: var(--surface-container-low);
    color: var(--on-surface-variant);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    padding: 1rem 1.25rem;
    border: none;
    text-align: left;
}
.dt-table tbody td {
    padding: 1rem 1.25rem;
    background: #fff;
    border: none;
    font-size: .9rem;
    vertical-align: middle;
}
.dt-table tbody tr {
    transition: background .15s ease;
}
.dt-table tbody tr:hover td { background: var(--surface-container-low); }
.dt-table tbody tr + tr td { box-shadow: inset 0 1px 0 rgba(188,201,197,.18); }

/* ===== Chips / Badges ===== */
.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .75rem;
    border-radius: 9999px;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .03em;
}
.chip-success { background: var(--primary-fixed); color: #00403a; }
.chip-warning { background: var(--tertiary-fixed); color: #604100; }
.chip-info    { background: var(--secondary-fixed); color: #00404a; }
.chip-danger  { background: var(--error-container); color: #93000a; }
.chip-neutral { background: var(--surface-container-high); color: var(--on-surface-variant); }

/* ===== Misc ===== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    line-height: 1;
}

.page-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--on-surface);
    letter-spacing: -.01em;
    margin: 0;
}
.page-subtitle { color: var(--on-surface-variant); font-size: .92rem; margin: .25rem 0 0; }

/* ===== Speech-to-Text ===== */
.speech-btn {
    padding: .35rem .85rem;
    font-size: .78rem;
    border-radius: 9999px;
    gap: .35rem;
}
.speech-btn .material-symbols-outlined { font-size: 18px; }
.speech-btn.listening {
    background: var(--error) !important;
    color: #fff !important;
    animation: speech-pulse 1.2s ease-in-out infinite;
}
.speech-status {
    font-size: .75rem;
    font-weight: 700;
    color: var(--error);
    display: none;
}
.speech-status.active { display: inline-flex; align-items: center; gap: .35rem; }
@keyframes speech-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(186,26,26,.4); }
    50% { box-shadow: 0 0 0 10px rgba(186,26,26,0); }
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--on-surface-variant);
}
.empty-state .material-symbols-outlined {
    font-size: 64px;
    color: var(--surface-dim);
    display: block;
    margin: 0 auto 1rem;
}

.field-validation-error { color: var(--error); font-size: .8rem; font-weight: 600; }
.field-validation-valid { display: none; }
.input-validation-error { box-shadow: 0 0 0 2px rgba(186,26,26,.3) !important; }
.validation-summary-valid { display: none !important; }
.validation-summary-errors {
    background: var(--error-container);
    color: #93000a;
    padding: 1rem 1.25rem;
    border-radius: .75rem;
    font-size: .85rem;
    margin-bottom: 1rem;
}
.validation-summary-errors:empty { display: none !important; }
.validation-summary-errors ul { margin: 0; padding-left: 1.25rem; }
.validation-summary-errors ul:empty { display: none; }

.alert-soft-success {
    background: var(--primary-fixed);
    color: #00403a;
    padding: .85rem 1.25rem;
    border-radius: .75rem;
    border: none;
    font-weight: 600;
    font-size: .9rem;
}
.alert-soft-danger {
    background: var(--error-container);
    color: #93000a;
    padding: .85rem 1.25rem;
    border-radius: .75rem;
    border: none;
    font-weight: 600;
    font-size: .9rem;
}

/* Toolbar above table - single horizontal line */
.dt-toolbar {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: var(--surface-container-lowest);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: .85rem 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
}
.dt-toolbar .filters {
    display: flex;
    gap: .65rem;
    align-items: center;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
}
.dt-toolbar .filters .form-control,
.dt-toolbar .filters .form-select {
    padding: .55rem .9rem;
    min-width: 0;
    width: auto;
    flex: 0 1 auto;
    font-size: .85rem;
}
.dt-toolbar .filters .input-with-icon {
    flex: 1 1 240px;
    min-width: 180px;
    max-width: 360px;
}
.dt-toolbar .filters .input-with-icon .form-control {
    width: 100%;
    flex: 1;
    padding: .55rem .9rem .55rem 2.5rem;
}
.dt-toolbar .filters .input-with-icon .material-symbols-outlined {
    font-size: 20px;
}
.dt-toolbar .filters .form-select { flex: 0 0 auto; min-width: 150px; }
.dt-toolbar .filters .form-check {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
}
.dt-toolbar .filters .form-check-input { margin: 0; }
.dt-toolbar .actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-shrink: 0;
}
.dt-toolbar .btn {
    padding: .55rem 1rem;
    font-size: .85rem;
    flex-shrink: 0;
}
@media (max-width: 991.98px) {
    .dt-toolbar .filters .input-with-icon { flex: 1 1 160px; min-width: 140px; }
    .dt-toolbar .filters .form-select { min-width: 130px; }
}

/* Detail page key/value rows */
.kv-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    padding: .85rem 0;
}
.kv-row + .kv-row { box-shadow: inset 0 1px 0 rgba(188,201,197,.15); }
.kv-row dt {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--on-surface-variant);
}
.kv-row dd { margin: 0; font-size: .95rem; color: var(--on-surface); font-weight: 500; }

/* Action buttons in tables */
.row-actions { display: inline-flex; gap: .35rem; }
.row-actions a, .row-actions button {
    width: 34px; height: 34px;
    border-radius: .65rem;
    background: var(--surface-container-low);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    border: none;
    transition: all .15s ease;
}
.row-actions a:hover, .row-actions button:hover {
    background: var(--primary-fixed);
}
.row-actions .danger { color: var(--error); background: var(--error-container); }
.row-actions .danger:hover { background: #ffb3ad; }

.text-primary-soft { color: var(--primary) !important; }
.text-error { color: var(--error) !important; }

/* ===== Autocomplete dropdown ===== */
.ac-wrap { position: relative; }
.ac-dropdown {
    position: fixed;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(0,107,95,.18);
    z-index: 9999;
    max-height: 420px;
    overflow-y: auto;
    display: none;
}
.ac-dropdown.show { display: block; }
.ac-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem 1rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--on-surface);
    transition: background .12s ease;
}
.ac-item + .ac-item { box-shadow: inset 0 1px 0 rgba(188,201,197,.18); }
.ac-item:hover, .ac-item.active { background: var(--surface-container-low); }
.ac-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--primary-fixed); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .85rem;
    flex-shrink: 0;
}
.ac-info { flex: 1; min-width: 0; }
.ac-name { font-weight: 700; font-size: .92rem; color: var(--on-surface); }
.ac-meta { font-size: .75rem; color: var(--on-surface-variant); display: flex; gap: .75rem; }
.ac-empty, .ac-loading {
    padding: 1.25rem; text-align: center;
    color: var(--on-surface-variant); font-size: .85rem;
}

/* ===================================================================
   RESPONSIVE — Mobile first, tablet, desktop
   Breakpoints:
   - xl ≥ 1200: Desktop full
   - lg 992-1199: Desktop dar (sidebar 220px)
   - md 768-991: Tablet (sidebar drawer, hamburger)
   - sm < 768: Phone (sidebar drawer, kompakt)
   =================================================================== */

/* ----- Hamburger button (header) ----- */
.btn-hamburger {
    display: none;
    width: 42px; height: 42px;
    border: none;
    background: var(--surface-container-low);
    color: var(--primary);
    border-radius: .75rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-hamburger .material-symbols-outlined { font-size: 24px; }

/* ----- Sidebar backdrop (mobile drawer overlay) ----- */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9, 31, 33, .5);
    z-index: 200;
    backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { display: block; }

/* ===== Tablet (lg ≤ 1199) ===== */
@media (max-width: 1199.98px) {
    .app-sidebar { width: 230px; }
    .app-content { padding: 1.5rem; }
}

/* ===== Tablet (md ≤ 991) — Sidebar olur drawer ===== */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        width: 280px;
        z-index: 250;
        transform: translateX(-100%);
        transition: transform .3s ease;
        box-shadow: 0 0 32px rgba(0,107,95,.18);
    }
    .app-sidebar.open { transform: translateX(0); }
    .app-main { width: 100%; }
    .btn-hamburger { display: inline-flex; }
    .app-content { padding: 1.25rem; }

    /* Header — kompakt */
    .app-header { padding: 0 1rem; gap: .5rem; }
    .app-header .search-box { width: auto; flex: 1 1 auto; min-width: 0; max-width: 320px; }
    .app-header .user-area { gap: .4rem; }
    .app-header .user-chip { display: none; }
    .app-header .speech-btn { display: none; }
}

/* ===== Phone (sm ≤ 767) ===== */
@media (max-width: 767.98px) {
    .app-content { padding: 1rem .85rem; }

    /* Page header — title + actions stacked */
    .page-title { font-size: 1.4rem; }
    .page-subtitle { font-size: .82rem; }
    .d-flex.justify-content-between.align-items-end {
        flex-wrap: wrap;
        gap: .85rem;
    }

    /* dt-card — kenar boşluk azalt */
    .dt-card { padding: 1.1rem; border-radius: .85rem; }
    .dt-card-header { flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; }
    .dt-card-header h2 { font-size: 1.05rem; }

    /* Stat cards — daha kompakt */
    .stat-card { padding: 1.1rem; }
    .stat-card .stat-value { font-size: 1.6rem; }
    .stat-card .stat-icon { width: 42px; height: 42px; }
    .stat-card .stat-icon .material-symbols-outlined { font-size: 22px; }

    /* Tablo overflow scrollable */
    .dt-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .dt-table { min-width: 640px; }
    .dt-table thead th { padding: .75rem .65rem; font-size: .65rem; }
    .dt-table tbody td { padding: .75rem .65rem; font-size: .82rem; }
    .row-actions a, .row-actions button { width: 30px; height: 30px; border-radius: .5rem; }
    .row-actions .material-symbols-outlined { font-size: 18px; }

    /* Filter toolbar — stack vertical */
    .dt-toolbar {
        flex-wrap: wrap;
        overflow-x: visible;
        white-space: normal;
        padding: .85rem;
    }
    .dt-toolbar .filters {
        flex-wrap: wrap;
        flex: 1 1 100%;
        gap: .5rem;
    }
    .dt-toolbar .filters .form-control,
    .dt-toolbar .filters .form-select {
        flex: 1 1 140px;
        min-width: 0;
        font-size: .82rem;
        padding: .55rem .75rem;
    }
    .dt-toolbar .filters .input-with-icon { flex: 1 1 100%; max-width: none; }
    .dt-toolbar .filters .form-select { min-width: 0; }
    .dt-toolbar .actions {
        flex: 1 1 100%;
        justify-content: flex-end;
    }
    .dt-toolbar .btn { padding: .5rem .85rem; font-size: .78rem; }

    /* Forms — input padding compact */
    .form-control, .form-select { padding: .7rem .85rem; font-size: .9rem; }
    .form-label { font-size: .68rem; }

    /* KV row — single column */
    .kv-row { grid-template-columns: 1fr; gap: .15rem; padding: .65rem 0; }
    .kv-row dt { font-size: .65rem; }
    .kv-row dd { font-size: .88rem; }

    /* Buttons — compact */
    .btn { padding: .55rem 1rem; font-size: .85rem; }
    .btn .material-symbols-outlined { font-size: 18px; }

    /* Speech buttons — sadece icon */
    .speech-btn span:not(.material-symbols-outlined) { display: none; }
    .speech-btn { padding: .45rem .65rem; }

    /* Page header buttons — küçült */
    .page-title + p { margin-bottom: .5rem; }

    /* Foto kart küçült */
    .foto-wrap, .kfoto-wrap { width: 160px; height: 160px; }
    .foto-wrap .placeholder, .kfoto-wrap .placeholder { font-size: 3rem; }

    /* Modal/Drawer fullwidth on phone */
    .yh-drawer { width: 100% !important; max-width: 100vw !important; }
    .modal-dialog { margin: .5rem; }
    .kamera-modal .modal-dialog { max-width: calc(100vw - 1rem); }

    /* Login responsive */
    .login-shell { max-width: calc(100vw - 1.5rem); }
    .glass-card { padding: 2rem 1.5rem; }
    .login-title { font-size: 1.5rem; }

    /* Forecast hide on phone — sadece bugun göster */
    .weather-forecast { display: none; }
    .weather-current { flex: 1; }

    /* Day strip kompakt */
    .day-strip { padding: .65rem; gap: .35rem; }
    .day-cell { flex: 0 0 52px; padding: .5rem .15rem; }
    .day-cell .dd { font-size: 1.15rem; }
    .day-cell .dn { font-size: .58rem; }
    .day-cell .dm { font-size: .58rem; }

    /* FullCalendar mobil */
    .fc .fc-toolbar { flex-wrap: wrap; gap: .5rem; }
    .fc .fc-toolbar-title { font-size: 1rem !important; }
    .fc .fc-button { padding: .35rem .65rem !important; font-size: .75rem !important; }
    .fc-event { font-size: .68rem !important; padding: 1px 3px !important; }
    .fc .fc-col-header-cell-cushion, .fc .fc-daygrid-day-number { font-size: .75rem; }

    /* Cari hareket tablosu chip kompakt */
    .chip { padding: .25rem .55rem; font-size: .65rem; }

    /* Currency strip wrap */
    #kurCard .d-flex.gap-4 { gap: 1rem !important; }
}

/* ===== Çok küçük (xs ≤ 480) ===== */
@media (max-width: 480px) {
    .app-header { padding: 0 .65rem; }
    .app-header .search-box input { font-size: .82rem; padding: .55rem 1rem .55rem 2.4rem; }
    .app-content { padding: .85rem .65rem; }
    .stat-card .stat-value { font-size: 1.4rem; }
    .page-title { font-size: 1.25rem; }
}
