/* ვებ-ვერსია (/app): popup.css-ის ფიქსირებული 720×600 ზომის ნაცვლად — მთელი ფანჯარა */
html.web-app, html.web-app body { height: 100%; }
html.web-app body { width: auto; height: 100vh; height: 100dvh; overflow: hidden; font-size: 14px; }
html.web-app .modal-overlay { padding: 16px; }

/* შესვლა */
.app-login { width: min(400px, calc(100vw - 32px)); padding: 32px 28px; background: var(--bg); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.app-login h1 { font-size: 24px; line-height: 1.25; }
.app-login .muted { line-height: 1.55; }
.app-login-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; }
.app-login-brand img { border-radius: 12px; }
.app-login-foot { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border); width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-login-foot a { color: var(--accent); font-size: 13px; text-decoration: none; }
.app-login-foot a:hover { text-decoration: underline; }
html.web-app #screen-login { background: var(--bg-soft, var(--bg)); background: radial-gradient(90% 70% at 100% 0%, var(--accent-soft) 0%, transparent 60%), var(--bg); padding: 16px; overflow-y: auto; }

.app-lang { font: inherit; font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; cursor: pointer; }
.app-lang:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* მთავარი */
html.web-app #screen-main.app-main { display: flex; flex-direction: column; min-height: 0; }
.app-head { flex: none; display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--border); background: var(--bg); }
.app-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.app-brand img { border-radius: 8px; }
.app-title { margin: 0; padding-left: 16px; border-left: 1px solid var(--border); font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.app-head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-head .btn { display: inline-flex; align-items: center; gap: 6px; }
.app-user { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 220px; }
.app-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.app-drive { flex: 1; min-height: 0; display: flex; background: var(--bg); }
.app-drive > .dv { height: 100%; grid-template-columns: 248px minmax(0, 1fr); }

@media (max-width: 860px) {
  .app-title, .app-user-name { display: none; }
  .app-head { padding: 8px 12px; gap: 10px; }
  .app-head .btn span { display: none; }
}
@media (max-width: 640px) {
  .app-brand span { display: none; }
  .app-drive > .dv { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app-drive .dv-side { max-height: 34vh; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--border); }
}

/* ფანჯრები დიდ ეკრანზე: popup-ის 520–560px სიმაღლის ლიმიტის ნაცვლად */
html.web-app .modal { max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); }
html.web-app .modal.wide { width: min(760px, calc(100vw - 32px)); }
