:root {
  --ink: #18221f;
  --muted: #6f7b76;
  --soft: #f2f3ef;
  --paper: #fbfbf8;
  --white: #ffffff;
  --line: #e2e5df;
  --coral: #ef6a5b;
  --coral-soft: #fff0ed;
  --teal: #238c7e;
  --teal-soft: #e7f4f1;
  --amber: #e9ad46;
  --shadow: 0 18px 55px rgba(26, 37, 32, .12);
  --sidebar: 244px;
  --agent: 364px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; font-family: "Noto Sans SC", sans-serif; color: var(--ink); background: var(--soft); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(35, 140, 126, .18); outline-offset: 2px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--agent); }
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(260px, 38%) minmax(320px, 1fr); background: var(--paper); }
.auth-brand { min-height: 100vh; padding: clamp(34px, 6vw, 76px); display: flex; align-items: flex-start; gap: 13px; color: white; background: #17201d; }
.auth-brand .brand-mark { flex: 0 0 auto; }
.auth-brand strong { display: block; font-size: 22px; letter-spacing: 2px; }
.auth-brand small { display: block; margin-top: 4px; color: #9aaba4; font: 400 9px/1 "DM Mono"; letter-spacing: 1.5px; }
.auth-panel { align-self: center; width: min(420px, calc(100vw - 44px)); margin: 40px auto; padding: 30px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: 0 16px 45px rgba(26, 37, 32, .08); display: grid; gap: 17px; }
.auth-panel h1 { margin: 0; font-size: 25px; }
.auth-panel > p { margin: -8px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-submit { width: 100%; height: 44px; margin-top: 2px; }
.form-error { min-height: 18px; color: #b64236; font-size: 10px; line-height: 1.6; }
.form-note, .modal-copy { margin: -4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.mode-control { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mode-control label { position: relative; }
.mode-control input { position: absolute; opacity: 0; pointer-events: none; }
.mode-control span { min-height: 44px; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.mode-control span svg { width: 16px; }
.mode-control input:checked + span { border-color: #8fc4ba; background: var(--teal-soft); color: var(--teal); }
.mode-control input:disabled + span { cursor: not-allowed; opacity: .48; }
.model-system-status { padding: 11px 12px; border-radius: 5px; background: #f4f5f1; color: var(--muted); font-size: 10px; line-height: 1.6; }
.model-system-status strong { color: var(--ink); }
.model-system-status.denied { background: var(--coral-soft); color: #a94b42; }
.custom-model-fields { display: grid; gap: 14px; }
.model-actions { align-items: center; }
.model-actions > span { flex: 1; }
.danger-text { color: #b64236; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 14px 16px; background: #17201d; color: #eef2ed; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 10px 30px; }
.brand strong { font-size: 17px; letter-spacing: 2px; display: block; }
.brand small { font: 400 8px/1 "DM Mono"; letter-spacing: 1.5px; color: #93a39d; }
.brand-mark { width: 30px; height: 30px; display: flex; align-items: end; gap: 3px; transform: skew(-8deg); }
.brand-mark span { display: block; width: 7px; background: var(--coral); border-radius: 1px; }
.brand-mark span:nth-child(1) { height: 16px; }
.brand-mark span:nth-child(2) { height: 26px; background: var(--amber); }
.brand-mark span:nth-child(3) { height: 21px; background: var(--teal); }
.sidebar-section { padding: 0 4px 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.section-label { height: 28px; padding-left: 8px; display: flex; align-items: center; justify-content: space-between; color: #82918b; text-transform: uppercase; font: 500 10px/1 "DM Mono"; letter-spacing: 1px; }
.library-list { display: grid; gap: 4px; margin-top: 6px; }
.library-item { border: 0; background: transparent; color: #b7c1bd; padding: 9px 8px; display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; border-radius: 6px; cursor: pointer; text-align: left; font-size: 13px; }
.library-item:hover, .library-item.active { background: rgba(255,255,255,.08); color: #fff; }
.library-item .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--lib-color); }
.library-item em { font-style: normal; font: 400 10px "DM Mono"; color: #67746f; }
.sidebar-nav { display: grid; gap: 4px; padding: 18px 4px; }
.nav-item { height: 40px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #9caaa5; display: flex; align-items: center; gap: 11px; cursor: pointer; text-align: left; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.08); }
.nav-item.active { box-shadow: inset 2px 0 var(--coral); }
.nav-item span { flex: 1; font-size: 13px; }
.nav-item b { font: 500 10px "DM Mono"; color: #788680; }
.sidebar-bottom { margin-top: auto; }
.profile-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; border-top: 1px solid rgba(255,255,255,.09); padding: 15px 8px 0; margin-top: 8px; }
.profile-row strong, .profile-row small { display: block; }
.profile-row strong { font-size: 12px; }
.profile-row small { margin-top: 2px; font-size: 10px; color: #788680; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; background: #dbe9e5; color: #17201d; border-radius: 50%; font: 600 13px "DM Mono"; }
.icon-btn { position: relative; width: 38px; height: 38px; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; border-radius: 6px; cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.compact { width: 28px; height: 28px; border: 0; background: transparent; color: inherit; }
.workspace { min-width: 0; background: var(--paper); }
.topbar { position: sticky; top: 0; z-index: 10; height: 72px; border-bottom: 1px solid var(--line); background: rgba(251,251,248,.96); backdrop-filter: blur(12px); display: flex; align-items: center; padding: 0 28px; gap: 20px; }
.breadcrumbs { display: flex; align-items: center; gap: 7px; min-width: 180px; font-size: 12px; color: var(--muted); }
.breadcrumbs svg { width: 13px; }
.breadcrumbs strong { color: var(--ink); }
.topbar-actions { margin-left: auto; display: flex; gap: 9px; align-items: center; }
.search-box { height: 38px; width: clamp(210px, 22vw, 300px); border: 1px solid var(--line); background: var(--white); border-radius: 6px; display: flex; align-items: center; gap: 8px; padding: 0 9px; color: #89938f; }
.search-box svg { width: 16px; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 12px; color: var(--ink); }
.search-box kbd { border: 1px solid var(--line); background: var(--soft); padding: 2px 5px; border-radius: 3px; font: 500 9px "DM Mono"; color: #87918c; }
.notification-dot { position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); border: 1px solid white; }
.primary-btn, .secondary-btn { height: 38px; border-radius: 6px; padding: 0 15px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; font-weight: 600; }
.primary-btn { border: 1px solid var(--ink); color: white; background: var(--ink); }
.primary-btn:hover { background: #2e3c37; }
.primary-btn:disabled { cursor: wait; opacity: .62; }
.primary-btn.is-loading svg { animation: spin 1s linear infinite; }
.primary-btn svg, .secondary-btn svg { width: 15px; }
.secondary-btn { border: 1px solid var(--line); background: white; color: var(--ink); }
.mobile-only, .agent-mobile-btn { display: none; }
.content { padding: 30px clamp(22px, 3vw, 44px) 64px; max-width: 1320px; margin: 0 auto; }
.view-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--coral); font: 500 10px "DM Mono"; letter-spacing: 1.3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.2; letter-spacing: 0; }
.view-head p { margin: 0; color: var(--muted); font-size: 12px; }
.head-actions { display: flex; gap: 8px; }
.hero-board { position: relative; min-height: 258px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(290px, .95fr); background: #19231f; overflow: hidden; border-radius: 7px; color: white; }
.hero-copy { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.hero-copy .eyebrow { color: #e7b454; }
.hero-copy h2 { max-width: 500px; margin-bottom: 12px; font: 600 clamp(28px, 3vw, 42px)/1.08 "Playfair Display", serif; letter-spacing: 0; }
.hero-copy p { max-width: 470px; margin-bottom: 23px; color: #bbc7c2; font-size: 13px; line-height: 1.8; }
.hero-copy .primary-btn { color: var(--ink); background: white; border-color: white; }
.hero-image { min-height: 258px; position: relative; background: url('assets/cocktail-hero.jpg') center/cover no-repeat; }
.hero-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #19231f 0, rgba(25,35,31,.15) 45%, rgba(25,35,31,.05)); }
.hero-stamp { position: absolute; right: 22px; bottom: 20px; border: 1px solid rgba(255,255,255,.55); padding: 8px 10px; color: white; font: 500 9px "DM Mono"; letter-spacing: 1px; backdrop-filter: blur(6px); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 7px; background: white; margin: 18px 0 30px; overflow: hidden; }
.metric { min-height: 100px; padding: 18px; border-right: 1px solid var(--line); display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 12px; }
.metric:last-child { border: 0; }
.metric-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 5px; color: var(--teal); background: var(--teal-soft); }
.metric:nth-child(2) .metric-icon { color: var(--coral); background: var(--coral-soft); }
.metric:nth-child(3) .metric-icon { color: #9c6e18; background: #fff5df; }
.metric:nth-child(4) .metric-icon { color: #577083; background: #edf3f6; }
.metric-icon svg { width: 17px; }
.metric strong { display: block; font: 500 24px/1 "DM Mono"; }
.metric small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 15px; }
.text-btn { border: 0; background: none; color: var(--teal); cursor: pointer; font-size: 11px; font-weight: 600; }
.recipe-list { display: grid; gap: 8px; }
.recipe-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 9px; background: white; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.recipe-row:hover { border-color: #b9c4bf; transform: translateY(-1px); }
.drink-thumb { width: 52px; height: 52px; border-radius: 4px; display: grid; place-items: center; overflow: hidden; background: var(--drink-bg); color: white; }
.drink-thumb svg { width: 23px; }
.recipe-row h3 { margin: 0 0 4px; font-size: 12px; }
.recipe-row p { margin: 0; color: var(--muted); font-size: 10px; }
.status-pill { display: inline-flex; gap: 5px; align-items: center; border-radius: 999px; padding: 5px 8px; font-size: 9px; white-space: nowrap; color: var(--teal); background: var(--teal-soft); }
.status-pill.missing { color: #ad5d4f; background: var(--coral-soft); }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.activity-list { border-left: 1px solid var(--line); margin-left: 8px; padding-left: 22px; display: grid; gap: 21px; }
.activity { position: relative; }
.activity::before { content: ""; position: absolute; left: -27px; top: 2px; width: 8px; height: 8px; background: white; border: 2px solid var(--teal); border-radius: 50%; }
.activity time { display: block; margin-bottom: 4px; color: #9ba39f; font: 400 9px "DM Mono"; }
.activity p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.activity strong { color: var(--ink); }
.filter-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; }
.filter-search { flex: 1; max-width: 360px; }
.filter-select { height: 38px; border: 1px solid var(--line); border-radius: 6px; background: white; padding: 0 28px 0 11px; font-size: 11px; color: var(--muted); }
.inventory-table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; display: table; }
.inventory-table th { height: 40px; text-align: left; padding: 0 14px; background: #f5f6f2; color: #87918c; font: 500 9px "DM Mono"; letter-spacing: .6px; }
.inventory-table td { height: 67px; border-top: 1px solid var(--line); padding: 8px 14px; font-size: 11px; }
.bottle-name { display: flex; align-items: center; gap: 10px; }
.bottle-icon { width: 32px; height: 42px; background: var(--bottle-color); border-radius: 4px 4px 7px 7px; position: relative; box-shadow: inset 0 -9px rgba(0,0,0,.1); }
.bottle-icon::before { content: ""; position: absolute; left: 10px; top: -5px; width: 12px; height: 8px; background: var(--bottle-color); border-radius: 2px 2px 0 0; }
.bottle-icon::after { content: ""; position: absolute; left: 4px; right: 4px; top: 14px; height: 10px; background: rgba(255,255,255,.72); }
.bottle-name strong, .bottle-name small { display: block; }
.bottle-name small { margin-top: 3px; color: var(--muted); }
.level { min-width: 92px; }
.level-top { display: flex; justify-content: space-between; margin-bottom: 5px; color: var(--muted); font: 400 9px "DM Mono"; }
.level-bar { height: 4px; background: #e8ebe6; border-radius: 4px; overflow: hidden; }
.level-bar i { display: block; height: 100%; width: var(--level); background: var(--teal); }
.level.low .level-bar i { background: var(--coral); }
.tag { display: inline-block; padding: 4px 7px; background: #f0f2ee; border-radius: 3px; color: #66726d; font-size: 9px; margin-right: 3px; }
.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.recipe-card { border: 1px solid var(--line); background: white; border-radius: 7px; overflow: hidden; cursor: pointer; }
.recipe-card:hover { box-shadow: 0 10px 30px rgba(30,43,37,.09); transform: translateY(-2px); }
.recipe-visual { height: 140px; position: relative; display: grid; place-items: center; background: var(--card-bg); overflow: hidden; }
.recipe-visual::after { content: ""; position: absolute; left: 15%; right: 15%; bottom: -15px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.13); filter: blur(12px); }
.glass { width: 62px; height: 82px; position: relative; z-index: 1; border: 2px solid rgba(255,255,255,.75); border-top: 0; border-radius: 2px 2px 23px 23px; background: linear-gradient(to top, var(--liquid) 0 70%, rgba(255,255,255,.12) 70%); box-shadow: inset 8px 0 rgba(255,255,255,.12); }
.glass.coupe { width: 88px; height: 47px; margin-bottom: 36px; border-radius: 3px 3px 44px 44px; }
.glass.coupe::before { content: ""; position: absolute; left: 42px; top: 45px; height: 37px; width: 2px; background: rgba(255,255,255,.7); }
.glass.coupe::after { content: ""; position: absolute; left: 24px; top: 81px; width: 38px; height: 2px; background: rgba(255,255,255,.7); }
.recipe-card-body { padding: 14px; }
.recipe-card-top { display: flex; justify-content: space-between; gap: 8px; }
.recipe-card h3 { margin: 0 0 5px; font-size: 13px; }
.recipe-card p { margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.ingredient-mini { padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #87918c; font: 400 9px "DM Mono"; }
.chat-history { display: grid; gap: 12px; }
.chat-date { margin: 14px 0 2px; color: #929d98; font: 500 9px "DM Mono"; letter-spacing: 1px; }
.history-card { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: start; padding: 15px; border: 1px solid var(--line); background: white; border-radius: 6px; }
.history-card .agent-orb { width: 38px; height: 38px; }
.history-card h3 { margin: 0 0 6px; font-size: 12px; }
.history-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.history-card time { color: #99a39f; font: 400 9px "DM Mono"; }
.admin-toolbar { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-summary { color: var(--muted); font-size: 11px; }
.user-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; }
.user-table { width: 100%; border-collapse: collapse; }
.user-table th { height: 40px; padding: 0 14px; text-align: left; background: #f5f6f2; color: #87918c; font: 500 9px "DM Mono"; }
.user-table td { min-height: 64px; padding: 13px 14px; border-top: 1px solid var(--line); font-size: 11px; }
.user-identity { display: flex; align-items: center; gap: 10px; }
.user-identity .avatar { flex: 0 0 auto; width: 32px; height: 32px; }
.user-identity strong, .user-identity small { display: block; }
.user-identity small { margin-top: 3px; color: var(--muted); font: 400 9px "DM Mono"; }
.role-badge, .account-status { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 3px; font-size: 9px; background: var(--teal-soft); color: var(--teal); }
.role-badge.admin { background: var(--coral-soft); color: #bf4b40; }
.account-status.inactive { background: #f0f1ee; color: #7e8884; }
.model-access { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.model-access i { width: 6px; height: 6px; border-radius: 50%; background: #a7b0ac; }
.model-access.allowed { color: var(--teal); }
.model-access.allowed i { background: var(--teal); }
.user-actions { display: flex; justify-content: flex-end; gap: 5px; }
.user-actions .icon-btn { width: 32px; height: 32px; }
.user-actions .danger { color: #b64236; }
.forced-password .password-modal-close { display: none; }
.empty-state { padding: 70px 20px; border: 1px dashed #cdd3cf; text-align: center; border-radius: 7px; }
.empty-state svg { width: 28px; color: var(--teal); }
.empty-state h3 { margin: 12px 0 5px; font-size: 14px; }
.empty-state p { color: var(--muted); font-size: 11px; }
.agent-panel { position: sticky; top: 0; height: 100vh; min-width: 0; display: flex; flex-direction: column; background: white; border-left: 1px solid var(--line); z-index: 30; }
.agent-head { min-height: 72px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
#closeAgentBtn { display: none; }
.agent-identity { display: flex; align-items: center; gap: 10px; }
.agent-orb { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--teal); box-shadow: 0 0 0 5px var(--teal-soft); }
.agent-orb svg { width: 16px; }
.agent-identity strong, .agent-identity span { display: block; }
.agent-identity strong { font-size: 13px; }
.agent-identity span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.agent-identity span i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #35b481; margin-right: 3px; }
.agent-context { margin: 12px 14px 0; padding: 10px 11px; display: flex; align-items: center; gap: 9px; background: #f4f5f1; border-radius: 5px; color: var(--muted); font-size: 10px; }
.agent-context svg { width: 14px; color: var(--teal); }
.agent-context strong { color: var(--ink); }
.chat-stream { flex: 1; min-height: 0; overflow-y: auto; padding: 17px 15px; display: flex; flex-direction: column; gap: 13px; }
.message { display: flex; gap: 9px; align-items: flex-start; }
.message.user { justify-content: flex-end; }
.message-avatar { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: white; }
.message-avatar svg { width: 11px; }
.bubble { max-width: 86%; padding: 10px 11px; border-radius: 3px 9px 9px 9px; background: #f1f3ef; font-size: 11px; line-height: 1.65; }
.message.user .bubble { color: white; background: #26332e; border-radius: 9px 3px 9px 9px; }
.bubble strong { font-weight: 600; }
.bubble a { color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.tool-trace { margin: -2px 0 8px; padding-bottom: 7px; border-bottom: 1px solid #dfe4df; display: flex; align-items: center; gap: 5px; color: var(--teal); font: 500 8px "DM Mono"; }
.tool-trace svg { width: 11px; height: 11px; }
.bubble .mini-card { margin-top: 9px; padding: 9px; background: white; border: 1px solid var(--line); border-radius: 5px; }
.mini-card-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.mini-card h4 { margin: 0; font-size: 11px; }
.mini-card p { margin: 0; color: var(--muted); font-size: 9px; }
.mini-card ul { list-style: none; padding: 7px 0 0; margin: 0; border-top: 1px solid var(--line); display: grid; gap: 5px; }
.mini-card li { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.typing { display: flex; gap: 3px; padding: 8px 10px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #9aa49f; animation: bounce 1s infinite alternate; }
.typing i:nth-child(2) { animation-delay: .2s; }.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { to { transform: translateY(-4px); opacity: .5; } }
@keyframes spin { to { transform: rotate(360deg); } }
.prompt-chips { padding: 0 14px 9px; display: flex; gap: 5px; overflow-x: auto; }
.prompt-chips button { flex: 0 0 auto; border: 1px solid var(--line); background: white; border-radius: 999px; padding: 6px 9px; color: var(--muted); font-size: 9px; cursor: pointer; }
.prompt-chips button:hover { color: var(--teal); border-color: #acd0c9; }
.agent-composer { border-top: 1px solid var(--line); padding: 10px 13px 14px; }
.composer-tools { display: flex; align-items: center; gap: 4px; color: #939c98; font-size: 9px; }
.composer-input { display: flex; gap: 8px; align-items: end; margin-top: 5px; }
.composer-input textarea { flex: 1; min-height: 40px; max-height: 100px; resize: none; border: 0; outline: 0; padding: 9px 4px; font-size: 11px; }
.send-btn { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 6px; background: var(--coral); color: white; display: grid; place-items: center; cursor: pointer; }
.send-btn svg { width: 16px; }
.send-btn:disabled { cursor: wait; opacity: .55; }
.bubble small { display: block; margin-top: 8px; color: #89948f; font-size: 8px; line-height: 1.5; }
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(18,27,23,.45); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: .2s; }
.overlay.show { opacity: 1; visibility: visible; }
.modal { position: fixed; z-index: 60; left: 50%; top: 50%; width: min(440px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow-y: auto; transform: translate(-50%, -46%) scale(.98); opacity: 0; visibility: hidden; padding: 22px; background: white; border-radius: 7px; box-shadow: var(--shadow); transition: .2s; }
.modal.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.wide-modal { width: min(610px, calc(100vw - 28px)); }
.modal-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.modal-head h2 { margin: 0; font-size: 21px; }
.modal form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span, .color-picker > span { color: #56625d; font-size: 11px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 10px 11px; outline: 0; color: var(--ink); background: white; font-size: 12px; }
.field textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.color-picker { display: flex; justify-content: space-between; align-items: center; }
.color-picker div { display: flex; gap: 8px; }
.color-picker label input { position: absolute; opacity: 0; }
.color-picker i { display: block; width: 24px; height: 24px; background: var(--swatch); border-radius: 50%; cursor: pointer; border: 3px solid white; box-shadow: 0 0 0 1px var(--line); }
.color-picker input:checked + i { box-shadow: 0 0 0 2px var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.type-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 17px; }
.type-tabs button { height: 42px; border: 1px solid var(--line); background: white; border-radius: 5px; display: flex; justify-content: center; align-items: center; gap: 7px; cursor: pointer; color: var(--muted); font-size: 11px; }
.type-tabs button svg { width: 15px; }
.type-tabs button.active { color: var(--teal); border-color: #8fc4ba; background: var(--teal-soft); }
.drop-zone { position: relative; min-height: 120px; border: 1px dashed #bfc8c3; border-radius: 6px; background: #f8f9f6; display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-zone svg { width: 21px; color: var(--teal); }
.drop-zone strong { color: var(--ink); font-size: 11px; }
.drop-zone span { font-size: 9px; }
.drop-zone em { max-width: 90%; color: var(--coral); font-style: normal; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipe-modal { width: min(520px, calc(100vw - 28px)); padding: 0; overflow: hidden; }
.recipe-detail-hero { min-height: 180px; display: flex; align-items: end; padding: 20px; color: white; background: var(--detail-bg); }
.recipe-detail-hero h2 { margin: 5px 0; font: 600 28px "Playfair Display"; }
.recipe-detail-hero p { margin: 0; font-size: 11px; color: rgba(255,255,255,.75); }
.recipe-close { position: absolute; right: 12px; top: 12px; background: rgba(255,255,255,.9); }
.recipe-detail-body { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.recipe-detail-body h3 { margin-bottom: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.ingredient-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ingredient-list li { display: flex; justify-content: space-between; padding-bottom: 7px; border-bottom: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.ingredient-list li span:last-child { color: var(--ink); font-family: "DM Mono"; }
.method-text { color: var(--muted); font-size: 10px; line-height: 1.8; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 10px 14px; display: flex; align-items: center; gap: 8px; color: white; background: #202d28; border-radius: 5px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: .2s; font-size: 11px; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast svg { width: 15px; color: #70d0b6; }

@media (max-width: 1180px) {
  :root { --sidebar: 216px; --agent: 326px; }
  .app-shell { grid-template-columns: var(--sidebar) minmax(0,1fr); }
  .agent-panel { position: fixed; right: 0; top: 0; width: min(364px, 92vw); transform: translateX(102%); transition: .25s; box-shadow: var(--shadow); }
  .agent-panel.open { transform: translateX(0); }
  #closeAgentBtn { display: grid; }
  .agent-mobile-btn { width: 38px; height: 38px; border: 0; border-radius: 6px; color: white; background: var(--teal); display: grid; place-items: center; }
  .agent-mobile-btn svg { width: 16px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }.metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .recipe-grid { grid-template-columns: repeat(2, 1fr); }
  .inventory-table th:nth-child(4), .inventory-table td:nth-child(4) { display: none; }
}
@media (max-width: 940px) {
  :root { --sidebar: 230px; }
  .search-box { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .auth-screen { display: block; padding: 0 18px 32px; background: var(--paper); }
  .auth-brand { min-height: auto; margin: 0 -18px; padding: 24px 22px; }
  .auth-panel { margin: 42px auto 0; padding: 24px 20px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; z-index: 55; transform: translateX(-102%); width: min(280px, 86vw); transition: .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: grid; }
  .topbar { height: 62px; padding: 0 14px; gap: 10px; }
  .breadcrumbs span, .breadcrumbs svg { display: none; }
  .breadcrumbs { min-width: 0; flex: 1; }
  .topbar-actions { margin: 0; }
  .topbar-actions > .icon-btn { display: none; }
  .primary-btn span { display: none; }
  .content { padding: 22px 14px 50px; }
  .view-head { align-items: flex-start; }
  .view-head p { max-width: 220px; line-height: 1.5; }
  .hero-board { grid-template-columns: 1fr; }
  .hero-copy { min-height: 280px; position: relative; z-index: 2; background: linear-gradient(90deg, rgba(22,31,28,.92), rgba(22,31,28,.52)); }
  .hero-image { position: absolute; inset: 0; min-height: 280px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 86px; padding: 12px; grid-template-columns: 30px 1fr; gap: 8px; }
  .metric-icon { width: 30px; height: 30px; }
  .metric strong { font-size: 19px; }
  .metric small { font-size: 9px; }
  .recipe-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-wrap: wrap; }
  .filter-search { max-width: none; flex-basis: 100%; }
  .inventory-table, .inventory-table tbody { display: block; }
  .inventory-table thead { display: none; }
  .inventory-table tr { display: grid; grid-template-columns: 1fr 96px; padding: 10px; border-bottom: 1px solid var(--line); }
  .inventory-table tr:last-child { border: 0; }
  .inventory-table td { height: auto; border: 0; padding: 5px; }
  .inventory-table td:nth-child(3), .inventory-table td:nth-child(4) { display: none; }
  .inventory-table td:last-child { text-align: right; }
  .recipe-detail-body { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .type-tabs button { font-size: 0; }.type-tabs button svg { width: 18px; }
  .user-table-wrap { border: 0; background: transparent; overflow: visible; }
  .user-table, .user-table tbody { display: block; }
  .user-table thead { display: none; }
  .user-table tr { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: white; }
  .user-table td { min-height: 0; padding: 0; border: 0; }
  .user-table td:nth-child(2), .user-table td:nth-child(3), .user-table td:nth-child(4) { font-size: 9px; color: var(--muted); }
  .user-table td:nth-child(5) { font-size: 9px; color: var(--muted); }
  .user-table td:last-child { grid-column: 2; grid-row: 1 / span 5; align-self: center; }
  .model-actions { flex-wrap: wrap; }
  .model-actions > span { display: none; }
  .model-actions button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
