/**
 * Öğretmen paneli — gerçek telefon kabuğu (APK / dar ekran)
 * Masaüstü (≥1024px) dokunulmaz. Sıkıştırma değil uyarlama.
 * display:contents yok — Android WebView’de çocukları kaybeder.
 */

@keyframes tdash-sb-lgs-tick {
    0%, 100% { transform: scale(1); border-color: #e2e8f0; background: #f1f5f9; }
    50% { transform: scale(1.04); border-color: #99f6e4; background: #f0fdfa; }
}

#teacher-panel.mp-phone-shell,
html.mp-phone-teacher {
    --tp-phone-pad-x: 0.75rem;
    --tp-phone-gap: 0.7rem;
    --tp-phone-radius: 0.95rem;
    --tp-phone-safe-top: max(env(safe-area-inset-top, 0px), 1.65rem);
    --tp-phone-safe-bot: max(env(safe-area-inset-bottom, 0px), 0.35rem);
    --tp-touch: 2.75rem;
}

html.is-capacitor #teacher-panel.mp-phone-shell,
html.is-native-app #teacher-panel.mp-phone-shell,
html.mp-phone-teacher #teacher-panel.mp-phone-shell {
    /* Panel zaten capacitor-safe ile üst şerit payı alıyor — çift boşluk olmasın */
    --tp-phone-safe-top: 0.35rem;
}

@media (max-width: 1023px) {
    #teacher-panel.mp-phone-shell {
        font-size: 15px !important;
        line-height: 1.45 !important;
    }

    /* —— Üst bar: ☰ + Sütlaç tabela —— */
    #teacher-panel.mp-phone-shell > header.t-teacher-header {
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.45rem !important;
        padding: 0.3rem var(--tp-phone-pad-x) 0.3rem !important;
        padding-top: var(--tp-phone-safe-top) !important;
        position: sticky;
        top: 0;
        z-index: 80;
        background: #fff !important;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: none;
        width: 100%;
        box-sizing: border-box;
        min-height: 0 !important;
        grid-template-columns: unset !important;
        grid-template-areas: unset !important;
    }

    #teacher-panel.mp-phone-shell > header .t-header-leading {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0 !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
        max-width: none;
    }

    #teacher-panel.mp-phone-shell > header .teacher-mobile-menu-btn {
        display: inline-flex !important;
        width: 2.35rem !important;
        height: 2.35rem !important;
        min-width: 2.35rem !important;
        min-height: 2.35rem !important;
        border-radius: 0.65rem !important;
        background: #0f766e !important;
        border: none !important;
        color: #fff !important;
        align-items: center;
        justify-content: center;
        box-shadow: 0 3px 10px rgba(15, 118, 110, 0.25);
        z-index: 2;
        flex-shrink: 0;
    }

    #teacher-panel.mp-phone-shell > header .teacher-mobile-menu-btn i {
        color: #fff !important;
        font-size: 0.9rem !important;
    }

    /* Hoş geldin + akademik hafta: yan menüde var — üstten kaldır */
    #teacher-panel.mp-phone-shell > header .t-header-leading > div.flex.flex-col,
    #teacher-panel.mp-phone-shell > header #t-header-title,
    #teacher-panel.mp-phone-shell > header #academic-week-badge,
    #teacher-panel.mp-phone-shell > header #teacher-role-badge {
        display: none !important;
    }

    /* Seri / LGS / yuva / çıkış gizle; Sütlaç tabela kalsın */
    #teacher-panel.mp-phone-shell > header .t-header-stats {
        display: flex !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        align-items: center !important;
        justify-content: stretch !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        gap: 0 !important;
    }

    #teacher-panel.mp-phone-shell > header .sa-mode-switch,
    #teacher-panel.mp-phone-shell > header .sa-mode-switch.is-on,
    #teacher-panel.mp-phone-shell > header .t-header-streak,
    #teacher-panel.mp-phone-shell > header .t-header-lgs,
    #teacher-panel.mp-phone-shell > header .t-sutlac-nest,
    #teacher-panel.mp-phone-shell > header .t-header-logout {
        display: none !important;
    }

    #teacher-panel.mp-phone-shell > header .t-sutlac-ticker {
        display: flex !important;
        flex: 1 1 auto !important;
        align-items: center !important;
        gap: 0.45rem !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0.28rem 0.55rem 0.28rem 0.35rem !important;
        border-radius: 999px !important;
        border: 1px solid #ddd6fe !important;
        background: linear-gradient(90deg, #f5f3ff, #ecfeff) !important;
        box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
        cursor: pointer;
        text-align: left;
        font: inherit;
        color: inherit;
    }

    #teacher-panel.mp-phone-shell > header .t-sutlac-ticker img {
        width: 1.7rem !important;
        height: 1.7rem !important;
        border-radius: 999px;
        object-fit: contain;
        flex-shrink: 0;
        background: #fff;
    }

    #teacher-panel.mp-phone-shell > header .t-sutlac-ticker-text {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        color: #312e81 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        transition: opacity 0.18s ease;
    }

    #teacher-panel.mp-phone-shell > header .t-sutlac-ticker-text.is-swap {
        opacity: 0;
    }

    #teacher-panel.mp-phone-shell .mp-back-bar {
        margin: 0.35rem var(--tp-phone-pad-x) 0.25rem !important;
        padding: 0 !important;
    }

    #teacher-panel.mp-phone-shell .mp-back-bar button {
        width: 100% !important;
        min-height: 2.2rem !important;
        font-size: 0.78rem !important;
        padding: 0.45rem 0.75rem !important;
        border-radius: 0.7rem !important;
    }
    body > #teacher-sidebar-overlay.teacher-sidebar-overlay.is-visible,
    #teacher-panel .teacher-sidebar-overlay.is-visible {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 10040 !important;
        background: rgba(15, 23, 42, 0.5) !important;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        animation: none !important;
    }

    body > #teacher-sidebar,
    #teacher-panel #teacher-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: min(20rem, 88vw) !important;
        max-width: 88vw !important;
        z-index: 10050 !important;
        transform: translate3d(-105%, 0, 0) !important;
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
        animation: none !important;
        background: #f8fafc !important;
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.18) !important;
        padding-top: var(--tp-phone-safe-top) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        display: flex !important;
        flex-direction: column !important;
    }

    body > #teacher-sidebar.is-open,
    #teacher-panel #teacher-sidebar.is-open {
        transform: translate3d(0, 0, 0) !important;
        animation: none !important;
    }

    body.mp-teacher-drawer-open {
        overflow: hidden !important;
        touch-action: none;
    }

    .mp-phone-drawer-close {
        position: absolute;
        top: var(--tp-phone-safe-top, 1.65rem);
        right: 0.55rem;
        width: 2.45rem;
        height: 2.45rem;
        border: 0;
        border-radius: 0.7rem;
        background: #e2e8f0;
        color: #0f172a;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        z-index: 3;
        font-size: 1rem;
    }

    body > #teacher-sidebar .tdash-sidebar-logo,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-logo {
        padding: 0.4rem 3.2rem 0.3rem 0.7rem !important;
        margin: 0 !important;
    }

    body > #teacher-sidebar .tdash-sidebar-brand,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-brand {
        gap: 0.55rem !important;
        align-items: center !important;
    }

    body > #teacher-sidebar .tdash-sidebar-brand-text,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-brand-text {
        min-width: 0 !important;
    }

    body > #teacher-sidebar .tdash-sidebar-brand-text strong,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-brand-text strong {
        font-size: 1.05rem !important;
        line-height: 1.15 !important;
    }

    body > #teacher-sidebar .tdash-sidebar-brand-text span,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-brand-text span {
        font-size: 0.68rem !important;
        line-height: 1.2 !important;
    }

    /* Yan panel — slim seri + animasyonlu LGS kutuları */
    body > #teacher-sidebar .tdash-sidebar-vitals,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-vitals {
        grid-template-columns: 0.9fr 1.2fr !important;
        gap: 0.28rem !important;
        margin: 0.25rem 0.55rem 0.05rem !important;
    }

    body > #teacher-sidebar .tdash-sidebar-vital,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-vital {
        padding: 0.28rem 0.38rem !important;
        min-height: 0 !important;
        border-radius: 0.55rem !important;
    }

    body > #teacher-sidebar .tdash-sidebar-vital-copy strong,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-vital-copy strong {
        font-size: 0.84rem !important;
        line-height: 1.1 !important;
    }

    body > #teacher-sidebar .tdash-sidebar-vital-copy em,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-vital-copy em {
        font-size: 0.48rem !important;
    }

    body > #teacher-sidebar .tdash-sidebar-vital--lgs,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-vital--lgs {
        padding: 0.22rem 0.28rem !important;
        gap: 0.22rem !important;
    }

    body > #teacher-sidebar .tdash-sb-lgs-tag,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sb-lgs-tag {
        font-size: 0.5rem !important;
        padding: 0.22rem 0.22rem !important;
    }

    body > #teacher-sidebar .tdash-sb-lgs-box,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sb-lgs-box {
        padding: 0.12rem 0.15rem !important;
        border-radius: 0.4rem !important;
        animation: tdash-sb-lgs-tick 2.2s ease-in-out infinite;
    }

    body > #teacher-sidebar .tdash-sb-lgs-box:last-child,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sb-lgs-box:last-child {
        animation-delay: 0.35s;
    }

    body > #teacher-sidebar .tdash-sb-lgs-box strong,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sb-lgs-box strong {
        font-size: 0.78rem !important;
        line-height: 1 !important;
    }

    body > #teacher-sidebar .tdash-sb-lgs-box em,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sb-lgs-box em {
        font-size: 0.46rem !important;
    }

    body > #teacher-sidebar .sa-tools-drawer-label,
    #teacher-panel.mp-phone-shell #teacher-sidebar .sa-tools-drawer-label {
        display: none !important;
    }

    html:has(#teacher-panel.is-sa-admin) > #teacher-sidebar .sa-tools-drawer-label,
    #teacher-panel.mp-phone-shell.is-sa-admin #teacher-sidebar .sa-tools-drawer-label {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }

    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-nav-item,
    body > #teacher-sidebar .tdash-nav-item {
        min-height: 2.75rem !important;
        padding: 0.75rem 0.9rem !important;
        font-size: 0.95rem !important;
        border-radius: 0.75rem !important;
        margin-bottom: 0.2rem !important;
        gap: 0.55rem !important;
    }

    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-nav-item > i:first-child,
    body > #teacher-sidebar .tdash-nav-item > i:first-child {
        width: 2.1rem !important;
        height: 2.1rem !important;
        font-size: 0.88rem !important;
    }

    body > #teacher-sidebar .tdash-sidebar-profile-hero,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-profile-hero {
        padding: 0.85rem 0.9rem !important;
        gap: 0.55rem !important;
    }

    body > #teacher-sidebar .tdash-sidebar-profile-photo-wrap,
    #teacher-panel.mp-phone-shell #teacher-sidebar .tdash-sidebar-profile-photo-wrap {
        width: 3.25rem !important;
        height: 3.25rem !important;
        max-width: 3.25rem !important;
    }

    body > #teacher-sidebar #teacher-sidebar-name,
    #teacher-panel.mp-phone-shell #teacher-sidebar-name {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
        white-space: normal !important;
    }

    body > #teacher-sidebar #teacher-sidebar-branch,
    #teacher-panel.mp-phone-shell #teacher-sidebar-branch {
        font-size: 0.78rem !important;
        writing-mode: horizontal-tb !important;
        white-space: normal !important;
    }

    body > #teacher-sidebar .tdash-nav-group-label,
    #teacher-panel.mp-phone-shell .tdash-nav-group-label {
        font-size: 0.72rem !important;
        padding: 0.55rem 0.65rem 0.25rem !important;
    }

    /* —— Ana içerik —— */
    #teacher-panel.mp-phone-shell > .flex-1.flex {
        flex-direction: column !important;
        min-height: 0 !important;
    }

    #teacher-panel.mp-phone-shell main.flex-1 {
        padding: 0.7rem var(--tp-phone-pad-x) calc(1.1rem + var(--tp-phone-safe-bot)) !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    #teacher-panel.mp-phone-shell .view-block {
        gap: var(--tp-phone-gap) !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    #teacher-panel.mp-phone-shell .view-block > * {
        min-width: 0;
        max-width: 100%;
    }

    #teacher-panel.mp-phone-shell :is(
        .tdash-card,
        .tdash-kcard,
        .tdash-icard,
        .tdash-vcard,
        .tsh-data-card,
        .sdet-card,
        .s360-passport,
        .s360-live-card
    ) {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-wrap: anywhere;
    }

    /* KPI / komuta: 2 sütun, okunaklı — 4 sütun sıkıştırması yok */
    #teacher-panel.mp-phone-shell .tdash-insight-metrics,
    #teacher-panel.mp-phone-shell .tdash-command-bar,
    #teacher-panel.mp-phone-shell .tsh-overview-kpis,
    #teacher-panel.mp-phone-shell .tsh-module-hero-kpis {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.55rem !important;
    }

    #teacher-panel.mp-phone-shell .tdash-insight-details,
    #teacher-panel.mp-phone-shell .tdash-sutlac-home-grid {
        grid-template-columns: 1fr !important;
    }

    #teacher-panel.mp-phone-shell .tdash-command-bar {
        overflow: visible !important;
        border-radius: var(--tp-phone-radius) !important;
    }

    #teacher-panel.mp-phone-shell .tdash-command-cell {
        align-items: flex-start !important;
        text-align: left !important;
        padding: 0.7rem 0.75rem !important;
        min-height: 4.1rem !important;
        gap: 0.2rem !important;
        overflow: visible !important;
        border-right: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        background: #fff;
    }

    #teacher-panel.mp-phone-shell .tdash-command-kicker,
    #teacher-panel.mp-phone-shell .tdash-command-hint {
        font-size: 0.72rem !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        width: auto !important;
        text-align: left !important;
        display: block !important;
    }

    #teacher-panel.mp-phone-shell .tdash-command-value {
        font-size: 1.35rem !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        width: auto !important;
        text-align: left !important;
    }

    #teacher-panel.mp-phone-shell .tdash-command-value.is-text {
        font-size: 0.95rem !important;
    }

    #teacher-panel.mp-phone-shell .tdash-kcard,
    #teacher-panel.mp-phone-shell .tdash-icard,
    #teacher-panel.mp-phone-shell .tdash-vcard,
    #teacher-panel.mp-phone-shell .tdash-card,
    #teacher-panel.mp-phone-shell .tsh-data-card {
        padding: 0.9rem !important;
        border-radius: var(--tp-phone-radius) !important;
        overflow: visible !important;
        min-height: 0 !important;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
    }

    #teacher-panel.mp-phone-shell .tdash-kcard-hero strong,
    #teacher-panel.mp-phone-shell .tdash-command-value {
        font-size: 1.45rem !important;
        line-height: 1.15 !important;
    }

    #teacher-panel.mp-phone-shell .tdash-kcard-title-row h3,
    #teacher-panel.mp-phone-shell .tdash-section-title,
    #teacher-panel.mp-phone-shell .tsh-section-title {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }

    #teacher-panel.mp-phone-shell .tdash-section-sub {
        font-size: 0.78rem !important;
        line-height: 1.4 !important;
        white-space: normal !important;
    }

    #teacher-panel.mp-phone-shell .tdash-kcard-foot,
    #teacher-panel.mp-phone-shell .tdash-icard-row span {
        font-size: 0.78rem !important;
        line-height: 1.35 !important;
        white-space: normal !important;
    }

    /* Genel Bakış üst şerit: başlık + 3 ikon, arama alt satır */
    #teacher-panel.mp-phone-shell .tdash-topbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto auto !important;
        grid-template-areas:
            "title add bell profile"
            "search search search search" !important;
        gap: 0.5rem !important;
        align-items: center !important;
        margin-bottom: 0.4rem !important;
    }

    #teacher-panel.mp-phone-shell .tdash-topbar-title {
        grid-area: title !important;
        font-size: 1.2rem !important;
        line-height: 1.2 !important;
        margin-right: 0 !important;
        min-width: 0;
    }

    #teacher-panel.mp-phone-shell .tdash-search-wrap {
        grid-area: search !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: none !important;
    }

    #teacher-panel.mp-phone-shell .tdash-search-input {
        font-size: 1rem !important;
        min-height: var(--tp-touch) !important;
        height: var(--tp-touch) !important;
        padding: 0.55rem 2.6rem 0.55rem 0.85rem !important;
        border-radius: 0.8rem !important;
    }

    #teacher-panel.mp-phone-shell .tdash-create-btn {
        grid-area: add !important;
        width: var(--tp-touch) !important;
        height: var(--tp-touch) !important;
        min-width: var(--tp-touch) !important;
        border-radius: 0.75rem !important;
        padding: 0 !important;
        justify-content: center !important;
    }

    #teacher-panel.mp-phone-shell .tdash-create-btn .tdash-create-text {
        display: none !important;
    }

    #teacher-panel.mp-phone-shell .tdash-icon-btn {
        grid-area: bell !important;
        width: var(--tp-touch) !important;
        height: var(--tp-touch) !important;
    }

    #teacher-panel.mp-phone-shell .tdash-header-profile {
        grid-area: profile !important;
        width: var(--tp-touch) !important;
        height: var(--tp-touch) !important;
    }

    #teacher-panel.mp-phone-shell .tdash-filter-chips {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0.4rem !important;
        padding-bottom: 0.2rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 0.35rem !important;
    }

    #teacher-panel.mp-phone-shell .tdash-filter-chips::-webkit-scrollbar {
        display: none;
    }

    #teacher-panel.mp-phone-shell .tdash-filter-chip {
        flex-shrink: 0;
        font-size: 0.84rem !important;
        padding: 0.5rem 0.85rem !important;
        min-height: 2.35rem;
        border-radius: 999px !important;
    }

    /* Atatürk + takvim dikey — pack/dashboard row’u kır */
    #teacher-panel.mp-phone-shell #teacher-dashboard-view .tdash-context-row--compact,
    #teacher-panel.mp-phone-shell #teacher-dashboard-view .tdash-context-row {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 0.7rem !important;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        align-items: stretch !important;
    }

    #teacher-panel.mp-phone-shell #teacher-dashboard-view .tdash-island-ataturk,
    #teacher-panel.mp-phone-shell #teacher-dashboard-view .tdash-ataturk-card--hover,
    #teacher-panel.mp-phone-shell #teacher-dashboard-view .tdash-island-cal {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Atatürk: öğrenci çekmecesi (teacher-ataturk-student.css) — eski tdash override yok */
    #teacher-panel.mp-phone-shell #teacher-dashboard-view .tdash-student-ataturk {
        width: 100% !important;
        max-width: none !important;
        flex: 0 0 auto !important;
    }

    #teacher-panel.mp-phone-shell #teacher-dashboard-view .tdash-ataturk-hover-zone,
    #teacher-panel.mp-phone-shell #teacher-dashboard-view .tdash-ataturk-badge--float,
    #teacher-panel.mp-phone-shell #teacher-dashboard-view .tdash-ataturk-drawer-head:not(.s-ataturk-compact) {
        display: none !important;
    }

    #teacher-panel.mp-phone-shell #teacher-dashboard-view #calendar-days-grid {
        min-height: 0 !important;
        height: auto !important;
        grid-auto-rows: minmax(1.85rem, auto) !important;
        gap: 0.2rem !important;
    }

    #teacher-panel.mp-phone-shell #teacher-dashboard-view .s-cal-day,
    #teacher-panel.mp-phone-shell #teacher-dashboard-view .s-cal-cell-empty {
        min-height: 1.85rem !important;
        height: auto !important;
        min-width: 0 !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
        padding: 0.2rem 0 !important;
        writing-mode: horizontal-tb !important;
        white-space: nowrap !important;
        overflow: visible !important;
        word-break: keep-all !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #teacher-panel.mp-phone-shell .tdash-ataturk-hover-panel,
    #teacher-panel.mp-phone-shell .tdash-cal-hover-panel {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #teacher-panel.mp-phone-shell .tdash-cmd-drawer,
    #teacher-panel.mp-phone-shell .mentor-alert-empty,
    #teacher-panel.mp-phone-shell [class*="dashed"] {
        padding: 0.85rem !important;
    }

    /* Öğrenci kartları: dar ekranda tek sütun — yazı/kutu çakışmasın */
    #teacher-panel.mp-phone-shell .s360-card-grid,
    #teacher-panel.mp-phone-shell .s360-live-grid,
    #teacher-panel.mp-phone-shell .tdash-weekly-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.7rem !important;
    }

    @media (min-width: 420px) {
        #teacher-panel.mp-phone-shell .s360-card-grid,
        #teacher-panel.mp-phone-shell .tdash-weekly-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        }
    }

    #teacher-panel.mp-phone-shell .s360-passport-name,
    #teacher-panel.mp-phone-shell .s360-live-card h3,
    #teacher-panel.mp-phone-shell .s360-live-card .font-extrabold {
        font-size: 0.95rem !important;
        white-space: normal !important;
        overflow: visible !important;
        line-height: 1.3 !important;
    }

    #teacher-panel.mp-phone-shell .s360-passport-body {
        display: none !important;
    }

    #teacher-panel.mp-phone-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    #teacher-panel.mp-phone-shell select,
    #teacher-panel.mp-phone-shell textarea {
        font-size: 1rem !important;
        min-height: var(--tp-touch);
        padding: 0.65rem 0.85rem !important;
    }

    #teacher-panel.mp-phone-shell #messages-view input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
        min-height: 2.35rem !important;
        padding: 0.4rem 0.85rem !important;
        font-size: 0.92rem !important;
    }

    #teacher-panel.mp-phone-shell label {
        font-size: 0.88rem !important;
    }

    #teacher-panel.mp-phone-shell .tsh-module-hero {
        display: flex !important;
        flex-direction: column !important;
        padding: 0.9rem !important;
        border-radius: var(--tp-phone-radius) !important;
        gap: 0.65rem !important;
        grid-template-columns: 1fr !important;
    }

    #teacher-panel.mp-phone-shell .tsh-module-hero h1,
    #teacher-panel.mp-phone-shell .tsh-module-title {
        font-size: 1.15rem !important;
        line-height: 1.25 !important;
    }

    #teacher-panel.mp-phone-shell .tsh-module-hero p {
        font-size: 0.82rem !important;
        line-height: 1.4 !important;
    }

    #teacher-panel.mp-phone-shell .tsh-module-kpi {
        padding: 0.55rem 0.5rem !important;
        min-width: 0 !important;
    }

    #teacher-panel.mp-phone-shell .tsh-module-kpi strong {
        font-size: 1.05rem !important;
    }

    #teacher-panel.mp-phone-shell .tsh-module-kpi span {
        font-size: 0.68rem !important;
        white-space: normal !important;
        line-height: 1.25 !important;
    }

    #teacher-panel.mp-phone-shell #messages-view .tmsg-layout,
    #teacher-panel.mp-phone-shell #messages-view .wa-layout {
        display: block !important;
        height: 100% !important;
        min-height: 0 !important;
    }

    /* Liste ↔ sohbet: ikisi birden görünmesin */
    #teacher-panel.mp-phone-shell #messages-view:not(.is-tmsg-thread) .wa-stage,
    #teacher-panel.mp-phone-shell #messages-view .wa-shell:not(.is-thread-open) .wa-stage {
        display: none !important;
    }

    #teacher-panel.mp-phone-shell #messages-view.is-tmsg-thread .wa-rail,
    #teacher-panel.mp-phone-shell #messages-view .wa-shell.is-thread-open .wa-rail {
        display: none !important;
    }

    #teacher-panel.mp-phone-shell #messages-view.is-tmsg-thread .wa-stage,
    #teacher-panel.mp-phone-shell #messages-view .wa-shell.is-thread-open .wa-stage {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 0 !important;
    }

    #teacher-panel.mp-phone-shell #messages-view:not(.is-tmsg-thread) .wa-rail,
    #teacher-panel.mp-phone-shell #messages-view .wa-shell:not(.is-thread-open) .wa-rail {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    /* Öğrenci detay metrikleri */
    #teacher-panel.mp-phone-shell #student-detail-view .sdet-metrics-deck {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    #teacher-panel.mp-phone-shell .sdet-metric-tile {
        min-width: 0 !important;
        overflow: visible !important;
        padding-left: 2.5rem !important;
    }

    #teacher-panel.mp-phone-shell .sdet-metric-label,
    #teacher-panel.mp-phone-shell .sdet-metric-sub,
    #teacher-panel.mp-phone-shell .sdet-metric-trend {
        font-size: 0.72rem !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    #teacher-panel.mp-phone-shell .sdet-metric-val {
        font-size: 1.05rem !important;
        white-space: normal !important;
    }

    #teacher-panel.mp-phone-shell .sdet-hero,
    #teacher-panel.mp-phone-shell .sdet-profile-head {
        flex-wrap: wrap !important;
        min-width: 0 !important;
    }

    /* Grafik / tablo yatay kaydır */
    #teacher-panel.mp-phone-shell .tdash-chart-wrap,
    #teacher-panel.mp-phone-shell .tdash-chart-tabs,
    #teacher-panel.mp-phone-shell .tdash-grade-pills {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Sütlaç soru kutusu taşmasın */
    #teacher-panel.mp-phone-shell .tdash-sutlac-home,
    #teacher-panel.mp-phone-shell .tdash-sutlac-chat,
    #teacher-panel.mp-phone-shell .tdash-sutlac-ask-form {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    #teacher-panel.mp-phone-shell .tdash-sutlac-ask-form {
        display: flex !important;
        align-items: stretch !important;
        gap: 0.4rem !important;
        width: 100% !important;
        padding: 0.45rem 0.55rem 0.65rem !important;
    }

    #teacher-panel.mp-phone-shell .tdash-sutlac-ask-form input {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-height: 2.45rem !important;
        font-size: 0.92rem !important;
    }

    #teacher-panel.mp-phone-shell .tdash-sutlac-ask-form button {
        flex: 0 0 2.45rem !important;
        width: 2.45rem !important;
        min-width: 2.45rem !important;
        height: 2.45rem !important;
    }

    /* “Tümünü gör” dikey harf yığını */
    #teacher-panel.mp-phone-shell .tdash-weekly-see-all,
    #teacher-panel.mp-phone-shell .tdash-card > .flex.items-center.justify-between > button {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        writing-mode: horizontal-tb !important;
        align-self: flex-start;
        font-size: 0.78rem !important;
        line-height: 1.2 !important;
        max-width: none !important;
    }

    #teacher-panel.mp-phone-shell .tdash-card > .flex.items-center.justify-between {
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        gap: 0.45rem !important;
    }

    /* Sınıf grafik hapları: metrik adı + renk */
    #teacher-panel.mp-phone-shell .tdash-grade-pills {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.45rem !important;
        overflow: visible !important;
        margin-bottom: 0.65rem;
    }

    #teacher-panel.mp-phone-shell .tdash-grade-pill {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.15rem !important;
        min-width: 0 !important;
        width: 100% !important;
        padding: 0.55rem 0.65rem !important;
        border-radius: 0.75rem !important;
        border: 1px solid #e2e8f0 !important;
        background: #fff !important;
        text-align: left !important;
    }

    #teacher-panel.mp-phone-shell .tdash-grade-pill-metric {
        display: block !important;
        font-size: 0.62rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #64748b;
        white-space: nowrap;
    }

    #teacher-panel.mp-phone-shell .tdash-grade-pill-value {
        font-size: 1.05rem !important;
        font-weight: 900 !important;
        color: #0f766e !important;
        white-space: nowrap !important;
    }

    #teacher-panel.mp-phone-shell .tdash-grade-pill[data-metric="homework"] .tdash-grade-pill-value { color: #2563eb !important; }
    #teacher-panel.mp-phone-shell .tdash-grade-pill[data-metric="absence"] .tdash-grade-pill-value { color: #e11d48 !important; }
    #teacher-panel.mp-phone-shell .tdash-grade-pill[data-metric="streak"] .tdash-grade-pill-value { color: #d97706 !important; }

    #teacher-panel.mp-phone-shell table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }

    /* Yapamadığı sorular — öğrenci yatay, ders 2 sütun */
    #teacher-panel.mp-phone-shell #missed-q-student-filter {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0.4rem !important;
        width: 100% !important;
        padding: 0.15rem 0.05rem 0.35rem !important;
        border: none !important;
        background: transparent !important;
        -webkit-overflow-scrolling: touch;
    }
    #teacher-panel.mp-phone-shell #missed-q-student-filter > button {
        width: auto !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        writing-mode: horizontal-tb !important;
        border-radius: 999px !important;
        min-height: 2.15rem !important;
        font-size: 0.72rem !important;
        padding: 0.45rem 0.75rem !important;
    }
    #teacher-panel.mp-phone-shell #missed-q-subject-filter {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.4rem !important;
        width: 100% !important;
        padding: 0.55rem !important;
        border: 1px solid #e2e8f0;
        border-radius: 1rem;
        background: #f8fafc;
        box-sizing: border-box;
    }

    #teacher-panel.mp-phone-shell #missed-q-subject-filter > button {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        font-size: 0.78rem !important;
        padding: 0.55rem 0.4rem !important;
        min-height: 2.4rem !important;
        border-radius: 0.75rem !important;
        writing-mode: horizontal-tb !important;
        white-space: nowrap !important;
    }
}

@media (hover: none), (pointer: coarse) {
    #teacher-panel .tdash-ataturk-hover-panel,
    #teacher-panel .tdash-cal-hover-panel {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

@media (max-width: 1023px) {
    #teacher-sidebar.is-open,
    #rehberlik-sidebar.is-open,
    body > #teacher-sidebar.is-open {
        animation: none !important;
    }
}
