* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; border: 1px solid var(--border); background: var(--accent); color: var(--on-accent); font-weight: 700; padding: .65rem .9rem; }
button.ghost { background: var(--bg-elev2); color: var(--text); }
input { width: 100%; padding: .7rem .8rem; margin: .25rem 0; font: inherit; font-size: 16px; }
.error { color: var(--red); font-size: .85rem; min-height: 1.1em; margin: .3rem 0 0; }
.muted { color: var(--muted); }

/* Autentificare */
.screen.center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.card { width: 100%; max-width: 380px; padding: 1.5rem; text-align: center; }
.card h1 { margin: 0 0 .25rem; font-size: 34px; }
.tabs { display: flex; gap: .5rem; margin: 1rem 0; }
.tab { flex: 1; background: var(--bg-elev2); color: var(--muted); }
.tab.active { background: var(--accent); color: var(--on-accent); }
form { display: flex; flex-direction: column; gap: .1rem; }
form button[type=submit] { margin-top: .5rem; height: 48px; }

/* Aplicatie */
#screen-app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.page { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.hdr-av { width: 32px; height: 32px; border-radius: 50%; background: #26324A; color: #BFD3FF; font-weight: 700; font-size: 13px; display: grid; place-items: center; margin-right: 6px; }
.hdr-av:empty { visibility: hidden; }

.hello { padding: 8px 4px 2px; }
.hello h1 { margin: 0 0 4px; font-size: 30px; font-weight: 700; }
.hello p { margin: 0; font-size: 15px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 12px; min-height: 128px; padding: 16px; border-radius: 18px;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.tile:active { background: #1B2029; }
.tile-ic { width: 42px !important; height: 42px !important; border-radius: 13px !important; }
.tile-txt { display: flex; flex-direction: column; gap: 3px; }
.tile-name { font-weight: 700; font-size: 16px; }
.tile-st { font-size: 13px; color: var(--muted); min-height: 1.3em; }
.tile-st.loading { width: 70%; border-radius: 6px; background: #1E2430; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

.recent { display: flex; flex-direction: column; gap: 8px; }
.rec {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.rec .d-chip { width: 36px; height: 36px; border-radius: 11px; }
.rec-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rec-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-sub { font-size: 13px; color: var(--muted); }
.rec svg.chev { color: #6B7482; flex: none; }

/* Toast, modal, meniu lateral (baza; aspectul vine din seto.css) */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); color: var(--text); padding: .6rem 1rem; z-index: 80; }
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1rem; }
.modal-card { width: 100%; max-width: 380px; padding: 1.25rem; }
.modal-card h2 { margin: 0 0 .5rem; font-size: 1.15rem; text-align: center; }
.modal-actions { display: flex; gap: .5rem; margin-top: .6rem; }
.modal-actions button { flex: 1; }
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(4,6,10,.62); }
.drawer-panel { position: absolute; top: 0; left: 0; bottom: 0; overflow-y: auto; animation: drawer-in .16s ease; }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
