/* ==========================================================================
   DCiEra App — design tokens
   ========================================================================== */
#dciera-app-root {
	--ink: #1A1A1A;
	--orange: #E8630A;
	--white: #FFFFFF;
	--paper: #FBFAF6;
	--muted: rgba(26, 26, 26, 0.70);
	--muted-faint: rgba(26, 26, 26, 0.45);
	--card: #F1EAD9;
	--stone: #F1EAD9;
	--green: #4F8A45;
	--red: #C13B35;
	--blue: #1565C0;
	--border: #E3E0D8;
	--border-strong: #C9C4B6;

	font-family: 'IBM Plex Sans', -apple-system, sans-serif;
	font-weight: 500;
	color: var(--ink);
	background: var(--paper);
	max-width: 1100px;
	margin: 0 auto;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
#dciera-app-root * { box-sizing: border-box; }
#dciera-app-root .mono { font-family: 'IBM Plex Mono', monospace; font-weight: 400; }
#dciera-app-root button, #dciera-app-root input, #dciera-app-root select, #dciera-app-root textarea {
	font-family: inherit; font-weight: 500; font-size: 13px; color: var(--ink);
}
#dciera-app-root button {
	background: var(--white); border: 1px solid var(--border-strong); border-radius: 3px;
	padding: 8px 14px; cursor: pointer;
}
#dciera-app-root button.primary { background: var(--ink); color: var(--white); border-color: var(--ink); }
#dciera-app-root button.accent { background: var(--orange); color: var(--white); border-color: var(--orange); }
#dciera-app-root button:hover { opacity: .85; }
#dciera-app-root input, #dciera-app-root select, #dciera-app-root textarea {
	border: 1px solid var(--border-strong); border-radius: 3px; padding: 8px 10px; width: 100%;
}

/* Layout: sidebar + content, with drafting corner marks */
.dc-shell { display: flex; width: 1000px; max-width: 100%; margin: 0 auto; min-height: 640px; border: 1px solid var(--border-strong); }
#dciera-app-root svg, #dciera-app-root img { max-width: 100%; height: auto; }
.dc-sidebar { width: 210px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--border-strong); padding: 16px 0; overflow-y: auto; max-height: 720px; }
.dc-sidebar-brand { padding: 0 16px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.dc-sidebar-brand .mark { width: 10px; height: 10px; background: var(--orange); flex-shrink: 0; }
.dc-sidebar-brand .name { font-size: 15px; font-weight: 600; }
.dc-sidebar-brand .tag { font-size: 10.5px; color: var(--muted); }
.dc-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 12.5px; color: var(--ink); cursor: pointer; border-left: 2px solid transparent; }
.dc-nav-item svg { flex-shrink: 0; opacity: .75; }
.dc-nav-item:hover { background: var(--stone); }
.dc-nav-item.active { border-left-color: var(--orange); background: var(--white); font-weight: 600; }
.dc-nav-item.active svg { opacity: 1; color: var(--orange); }
.dc-sidebar-divider { height: 1px; background: var(--border-strong); margin: 12px 16px; }
.dc-content { flex: 1; min-width: 0; padding: 24px 28px; overflow-y: auto; max-height: 720px; }
.dc-content-inner { overflow-x: auto; }

.dc-crumb { font-size: 11px; color: var(--muted); margin-bottom: 4px; cursor: pointer; }
.dc-h1 { font-size: 20px; font-weight: 600; margin: 0 0 6px; color: var(--orange); display: flex; align-items: center; gap: 8px; }
.dc-h1::before { content: ''; width: 4px; height: 20px; background: var(--orange); flex-shrink: 0; }
.dc-sub { font-size: 13px; color: var(--muted); margin: 0 0 20px; line-height: 1.6; max-width: 560px; }

/* Cards */
.dc-card { border: 1px solid var(--border-strong); border-radius: 4px; padding: 16px 18px; margin-bottom: 12px; background: var(--white); }
.dc-card.tint { background: var(--card); }
.dc-card-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.dc-card-title { font-size: 13.5px; font-weight: 600; margin: 0; }

/* Badges */
.dc-badge { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 3px; white-space: nowrap; letter-spacing: .01em; }
.dc-badge.danger { background: #FBE9E7; color: var(--red); }
.dc-badge.warn { background: #FFF3E0; color: #8A5A00; }
.dc-badge.ok { background: #E8F0E6; color: var(--green); }
.dc-badge.neutral { background: var(--card); color: var(--muted); }
.dc-badge.accent { background: #FCE4D6; color: var(--orange); }
.dc-badge.new { background: var(--ink); color: var(--white); }

/* Tags */
.dc-tag { display: inline-flex; font-size: 11px; padding: 3px 8px; border-radius: 3px; background: var(--card); color: var(--muted); margin: 0 6px 6px 0; }

/* Tabs */
.dc-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.dc-tab { padding: 8px 14px; font-size: 12.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.dc-tab.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 600; }

/* Stepper */
.dc-stepper { display: flex; align-items: center; margin-bottom: 22px; }
.dc-step { display: flex; flex-direction: column; align-items: center; flex: 1; }
.dc-step .dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; border: 1px solid var(--border-strong); color: var(--muted); }
.dc-step.done .dot { background: var(--green); color: var(--white); border-color: var(--green); }
.dc-step.current .dot { background: var(--ink); color: var(--white); border-color: var(--ink); }
.dc-step .lbl { font-size: 10.5px; margin-top: 5px; color: var(--muted); }
.dc-step.current .lbl { color: var(--ink); font-weight: 600; }
.dc-step-line { flex: 1; height: 1px; background: var(--border-strong); margin-bottom: 18px; }
.dc-step-line.done { background: var(--green); }

/* Timeline */
.dc-tl-item { display: flex; gap: 12px; }
.dc-tl-dotwrap { display: flex; flex-direction: column; align-items: center; }
.dc-tl-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; }
.dc-tl-line { flex: 1; width: 1px; background: var(--border); margin-top: 4px; }
.dc-tl-body { padding-bottom: 18px; flex: 1; }

/* Tables */
.dc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dc-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; color: var(--muted); padding: 8px 10px; background: var(--card); }
.dc-table td { padding: 9px 10px; border-top: 1px solid var(--border); }

/* Bars / progress */
.dc-bar-track { height: 5px; border-radius: 3px; background: var(--card); overflow: hidden; }
.dc-bar-fill { height: 100%; }

/* Chat */
.dc-chat { border: 1px solid var(--border-strong); border-radius: 4px; overflow: hidden; max-width: 440px; }
.dc-chat-head { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.dc-chat-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.dc-bubble-user { align-self: flex-end; max-width: 85%; background: var(--ink); color: var(--white); border-radius: 10px 10px 2px 10px; padding: 9px 12px; font-size: 12.5px; }
.dc-bubble-app { align-self: flex-start; max-width: 90%; background: var(--card); border-radius: 10px 10px 10px 2px; padding: 10px 12px; font-size: 12.5px; }
.dc-chat-input { border-top: 1px solid var(--border); padding: 10px 12px; display: flex; gap: 8px; }

.dc-client-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--ink); border-radius: 4px; margin-bottom: 16px; }
.dc-client-bar .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: rgba(255,255,255,.55); }
.dc-client-bar .name { font-size: 13px; font-weight: 600; color: var(--white); }
.dc-client-bar .vendor { font-size: 11px; color: rgba(255,255,255,.6); margin-left: auto; }

/* Module tabs (top of content, switches screens within the active module) */
.dc-mtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-strong); margin-bottom: 20px; flex-wrap: wrap; }
.dc-mtab { display: flex; align-items: center; gap: 6px; padding: 9px 14px; font-size: 12.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.dc-mtab:hover { color: var(--ink); }
.dc-mtab.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 600; }

/* CTA — move to the next logical screen */
.dc-cta { display: flex; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); }
.dc-cta button { display: flex; align-items: center; gap: 6px; }

/* Icon-bearing row inside cards/headers */
.dc-irow { display: flex; align-items: center; gap: 8px; }
.dc-irow svg { flex-shrink: 0; color: var(--muted); }

.dc-quicklink { background: var(--stone); border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.dc-node { fill: none; stroke: var(--border-strong); stroke-width: 1; }
.dc-line { stroke: var(--border-strong); stroke-width: 1.5; fill: none; }

/* Utility */
.dc-flex { display: flex; gap: 8px; }
.dc-flex.between { justify-content: space-between; align-items: center; }
.dc-mt { margin-top: 12px; }
.dc-empty { text-align: center; padding: 22px; color: var(--muted); font-size: 12.5px; background: var(--card); border-radius: 4px; }
.dc-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
