/* ANDROID-031. Progressive mobile UI for the shared OMEGA ŻAK PWA.
   No data-schema changes. PC remains on the original layout. */
.mobile-current-title,.mobile-bottom-nav,.mobile-fab,.mobile-file-actions,.mobile-file-list,.mobile-file-hint,.mobile-back{display:none}
.mobile-sheet-backdrop[hidden],.mobile-sheet[hidden]{display:none!important}
.mobile-sheet-backdrop{position:fixed;inset:0;background:rgba(7,28,65,.62);z-index:51}
.mobile-sheet{position:fixed;z-index:52;bottom:0;left:0;right:0;max-height:85dvh;overflow-y:auto;overscroll-behavior:contain;border-radius:22px 22px 0 0;background:#fff;box-shadow:0 -12px 40px #071c4140;padding:18px 18px calc(20px + env(safe-area-inset-bottom,0px))}
.mobile-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:17px;color:var(--navy);padding:3px 0 14px}
.mobile-sheet-head button{display:grid;place-items:center;min-height:44px;min-width:44px;border:0;background:var(--soft);border-radius:12px;color:var(--navy);font-size:20px}
#mobileMoreLinks,.mobile-sheet-actions{display:flex;flex-direction:column;gap:7px}
#mobileMoreLinks button,.mobile-sheet-actions button{min-height:52px;display:flex;align-items:center;gap:13px;text-align:left;background:#f6f9ff;border:1px solid var(--line);border-radius:13px;padding:11px 14px;font-weight:700;color:var(--navy)}
#mobileMoreLinks button[aria-current=page]{background:#eaf2ff;border-color:#9fbdf3;color:var(--blue)}
#mobileMoreLinks button svg:last-child{margin-left:auto}
.mobile-sheet-actions button span{font-size:22px}
.mobile-sheet-foot{font-size:12px;color:var(--muted);margin:18px 2px 0}
body.mobile-sheet-open{overflow:hidden}
@media(min-width:760px){.mobile-sheet,.mobile-sheet-backdrop{display:none!important}}
@media(max-width:759px){
  html{scroll-padding-bottom:130px}
  body{font-size:15px;-webkit-text-size-adjust:100%}
  .sidebar,.menu-overlay,.mobile-menu{display:none!important}
  .topbar{min-height:63px;height:auto;padding:10px 14px;gap:12px;top:0;box-shadow:0 2px 12px #071c4108}
  .topbar-title{font-size:17px;letter-spacing:-.4px}
  .topbar-title small{display:none}
  .mobile-current-title{display:block;margin-left:auto;text-align:right;font-size:12px;line-height:1.3;font-weight:800;color:var(--navy);max-width:42%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .topbar .avatar,.topbar .quick-add{display:none}
  .view{padding:19px 13px calc(144px + env(safe-area-inset-bottom,0px));min-width:0}
  .page-heading{gap:13px;margin-bottom:17px}
  .page-heading h1{font-size:23px;margin:5px 0}
  .page-heading .subtitle{font-size:12px}
  .page-heading .actions{gap:8px}
  .page-heading .btn{min-height:44px}
  .panel{padding:16px}
  .hero{min-height:178px;padding:20px}
  .hero h2{font-size:21px}
  .hero p{font-size:12px}
  .grid{gap:11px}
  .grid-2{grid-template-columns:minmax(0,1fr)}
  .grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-3>.summary-card:last-child{grid-column:span 2}
  .summary-card{min-height:106px;padding:15px;gap:10px}
  .summary-card .number{font-size:24px}
  .summary-card .small{font-size:11px}
  .subject-card{min-height:150px;padding:15px}
  .subject-hero{flex-wrap:wrap;padding:15px}
  .subject-hero .actions{width:100%;margin-left:0!important}
  .subject-hero h1{font-size:20px}
  .subject-hero .actions .btn{min-height:44px}
  .mobile-bottom-nav{position:fixed;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));z-index:40;background:rgba(255,255,255,.98);border-top:1px solid var(--line);box-shadow:0 -4px 22px rgba(7,28,65,.09);padding:7px 4px calc(7px + env(safe-area-inset-bottom,0px));min-height:67px}
  .mobile-bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:52px;padding:5px 1px;background:transparent;border:0;border-radius:12px;color:#65748c;font-weight:750;font-size:10px;line-height:1.2}
  .mobile-bottom-nav button.active{color:var(--blue);background:#eaf2ff}
  .mobile-bottom-nav button span:last-child{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-fab{position:fixed;right:17px;bottom:calc(85px + env(safe-area-inset-bottom,0px));z-index:39;display:grid;place-items:center;width:55px;height:55px;border:none;border-radius:18px;background:var(--red);color:white;font-size:32px;line-height:1;box-shadow:0 10px 27px #ed21454a}
  .note-workspace{display:block}
  .note-list-panel{max-height:none;overflow:visible}
  .note-row{min-height:65px;padding:14px;border-bottom:1px solid var(--line);border-radius:7px}
  .note-row strong{font-size:14px}
  .note-row small{font-size:12px}
  .mobile-back{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin-bottom:12px}
  .mobile-note-editor .note-editor{min-height:0;padding:16px}
  .mobile-note-editor .note-editor>.between:first-child{align-items:flex-start;gap:10px;flex-wrap:wrap}
  .note-title-input{font-size:18px}
  .note-textarea{min-height:44dvh;resize:vertical;font-size:16px}
  .mobile-note-editor .toolbar{margin-top:14px}
  .control{min-height:45px;font-size:16px}
  .filters select{max-width:100%}
  .files-page>.page-heading .actions,.files-page .file-drop,.files-page .desktop-file-table{display:none}
  .mobile-file-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0 0 15px}
  .mobile-file-actions .btn{min-width:0;min-height:48px;white-space:normal;padding:9px;justify-content:center;text-align:center;font-size:12px}
  .mobile-file-actions .btn:first-child{grid-column:span 2}
  .mobile-file-list{display:flex;flex-direction:column;gap:10px}
  .mobile-file-card{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);background:#fafdff;border-radius:12px;padding:13px;min-width:0}
  .mobile-file-card .item-icon{min-width:42px}
  .mobile-file-body{min-width:0;flex:1}
  .mobile-file-body strong{display:block;overflow-wrap:anywhere;font-size:13px}
  .mobile-file-body small{color:var(--muted);font-size:11px;display:block;margin:3px 0 11px}
  .mobile-file-buttons{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
  .mobile-file-buttons .btn{min-height:42px;font-size:11px}
  .mobile-file-hint{display:block;margin:12px 3px}
  .panel-header{flex-wrap:wrap}
  .list-item .btn-sm{min-height:42px}
  .task-line{align-items:center;gap:11px}
  .task-line input[type=checkbox]{height:24px;width:24px}
  .task-line button{min-height:44px;min-width:44px;display:grid;place-items:center}
  .task-line .chip{max-width:88px;white-space:normal;justify-content:center;text-align:center}
  .calendar-head{flex-wrap:wrap}
  .calendar-head h2{font-size:18px}
  .calendar-cell{min-height:48px;padding:6px}
  .calendar-cell.selected{padding:5px}
  .calendar-grid{gap:3px}
  .week-name{padding:5px 0;font-size:10px}
  .calendar-cell.has-event::after{bottom:4px;left:7px}
  .quiz-opt{min-height:55px;font-size:14px}
  .settings-row{align-items:flex-start;flex-wrap:wrap}
  .app-dialog{max-width:calc(100vw - 24px);max-height:min(90dvh,850px);overflow:auto}
  .dialog-fields .grid{grid-template-columns:1fr}
  #toastContainer{bottom:calc(85px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 24px)}
  body:has(input:not([type=checkbox]):focus,textarea:focus,select:focus) .mobile-bottom-nav,
  body:has(input:not([type=checkbox]):focus,textarea:focus,select:focus) .mobile-fab{display:none}
}
@media(max-width:360px){
  .view{padding-left:9px;padding-right:9px}
  .grid-4{grid-template-columns:minmax(0,1fr)}
  .mobile-bottom-nav button{font-size:9px}
  .mobile-file-buttons .btn{padding:8px}
}
@media print{.mobile-bottom-nav,.mobile-fab,.mobile-sheet,.mobile-sheet-backdrop,.mobile-current-title,.mobile-file-actions{display:none!important}}
/* Punkt przy magazynie oznacza zapis na urządzeniu, a nie połączenie z chmurą. */
.device-status .online-dot{background:#7ba6ff;box-shadow:0 0 0 4px #7ba6ff1a}
