:root {
    --ink: #18242b;
    --muted: #66767d;
    --line: #b9c8cc;
    --bg: #dfe6e8;
    --card: #f8faf9;
    --teal: #087f83;
    --teal-dark: #075e68;
    --mint: #d8f1ed;
    --orange: #f0a447;
    --danger: #b74949;
    font-family: Tahoma, Arial, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: var(--ink); background: var(--bg); font-size: 13px; }
a { color: var(--teal-dark); text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* Skin clássico inspirado no LC, usando a paleta teal do Construct. */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.lc-header { background: #e9eeef; border-bottom: 1px solid #9eb3b8; box-shadow: 0 2px 5px #16394025; }
.window-bar { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 18px; color: #fff; background: linear-gradient(180deg, #087f83, #075e68); }
.app-brand { min-width: 0; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 4px; display: grid; place-items: center; background: #d8f1ed; color: var(--teal-dark); font-size: 13px; font-weight: 800; letter-spacing: .03em; border: 1px solid #ffffff80; box-shadow: inset 0 1px #fff8; }
.brand-copy { min-width: 0; display: grid; gap: 2px; }
.brand-copy strong { font-size: 16px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy small { color: #d8f4f1; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window-context { display: flex; align-items: center; gap: 7px; color: #d9f2ef; white-space: nowrap; font-size: 12px; }
.window-user { border-left: 1px solid #bce4df66; padding-left: 10px; color: #fff; }
.connection-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #8de0a2; box-shadow: 0 0 0 2px #8de0a233; }
.main-menu { min-height: 34px; display: flex; align-items: stretch; gap: 0; padding: 0 10px; overflow-x: auto; white-space: nowrap; background: #f4f6f6; border-bottom: 1px solid #c1ced1; }
.main-menu a { display: inline-flex; align-items: center; padding: 0 13px; color: #273d42; font-size: 13px; font-weight: 700; border-right: 1px solid transparent; }
.main-menu a:hover, .main-menu a.active { color: #fff; background: var(--teal); }
.shortcut-strip { padding: 7px 13px 5px; background: #e3e9ea; border-bottom: 1px solid #b6c5c8; }
.shortcut-scroll { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.shortcut { flex: 0 0 auto; min-width: 72px; min-height: 65px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 2px 7px 3px; color: #233c41; border: 1px solid transparent; border-radius: 3px; }
.shortcut:hover, .shortcut.active { background: var(--mint); border-color: #8bcac4; color: var(--teal-dark); }
.shortcut-icon { width: 37px; height: 37px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #2db8ad, var(--teal)); border: 1px solid #075e6866; border-radius: 5px; box-shadow: inset 0 1px #ffffff66, 0 1px 2px #16394033; font-size: 22px; line-height: 1; font-weight: 700; }
.shortcut:nth-child(3n) .shortcut-icon { background: linear-gradient(145deg, #16a49b, #075e68); }
.shortcut:nth-child(4n) .shortcut-icon { background: linear-gradient(145deg, #62c6bc, #087f83); }
.shortcut-label { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.1; text-align: center; }
.shortcut-exit .shortcut-icon { background: linear-gradient(145deg, #8ccbc2, #075e68); }
.app-workspace { flex: 1; min-height: 0; background: var(--bg); }
.main-content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 19px 28px 36px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 0 0 12px; border-bottom: 1px solid #b9c8cc; }
.eyebrow { color: var(--teal-dark); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
h1 { margin: 4px 0 0; color: #1a3035; font-size: 25px; letter-spacing: 0; }
h2, h3, h4 { margin-top: 0; }
h2 { margin-bottom: 8px; font-size: 22px; letter-spacing: 0; }
h3 { margin-bottom: 0; font-size: 16px; }
h4 { margin: 20px 0 10px; color: var(--teal-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.user-chip { display: flex; align-items: center; gap: 8px; background: #f8faf9; padding: 4px 9px 4px 5px; border: 1px solid var(--line); border-radius: 3px; color: #3a4a50; font-size: 12px; }
.avatar { width: 27px; height: 27px; border-radius: 3px; display: grid; place-items: center; background: var(--mint); color: var(--teal-dark); font-weight: 800; }
.statusbar { display: flex; align-items: center; gap: 20px; min-height: 27px; padding: 4px 16px; color: #e5f5f3; background: var(--teal-dark); border-top: 1px solid #064c55; font-size: 11px; }
.statusbar-online { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }

.hero-panel { background: linear-gradient(125deg, var(--teal-dark), #129790); color: #fff; padding: 23px 26px; border: 1px solid #064c55; border-radius: 4px; display: flex; align-items: center; justify-content: space-between; gap: 24px; box-shadow: 0 3px 8px #087f8324; }
.hero-panel p { max-width: 650px; margin: 0; color: #d8f4f1; line-height: 1.45; }
.pill { display: inline-block; margin-bottom: 11px; border: 1px solid #9de2dc99; color: #d4f8f3; border-radius: 3px; padding: 4px 8px; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #6c9295; border-radius: 3px; padding: 9px 14px; cursor: pointer; font-weight: 700; transition: background .15s, box-shadow .15s; }
.button:hover { box-shadow: 0 2px 5px #0c4d5433; }
.button.primary { color: #fff; background: linear-gradient(180deg, #139991, var(--teal)); border-color: #05666c; }
.button.secondary { color: var(--teal-dark); background: linear-gradient(180deg, #fff, #e4eded); border-color: #a9bfc1; }
.button.light { color: var(--teal-dark); background: #f5fffd; border-color: #b9e1df; }
.button.full { width: 100%; margin-top: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 15px 0; }
.stat-card, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 2px 6px #18404d12; }
.stat-card { padding: 15px 17px; display: grid; gap: 6px; border-top: 3px solid var(--teal); }
.stat-card span, .stat-card small, .muted { color: var(--muted); }
.stat-card strong { font-size: 25px; letter-spacing: 0; color: #19383d; }
.stat-card small { font-size: 11px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr); gap: 13px; margin: 13px 0; }
.content-grid.two-one { grid-template-columns: minmax(0, 1fr); }
.panel { padding: 17px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding-bottom: 9px; border-bottom: 1px solid #d5e0e1; }
.panel-heading a { font-size: 12px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th { color: #496067; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; background: #e6eeee; }
th, td { padding: 10px 9px; border: 1px solid #d5e0e1; white-space: nowrap; }
tbody tr:nth-child(even) { background: #f0f5f5; }
tbody tr:hover { background: var(--mint); }
td small.block { display: block; margin-top: 3px; }
.status { display: inline-block; border-radius: 3px; padding: 3px 7px; font-size: 10px; font-weight: 700; background: #e9f0f0; color: #4f666b; border: 1px solid #cbdadb; }
.status.active, .status.success { background: #dff5e8; color: #257147; border-color: #a9ddba; }
.status.suspended, .status.expired, .status.inactive { background: #fbe4e2; color: #a33e3e; border-color: #edb9b4; }
.check { border-top: 1px solid #d5e0e1; padding: 11px 0; display: flex; align-items: center; gap: 9px; font-size: 13px; }
.check span { width: 23px; height: 23px; border-radius: 3px; background: #edf3f3; display: grid; place-items: center; color: var(--teal); font-size: 12px; font-weight: 800; border: 1px solid #d2dfdf; }
.check.done span { background: var(--mint); border-color: #a7dcd6; }
.empty { padding: 24px 10px; color: var(--muted); text-align: center; }
.alert, .notice, .license-reveal { border-radius: 3px; padding: 11px 13px; margin-bottom: 14px; font-size: 13px; }
.alert.error { background: #fff0ee; border: 1px solid #e7b5b0; color: #923a36; }
.alert.success { background: #e8f8ee; border: 1px solid #a9ddba; color: #277044; }
.notice { background: #e9f6f6; border: 1px solid #acd8d6; color: #2d6163; }
.license-reveal { background: #fff5d6; border: 1px solid #d8bc67; display: grid; gap: 6px; color: #654a18; }
.license-reveal code { width: fit-content; background: #fff; border: 1px dashed #c6a34b; border-radius: 3px; padding: 9px 11px; font-size: 16px; letter-spacing: .08em; color: #503907; }
.license-reveal small { color: #856c38; }
form { margin: 0; }
label { display: grid; gap: 5px; color: #45575d; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 34px; border: 1px solid #aebfc2; border-radius: 2px; background: #fff; color: var(--ink); padding: 7px 9px; outline: none; }
textarea { min-height: 82px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 2px #087f8320; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 13px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; align-items: center; gap: 9px; margin-top: 13px; }
.form-help { font-size: 11px; margin: 6px 0 13px; }
.search-form { display: flex; gap: 8px; margin-bottom: 14px; }
.search-form input { flex: 1; }
.search-form .button { flex: 0 0 auto; }
.mini-input { width: 62px; min-height: 27px; padding: 4px 5px; font-size: 11px; }
.action-row { display: inline-flex; align-items: center; gap: 5px; }
.inline { display: inline; }
.link-button { background: none; border: 0; color: var(--teal-dark); padding: 0; cursor: pointer; font-weight: 700; font-size: 11px; }
.danger-text { color: var(--danger); }
.status.pending_cash { background: #fff2d3; color: #8a6415; border-color: #e2c66e; }
.status.paid { background: #dff5e8; color: #257147; border-color: #a9ddba; }
.status.cancelled { background: #fbe4e2; color: #a33e3e; border-color: #edb9b4; }
.low-stock { color: var(--danger); font-weight: 800; }
.sale-items { display: grid; gap: 7px; margin-bottom: 14px; }
.sale-item-head, .sale-item-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(120px, .6fr); gap: 9px; align-items: center; }
.sale-item-head { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.finalize-form { display: inline-flex; align-items: center; gap: 6px; }
.finalize-form select { width: 145px; min-height: 28px; padding: 5px 6px; font-size: 11px; }
code { font-family: Consolas, "Courier New", monospace; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-card, .install-card { width: min(100%, 470px); background: #f8faf9; border: 1px solid var(--line); border-top: 5px solid var(--teal); border-radius: 4px; padding: 27px; box-shadow: 0 8px 22px #16465320; }
.install-card { width: min(100%, 850px); }
.auth-card .brand-mark.large, .install-card .brand-mark.large { margin: 0 auto 9px; width: 52px; height: 52px; font-size: 17px; }
.brand-name { margin-top: 6px; font-size: 21px; font-weight: 800; letter-spacing: 0; }
.brand-name.dark { color: var(--ink); text-align: center; }
.brand-subtitle { color: var(--teal-dark); font-size: 11px; text-transform: uppercase; letter-spacing: .11em; margin-top: 3px; text-align: center; }
.auth-card h1, .install-card h1 { margin-top: 25px; font-size: 23px; }
.auth-card form { display: grid; gap: 14px; }
.auth-foot { margin: 18px 0 0; text-align: center; font-size: 11px; color: var(--muted); }
.install-card h2 { margin: 23px 0 10px; font-size: 14px; color: var(--teal-dark); }
.install-card .button { margin-top: 10px; }

@media (max-width: 900px) {
    .main-content { padding: 17px 18px 30px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
    .window-bar { align-items: flex-start; padding: 8px 12px; }
    .window-context { display: none; }
    .brand-copy strong { font-size: 14px; }
    .main-menu { padding: 0 4px; }
    .main-menu a { padding: 0 10px; font-size: 12px; }
    .shortcut-strip { padding-left: 5px; padding-right: 5px; }
    .shortcut { min-width: 65px; }
    .topbar { align-items: flex-start; }
    .user-chip { display: none; }
    .hero-panel { display: block; padding: 20px; }
    .hero-panel .button { margin-top: 17px; }
    .content-grid { grid-template-columns: 1fr; }
    .stat-grid { gap: 8px; }
    .stat-card { padding: 12px; }
    .stat-card strong { font-size: 21px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
    .form-actions, .search-form { align-items: stretch; flex-direction: column; }
    .sale-item-head, .sale-item-row { grid-template-columns: minmax(0, 1fr) 105px; }
    .finalize-form { display: flex; flex-direction: column; align-items: stretch; }
    .finalize-form select { width: 100%; }
    .statusbar { gap: 8px; flex-wrap: wrap; }
    .statusbar-online { margin-left: 0; }
}
