@media (max-width: 480px) {
  .content-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .topbar {
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .workflow-actions button {
    padding: 0 11px;
  }

  .page-subtitle {
    display: none;
  }

  .topbar-right {
    gap: 8px;
  }

  .user-chip span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view-status-bar {
    display: grid;
    grid-template-columns: 1fr;
    padding: 9px 10px;
  }

  .view-tools {
    padding: 8px;
  }

  .schedule-title {
    padding: 9px 10px;
  }

  .schedule-title h2 {
    font-size: 20px;
  }

  .mobile-course-layout .view-select-label,
  .view-select-label {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .view-metrics {
    grid-template-columns: 1fr;
  }

  .view-metrics span,
  .schedule-summary span {
    justify-content: space-between;
    width: 100%;
  }

  .view-status-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0 !important;
    width: 100%;
  }

  .view-status-actions .ghost-button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .main-filters {
    grid-template-columns: 1fr;
  }

  .main-filters label:first-child,
  .main-filters .range-hint {
    grid-column: 1 / -1;
  }

  .main-filters label {
    min-width: 0;
  }

  .controls {
    padding: 10px;
  }

  .controls input,
  .controls select {
    width: 100%;
    padding: 0 10px;
  }

  .more-filters summary {
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    white-space: normal;
  }

  .active-filter-chips,
  .quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .filter-chip,
  .quick-actions button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .empty-actions {
    grid-template-columns: 1fr;
    width: min(260px, 100%);
  }

  .empty {
    min-height: 220px;
    padding: 20px 14px;
  }

  .empty-stack strong {
    font-size: 16px;
  }

  .empty-stack span {
    max-width: 100%;
    font-size: 13px;
  }

  .tab {
    min-height: 52px;
    padding: 5px 2px;
  }

  .tab span {
    width: 26px;
    height: 26px;
  }

  .tab strong {
    max-width: 56px;
    font-size: 11px;
  }

  .scroll-top-button {
    right: 10px;
    bottom: calc(84px + var(--safe-bottom));
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .global-loading {
    top: max(8px, var(--safe-top));
    left: 10px;
    right: 10px;
    justify-content: center;
    width: auto;
    max-width: none;
    transform: none;
    text-align: center;
  }

  .package-actions button,
  .ledger-row .row-actions button {
    width: 100%;
  }

  .package-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .package-actions .icon-button,
  .ledger-row .row-actions .icon-button {
    width: 44px;
    min-height: 44px;
    justify-self: start;
  }

  .ledger-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ledger-toolbar button {
    width: 100%;
  }

  .calendar-view,
  .schedule-list,
  .week-view,
  .timeline-view,
  .subject-view,
  .teacher-view,
  .status-view,
  .institution-view {
    padding: 8px;
  }

  .calendar-day {
    padding: 10px;
  }

  .calendar-day header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
  }

  .calendar-course span,
  .calendar-block-meta {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .calendar-course,
  .calendar-block {
    padding: 9px 10px;
  }

  .timeline-item,
  .course-card,
  .ledger-row {
    grid-template-columns: 1fr;
  }

  .timeline-time,
  .time,
  .ledger-time {
    width: 100%;
    max-width: 100%;
  }

  .timeline-time {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    border-radius: 8px;
    padding: 8px 10px;
    background: #f4f7f6;
  }

  .timeline-actions,
  .row-actions,
  .ledger-row .row-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
    justify-content: stretch;
  }

  .timeline-actions .mini-button,
  .timeline-actions select,
  .row-actions .mini-button,
  .row-actions select,
  .status-select,
  .package-select {
    width: 100%;
    min-width: 0;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .kpis article,
  .insight-card,
  .finance-card,
  .settlement-overview-card,
  .settlement-card,
  .package-card {
    padding: 14px;
  }

  .kpis strong,
  .finance-card strong {
    font-size: clamp(22px, 8vw, 28px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .package-metrics,
  .finance-grid {
    grid-template-columns: 1fr;
  }

  .settlement-overview-primary,
  .settlement-overview-status {
    grid-template-columns: 1fr;
  }

  .settlement-package-balance {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .settlement-package-balance strong {
    font-size: 24px;
    text-align: left;
  }

  .package-metrics span,
  .settlement-overview-metric {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 6px;
  }

  .package-metrics em,
  .settlement-overview-metric strong {
    text-align: right;
    font-size: clamp(15px, 5vw, 18px);
  }

  .package-progress,
  .mini-progress {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .package-progress::before,
  .mini-progress::before {
    right: 46px;
  }

  .visual-dashboard-card {
    padding: 12px;
  }

  .visual-dashboard-card h3 {
    font-size: 16px;
  }

  .comparison-bar-row {
    grid-template-columns: 56px minmax(0, 1fr) 48px;
  }

  .subject-treemap {
    grid-auto-rows: 64px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .treemap-tile {
    padding: 7px;
  }

  .treemap-tile strong {
    font-size: 12px;
  }
}
