/* Disiplin Panosu v1.7 — yalnızca telefon görünümü */
.mobile-board-nav,
.mobile-area-nav,
.mobile-bottom-nav,
.mobile-note-back { display: none; }

@media (max-width: 760px) {
  html,
  body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body { -webkit-text-size-adjust: 100%; }
  button { -webkit-tap-highlight-color: transparent; }
  input,
  select,
  textarea { font-size: 16px !important; }

  /* Giriş ekranı */
  .auth-view { min-height: 100dvh; }
  .auth-panel {
    min-height: 100dvh;
    place-items: start center;
    padding: max(34px, env(safe-area-inset-top)) 22px max(30px, env(safe-area-inset-bottom));
  }
  .auth-card { width: min(100%, 430px); }
  .auth-logo-home { margin: 0 auto 19px; padding: 4px 8px 4px 5px; }
  .auth-logo-icon { width: 32px; height: 32px; }
  .auth-logo-name { width: 118px; }
  .auth-tabs { margin-bottom: 25px; }
  .auth-tabs button { min-height: 47px; font-size: 14px; }
  .auth-form .eyebrow { margin-bottom: 9px; font-size: 10px; }
  .auth-form h2 { margin-bottom: 24px; font-size: clamp(28px, 8vw, 34px); }
  .auth-form label { margin-top: 15px; gap: 8px; font-size: 13px; }
  .auth-form input { min-height: 50px; padding: 12px 14px; }
  .auth-form .primary { min-height: 50px; margin-top: 22px; font-size: 15px; }
  .text-button { min-height: 45px; font-size: 13px; }
  .form-copy { font-size: 13px; }

  /* Mobil kabuk: üstte marka, altta ana menü */
  .app-shell { width: 100%; min-width: 0; }
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    gap: 0;
    padding: max(7px, env(safe-area-inset-top)) 12px 7px;
    box-shadow: 0 3px 12px rgba(20,29,38,.12);
  }
  .sidebar .brand {
    width: max-content;
    min-height: 36px;
    gap: 8px;
    padding: 0 3px;
    font-size: 14px;
  }
  .sidebar-logo-wrap { width: 32px; height: 32px; }
  .sidebar-logo { width: 27px; height: 27px; }
  .sidebar nav,
  .sidebar .account-shortcut { display: none; }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 80;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 61px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px 7px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid #cbd3db;
    background: rgba(248,250,252,.96);
    box-shadow: 0 -7px 24px rgba(24,35,47,.1);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #798592;
  }
  .mobile-bottom-nav button > svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-bottom-nav button > small { font-size: 10px; line-height: 1; font-weight: 800; }
  .mobile-bottom-nav button.active { background: #e6ebf0; color: #30465c; }

  /* Sayfa başlığı ve araçlar */
  .workspace { width: 100%; padding: 17px 12px calc(86px + env(safe-area-inset-bottom)); }
  .topbar {
    min-height: 70px;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 15px;
  }
  .topbar > div:first-child { min-width: 0; }
  .topbar .eyebrow { margin-bottom: 7px; font-size: 9px; }
  .topbar h1 { max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(23px, 7vw, 28px); }
  .top-actions { flex: none; }
  .top-actions button { min-height: 44px; padding: 10px 12px; font-size: 13px; }
  #reportButton { min-width: 50px; font-size: 0; }
  #reportButton span { display: inline; font-size: 12px; }
  #newCardButton { min-width: 104px; }

  /* Pano seçimi, günün sözü ve hızlı ekleme */
  .mobile-area-nav {
    width: 100%;
    display: flex;
    gap: 6px;
    margin: 0 0 11px;
    padding: 0 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .mobile-area-nav::-webkit-scrollbar { display: none; }
  .mobile-area-nav button {
    min-height: 38px;
    flex: 1 0 auto;
    padding: 8px 13px;
    border: 1px solid #ccd4dc;
    border-radius: 9px;
    background: #f5f7f9;
    color: #687581;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }
  .mobile-area-nav button.active { border-color: #3d5369; background: #3d5369; color: #fff; }

  .motivation-bar {
    min-height: 0;
    margin: -1px 0 13px;
    padding: 11px 12px;
    gap: 5px;
    border-radius: 10px;
  }
  .motivation-bar > span { font-size: 9px; }
  .motivation-bar > p { font-size: 13px; line-height: 1.4; }
  .quick-add {
    width: 100%;
    min-height: 52px;
    grid-template-columns: 25px minmax(0,1fr) auto;
    gap: 5px;
    margin-bottom: 10px;
    padding: 5px 6px 5px 10px;
  }
  .quick-add input { width: 100%; min-width: 0; }
  .quick-add button { min-width: 64px; min-height: 40px; font-size: 13px; }
  .filterbar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }
  .filterbar input,
  .filterbar select { width: 100%; min-width: 0; height: 46px; padding: 0 11px; }
  .filterbar input { grid-column: 1 / -1; }

  /* Mobil pano sekmeleri */
  .mobile-board-nav {
    width: 100%;
    display: flex;
    gap: 6px;
    margin: 0 0 10px;
    padding: 3px;
    overflow-x: auto;
    border: 1px solid #ccd4dc;
    border-radius: 10px;
    background: #dde3e8;
    scrollbar-width: none;
  }
  .mobile-board-nav::-webkit-scrollbar { display: none; }
  .mobile-board-nav button {
    min-height: 40px;
    flex: 1 0 auto;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #65717e;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }
  .mobile-board-nav button.active { background: #fff; color: #31465b; box-shadow: 0 1px 5px rgba(35,47,59,.12); }
  .mobile-board-nav span { margin-left: 4px; color: #8a949e; font-size: 10px; }

  /* Pano: her kaydırmada tek tam sütun */
  .board {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(4, 100%);
    gap: 10px;
    margin: 0;
    padding: 0 0 10px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }
  .board::-webkit-scrollbar { display: none; }
  .column {
    width: 100%;
    min-width: 0;
    padding: 12px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .column > header { padding-bottom: 12px; }
  .column > header h2 { font-size: 16px; }
  .column > header > small { min-width: 29px; height: 29px; font-size: 11px; }
  .card-list { min-height: 70px; }
  .task-card { padding: 13px; cursor: default; touch-action: pan-y; }
  .task-card:hover { transform: none; box-shadow: 0 2px 5px rgba(31,42,54,.035); }
  .task-card h3 { font-size: 17px; }
  .task-card > p { font-size: 13px; }
  .area-tag { min-height: 27px; font-size: 11px; }
  .icon-button { width: 40px; height: 40px; }
  .subtask-list button { min-height: 31px; font-size: 13px; }
  .card-meta { font-size: 11px; }
  .task-card .card-actions { gap: 8px; }
  .task-card .card-actions button,
  .task-card .card-actions select { min-height: 42px; padding: 8px 10px; }
  .task-card .card-actions select { max-width: 145px; }
  .column-add { min-height: 44px; font-size: 12px; }

  /* Bugün, rapor ve hesap */
  .today-view,
  .settings-view { width: 100%; }
  .today-layout,
  .settings-grid { grid-template-columns: 1fr; }
  .focus-card,
  .focus-queue { padding: 18px; }
  .focus-card h2 { font-size: 23px; }
  .today-buttons { flex-direction: column; }
  .today-buttons button { min-height: 46px; }
  .empty-state { margin: 25px auto; padding: 30px 18px; }
  .settings-card { padding: 18px; }
  .settings-card .primary { width: 100%; min-height: 46px; }
  .settings-card .button-row > button { flex: 1; min-height: 44px; }
  .area-manager-card { grid-column: auto; }
  .area-manager-row { grid-template-columns: repeat(3,1fr); gap: 7px; }
  .area-manager-row .area-manager-dot { display: none; }
  .area-manager-row input,
  .area-manager-row > small { grid-column: 1 / -1; }
  .area-manager-row .area-delete { grid-column: auto; grid-row: auto; }
  .area-manager-row button { min-height: 40px; padding-inline: 9px; font-size: 11px; }
  .area-add-form { grid-template-columns: 1fr; }
  .area-add-form .primary { width: 100%; }
  .area-delete-option { padding: 13px; }
  .area-delete-option button,
  .area-delete-buttons button { width: 100%; min-height: 44px; }
  .area-delete-buttons { flex-direction: column; }
  .area-choice { min-height: 68px; padding: 13px; }
  .area-choice strong { font-size: 13px; }
  .area-choice small { font-size: 10px; }
  .area-move-submit { width: 100%; min-height: 46px; }
  .report-stats { grid-template-columns: 1fr 1fr; }

  /* Notlar: liste ve not ayrıntısı ayrı ekranlar */
  .notes-view { width: 100%; }
  .notes-layout {
    min-height: calc(100dvh - 195px);
    display: block;
    border-radius: 11px;
  }
  .notes-layout:not(.mobile-detail-open) .note-editor,
  .notes-layout:not(.mobile-detail-open) .note-empty:not(.trash-detail) { display: none; }
  .notes-layout.mobile-detail-open .notes-panel { display: none; }
  .notes-panel { min-height: calc(100dvh - 195px); border: 0; padding: 12px; }
  .notes-panel-head .primary { min-height: 42px; font-size: 13px; }
  .notes-tabs button { min-height: 40px; font-size: 12px; }
  .note-search { height: 46px; }
  .note-list { max-height: none; overflow: visible; }
  .note-list-item { min-height: 72px; padding: 13px; }
  .note-list-item span { font-size: 14px; }
  .note-list-item small { font-size: 11px; }
  .note-editor { min-height: calc(100dvh - 195px); padding: 13px; }
  .mobile-note-back {
    min-height: 40px !important;
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccd4dc;
    border-radius: 7px;
    background: rgba(255,255,255,.8);
    color: #45586a;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 800;
  }
  .note-editor-tools { align-items: center; padding-bottom: 12px; }
  .note-editor-tools select { max-width: 116px; height: 40px; font-size: 13px !important; }
  .note-editor-tools .danger,
  .note-editor-tools .secondary { min-height: 40px; padding: 8px 10px; font-size: 11px; }
  .note-title { padding: 20px 2px 13px; font-size: 24px !important; }
  .format-toolbar { margin-inline: -2px; overflow-x: auto; }
  .format-toolbar button { min-width: 40px; min-height: 40px; font-size: 12px; }
  .note-body,
  .note-preview { min-height: 48dvh; font-size: 16px !important; }
  .note-empty { min-height: calc(100dvh - 195px); padding: 24px 16px; }

  /* Alt sayfa biçimindeki pencereler */
  .modal-backdrop { padding: 0; align-items: end; }
  .modal {
    width: 100%;
    max-height: min(92dvh, 820px);
    padding: 20px 16px max(18px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }
  .modal::before {
    content: '';
    width: 38px;
    height: 4px;
    display: block;
    margin: -8px auto 13px;
    border-radius: 9px;
    background: #c5cdd5;
  }
  .modal-head { margin-bottom: 17px; }
  .modal-head h2 { font-size: 23px; }
  #cardForm { gap: 12px; }
  #cardForm input,
  #cardForm select,
  #cardForm textarea { min-height: 48px; }
  .modal-actions { position: sticky; bottom: 0; margin-inline: -16px; padding: 13px 16px max(2px, env(safe-area-inset-bottom)); background: #f7f9fb; }
  .toast { left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); text-align: center; font-size: 12px; }
}

@media (max-width: 370px) {
  .topbar h1 { max-width: 48vw; }
  .top-actions button { padding-inline: 9px; }
  #newCardButton { min-width: 92px; }
  .mobile-board-nav button { padding-inline: 8px; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .board { scroll-behavior: auto; }
}
