/* PratikCV ortak küçük ekran sistemi — kullanıcı ve yönetici panelleri */

html,
body { max-width: 100%; }

.app-shell,
.app-main,
.app-content,
.panel-card,
.app-page-head { min-width: 0; }

img,
svg,
canvas { max-width: 100%; }

@media (max-width: 1024px) {
  .app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 60px;
    padding-inline: 16px;
  }

  .app-content { padding: 22px 18px 34px; overflow: visible; }
  .app-page-head { flex-wrap: wrap; }
  .app-breadcrumb {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .app-breadcrumb::-webkit-scrollbar { display: none; }
  .panel-card-head { flex-wrap: wrap; }
  .checkout-layout,
  .settings-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
  .modal-dialog { max-width: calc(100vw - 24px); margin-inline: auto; }
}

@media (max-width: 760px) {
  body { overflow-x: hidden; }

  .app-topbar { gap: 8px; padding-inline: 10px; }
  .app-topbar .app-search { min-width: 0; padding: 8px 10px; }
  .app-topbar .app-search span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .app-topbar-actions { min-width: 0; gap: 3px; }
  .app-icon-btn { width: 34px; height: 34px; flex: 0 0 34px; }

  .app-content { padding: 15px 11px 30px; }
  .app-breadcrumb { margin-bottom: 11px; font-size: 10.5px; }
  .app-page-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 13px;
  }
  .app-page-head .app-page-icon { width: 40px; height: 40px; }
  .app-page-head h1 { font-size: 17px; }
  .app-page-head p { font-size: 11.5px; line-height: 1.45; }
  .app-page-head > :not(.app-page-icon):not(div),
  .app-page-head > .ms-auto {
    grid-column: 1 / -1;
    justify-self: stretch;
    margin-left: 0 !important;
  }
  .app-page-head > .btn,
  .app-page-head > .btn-group { justify-content: center; width: 100%; }

  .dashboard-hero,
  .analytics-head,
  .portfolio-editor-head {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }
  .dashboard-hero > .d-flex,
  .dashboard-hero > :last-child,
  .portfolio-editor-head > :last-child { width: 100%; }
  .dashboard-hero .btn,
  .portfolio-editor-head .btn { flex: 1; justify-content: center; }

  .dashboard-stat-grid,
  .analytics-metrics,
  .analytics-layout,
  .analytics-insights { grid-template-columns: 1fr; }
  .metric-card { padding: 14px; }
  .metric-card strong { font-size: 20px; }
  .dashboard-chart-card { min-height: 300px; }

  .panel-card { padding: 15px; border-radius: 13px; }
  .table-panel { padding: 0; }
  .panel-card-head { align-items: flex-start; gap: 8px; }
  .panel-card-head > a { white-space: nowrap; }
  .pc-empty-state { min-height: 190px; padding: 30px 18px !important; }

  .panel-create-cta,
  .pc-alert {
    align-items: stretch !important;
    flex-direction: column;
    gap: 12px;
  }
  .panel-create-cta > div:last-child,
  .pc-alert > .btn,
  .pc-alert > a,
  .pc-alert > div:last-child { width: 100%; }
  .panel-create-cta > div:last-child { display: grid !important; grid-template-columns: 1fr 1fr; }
  .panel-create-cta .btn,
  .panel-create-cta .btn-cta,
  .pc-alert .btn { justify-content: center; width: 100%; }

  .pc-table-scroll,
  .table-responsive,
  .table-responsive-modern {
    margin-inline: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .pc-table { min-width: 620px; }
  .pc-table th,
  .pc-table td { padding-inline: 11px !important; }

  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .checkout-form-card { padding: 17px; }
  .section-heading { align-items: flex-start; }

  .modal-dialog { margin: 8px auto; }
  .modal-content { max-height: calc(100dvh - 16px); border-radius: 16px; }
  .modal-header { padding: 15px 16px 12px; }
  .modal-body { padding: 16px; overflow-y: auto; }
  .modal-footer { gap: 7px; padding: 11px 16px 15px; }
  .modal-footer .btn { min-width: 0; flex: 1; }
  .content-cover-preview { height: 155px; }

  .cover-letter-card { align-items: flex-start; flex-wrap: wrap; gap: 11px; padding: 14px; }
  .cover-letter-body { flex-basis: calc(100% - 70px); }
  .cover-letter-actions { width: 100%; display: grid; grid-template-columns: 1fr auto; }
  .cover-letter-actions .btn { justify-content: center; }

  .pricing-page-app { padding-inline: 0; }
  .pricing-hero { padding: 22px 18px; }
  .pricing-hero h1 { font-size: clamp(31px, 9vw, 42px); }
  .pricing-card { padding: 20px; }

  .notification-page-item { align-items: flex-start; }
  .notification-title-row { align-items: flex-start; flex-direction: column; gap: 3px; }
}

@media (max-width: 560px) {
  .app-search { flex: 0 1 116px !important; }
  .app-mobile-menu { width: 36px; height: 36px; flex: 0 0 36px; }
  .app-user-chip { width: 36px; height: 36px; justify-content: center; padding: 4px; }
  .app-user-chip .app-user-name,
  .app-user-chip > span:not(.app-user-avatar) { display: none; }
  .app-user-chip.dropdown-toggle::after { display: none; }

  .app-page-head { grid-template-columns: 36px minmax(0, 1fr); padding: 12px; }
  .app-page-head .app-page-icon { width: 36px; height: 36px; font-size: 15px; }
  .app-page-head p { overflow-wrap: anywhere; }

  .panel-create-cta > div:last-child { grid-template-columns: 1fr; }
  .premium-benefits { display: grid; grid-template-columns: 1fr 1fr; }
  .recent-cv-item { align-items: flex-start; }
  .recent-cv-item small { white-space: normal; }

  .input-group { gap: 6px; }
  .panel-card .input-group { flex-wrap: wrap; }
  .panel-card .input-group > .form-control { min-width: 0; flex: 1 1 calc(100% - 58px); }
  .panel-card .input-group > .btn { flex: 1 1 100%; border-radius: 9px !important; }
  .panel-card .input-group > .input-group-text { border-radius: 9px !important; }

  .modal-footer { flex-wrap: nowrap; }
  .modal-footer .btn { padding-inline: 8px; font-size: 11.5px; }
  .new-cv-template-card { grid-template-columns: 72px minmax(0, 1fr); }
  .new-cv-template-preview { height: 90px; }
  .new-cv-premium { top: 6px; right: 6px; }

  .portfolio-multi-card,
  #cv-list .item-card { border-radius: 16px; }
  #cv-list .item-actions { grid-template-columns: minmax(76px, 1fr) repeat(5, 34px); }
  .portfolio-card-top { align-items: flex-start; }

  .pc-swal .pc-swal-actions { flex-direction: column-reverse; }
  .pc-swal .pc-swal-actions .btn { width: 100%; margin: 0 !important; }
}

@media (hover: none) and (pointer: coarse) {
  .app-nav-item,
  .dropdown-item,
  .action-menu-btn { min-height: 42px; }
  button,
  .btn,
  input,
  select { touch-action: manipulation; }
}
