:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #203331;
  background: #f3f8f7;
  line-height: 1.5;
  --teal: #075b55;
  --teal-dark: #064943;
  --teal-light: #dff1ed;
  --gray: #667775;
  --muted: #879693;
  --line: #dbe7e4;
  --soft: #edf8f5;
  --surface: #ffffff;
  --danger: #b42318;
  --shadow: 0 14px 40px rgba(25, 65, 60, .08);
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: radial-gradient(circle at 88% -10%, rgba(12, 123, 113, .08), transparent 28rem), #f3f8f7; }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 10px; padding: .72rem 1rem; cursor: pointer; font-weight: 750; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease; }
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(8, 130, 118, .28); outline-offset: 2px; }
.primary { color: #fff; background: linear-gradient(135deg, #075b55, #0b746b); box-shadow: 0 6px 16px rgba(7, 91, 85, .16); }
.primary:hover { box-shadow: 0 9px 20px rgba(7, 91, 85, .23); }
.secondary { color: var(--teal); background: #fff; border: 1px solid #b9ccc7; }
.secondary:hover { background: var(--soft); border-color: #86b8ae; }

.topbar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem max(1.25rem, calc((100% - 1240px) / 2)); color: var(--teal-dark); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(7, 91, 85, .03); position: sticky; top: 0; z-index: 100; }
.topbar-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.topbar-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.app-logo-emblem { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--teal), #0d8378); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 4px 12px rgba(7, 91, 85, .22); flex-shrink: 0; }
.brand-titles { display: flex; flex-direction: column; }
.brand-main { display: flex; align-items: center; gap: 8px; }
.brand-name { font-size: 1.1rem; font-weight: 850; letter-spacing: -.03em; line-height: 1.15; color: #192524; }
.brand-name-accent { color: var(--teal); }
.product-badge { font-size: .65rem; color: var(--teal); font-weight: 750; text-transform: uppercase; letter-spacing: .06em; background: var(--soft); padding: 2px 6px; border-radius: 6px; border: 1px solid #bfe0d8; }
.brand-tag { font-size: .72rem; color: #6b7c79; font-weight: 500; }
.status-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem; border-radius: 999px; background: var(--soft); border: 1px solid #bfe0d8; font-size: .76rem; color: var(--teal-dark); font-weight: 600; cursor: pointer; transition: background .16s ease; user-select: none; }
.status-pill:hover { background: #dff2ed; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #059669; box-shadow: 0 0 0 2px rgba(5, 150, 105, .2); }
.status-pill.offline .status-dot { background: #94a3b8; box-shadow: none; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.topbar-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .52rem .9rem; border-radius: 12px; font-size: .84rem; font-weight: 700; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.topbar-btn svg { flex-shrink: 0; }
.topbar-btn.primary { color: #fff; background: linear-gradient(135deg, #075b55, #0d8378); border: none; box-shadow: 0 4px 14px rgba(7,91,85,.22); }
.topbar-btn.primary:hover { box-shadow: 0 6px 18px rgba(7,91,85,.32); transform: translateY(-1px); }
.topbar-btn.secondary { color: var(--teal); background: #ffffff; border: 1px solid #c9d6d3; }
.topbar-btn.secondary:hover { background: var(--soft); border-color: #0d8378; transform: translateY(-1px); }
.profile-btn { color: #192524; background: #ffffff; border: 1px solid #c9d6d3; border-radius: 12px; }
.profile-btn:hover { background: var(--soft); border-color: #0d8378; transform: translateY(-1px); }
.profile-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--soft); color: var(--teal); display: grid; place-items: center; font-size: .78rem; }
.app-logo { width: 38px; height: 38px; border: 1.5px solid #cce8e2; border-radius: 10px; object-fit: contain; background: #ffffff; box-shadow: 0 2px 6px rgba(7, 91, 85, .08); }

.shell { width: min(100% - 2rem, 1240px); margin: 0 auto; padding: 1.1rem 0 3.5rem; }
.activation-page > a:first-child { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.1rem; padding: .58rem .85rem .58rem .7rem; border: 1px solid #c8dcd7; border-radius: 999px; color: var(--teal-dark); background: rgba(255,255,255,.78); box-shadow: 0 4px 12px rgba(25, 65, 60, .06); font-size: .84rem; font-weight: 750; text-decoration: none; transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.activation-page > a:first-child:hover { transform: translateY(-1px); border-color: #86b8ae; background: #fff; box-shadow: 0 7px 18px rgba(25, 65, 60, .1); }
.activation-page > a:first-child:focus-visible { outline: 3px solid rgba(8, 130, 118, .28); outline-offset: 3px; }
.systems-hub { animation: view-enter .22s ease both; }
.hub-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.35rem; padding: 2.2rem 2.15rem; border: 1px solid #bfe0d8; border-radius: 24px; background: linear-gradient(145deg, #effaf7, #fff); box-shadow: var(--shadow); }
.hub-heading h1 { margin: .2rem 0 .55rem; color: #1c2c2d; font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.02; letter-spacing: -.045em; }
.hub-add { display: inline-grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .55rem; min-width: 195px; padding: .8rem 1rem .78rem .78rem; border: 1px solid rgba(255,255,255,.3); border-radius: 16px; color: #fff; background: linear-gradient(135deg, #075b55, #0d8378); box-shadow: 0 10px 24px rgba(7, 91, 85, .2); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.hub-add:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(7, 91, 85, .28); filter: saturate(1.08); }
.hub-add > span:first-child { display: grid; grid-row: span 2; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; color: var(--teal); background: #fff; font-size: 1.45rem; line-height: 1; }
.hub-add > span:nth-child(2) { font-size: .9rem; font-weight: 850; }
.hub-add small { color: #cce8e3; font-size: .7rem; }
.systems-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1rem; }
.system-card { display: grid; gap: 1rem; min-height: 240px; padding: 1.35rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.system-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.system-card h2 { margin: .15rem 0 .2rem; color: #203331; font-size: 1.2rem; }
.system-card p { margin: 0; color: var(--gray); font-size: .88rem; }
.system-status { display: inline-flex; padding: .3rem .58rem; border-radius: 99px; color: #087443; background: #dcf5eb; font-size: .7rem; font-weight: 850; }
.system-key { display: grid; gap: .35rem; margin-top: auto; padding: .75rem; border: 1px solid #e4efec; border-radius: 12px; background: #f8fbfa; }
.system-key span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.system-key code { overflow-wrap: anywhere; color: #29413e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.system-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.system-actions button { flex: 1; min-width: 120px; padding: .58rem .7rem; font-size: .8rem; }
.hub-install-card { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; border-color: #bfe0d8; background: linear-gradient(110deg, #effaf7, #fff); }
.hub-install-icon { display: grid; flex: 0 0 3rem; place-items: center; width: 3rem; height: 3rem; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #075b55, #0d8378); font-size: 1.55rem; box-shadow: 0 8px 18px rgba(7, 91, 85, .16); }
.hub-install-copy { flex: 1; }
.hub-install-card h2 { margin: .15rem 0; font-size: 1.05rem; }
.hub-install-card p { max-width: 680px; margin: .35rem 0 0; color: var(--gray); font-size: .88rem; }
.hub-install-card button { flex: 0 0 auto; white-space: nowrap; }
.hub-help { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.hub-help h2 { margin: .15rem 0; font-size: 1.05rem; }
.hub-help p { max-width: 720px; margin: .35rem 0 0; color: var(--gray); font-size: .88rem; }
.hub-help > span { color: var(--teal); font-size: 2rem; }
.hub-help-link { display: inline-flex; align-items: center; gap: .45rem; color: var(--teal); text-decoration: none; white-space: nowrap; }
.hub-help-link span { font-size: 1rem; }
.hub-install-dialog { width: min(620px, calc(100% - 2rem)); padding: 1.45rem; }
.hub-install-dialog > .dialog-head { margin-bottom: .8rem; }
.hub-install-dialog h2 { margin: .15rem 0; font-size: 1.35rem; }
.hub-install-intro { margin: 0; color: var(--gray); }
.hub-install-steps { display: grid; gap: .8rem; margin: 1.1rem 0 0; padding: 0; list-style: none; counter-reset: install-step; }
.hub-install-steps li { display: grid; grid-template-columns: 2rem 1fr; gap: .7rem; align-items: start; counter-increment: install-step; color: #29413e; line-height: 1.5; }
.hub-install-steps li::before { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; color: var(--teal); background: var(--soft); font-weight: 850; content: counter(install-step); }
.hub-install-dialog .dialog-actions { align-items: center; flex-wrap: wrap; }
.hub-install-dialog .hub-open-link { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.75rem; padding: .65rem .95rem; border: 1px solid #b9ccc7; border-radius: 10px; color: var(--teal); background: #fff; font-weight: 800; text-decoration: none; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.hub-install-dialog .hub-open-link:hover { transform: translateY(-1px); border-color: #86b8ae; background: var(--soft); }
.hub-install-dialog .hub-open-link span { font-size: 1rem; }
body.hub-mode .product-header, body.hub-mode .workspace-nav, body.hub-mode #browser-mode-banner, body.hub-mode .workspace-view, body.hub-mode #app-message { display: none; }
.product-header { display: none !important; }
.eyebrow { margin: 0 0 .4rem; color: var(--teal); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.lead { max-width: 620px; margin: 0; color: var(--gray); font-size: 1rem; }
.license-box { display: none; }

.workspace-nav { display: flex; align-items: center; gap: .45rem; overflow-x: auto; margin-bottom: 1.25rem; padding: .45rem; border: 1px solid var(--line); border-radius: 16px; background: #ffffff; box-shadow: 0 2px 8px rgba(7, 91, 85, .04); }
.workspace-tab { flex: 1; min-width: 0; color: #6b7c79; background: transparent; font-size: .86rem; font-weight: 650; white-space: nowrap; padding: .65rem .95rem; border-radius: 12px; border: 1px solid transparent; transition: all .15s ease; display: flex; align-items: center; gap: .45rem; }
.workspace-tab svg { flex-shrink: 0; }
.workspace-tab:hover { color: var(--teal); background: var(--soft); }
.workspace-tab.active { color: #fff !important; background: linear-gradient(135deg, var(--teal), #0d8378) !important; border-color: transparent !important; box-shadow: 0 4px 14px rgba(7, 91, 85, .22) !important; font-weight: 750 !important; }
.workspace-tab.active svg { stroke: #fff; }

.workspace-view { min-height: 300px; animation: view-enter .22s ease both; }
@keyframes view-enter { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-card { position: relative; overflow: hidden; padding: 1.4rem; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 4px 20px -2px rgba(7, 91, 85, .05), 0 2px 6px -1px rgba(0, 0, 0, .03); transition: transform .15s ease, box-shadow .15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(25, 65, 60, .09); }
.stat-card::after { position: absolute; right: -24px; bottom: -38px; width: 105px; height: 105px; border-radius: 50%; background: rgba(7, 91, 85, .04); content: ""; }
.stat-card span, .stat-card small { display: block; color: var(--gray); }
.stat-card span { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #526063; }
.stat-card small { font-size: .78rem; color: #7a8c89; }
.stat-card strong { display: block; margin: .4rem 0 .2rem; color: #192524; font-size: 2.35rem; font-weight: 900; line-height: 1.1; letter-spacing: -.04em; }
.stat-card.accent { border-color: #84ccba; background: linear-gradient(135deg, #f0faf7 0%, #ffffff 100%); }
.stat-card.accent strong { color: var(--teal-dark); }
.overview-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; margin-top: 1rem; }
.card, .table-card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 4px 20px -2px rgba(7, 91, 85, .05), 0 2px 6px -1px rgba(0, 0, 0, .03); }
.card { padding: 1.5rem; }
.section-heading, .section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-heading h2, .section-toolbar h2 { margin: .15rem 0; color: #203331; font-size: 1.35rem; letter-spacing: -.025em; }
.section-toolbar { align-items: flex-end; margin-bottom: 1.25rem; }
.section-toolbar p { margin: .35rem 0 0; color: var(--gray); }
.toolbar-actions, .actions, .overview-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.overview-actions { margin-top: 1rem; }
.flow-list { display: grid; gap: 1.05rem; margin: 1.3rem 0 0; padding: 0; list-style: none; counter-reset: flow; }
.flow-list li { display: grid; grid-template-columns: 2.25rem 1fr; align-items: start; column-gap: .8rem; counter-increment: flow; }
.flow-list li::before { display: grid; grid-row: span 2; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 12px; color: var(--teal); background: var(--soft); font-weight: 850; content: counter(flow, decimal-leading-zero); }
.flow-list strong, .flow-list span { display: block; }
.flow-list strong { color: #29413e; }
.flow-list span { color: var(--gray); font-size: .85rem; }
.compact-list { display: grid; gap: .6rem; margin-top: 1rem; }
.recent-order { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; color: #29413e; text-align: left; border: 1px solid #edf2f1; border-radius: 12px; background: #fbfdfc; }
.recent-order:hover { border-color: #b7d7d1; background: var(--soft); }
.recent-order strong, .recent-order small { display: block; }
.recent-order small { color: var(--gray); }

.message { min-height: 1.5rem; margin: 1rem 0 0; color: #166534; font-size: .9rem; font-weight: 650; }
.message.error { color: var(--danger); }
.form-card { margin-bottom: 1rem; }
.form-card h3 { margin: 0 0 1rem; color: #29413e; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
.filter-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: .75rem; margin-bottom: 1rem; }
input, select, textarea { width: 100%; padding: .75rem .95rem; color: #192524; border: 1px solid #cdd8d5; border-radius: 12px; background: #ffffff; font-family: inherit; font-size: .92rem; transition: border-color .15s ease, box-shadow .15s ease; }
input:hover, select:hover, textarea:hover { border-color: #9dbcb5; }
input:focus, select:focus, textarea:focus { border-color: #0d8378; box-shadow: 0 0 0 3px rgba(13, 131, 120, .15); outline: 0; }
textarea { min-height: 100px; resize: vertical; }
label { display: grid; gap: .4rem; margin: .75rem 0; color: #435956; font-size: .86rem; font-weight: 700; }
.table-card { overflow: auto; }
table { width: 100%; min-width: 780px; border-collapse: collapse; }
th, td { padding: 1rem; text-align: left; white-space: nowrap; border-bottom: 1px solid #edf2f1; }
th { color: #71827f; background: #f9fbfb; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: .4rem; }
.row-actions button { padding: .42rem .65rem; color: var(--teal); background: #eef7f5; font-size: .78rem; }
.row-actions button:last-child { color: var(--danger); background: #fff0ef; }
.empty { padding: 2.5rem; color: var(--gray); text-align: center; }

.order-list { display: grid; gap: .85rem; }
.order-card { padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.order-card:hover { border-color: #afd2ca; }
.order-card header, .order-card footer, .order-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.order-card header > div { display: flex; align-items: center; gap: .65rem; }
.order-card h3 { margin: .8rem 0 .25rem; color: #263d3a; }
.order-card p { margin: .15rem 0 .7rem; color: var(--gray); }
.order-meta { justify-content: flex-start; color: var(--gray); font-size: .82rem; }
.order-card footer { justify-content: flex-end; margin-top: 1rem; }
.order-card footer select { width: auto; padding: .55rem .65rem; }
.order-number { padding: 0; color: var(--teal); background: transparent; font-size: 1.05rem; }
.status, .priority { display: inline-flex; padding: .3rem .58rem; border-radius: 99px; font-size: .7rem; font-weight: 850; }
.status-open, .priority-low { color: #566062; background: #e8efed; }
.status-in_progress { color: #175cd3; background: #e1edff; }
.status-waiting, .priority-high, .priority-urgent { color: #925f00; background: #fff1cc; }
.status-completed { color: #087443; background: #dcf5eb; }
.status-cancelled { color: #b42318; background: #fee4e2; }

.browser-mode-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1.15rem; padding: .9rem 1rem; border: 1px solid #bfe0d8; border-radius: 14px; color: #294d49; background: #eaf8f4; }
.browser-mode-banner span { color: #5a716d; }
.browser-mode-banner a, .browser-mode-banner button { margin-left: auto; text-decoration: none; }
.update-notice { display: flex; align-items: center; gap: .7rem; margin-top: .5rem; color: var(--teal-dark); }
.update-notice button { padding: .45rem .65rem; color: var(--teal); border: 1px solid #b9c8c4; background: #fff; font-size: .8rem; }

.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dialog-head h2 { margin: .15rem 0; color: #203331; letter-spacing: -.03em; }
.dialog-head > button { padding: .15rem .45rem; color: #607370; background: transparent; font-size: 1.5rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.25rem; }
dialog { width: min(760px, calc(100% - 2rem)); padding: 0; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 25px 60px -12px rgba(7, 91, 85, .25); }
dialog::backdrop { background: rgba(25, 37, 36, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog form { padding: 1.6rem; }
#history-dialog { width: min(600px, calc(100% - 2rem)); padding: 1.6rem; }
.history-list { display: grid; gap: .7rem; padding: 1rem 0 0; }
.history-item { display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem; padding: .85rem; border-left: 3px solid #78c9bb; background: #f7faf9; }
.history-item span, .history-item small { color: var(--gray); font-size: .82rem; }
.history-item small { grid-column: 1 / -1; }
.muted { color: var(--gray); }

.profile-dialog { padding: 0; border: none; border-radius: 20px; box-shadow: 0 24px 60px rgba(7,91,85,.28); background: transparent; width: min(100% - 2rem, 640px); }
.profile-dialog::backdrop { background: rgba(15, 30, 30, .6); backdrop-filter: blur(4px); }
.profile-dialog-card { background: #fff; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.profile-dialog-card .dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.6rem; border-bottom: 1px solid #e2e8f0; background: #fafdfc; }
.profile-head-info { display: flex; align-items: center; gap: .85rem; }
.profile-head-info h2 { margin: 0; font-size: 1.25rem; color: #1e293b; }
.profile-head-info p { margin: 0; }
.profile-dialog-icon { width: 42px; height: 42px; border-radius: 12px; background: #e6f6f3; color: #075b55; display: grid; place-items: center; font-size: 1.35rem; }
.close-dialog-btn { background: transparent; border: none; font-size: 1.6rem; color: #64748b; cursor: pointer; padding: .2rem .5rem; line-height: 1; border-radius: 8px; }
.profile-body { padding: 1.3rem 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; max-height: 75vh; overflow-y: auto; }
.profile-license-card { background: linear-gradient(145deg, #f0fdf9, #f8fbfa); border: 1.5px solid #bbf7d0; border-radius: 16px; padding: 1.25rem; }
.profile-card-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.license-product-badge { display: flex; align-items: center; gap: .5rem; color: #064e3b; font-size: .95rem; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.license-status-tag { background: #dcfce7; color: #166534; font-size: .75rem; font-weight: 800; padding: .25rem .75rem; border-radius: 999px; border: 1px solid #bbf7d0; }
.profile-label { font-size: .72rem; font-weight: 800; color: var(--teal); letter-spacing: .06em; text-transform: uppercase; display: block; margin-bottom: .4rem; }
.profile-key-box { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid #c8dcd7; border-radius: 10px; padding: .35rem .45rem .35rem .85rem; }
.profile-key-code { flex: 1; font-family: monospace; font-size: .95rem; font-weight: 800; color: #064e3b; letter-spacing: .04em; word-break: break-all; }
.btn-copy { padding: .45rem .85rem; font-size: .8rem; white-space: nowrap; border-radius: 8px; }
.copy-success-msg { color: #15803d; font-size: .78rem; font-weight: 700; margin-top: .3rem; display: block; }
.profile-key-tip { font-size: .74rem; color: #64748b; margin-top: .4rem; display: block; }
.profile-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid #dcf2ec; }
.profile-detail-item span { font-size: .72rem; color: #64748b; display: block; }
.profile-detail-item strong { font-size: .82rem; color: #1e293b; display: block; margin-top: .15rem; }
.monospace-small { font-family: monospace; font-size: .75rem; word-break: break-all; }
.profile-company-card { background: #fff; border: 1.5px solid #d4e5e1; border-radius: 16px; padding: 1.25rem; }
.company-badge-info { background: #e0f2fe; color: #0369a1; font-size: .72rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; border: 1px solid #bae6fd; }
.profile-subtext { font-size: .78rem; color: #64748b; margin: 0 0 .9rem; line-height: 1.35; }
.company-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.company-form-grid .full-width { grid-column: span 2; }
.company-form-grid label { display: flex; flex-direction: column; gap: .3rem; font-size: .75rem; font-weight: 700; color: #334155; }
.company-form-grid input { padding: .55rem .75rem; border: 1px solid #cbd5e1; border-radius: 8px; font-size: .85rem; font-family: inherit; transition: border-color .15s ease; }
.company-form-grid input:focus { border-color: #075b55; outline: none; box-shadow: 0 0 0 2px rgba(7,91,85,.15); }
.company-form-actions { display: flex; align-items: center; gap: .85rem; margin-top: 1rem; flex-wrap: wrap; }
.company-saved-msg { color: #15803d; font-size: .8rem; font-weight: 700; }
.profile-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.profile-action-card { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-radius: 12px; border: 1px solid #dbe7e4; background: #fff; text-decoration: none; text-align: left; transition: all .16s ease; color: inherit; }
.profile-action-card:hover { transform: translateY(-2px); border-color: #075b55; box-shadow: 0 6px 16px rgba(7,91,85,.1); }
.profile-action-card .action-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.profile-action-card strong { font-size: .85rem; color: #1e293b; display: block; }
.profile-action-card small { font-size: .72rem; color: #64748b; line-height: 1.2; display: block; }
.profile-foot-actions { padding: .9rem 1.6rem; border-top: 1px solid #e2e8f0; background: #f8fafc; display: flex; justify-content: flex-end; }

@media (max-width: 980px) {
  .hub-heading { align-items: flex-start; flex-direction: column; }
  .product-header { align-items: flex-start; flex-direction: column; }
  .license-box { width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .workspace-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .topbar { min-height: 64px; padding: .75rem 1rem; }
  .topbar-left { gap: .6rem; }
  .product-badge { display: none; }
  .status-pill span:not(.status-dot) { display: none; }
  .status-pill { padding: .4rem; }
  .topbar-btn .btn-text, .profile-btn .profile-text { display: none; }
  .topbar-btn { padding: .55rem .65rem; }
  .profile-details-grid, .profile-actions-grid, .company-form-grid { grid-template-columns: 1fr; }
  .company-form-grid .full-width { grid-column: span 1; }
  .app-logo { width: 32px; height: 32px; }
  .shell { width: min(100% - 1.25rem, 1240px); padding-top: 1.15rem; }
  .product-header { gap: 1.1rem; margin-bottom: 1rem; padding: 1.35rem; border-radius: 19px; }
  .hub-heading { gap: 1rem; margin-bottom: 1rem; padding: 1.35rem; border-radius: 19px; }
  .hub-add { width: 100%; }
  .hub-install-card { align-items: flex-start; flex-wrap: wrap; }
  .hub-install-copy { min-width: calc(100% - 4rem); }
  .hub-install-card button { width: 100%; }
  .hub-help { align-items: flex-start; }
  .hub-help-link { width: 100%; justify-content: center; }
  .hub-install-dialog .dialog-actions > * { flex: 1; text-align: center; }
  .product-header h1 { font-size: 2rem; }
  .lead { font-size: .9rem; }
  .workspace-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; padding: .3rem; border-radius: 14px; }
  .workspace-tab { padding: .62rem .4rem; font-size: .72rem; white-space: normal; }
  .stat-grid { gap: .65rem; }
  .stat-card { padding: .9rem; border-radius: 14px; }
  .stat-card span { font-size: .75rem; }
  .stat-card strong { font-size: 1.65rem; }
  .stat-card small { font-size: .68rem; }
  .card { padding: 1rem; border-radius: 16px; }
  .section-toolbar, .section-heading { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions button { flex: 1; padding: .62rem .45rem; font-size: .75rem; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-row { grid-template-columns: 1fr; }
  .order-card header, .order-card footer { align-items: flex-start; flex-direction: column; }
  .order-card footer { justify-content: stretch; }
  .order-card footer select, .order-card footer button { width: 100%; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions button { flex: 1; }
  dialog form, #history-dialog { padding: 1.1rem; }
}

/* Trial Banner & Modal Styles */
.trial-notice-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1.5px solid #f59e0b;
  color: #78350f;
  padding: .75rem 1.25rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, .12);
  flex-wrap: wrap;
}
.trial-notice-banner.trial-expired {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #ef4444;
  color: #991b1b;
}
.trial-banner-content {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .88rem;
}
.trial-icon { font-size: 1.2rem; line-height: 1; }
.trial-sep { opacity: .5; margin: 0 .25rem; }
.trial-btn-activate {
  background: #075b55;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
}
.trial-btn-activate:hover {
  background: #054540;
  transform: translateY(-1px);
}
.trial-dialog-backdrop {
  border: none;
  border-radius: 20px;
  padding: 0;
  background: transparent;
  max-width: 560px;
  width: min(94vw, 560px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .4);
}
.trial-dialog-backdrop::backdrop {
  background: rgba(15, 23, 42, .75);
  backdrop-filter: blur(4px);
}
.trial-modal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.75rem;
  border: 1px solid #e2e8f0;
}
.trial-modal-header { text-align: center; margin-bottom: 1.25rem; }
.trial-modal-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: #fef3c7;
  color: #b45309;
  padding: .25rem .75rem;
  border-radius: 999px;
  margin-bottom: .6rem;
  border: 1px solid #fde68a;
}
.trial-modal-header h2 {
  font-size: 1.4rem;
  color: #0f172a;
  margin: 0 0 .5rem;
}
.trial-modal-desc {
  font-size: .88rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}
.trial-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.25rem 0;
}
.trial-offer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 2px solid #10b981;
  border-radius: 16px;
  padding: 1.25rem;
}
.trial-offer-info { flex: 1; }
.trial-offer-tag {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #047857;
  display: block;
  margin-bottom: .25rem;
}
.trial-offer-info h3 {
  font-size: 1.15rem;
  color: #064e3b;
  margin: 0 0 .25rem;
}
.trial-offer-info p {
  font-size: .78rem;
  color: #065f46;
  margin: 0;
  line-height: 1.35;
}
.trial-offer-price {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
}
.trial-offer-price .price-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: #064e3b;
}
.trial-buy-btn {
  font-size: .82rem;
  padding: .55rem 1rem;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  border-radius: 10px;
}
.trial-activation-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.1rem;
}
.trial-activation-box h4 {
  font-size: .84rem;
  color: #334155;
  margin: 0 0 .6rem;
}
.trial-inline-form {
  display: flex;
  gap: .5rem;
}
.trial-inline-form input {
  flex: 1;
  font-family: monospace;
  font-size: .85rem;
  padding: .6rem .75rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  text-transform: uppercase;
}
.trial-inline-form input:focus {
  border-color: #075b55;
  outline: none;
}
.trial-btn-submit {
  padding: .6rem 1rem;
  font-size: .82rem;
  white-space: nowrap;
  border-radius: 10px;
}
.trial-msg { font-size: .8rem; margin-top: .5rem; font-weight: 700; }
.trial-msg-success { color: #15803d; }
.trial-msg-error { color: #b91c1c; }
.trial-modal-footer { text-align: center; }
.trial-btn-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: .8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: .4rem;
}
.trial-btn-close:hover { color: #1e293b; }

/* ==========================================================================
   Topbar Unificada & Mobile Hamburger (Padrão PrecificaPro)
   ========================================================================== */
.desktop-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.btn-install-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--teal), #0d8378);
  color: #ffffff !important;
  border: none;
  border-radius: 12px;
  padding: .5rem .9rem;
  font-size: .82rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(7, 91, 85, .2);
  transition: all .15s ease;
  white-space: nowrap;
}

.btn-install-app:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(7, 91, 85, .28);
}

.btn-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0 !important;
  border-radius: 12px;
  border: 1px solid #c9d6d3;
  background: #ffffff;
  color: var(--teal);
  cursor: pointer;
  transition: all .15s ease;
}

.btn-hamburger:hover {
  background: var(--soft);
  border-color: #86b8ae;
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  visibility: visible;
  transition: visibility .2s ease;
}

.mobile-drawer-overlay.hidden {
  visibility: hidden;
  pointer-events: none;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 37, 36, .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity .2s ease;
}

.mobile-drawer-overlay.hidden .mobile-drawer-backdrop {
  opacity: 0;
}

.mobile-drawer-sheet {
  position: relative;
  width: min(320px, 86vw);
  height: 100%;
  background: #ffffff;
  box-shadow: -4px 0 25px rgba(7, 91, 85, .15);
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  z-index: 1001;
}

.mobile-drawer-overlay.hidden .mobile-drawer-sheet {
  transform: translateX(100%);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.mobile-drawer-title {
  font-size: 1rem;
  font-weight: 850;
  color: #192524;
}

.mobile-drawer-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--gray);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-close:hover {
  background: #f1f5f4;
  color: #192524;
}

.mobile-drawer-content {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-drawer-section-label {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray);
  margin-bottom: .6rem;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .85rem;
  border-radius: 12px;
  text-decoration: none;
  color: #192524;
  border: 1px solid transparent;
  transition: all .15s ease;
  background: #f8faf9;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.mobile-drawer-link:hover {
  background: var(--soft);
  border-color: #86b8ae;
}

.mobile-drawer-link.highlight {
  background: linear-gradient(135deg, rgba(7, 91, 85, .07), rgba(13, 131, 120, .12));
  border-color: rgba(7, 91, 85, .2);
}

.mobile-drawer-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.mobile-drawer-link strong {
  display: block;
  font-size: .88rem;
  font-weight: 750;
  color: #192524;
}

.mobile-drawer-link small {
  display: block;
  font-size: .72rem;
  color: var(--gray);
}

/* Modal Guia de Instalação */
.install-guide-dialog {
  border: none;
  border-radius: 20px;
  padding: 0;
  background: transparent;
  max-width: 520px;
  width: min(94vw, 520px);
  box-shadow: 0 25px 60px -12px rgba(7, 91, 85, .25);
}

.install-guide-dialog::backdrop {
  background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(4px);
}

.install-guide-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.75rem;
  border: 1px solid #e2e8f0;
}

.install-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.install-guide-header h3 {
  font-size: 1.2rem;
  font-weight: 850;
  color: #192524;
  margin: 0;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--gray);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
}

.btn-close-modal:hover { background: #f1f5f4; color: #192524; }

.install-guide-desc {
  font-size: .88rem;
  color: var(--gray);
  line-height: 1.45;
  margin: 0 0 1.25rem;
}

.install-guide-steps {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.install-step-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: .9rem 1rem;
}

.install-step-item strong {
  display: block;
  font-size: .86rem;
  color: #0f172a;
  margin-bottom: .25rem;
}

.install-step-item span {
  font-size: .78rem;
  color: #64748b;
  line-height: 1.4;
  display: block;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .shell {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .desktop-actions {
    display: none !important;
  }

  .btn-hamburger {
    display: inline-flex !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .brand-tag {
    display: none !important;
  }

  .product-badge {
    display: none !important;
  }

  .topbar {
    min-height: 56px !important;
    padding: .5rem .75rem !important;
    gap: .5rem !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .topbar-left {
    gap: .5rem !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .topbar-brand {
    gap: .5rem !important;
    min-width: 0 !important;
  }

  .brand-titles {
    min-width: 0 !important;
  }

  .brand-name {
    font-size: 1.05rem !important;
    white-space: nowrap !important;
  }

  .topbar-actions {
    gap: .45rem !important;
    flex-shrink: 0 !important;
  }

  .btn-install-app {
    padding: .4rem .65rem !important;
    font-size: .76rem !important;
    gap: .35rem !important;
    flex-shrink: 0 !important;
  }
}
