/* EmentaDigital.online — light theme for landing / auth / backoffice.
   Brand: navy #1e3a5f + gold #d9a12b. */
:root {
    --bg: #f4f6fa;
    --card: #ffffff;
    --fg-0: #1c2739;
    --fg-1: #5b6b85;
    --fg-2: #8c99ae;
    --navy: #1e3a5f;
    --navy-2: #16304f;
    --gold: #d9a12b;
    --gold-2: #c08d1d;
    --accent: #1e3a5f;
    --good: #1e9e5a; --warn: #c78a06; --bad: #d5453c;
    --border: #e3e9f2;
    --shadow: 0 1px 2px rgba(30, 58, 95, .05), 0 4px 16px rgba(30, 58, 95, .06);
    color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg); color: var(--fg-0);
    font: 13.5px/1.55 Inter, 'Segoe UI', system-ui, sans-serif;
}
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1 { font-size: 22px; margin: 0 0 4px; color: var(--navy); letter-spacing: -.2px; }
h2 { font-size: 15px; margin: 0 0 12px; color: var(--navy); }
p.sub { color: var(--fg-1); margin: 0 0 20px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd6e4; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---- Shell ---------------------------------------------------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
    background: linear-gradient(180deg, #1e3a5f 0%, #152c4a 100%);
    color: #e8edf5;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { font-size: 16px; padding: 20px 18px 16px; letter-spacing: .2px; color: #fff; font-weight: 400; }
.brand b { color: var(--gold); font-weight: 700; }
.brand-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); margin-right: 7px; }
.brand-logo { width: 26px; height: 25px; vertical-align: -6px; margin-right: 9px; background: #fff; border-radius: 7px; padding: 2px; }
.side-rest { display: flex; gap: 10px; align-items: center; margin: 0 12px 14px; padding: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; }
.side-rest img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: #fff; }
.side-rest-name { font-weight: 600; font-size: 12.5px; color: #fff; }
.side-rest-link { font-size: 11px; color: #a9bad2; }
.side-rest-link:hover { color: var(--gold); }
.side nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #b6c4d9; font-weight: 500; }
.side nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side nav a.on { background: rgba(217,161,43,.16); color: #fff; box-shadow: inset 2.5px 0 0 var(--gold); }
.ni { width: 18px; text-align: center; opacity: .95; }
.side-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; color: #a9bad2; font-size: 12px; }
.side-foot a { color: #a9bad2; }
.side-foot a:hover { color: var(--gold); }
.main { padding: 28px 32px 70px; max-width: 1200px; width: 100%; }

/* ---- Controls -------------------------------------------------- */
.button, button {
    background: #fff; color: var(--navy); border: 1px solid #ccd6e5;
    border-radius: 8px; padding: 7px 15px; font: inherit; font-weight: 600; cursor: pointer;
    transition: box-shadow .12s, border-color .12s, background .12s;
}
.button:hover, button:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.button.primary, button.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.button.primary:hover, button.primary:hover { background: var(--navy-2); }
.button.gold, button.gold { background: var(--gold); border-color: var(--gold); color: #17253c; }
.button.gold:hover, button.gold:hover { background: var(--gold-2); }
.button.danger, button.danger { background: #fff; border-color: #ecc7c4; color: var(--bad); }
.button.danger:hover, button.danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.button.small, button.small { padding: 4px 11px; font-size: 12px; border-radius: 7px; }
.button[disabled], button[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.iconbtn { background: transparent; border: none; color: var(--fg-2); cursor: pointer; font-size: 14px; padding: 4px 7px; border-radius: 6px; }
.iconbtn:hover { background: #edf1f7; color: var(--navy); box-shadow: none; }
.iconbtn.trash:hover { color: var(--bad); background: #fbeeed; }

input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    width: 100%; background: #fff; border: 1px solid #ccd6e5; color: var(--fg-0);
    border-radius: 8px; padding: 8px 11px; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,95,.12); }
input::placeholder, textarea::placeholder { color: #a5b1c4; }
input[type=color] { width: 100%; height: 36px; padding: 3px; background: #fff; border: 1px solid #ccd6e5; border-radius: 8px; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--navy); }
label.f { display: block; margin-bottom: 13px; }
label.f > span { display: block; font-size: 11px; font-weight: 700; color: var(--fg-1); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px; }
label.check { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; cursor: pointer; }
label.check input { accent-color: var(--navy); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mt { margin-top: 16px; } .mb { margin-bottom: 18px; }
.muted { color: var(--fg-1); } .faint { color: var(--fg-2); font-size: 12px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; background: #edf1f7; color: var(--fg-1); }
.pill.good { background: #e2f5ea; color: var(--good); }
.pill.warn { background: #fbf2da; color: var(--warn); }
.pill.bad { background: #fbe9e7; color: var(--bad); }
.pill.accent { background: #f7ecd2; color: #9a7212; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--fg-2); padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.list td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
table.list tr:hover td { background: #f8fafd; }

/* ---- Stats ------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat .v { font-size: 24px; font-weight: 800; color: var(--navy); }
.stat .l { font-size: 11px; color: var(--fg-1); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ---- Menu editor -------------------------------------------------- */
.cat-block { margin-bottom: 20px; }
.cat-head { display: flex; align-items: center; gap: 10px; background: #eef2f8; border: 1px solid var(--border); border-radius: 12px 12px 0 0; padding: 11px 14px; }
.cat-head .drag { cursor: grab; color: var(--fg-2); }
.cat-head h3 { margin: 0; font-size: 14px; flex: 1; color: var(--navy); }
.cat-body { border: 1px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; background: var(--card); box-shadow: var(--shadow); }
.prod-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.prod-row:last-child { border-bottom: none; }
.prod-row .drag { cursor: grab; color: var(--fg-2); }
.prod-row img.thumb { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; background: #eef2f8; }
.prod-row .no-thumb { width: 42px; height: 42px; border-radius: 9px; background: #eef2f8; display: flex; align-items: center; justify-content: center; color: var(--fg-2); }
.prod-name { font-weight: 600; }
.prod-desc { color: var(--fg-2); font-size: 12px; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-price { margin-left: auto; font-weight: 700; white-space: nowrap; color: var(--navy); }
.dim { opacity: .45; }
.dragging { opacity: .4; }

/* ---- Modal --------------------------------------------------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(23, 37, 60, .45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; width: 560px; max-width: calc(100vw - 40px); max-height: calc(100vh - 60px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(23,37,60,.25); }
.modal-header { padding: 15px 20px; border-bottom: 1px solid var(--border); font-weight: 700; color: var(--navy); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer { padding: 13px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---- Upload box ------------------------------------------------------ */
.upbox { border: 1.5px dashed #c3cede; border-radius: 10px; padding: 14px; text-align: center; color: var(--fg-1); cursor: pointer; background: #fafbfd; }
.upbox:hover { border-color: var(--gold); color: var(--fg-0); background: #fffdf6; }
.upbox img { max-width: 100%; max-height: 110px; border-radius: 8px; display: block; margin: 0 auto 8px; }

/* ---- Design page ------------------------------------------------------ */
.design-grid { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.preview-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; position: sticky; top: 20px; box-shadow: var(--shadow); }
.preview-frame { width: 375px; height: 660px; border: none; border-radius: 24px; background: #000; display: block; margin: 0 auto; box-shadow: 0 0 0 7px #17253c, 0 14px 44px rgba(23,37,60,.35); }

.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preset-card {
    border: 1.5px solid var(--border); border-radius: 12px; padding: 0; overflow: hidden;
    cursor: pointer; background: #fff; text-align: left; font: inherit; transition: border-color .12s, box-shadow .12s;
}
.preset-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.preset-card.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,161,43,.25); }
.preset-thumb { height: 64px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.preset-thumb .ln { height: 7px; border-radius: 4px; width: 75%; }
.preset-thumb .ln.short { width: 45%; }
.preset-name { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-weight: 700; font-size: 12.5px; color: var(--fg-0); border-top: 1px solid var(--border); }
.preset-dots { display: flex; gap: 4px; }
.preset-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }

/* ---- Kitchen ------------------------------------------------------------ */
.kcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.kcol-head { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--fg-1); margin-bottom: 10px; display: flex; justify-content: space-between; font-weight: 700; }
.korder { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--navy); border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; box-shadow: var(--shadow); }
.korder.s-new { border-left-color: var(--warn); }
.korder.s-preparing { border-left-color: var(--navy); }
.korder.s-ready { border-left-color: var(--good); }
.korder .khead { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.korder ul { margin: 6px 0; padding-left: 0; list-style: none; }
.korder li { padding: 2px 0; }
.korder li b { color: var(--gold-2); margin-right: 6px; }
.knote { color: #9a6d00; font-size: 12px; margin: 4px 0; background: #fdf6e0; border-radius: 6px; padding: 4px 8px; }
.kcalls { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.kcall { background: #fdf6e0; border: 1px solid #ecd9a0; border-radius: 10px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }

/* ---- Floor plan ------------------------------------------------------------ */
.plan-wrap {
    position: relative; border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; background: #fff; user-select: none;
}
.plan-img { display: block; width: 100%; pointer-events: none; }
.tmark {
    position: absolute; transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .94); border: 2px solid var(--navy);
    color: var(--navy); cursor: grab; touch-action: none;
    font-size: 10px; line-height: 1.25; text-align: center;
    box-shadow: 0 3px 10px rgba(23, 37, 60, .25); z-index: 5; padding: 2px;
}
.tmark:active { cursor: grabbing; z-index: 6; }
.tmark b { font-size: 10.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmark span { color: var(--fg-1); font-size: 9.5px; }
.tmark.square    { width: 58px; height: 58px; border-radius: 9px; }
.tmark.rectangle { width: 84px; height: 50px; border-radius: 9px; }
.tmark.round     { width: 60px; height: 60px; border-radius: 50%; }
.tmark.balcao    { width: 104px; height: 36px; border-radius: 7px; border-top: 5px solid var(--gold); }
.tray { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.tray-item {
    background: #eef2f8; border: 1.5px dashed #b9c6da; color: var(--navy);
    border-radius: 9px; padding: 7px 13px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.tray-item:hover { border-color: var(--gold); background: #fffdf6; box-shadow: none; }

/* ---- QR / tables ---------------------------------------------------------- */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.qr-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.qr-card canvas { width: 100%; max-width: 170px; border-radius: 8px; }
.qr-card .tname { font-weight: 700; margin: 8px 0 2px; color: var(--navy); }

/* ---- Auth --------------------------------------------------------------- */
.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background:
        radial-gradient(700px 340px at 85% -10%, rgba(217,161,43,.14), transparent),
        radial-gradient(800px 420px at 0% 110%, rgba(30,58,95,.10), transparent),
        var(--bg);
}
.auth-card { width: 390px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px; box-shadow: 0 14px 44px rgba(23,37,60,.12); }
.auth-brand { text-align: center; font-size: 19px; margin-bottom: 18px; color: var(--navy); }
.auth-brand b { color: var(--gold); }
.err { background: #fbe9e7; border: 1px solid #efc4c0; color: #a33830; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 12.5px; display: none; }

/* ---- Landing -------------------------------------------------------------- */
.topbar {
    display: flex; justify-content: space-between; align-items: center; padding: 14px 30px;
    background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar .brand { padding: 0; color: var(--navy); font-weight: 600; }
.topbar .brand b { color: var(--gold); }
.topbar .brand-logo { background: transparent; }
.hero {
    max-width: 960px; margin: 0 auto; padding: 84px 24px 50px; text-align: center;
    position: relative;
}
.hero-bg {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(640px 300px at 75% 0%, rgba(217,161,43,.16), transparent),
        radial-gradient(700px 360px at 15% 20%, rgba(30,58,95,.08), transparent);
}
.hero h1 { font-size: 44px; line-height: 1.12; margin: 0 0 16px; color: var(--navy); letter-spacing: -.8px; }
.hero h1 b { color: var(--gold-2); }
.hero p { color: var(--fg-1); font-size: 17px; max-width: 640px; margin: 0 auto 30px; }
.hero .logo-badge {
    width: 104px; height: 100px; padding: 14px; margin-bottom: 24px;
    background: #fff; border-radius: 26px; border: 1px solid var(--border);
    box-shadow: 0 10px 34px rgba(30,58,95,.14);
}
.cta {
    display: inline-block; background: var(--gold); color: #17253c; font-weight: 800;
    padding: 13px 30px; border-radius: 12px; font-size: 16px; border: none; cursor: pointer;
    box-shadow: 0 8px 24px rgba(217,161,43,.4); transition: transform .12s, box-shadow .12s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(217,161,43,.5); color: #17253c; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 980px; margin: 30px auto 10px; padding: 0 24px; }
.feat .card { text-align: left; }
.feat .card h3 { margin: 8px 0 6px; font-size: 15px; color: var(--navy); }
.feat .card p { color: var(--fg-1); margin: 0; font-size: 13px; }
.feat .fi {
    font-size: 20px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: #f5efdf; border-radius: 12px;
}
.steps { max-width: 980px; margin: 50px auto 20px; padding: 0 24px; }
.steps h2 { text-align: center; font-size: 24px; margin-bottom: 26px; }
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { text-align: center; padding: 0 6px; }
.step .n {
    width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto 10px;
}
.step b { color: var(--navy); display: block; margin-bottom: 4px; }
.step span { color: var(--fg-1); font-size: 12.5px; }
.foot { text-align: center; color: var(--fg-2); font-size: 12.5px; padding: 44px 0 34px; }

/* ---- Toast ----------------------------------------------------------------- */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast-msg { background: var(--navy); color: #fff; border-radius: 10px; padding: 10px 18px; font-weight: 600; box-shadow: 0 8px 28px rgba(23,37,60,.3); }
.toast-msg.bad { background: var(--bad); }
.toast-msg.good { background: var(--good); }

@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .side nav { flex-direction: row; flex-wrap: wrap; }
    .design-grid, .kcols, .grid2, .grid3, .stats, .feat, .steps-row, .preset-grid { grid-template-columns: 1fr; }
    .main { padding: 18px; }
    .hero h1 { font-size: 30px; }
}
@media print {
    body { background: #fff; }
    .side, .no-print, #toast { display: none !important; }
    .shell { display: block; }
    .main { max-width: none; padding: 0; }
    .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 6mm; }
    .qr-card { border: 1px dashed #bbb; background: #fff; color: #111; box-shadow: none; break-inside: avoid; }
    .qr-card .faint { color: #555; }
}
