/* EnergiaSpolu mobil – vzhľad mobilnej aplikácie (na počítači v ráme telefónu, na mobile na celú obrazovku). */
:root{--navy:#15385e;--red:#e6333b;--blue:#0876bc;--green:#24683b;--amber:#b7791f;--ink:#26384d;--muted:#6b7a8c;--line:#e3e9f1;--bg:#f3f6fa;--card:#fff;--safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px)}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{font-family:Inter,"Segoe UI",system-ui,-apple-system,Arial,sans-serif;color:var(--ink);background:radial-gradient(1200px 700px at 80% 10%,#dcebf8 0%,transparent 60%),linear-gradient(160deg,#f6f9fc,#e8eff7);-webkit-font-smoothing:antialiased}
button,input{font:inherit}a{color:var(--blue)}
[hidden]{display:none!important}

/* ---------- javisko (počítač) ---------- */
.stage{min-height:100%;display:grid;grid-template-columns:minmax(260px,420px) auto;gap:64px;align-items:center;justify-content:center;padding:32px}
.stage-info h2{font-size:44px;line-height:1.08;letter-spacing:-1.2px;color:var(--navy);margin:22px 0 14px}.stage-info h2 em{font-style:normal;color:var(--red)}
.stage-info p{color:#4a5f75;line-height:1.6;font-size:16px}
.stage-logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:22px;color:var(--navy)}.accent{color:var(--red)}
.stage-actions{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0 14px}
.stage-demo{border:0;border-radius:12px;background:var(--red);color:#fff;font-weight:800;padding:14px 22px;cursor:pointer;box-shadow:0 10px 24px rgba(230,51,59,.28)}
.stage-back{display:inline-flex;align-items:center;padding:14px 18px;border-radius:12px;border:1px solid #cdd9e6;background:#fff;color:var(--navy);font-weight:700;text-decoration:none}
.stage-note{font-size:13px!important;color:var(--muted)!important}
.logo-mark{width:34px;height:34px;border-radius:10px;background:var(--red);color:#fff;display:inline-grid;place-items:center;flex:0 0 auto}.logo-mark svg{width:20px;height:20px}.logo-mark.big{width:72px;height:72px;border-radius:20px}.logo-mark.big svg{width:40px;height:40px}

/* rám telefónu */
.device{position:relative;width:414px;height:868px;padding:12px;border-radius:58px;background:linear-gradient(145deg,#1f2b3b,#0b1320);box-shadow:0 40px 90px rgba(10,30,60,.35),inset 0 0 0 2px #2c3a4e}
.device-btn{position:absolute;width:4px;border-radius:3px;background:#1a2433}.device-btn.b1{left:-4px;top:150px;height:34px}.device-btn.b2{left:-4px;top:205px;height:62px}.device-btn.b3{right:-4px;top:220px;height:92px}
.screen{position:relative;width:100%;height:100%;border-radius:46px;overflow:hidden;background:var(--bg);display:flex;flex-direction:column;isolation:isolate}
.statusbar{height:50px;flex:0 0 50px;display:flex;align-items:center;justify-content:space-between;padding:0 30px 0 34px;font-weight:700;font-size:15px;color:#111;background:#fff;position:relative;z-index:5}
.island{position:absolute;left:50%;top:11px;transform:translateX(-50%);width:120px;height:34px;border-radius:20px;background:#0b0f15}
.sb-icons{display:flex;gap:6px;align-items:center}.sb-icons svg{height:11px;fill:#111}.batt{width:24px;height:12px;border:1.5px solid #111;border-radius:4px;padding:1.5px;position:relative}.batt i{display:block;width:70%;height:100%;background:#111;border-radius:1.5px}
.home-indicator{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);width:134px;height:5px;border-radius:3px;background:#111;opacity:.85;z-index:30}

/* ---------- štart a prihlásenie ---------- */
.boot{flex:1;display:grid;place-content:center;justify-items:center;gap:14px;color:var(--muted)}.boot .logo-mark{animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(.92);opacity:.75}}
.login{flex:1;overflow:auto;background:#fff}.login-inner{padding:34px 26px 60px}
.logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:21px;color:var(--navy);text-decoration:none}.logo small{display:block;font-size:11px;font-weight:500;color:var(--muted)}
.login h1{font-size:30px;letter-spacing:-.8px;color:var(--navy);margin:34px 0 8px}.lead{color:var(--muted);line-height:1.6;margin:0 0 22px;font-size:14.5px}
.login label{display:block;font-size:13px;font-weight:700;margin:14px 0 6px;color:var(--navy)}
.login input{width:100%;min-height:50px;border:1px solid #ccd9e7;border-radius:12px;padding:12px 14px;font-size:16px;color:var(--ink);background:#fff}
.login input:focus{outline:3px solid rgba(8,118,188,.25);border-color:var(--blue)}
.pw{position:relative}.pw input{padding-right:92px}.pw-toggle{position:absolute;right:6px;top:6px;bottom:6px;border:0;border-radius:9px;background:#eef3f9;color:var(--navy);font-size:12px;font-weight:700;padding:0 12px;cursor:pointer}
.message{background:#fff0f1;color:#a72430;border-radius:10px;padding:10px 12px;font-size:13px;margin:14px 0 0}
.btn-primary,.btn-demo,.btn-ghost,.btn-danger{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;border-radius:13px;font-weight:800;font-size:15px;cursor:pointer;text-decoration:none;padding:0 18px}
.btn-primary{border:0;background:var(--red);color:#fff;box-shadow:0 10px 22px rgba(230,51,59,.25);margin-top:20px}.btn-primary:disabled{opacity:.6}
.btn-demo{width:100%;border:1px solid #cfe0f1;background:#f2f8fe;color:var(--blue)}
.btn-ghost{border:1px solid #d5e0ec;background:#fff;color:var(--navy);margin-top:12px}.btn-danger{border:1px solid #f1c4c7;background:#fff;color:#c42b33;margin-top:12px}
.block{width:100%}
.or{display:flex;align-items:center;gap:10px;color:#8b9aab;font-size:12px;margin:22px 0}.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}
.switch{text-align:center;font-size:14px;color:var(--muted);margin-top:22px}.switch a{font-weight:700}
.footnote{text-align:center;font-size:11px;color:#9aa8b8;margin-top:26px}

/* ---------- aplikácia ---------- */
.shell{flex:1;display:flex;flex-direction:column;min-height:0;position:relative}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 16px 6px;background:#fff}
.logo.small{font-size:18px}.logo.small .logo-mark{width:30px;height:30px;border-radius:9px}.logo.small .logo-mark svg{width:17px;height:17px}
.demo-badge{margin-right:auto;margin-left:4px;padding:3px 8px;border-radius:999px;background:#fff1d6;color:#8a5a00;font-size:10px;font-weight:800;letter-spacing:.08em}
.topbar-actions{display:flex;gap:8px;align-items:center}
.icon-btn{width:38px;height:38px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--navy);display:grid;place-items:center;cursor:pointer}.icon-btn svg{width:19px}.icon-btn.spin svg{animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.avatar{width:38px;height:38px;border-radius:50%;border:0;background:linear-gradient(135deg,var(--navy),var(--blue));color:#fff;font-weight:800;font-size:13px;cursor:pointer}.avatar.big{display:grid;place-items:center;width:52px;height:52px;font-size:17px}
.site-chip{display:flex;align-items:center;gap:8px;margin:0;padding:9px 16px 11px;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left;cursor:pointer;color:var(--ink);font-size:13px}
.site-chip .dot{width:8px;height:8px;border-radius:50%;background:#2f8a4c;box-shadow:0 0 0 3px #e3f5e9}.site-chip small{margin-left:auto;color:var(--muted);font-family:ui-monospace,Consolas,monospace;font-size:11px}.site-chip i{font-style:normal;color:var(--muted)}
.view{flex:1;overflow-y:auto;overflow-x:hidden;padding:16px 16px 24px;-webkit-overflow-scrolling:touch;outline:none}
.greet,.page-title{font-size:24px;letter-spacing:-.5px;color:var(--navy);margin:4px 0 12px}.sub{margin:-6px 0 14px;color:var(--muted);font-size:13px;line-height:1.5}
.eyebrow{font-size:10.5px;letter-spacing:.12em;font-weight:800;color:var(--blue)}
.hero-card{border-radius:22px;padding:18px 18px 12px;color:#fff;background:linear-gradient(135deg,#15385e,#0876bc);box-shadow:0 14px 30px rgba(21,56,94,.25);margin-bottom:14px}
.hero-card .eyebrow{color:#bfe0ff}.hero-num{font-size:38px;font-weight:800;letter-spacing:-1px;margin:6px 0}
.hero-meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:#d6e8f8}
.delta{font-weight:800;padding:1px 6px;border-radius:999px;font-size:11px;background:rgba(255,255,255,.14)}.delta.good{color:#7ee2a0}.delta.bad{color:#ffb4b8}
.card .delta.good,.tile .delta.good{color:var(--green);background:#e3f5e9}.card .delta.bad{color:#c42b33;background:#fdebec}
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:10px;margin-bottom:14px}
.tile{display:flex;flex-direction:column;gap:3px;padding:13px;border-radius:16px;background:#fff;border:1px solid var(--line);text-decoration:none;color:var(--ink);min-width:0}
.tile small{font-size:11px;color:var(--muted);font-weight:600}.tile b{font-size:17px;color:var(--navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile span{font-size:11px;color:var(--muted)}
.tile.warn{border-color:#f3d18b;background:#fffaf0}.tile.good{border-color:#bfe0c9;background:#f3fbf6}
.card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;margin-bottom:14px}
.card h2{font-size:16px;margin:0;color:var(--navy)}.card h3{font-size:13px;margin:14px 0 6px;color:var(--navy)}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.card-head a{font-size:13px;font-weight:700;text-decoration:none}
.card-head input[type=date]{border:1px solid #ccd9e7;border-radius:10px;padding:6px 8px;font-size:13px;color:var(--navy)}
.muted{color:var(--muted)}.small{font-size:12px}.note{font-size:11.5px;color:var(--muted);text-align:center;line-height:1.5;margin:8px 6px 0}
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;margin-bottom:12px}.chips button{border:1px solid #d5e0ec;background:#fff;color:var(--navy);border-radius:999px;padding:7px 14px;font-weight:700;font-size:13px;cursor:pointer}.chips button.on{background:var(--navy);color:#fff;border-color:var(--navy)}
.stat-row{display:flex;gap:10px;margin-bottom:12px}.stat-row>div{flex:1;min-width:0}.stat-row small{display:block;font-size:11px;color:var(--muted)}.stat-row b{display:block;font-size:17px;color:var(--navy)}.stat-row span{font-size:11px;color:var(--muted)}

/* grafy */
.bars{display:flex;align-items:flex-end;gap:4px;height:calc(var(--h) + 18px);padding-top:4px}
.bar{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;min-width:0}
.bar i{display:block;width:100%;max-width:22px;border-radius:5px 5px 2px 2px;background:linear-gradient(180deg,#3b9be0,#0876bc);min-height:0}
.bar small{font-size:9.5px;color:var(--muted);margin-top:4px;height:14px;white-space:nowrap}
.bar.hl i{background:linear-gradient(180deg,#ff6b72,var(--red))}
.bars.prod .bar i{background:linear-gradient(180deg,#f7c548,#e09a14)}
.bars.light .bar i{background:rgba(255,255,255,.35)}.bars.light .bar.hl i{background:#fff}.bars.light .bar small{color:#bcd6ee}
.bars.thin{gap:1px}.bars.thin .bar i{border-radius:2px 2px 0 0;max-width:none}.bars.thin .bar small{display:none}
.axis{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);margin-top:4px}

/* riadky */
.row-item{display:flex;align-items:center;gap:10px;width:100%;padding:11px 4px;border:0;border-top:1px solid #eef2f6;background:none;text-align:left;cursor:pointer;color:var(--ink)}
.card .row-item:first-of-type,.card-head+.row-item{border-top:0}
.row-item.selected{background:#f2f8fe;border-radius:12px;padding:11px 10px}
.row-main{flex:1;min-width:0}.row-main b{display:block;font-size:14px;color:var(--navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row-main small{display:block;font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.role{flex:0 0 auto;font-size:10px;font-weight:800;padding:4px 8px;border-radius:999px;text-transform:uppercase;letter-spacing:.04em}.role.share{background:#fff4dc;color:#8a5a00}.role.receive{background:#e3f1fb;color:#0868a6}
.amt{text-align:right;flex:0 0 auto}.amt b{display:block;font-size:14px;color:var(--navy)}.amt small{font-size:11px;font-weight:700}
.st-sent,.st-issued{color:#b3232a}.st-paid,.st-pay-paid{color:var(--green)}.st-pay-sent,.st-pay-issued{color:#8a5a00}.st-cancelled{color:var(--muted)}
.pill{flex:0 0 auto;font-size:10.5px;font-weight:800;padding:4px 9px;border-radius:999px;background:#eef2f6;color:#40546a;white-space:nowrap}
.pill.active{background:#e3f5e9;color:var(--green)}.pill.pending,.pill.processing,.pill.scheduled,.pill.approved{background:#e3f1fb;color:#0868a6}.pill.ending{background:#fff1d6;color:#8a5a00}.pill.closed{background:#eef2f6;color:#6b7a8c}
.group-card h2{margin:4px 0 2px;font-size:17px}.group-card .muted{font-size:12.5px;margin:0 0 10px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:7px 12px;margin:8px 0;font-size:13px}.kv dt{color:var(--muted)}.kv dd{margin:0;text-align:right;font-weight:700;color:var(--navy)}.kv dd small{display:block;font-weight:500;color:var(--muted);font-size:11px}
.cap{margin:10px 0 4px}.cap>div{height:8px;border-radius:999px;background:#eef2f6;overflow:hidden}.cap i{display:block;height:100%;background:linear-gradient(90deg,#f7c548,#e09a14)}.cap small{font-size:11px;color:var(--muted)}
.empty-card{background:#fff;border:1px dashed #cfdbe8;border-radius:18px;padding:22px 18px;text-align:center;margin-bottom:14px}.empty-card b{color:var(--navy)}.empty-card p{color:var(--muted);font-size:13px;line-height:1.5;margin:6px 0 0}
.skeleton{height:150px;border-radius:20px;background:linear-gradient(90deg,#e9eef4,#f5f8fb,#e9eef4);background-size:200% 100%;animation:sk 1.2s linear infinite;margin-bottom:14px}.skeleton.short{height:80px}@keyframes sk{to{background-position:-200% 0}}

/* spodná lišta */
.tabbar{display:flex;justify-content:space-around;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-top:1px solid var(--line);padding:6px 4px calc(18px + var(--safe-b))}
.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 0;color:#8796a7;text-decoration:none;font-size:10.5px;font-weight:700;border-radius:12px}
.tabbar svg{width:23px;height:23px}.tabbar a.active{color:var(--red)}.tabbar a.active svg{filter:drop-shadow(0 4px 8px rgba(230,51,59,.25))}

/* spodný panel */
.sheet-backdrop{position:absolute;inset:0;background:rgba(10,25,45,.42);z-index:18}
.sheet{position:absolute;left:0;right:0;bottom:0;top:auto;margin:0;width:100%;max-width:none;max-height:82%;overflow-y:auto;border:0;border-radius:24px 24px 0 0;padding:10px 18px calc(30px + var(--safe-b));background:#fff;z-index:20;transform:translateY(100%);transition:transform .22s ease;box-shadow:0 -10px 40px rgba(10,30,60,.18)}
.sheet[open]{display:block}.sheet.open{transform:none}
.sheet-handle{width:42px;height:5px;border-radius:3px;background:#d5dde7;margin:2px auto 10px}
.sheet-close{position:absolute;right:14px;top:12px;width:32px;height:32px;border-radius:50%;border:0;background:#f1f4f8;color:#59728c;font-size:20px;cursor:pointer}
.sheet h2{font-size:20px;color:var(--navy);margin:4px 40px 10px 0}.sheet h3{font-size:13px;color:var(--navy);margin:18px 0 6px}
.sheet-amount{display:flex;align-items:center;gap:12px;margin:0 0 6px}.sheet-amount b{font-size:30px;color:var(--navy)}
.profile-head{display:flex;gap:12px;align-items:center}.profile-head h2{margin:0}.profile-head p{margin:2px 0 0;font-size:13px}
.toast{position:absolute;left:50%;bottom:96px;transform:translateX(-50%);background:#15385e;color:#fff;font-size:13px;font-weight:600;padding:10px 16px;border-radius:999px;z-index:25;white-space:nowrap;box-shadow:0 10px 24px rgba(0,0,0,.2)}

/* ---------- skutočný mobil: bez rámu, na celú obrazovku ---------- */
@media (max-width:760px),(max-height:620px){
 body{background:var(--bg)}
 .stage{display:block;padding:0;min-height:100%}
 .stage-info{display:none}
 .device{width:100%;height:100dvh;height:100vh;padding:0;border-radius:0;background:none;box-shadow:none}
 @supports (height:100dvh){.device{height:100dvh}}
 .device-btn,.home-indicator,.statusbar{display:none}
 .screen{border-radius:0;padding-top:var(--safe-t)}
}
@media (min-width:761px) and (max-width:960px){.stage{grid-template-columns:1fr;justify-items:center;gap:28px}.stage-info{text-align:center;max-width:520px}.stage-logo,.stage-actions{justify-content:center}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* nižšie obrazovky počítača – zmenšený rám telefónu */
@media (min-width:761px) and (max-height:920px) and (min-height:621px){.device{zoom:.88}}
@media (min-width:761px) and (max-height:820px) and (min-height:621px){.device{zoom:.78}}
@media (min-width:761px) and (max-height:720px) and (min-height:621px){.device{zoom:.7}}
