:root { color-scheme: light; --ink:#14211d; --forest:#173c32; --forest-2:#205344; --mint:#b9f7d3; --paper:#f4f1e9; --white:#fffefa; --muted:#66736e; --line:#d9ddd8; --chat:#eaf4ef; font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
* { box-sizing:border-box; }
html,body { margin:0; min-height:100%; background:var(--paper); color:var(--ink); }
button,input,textarea { font:inherit; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible { outline:3px solid rgba(40,120,94,.28); outline-offset:2px; }
.hidden { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.state-card { min-height:100vh; display:grid; place-items:center; color:var(--muted); }
.brand { display:flex; align-items:center; gap:12px; font-weight:850; letter-spacing:.12em; }
.brand-mark { width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--mint); border-radius:10px; color:var(--mint); }
.eyebrow { margin:0 0 18px; color:var(--mint); font-size:.76rem; font-weight:850; letter-spacing:.16em; text-transform:uppercase; }
.eyebrow.dark { color:#28785e; }.eyebrow.compact { margin-bottom:7px; }
h1,h2 { margin:0; font-family:Georgia,"Times New Roman",serif; font-weight:500; letter-spacing:-.04em; }
h1 { font-size:clamp(3.6rem,7vw,7.5rem); line-height:.9; }
h2 { font-size:clamp(2rem,4vw,3rem); line-height:1.05; }
.muted { margin:14px 0 28px; color:var(--muted); line-height:1.55; }

/* Acceso */
.shell { min-height:100vh; display:grid; grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr); }
.intro { padding:48px clamp(32px,6vw,96px); background:var(--forest); color:var(--white); display:flex; flex-direction:column; justify-content:space-between; position:relative; overflow:hidden; }
.intro::after { content:""; position:absolute; width:420px; height:420px; border:1px solid rgba(185,247,211,.22); border-radius:50%; right:-170px; bottom:-170px; box-shadow:0 0 0 72px rgba(185,247,211,.04),0 0 0 144px rgba(185,247,211,.025); }
.intro-copy { max-width:660px; position:relative; z-index:1; }
.lead { max-width:570px; margin:34px 0 0; color:#d4e2dc; font-size:clamp(1rem,1.8vw,1.25rem); line-height:1.65; }
.security-note { max-width:420px; margin:48px 0 0; color:#a9c0b7; font-size:.88rem; line-height:1.6; }
.account-panel { padding:32px; display:grid; place-items:center; }
.card { width:min(100%,470px); padding:clamp(30px,5vw,54px); background:var(--white); border:1px solid rgba(20,33,29,.08); border-radius:24px; box-shadow:0 24px 80px rgba(23,60,50,.1); }
.tabs { display:grid; grid-template-columns:1fr 1fr; margin:26px 0; padding:4px; background:#edf0eb; border-radius:12px; }
.tab { padding:10px; border:0; border-radius:9px; color:var(--muted); background:transparent; cursor:pointer; font-weight:700; }
.tab.active { color:var(--ink); background:var(--white); box-shadow:0 2px 10px rgba(20,33,29,.08); }
#auth-form { display:grid; gap:9px; } label { margin-top:7px; font-size:.86rem; font-weight:750; }
input { width:100%; padding:14px 15px; border:1px solid var(--line); border-radius:11px; background:#fff; outline:none; }
input:focus { border-color:#28785e; box-shadow:0 0 0 3px rgba(40,120,94,.12); }
.primary,.secondary { width:100%; padding:14px 18px; border-radius:11px; font-weight:800; cursor:pointer; }
.primary { margin-top:10px; border:1px solid var(--forest); background:var(--forest); color:white; }.primary:hover { background:var(--forest-2); }
.link-button { display:block; text-align:center; text-decoration:none; }.error { min-height:20px; color:#a63b32; font-size:.84rem; }.terms { margin:22px 0 0; color:#8a938f; font-size:.76rem; line-height:1.5; text-align:center; }

/* Aplicación conversacional */
.chat-app { height:100dvh; overflow:hidden; display:grid; grid-template-columns:260px minmax(0,1fr); grid-template-rows:68px minmax(0,1fr); background:#f7f6f1; transition:grid-template-columns .2s ease; }
.dashboard-loader { position:fixed; z-index:100; inset:0; display:grid; place-items:center; padding:24px; background:rgba(244,241,233,.96); backdrop-filter:blur(5px); }.dashboard-loader-card { min-width:min(330px,100%); display:grid; justify-items:center; gap:11px; padding:30px 26px; border:1px solid rgba(20,33,29,.09); border-radius:20px; background:var(--white); box-shadow:0 24px 70px rgba(23,60,50,.13); text-align:center; }.loader-brand { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:var(--forest); color:var(--mint); font-weight:900; }.loader-spinner { width:28px; height:28px; margin:3px 0; border:3px solid #dce8e2; border-top-color:#28785e; border-radius:50%; animation:triama-spin .8s linear infinite; }.dashboard-loader-card strong { color:var(--ink); font-size:1rem; }.dashboard-loader-card p { margin:0; color:var(--muted); font-size:.8rem; }@keyframes triama-spin { to { transform:rotate(360deg); } }@media (prefers-reduced-motion:reduce) { .loader-spinner { animation-duration:1.8s; } }
.chat-app.sidebar-collapsed { grid-template-columns:72px minmax(0,1fr); }
.app-header { z-index:20; grid-column:1/-1; display:grid; grid-template-columns:auto 210px minmax(0,1fr); align-items:center; gap:10px; min-width:0; padding:0 22px 0 14px; background:var(--forest); color:#fff; box-shadow:0 2px 12px rgba(20,33,29,.16); }
.app-brand { font-size:.92rem; }.app-brand .brand-mark { width:32px; height:32px; }
.workspace-switcher { justify-self:center; min-width:0; display:flex; align-items:baseline; gap:8px; padding:8px 13px; border:1px solid rgba(255,255,255,.14); border-radius:10px; background:rgba(255,255,255,.06); color:white; cursor:pointer; }
.workspace-switcher span { color:#bcd0c8; font-size:.72rem; }.workspace-switcher strong { max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.83rem; }
.menu-toggle { display:none; border:0; background:transparent; color:white; font-size:1.4rem; cursor:pointer; }
.sidebar-collapse-button { width:34px; height:34px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.15); border-radius:9px; background:rgba(255,255,255,.06); color:white; font-size:1.35rem; cursor:pointer; }
.app-sidebar { min-height:0; display:flex; flex-direction:column; padding:16px 12px; background:#fbfaf6; border-right:1px solid var(--line); }
.new-chat-button { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; padding:12px; border:0; border-radius:11px; background:var(--forest); color:white; font-weight:800; cursor:pointer; }.new-chat-button:hover { background:var(--forest-2); }
.app-sidebar nav { display:grid; gap:5px; margin-top:14px; }.nav-item { width:100%; display:flex; align-items:center; gap:11px; padding:11px 12px; border:0; border-radius:9px; background:transparent; color:#42514c; text-align:left; cursor:pointer; font-weight:700; }.nav-item span { width:19px; color:#28785e; text-align:center; }.nav-item.active { background:#e5f2ec; color:#176246; }.nav-item.logout { color:#8f3e37; }
.sidebar-divider { height:1px; margin:14px 4px; background:var(--line); }.sidebar-label { margin:0 8px 8px; color:#89938f; font-size:.68rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.recent-chats { min-height:0; overflow:auto; }.recent-chat { width:100%; display:grid; gap:3px; padding:11px 12px; border:0; border-radius:9px; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }.recent-chat.active { background:#f0f0eb; }.recent-chat strong { font-size:.83rem; }.recent-chat small { color:var(--muted); font-size:.72rem; }
.sidebar-bottom { position:relative; display:grid; gap:8px; margin-top:auto; padding-top:14px; border-top:1px solid var(--line); }.account-button { width:100%; min-width:0; display:flex; align-items:center; gap:10px; padding:10px 11px; border:0; border-radius:9px; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }.account-button:hover,.account-button[aria-expanded="true"] { background:#eef0ec; }.account-button strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.86rem; }.account-icon { width:20px; flex:none; color:#28785e; font-size:1.15rem; text-align:center; }.account-chevron { margin-left:auto; color:var(--muted); transition:transform .15s ease; }.account-button[aria-expanded="true"] .account-chevron { transform:rotate(180deg); }
.account-menu { position:absolute; z-index:50; left:0; right:0; bottom:52px; padding:7px; border:1px solid var(--line); border-radius:12px; background:white; box-shadow:0 14px 36px rgba(20,33,29,.16); }.account-menu button { width:100%; display:flex; align-items:center; gap:10px; padding:10px; border:0; border-radius:8px; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }.account-menu button:hover:not(:disabled) { background:#f0f3ef; }.account-menu button:disabled { cursor:default; opacity:.62; }.account-menu button>span:last-child { display:flex; align-items:center; justify-content:space-between; width:100%; gap:8px; }.account-menu small { color:#929b97; font-size:.62rem; }.account-menu>div { height:1px; margin:5px; background:var(--line); }.account-menu .logout { color:#8f3e37; }
.sidebar-collapsed .new-chat-button { height:44px; padding:0; font-size:0; }.sidebar-collapsed .new-chat-button span { font-size:1.2rem; }.sidebar-collapsed .nav-item { justify-content:center; padding-inline:0; font-size:0; }.sidebar-collapsed .nav-item span { font-size:1rem; }.sidebar-collapsed .sidebar-divider,.sidebar-collapsed .sidebar-label,.sidebar-collapsed .recent-chats { display:none; }.sidebar-collapsed .account-button { justify-content:center; padding-inline:0; }.sidebar-collapsed .account-button strong,.sidebar-collapsed .account-chevron { display:none; }.sidebar-collapsed .account-menu { left:56px; right:auto; bottom:0; width:210px; }.sidebar-collapsed .app-sidebar { padding-inline:9px; }
.recent-chats-empty { margin:8px 10px; color:var(--muted); font-size:.75rem; line-height:1.45; }
.sidebar-backdrop { display:none; }

.chat-view { min-width:0; min-height:0; display:grid; grid-template-rows:64px minmax(0,1fr) auto; background:#edf2ee; position:relative; }
.chat-view::before { content:""; position:absolute; inset:64px 0 0; opacity:.35; background-image:radial-gradient(circle at 20px 20px,rgba(23,60,50,.06) 1px,transparent 1px); background-size:34px 34px; pointer-events:none; }
.chat-header { z-index:1; display:flex; align-items:center; gap:11px; padding:0 24px; border-bottom:1px solid var(--line); background:rgba(255,254,250,.96); }.assistant-avatar { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background:var(--forest); color:var(--mint); font-weight:900; }.chat-header>div:nth-child(2) { display:grid; gap:2px; }.chat-header strong { font-size:.9rem; }.chat-header span { color:var(--muted); font-size:.72rem; }.online-dot { width:8px; height:8px; margin-left:auto; border-radius:50%; background:#2daa74; }
.message-stream { z-index:1; min-height:0; overflow:auto; padding:22px clamp(18px,6vw,80px) 28px; scroll-behavior:smooth; }.day-separator { display:flex; justify-content:center; margin-bottom:18px; }.day-separator span { padding:5px 10px; border-radius:999px; background:rgba(255,255,255,.82); color:var(--muted); font-size:.7rem; box-shadow:0 2px 8px rgba(20,33,29,.05); }
.message { position:relative; width:fit-content; max-width:min(620px,82%); margin-bottom:12px; padding:11px 14px 20px; border-radius:6px 15px 15px 15px; background:#fff; box-shadow:0 2px 7px rgba(20,33,29,.08); line-height:1.5; }.message p { margin:3px 0 8px; }.message-author { color:#28785e; font-size:.72rem; font-weight:850; }.message time { position:absolute; right:10px; bottom:5px; color:#929b97; font-size:.62rem; }.user-message { min-width:76px; margin-left:auto; padding-bottom:10px; border-radius:15px 6px 15px 15px; background:#d9f3e5; }.user-message .message-author { display:none; }.user-message p { margin-bottom:2px; overflow-wrap:anywhere; }.user-message time { position:static; display:block; width:max-content; min-width:100%; margin-top:4px; text-align:right; line-height:1.2; }
.purchase-summary { width:min(620px,82%); margin:0 0 14px; padding:17px; border:1px solid #79bfa0; border-radius:14px; background:#fff; box-shadow:0 4px 16px rgba(20,33,29,.08); }.purchase-summary>strong { display:block; margin-bottom:12px; color:var(--forest); }.purchase-summary dl { display:grid; gap:7px; margin:0; }.purchase-summary dl>div { display:flex; justify-content:space-between; gap:20px; padding-bottom:7px; border-bottom:1px solid #edf0ec; }.purchase-summary dt { color:var(--muted); font-size:.78rem; }.purchase-summary dd { margin:0; font-size:.82rem; font-weight:750; text-align:right; }.purchase-summary .summary-total { padding-top:4px; border:0; }.purchase-summary .summary-total dt,.purchase-summary .summary-total dd { color:var(--forest); font-size:.95rem; font-weight:900; }.purchase-summary>p { margin:12px 0; color:#7b8581; font-size:.72rem; }.summary-actions { display:flex; justify-content:flex-end; gap:8px; }.summary-actions button { padding:9px 12px; border-radius:9px; cursor:pointer; font-size:.78rem; font-weight:800; }.summary-actions .secondary { border:1px solid var(--line); background:white; color:var(--ink); }.summary-actions .primary { border:1px solid var(--forest); background:var(--forest); color:white; }.summary-actions button:disabled,.quick-action:disabled,.send-button:disabled { cursor:wait; opacity:.55; }
.purchase-summary.registered { border-color:#4da77d; background:#fbfffc; }.purchase-summary .registered-status { margin:14px 0 0; padding:11px 12px; border-radius:10px; background:#dff5e9; color:#176246; font-size:.8rem; font-weight:850; }
.quick-actions { max-width:760px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:18px 0 0; }.quick-action { display:grid; grid-template-columns:30px 1fr; gap:2px 9px; padding:13px; border:1px solid rgba(23,60,50,.14); border-radius:13px; background:rgba(255,255,255,.9); color:var(--ink); text-align:left; cursor:pointer; box-shadow:0 3px 12px rgba(20,33,29,.04); }.quick-action:hover { border-color:#61ae8d; transform:translateY(-1px); }.quick-action>span { grid-row:1/3; width:28px; height:28px; display:grid; place-items:center; border-radius:9px; background:#e4f4ec; color:#176246; font-weight:900; }.quick-action strong { font-size:.79rem; }.quick-action small { color:var(--muted); font-size:.68rem; line-height:1.35; }
.composer { z-index:2; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:end; gap:8px; padding:12px clamp(14px,5vw,70px) max(12px,env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:#fbfaf6; }.composer textarea { max-height:120px; resize:none; padding:12px 14px; border:1px solid var(--line); border-radius:21px; background:#fff; color:var(--ink); outline:none; line-height:1.35; }.composer textarea:focus { border-color:#61ae8d; }.attach-button,.send-button { width:42px; height:42px; display:grid; place-items:center; border:0; border-radius:50%; cursor:pointer; }.attach-button { background:#eceeea; color:#54615c; font-size:1.25rem; }.send-button { background:var(--forest); color:white; }.composer>p { grid-column:1/-1; margin:1px 0 0; color:#89938f; font-size:.64rem; text-align:center; }

/* Vinculaciones */
.connections-view { min-width:0; min-height:0; overflow:auto; padding:clamp(28px,5vw,58px); background:#f6f4ee; }.settings-heading,.settings-grid { max-width:1120px; margin-inline:auto; }.settings-grid { display:grid; grid-template-columns:minmax(300px,.8fr) minmax(420px,1.2fr); align-items:start; gap:22px; }.panel { padding:26px; border:1px solid rgba(20,33,29,.1); border-radius:18px; background:var(--white); box-shadow:0 10px 34px rgba(23,60,50,.055); }.panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }.panel h3 { margin:0; font-size:1.35rem; }.status-pill { padding:7px 10px; border-radius:999px; background:#f0f1ee; color:var(--muted); font-size:.75rem; font-weight:850; }.status-pill.connected { background:#dff5e9; color:#176246; }.empty-state { display:flex; gap:16px; margin:24px 0 12px; padding:18px; border:1px solid var(--line); border-radius:14px; background:#f7f8f4; }.empty-state p { margin:5px 0 0; color:var(--muted); font-size:.88rem; line-height:1.5; }.empty-state.connected { border-color:#7bc7a5; background:#edf9f3; }.step-number { color:#28785e; font-weight:900; }.refresh-button { padding:8px 11px; border:1px solid var(--line); border-radius:9px; background:transparent; cursor:pointer; font-size:.78rem; font-weight:750; }.workspace-feedback { margin:16px 0; color:var(--muted); font-size:.84rem; }.workspace-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }.workspace-option { width:100%; min-width:0; display:flex; align-items:center; justify-content:space-between; gap:13px; padding:15px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); text-align:left; cursor:pointer; }.workspace-option.selected { border-color:#28785e; background:#edf9f3; }.workspace-option>span:first-child { min-width:0; display:grid; gap:4px; }.workspace-option strong { overflow:hidden; text-overflow:ellipsis; }.workspace-option small { color:var(--muted); }.workspace-choice { color:#28785e; font-size:.75rem; font-weight:850; white-space:nowrap; }

@media (max-width:900px) { .settings-grid { grid-template-columns:1fr; }.workspace-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:720px) {
  .shell { grid-template-columns:1fr; }.intro { min-height:46vh; padding:28px 24px 36px; gap:48px; }.intro h1 { font-size:clamp(3.1rem,15vw,5rem); }.security-note { display:none; }.account-panel { padding:20px 15px 34px; }.card { padding:30px 23px; border-radius:19px; }
  .chat-app,.chat-app.sidebar-collapsed { grid-template-columns:1fr; grid-template-rows:60px minmax(0,1fr); }.app-header { grid-template-columns:auto 1fr auto; height:60px; padding:0 12px; }.menu-toggle { display:block; }.sidebar-collapse-button { display:none; }.app-brand { justify-self:center; }.app-brand .brand-mark { width:30px; height:30px; }.workspace-switcher { grid-column:1/-1; position:absolute; left:50%; top:60px; transform:translateX(-50%); z-index:5; max-width:86%; padding:5px 10px; border-radius:0 0 10px 10px; background:var(--forest); }.workspace-switcher span { display:none; }.workspace-switcher strong { max-width:70vw; }
  .app-sidebar,.sidebar-collapsed .app-sidebar { position:fixed; z-index:40; top:60px; bottom:0; left:0; width:min(86vw,310px); padding:16px 12px; transform:translateX(-105%); transition:transform .2s ease; box-shadow:12px 0 30px rgba(20,33,29,.18); }.app-sidebar.open { transform:translateX(0); }.sidebar-backdrop:not(.hidden) { position:fixed; z-index:30; inset:60px 0 0; display:block; border:0; background:rgba(20,33,29,.38); }.sidebar-collapsed .new-chat-button { height:auto; padding:12px; font-size:inherit; }.sidebar-collapsed .new-chat-button span { font-size:inherit; }.sidebar-collapsed .nav-item { justify-content:flex-start; padding:11px 12px; font-size:inherit; }.sidebar-collapsed .nav-item span { font-size:inherit; }.sidebar-collapsed .sidebar-divider,.sidebar-collapsed .sidebar-label,.sidebar-collapsed .recent-chats { display:block; }.sidebar-collapsed .sidebar-divider { display:block; }.sidebar-collapsed .account-button { justify-content:flex-start; padding:10px 11px; }.sidebar-collapsed .account-button strong,.sidebar-collapsed .account-chevron { display:block; }.sidebar-collapsed .account-menu { left:0; right:0; bottom:52px; width:auto; }
  .chat-view { grid-column:1; grid-row:2; grid-template-rows:58px minmax(0,1fr) auto; padding-top:25px; }.chat-header { padding:0 15px; }.message-stream { padding:15px 11px 20px; }.message,.purchase-summary { max-width:88%; font-size:.92rem; }.quick-actions { grid-template-columns:1fr; gap:7px; }.composer { padding:9px 9px max(9px,env(safe-area-inset-bottom)); }.composer>p { display:none; }.attach-button,.send-button { width:40px; height:40px; }
  .connections-view { grid-column:1; grid-row:2; padding:48px 15px 30px; }.workspace-list { grid-template-columns:1fr; }.panel { padding:20px; }
}

.account-view{min-width:0;min-height:0;overflow:auto;padding:clamp(28px,5vw,58px);background:#f6f4ee}.account-page-heading,.account-panel-view{max-width:920px;margin-inline:auto}.account-page-heading{margin-bottom:22px}.account-page-heading h2{margin:4px 0 6px;font-size:2rem}.profile-form{display:grid;grid-template-columns:220px 1fr;gap:30px}.profile-photo-column{display:flex;flex-direction:column;align-items:center;gap:11px;padding-right:28px;border-right:1px solid var(--line)}.profile-avatar{width:106px;height:106px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:var(--forest);color:white;font-size:2rem;font-weight:900}.profile-avatar img,.account-icon img,.brand-preview img,.favicon-preview img{width:100%;height:100%;object-fit:cover}.account-icon{overflow:hidden}.secondary-upload{display:inline-flex;align-items:center;justify-content:center;width:max-content;padding:9px 13px;border:1px solid #b9ccc4;border-radius:9px;background:#edf6f2;color:var(--forest);cursor:pointer;font-size:.78rem;font-weight:800}.secondary-upload input{display:none}.profile-photo-column small,.brand-asset-row small,.preference-row small{display:block;color:var(--muted);font-size:.72rem}.profile-fields{display:grid;grid-template-columns:1fr 1fr;gap:17px}.profile-fields label{display:grid;gap:6px;font-size:.76rem;font-weight:800}.profile-fields input{min-height:43px;padding:9px 11px;border:1px solid #cad5d0;border-radius:9px;font:inherit}.account-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:9px;margin-top:12px}.secondary-action,.account-save{padding:10px 15px;border-radius:9px;font-size:.8rem;font-weight:800;cursor:pointer}.secondary-action{border:1px solid var(--line);background:white;color:var(--ink)}.account-save{border:0}.account-panel-view h3{margin:5px 0 14px}.preference-row{display:grid;grid-template-columns:1fr auto;align-items:center;padding:17px 0;border-bottom:1px solid var(--line);cursor:pointer}.preference-row input{width:20px;height:20px;accent-color:#28785e}.credits-card{display:grid;grid-template-columns:180px 1fr;align-items:center;gap:20px;padding:17px;border-radius:12px;background:#f2f7f4}.credits-card span{display:grid}.credits-card span strong{font-size:1.7rem}.credits-card>div{height:8px;overflow:hidden;border-radius:9px;background:#d8e4df}.credits-card i{display:block;width:84%;height:100%;background:#28785e}.admin-notice{display:grid;gap:3px;margin:-5px -5px 22px;padding:14px 16px;border:1px solid #bcdccc;border-radius:11px;background:#e9f6ef;color:var(--forest)}.brand-asset-row{display:grid;grid-template-columns:98px 1fr;align-items:center;gap:19px;padding:20px 0;border-bottom:1px solid var(--line)}.brand-asset-row>span{display:grid;gap:5px}.brand-preview,.favicon-preview{display:grid;place-items:center;overflow:hidden;background:var(--forest);color:#fff;font-weight:900}.brand-preview{width:96px;height:64px;border-radius:11px}.favicon-preview{width:50px;height:50px;margin-left:22px;border-radius:10px}.chat-processing-indicator{width:min(680px,88%);display:flex;align-items:center;gap:12px;margin:0 0 16px;padding:13px 15px;border:1px solid #b8d9cd;border-radius:13px;background:#f8fbf9}.thinking-brand{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#28785e;color:#fff;font-weight:900}.chat-processing-indicator>span:nth-child(2){display:grid}.chat-processing-indicator small{color:var(--muted);font-size:.72rem}.thinking-dots{display:flex;gap:5px;margin-left:auto}.thinking-dots i{width:7px;height:7px;border-radius:50%;background:#28785e;animation:thinkingDot 1.15s infinite}.thinking-dots i:nth-child(2){animation-delay:.15s}.thinking-dots i:nth-child(3){animation-delay:.3s}@keyframes thinkingDot{0%,60%,100%{transform:translateY(0);opacity:.35}30%{transform:translateY(-6px);opacity:1}}@media(max-width:760px){.profile-form{grid-template-columns:1fr}.profile-photo-column{border-right:0;border-bottom:1px solid var(--line);padding:0 0 22px}.profile-fields{grid-template-columns:1fr}.brand-asset-row{grid-template-columns:76px 1fr}}

.quick-actions + .message { margin-top:28px; }
@media(max-width:720px){.quick-actions + .message{margin-top:22px}}

/* Refinamiento visual integral aprobado */
:root {
  --chat:#edf2ee;
  --surface:#fffefa;
  --surface-muted:#f7f8f5;
  --line-soft:#e2e6e1;
  --shadow-soft:0 8px 28px rgba(20,33,29,.07);
  --shadow-card:0 4px 16px rgba(20,33,29,.08);
}
.chat-app {
  grid-template-columns:300px minmax(0,1fr);
  grid-template-rows:72px minmax(0,1fr);
  background:var(--chat);
}
.chat-app.sidebar-collapsed { grid-template-columns:74px minmax(0,1fr); }
.app-header {
  position:relative;
  grid-template-columns:auto auto minmax(0,1fr);
  gap:14px;
  min-height:72px;
  padding:0 24px 0 16px;
  background:#0b4b3b;
  box-shadow:0 3px 16px rgba(7,45,35,.18);
}
.app-brand { font-size:1rem; letter-spacing:.14em; }
.app-brand .brand-mark {
  width:42px;
  height:42px;
  border-color:rgba(185,247,211,.7);
  border-radius:12px;
  background:rgba(255,255,255,.035);
  font-size:1.1rem;
}
.sidebar-collapse-button {
  width:42px;
  height:42px;
  border-color:rgba(255,255,255,.18);
  border-radius:11px;
  background:rgba(255,255,255,.035);
}
.sidebar-collapse-button:hover { background:rgba(255,255,255,.09); }
.workspace-switcher {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  min-height:44px;
  padding:10px 16px;
  border-color:rgba(255,255,255,.24);
  border-radius:12px;
  background:rgba(255,255,255,.055);
  box-shadow:inset 0 1px rgba(255,255,255,.04);
}
.workspace-switcher:hover { background:rgba(255,255,255,.1); }
.workspace-switcher span { color:#d0ded8; font-size:.75rem; }
.workspace-switcher strong { font-size:.88rem; }

.app-sidebar {
  position:relative;
  padding:20px 18px 0;
  border-right:1px solid var(--line-soft);
  background:#fffefa;
}
.new-chat-button {
  min-height:50px;
  border-radius:12px;
  background:#07533f;
  box-shadow:0 5px 14px rgba(7,83,63,.14);
  font-family:"Segoe UI",Inter,ui-sans-serif,system-ui,sans-serif;
  font-size:.88rem;
  font-weight:700;
  letter-spacing:-.01em;
}
.new-chat-button img { width:18px; height:18px; flex:none; }
.new-chat-button:hover { background:#0b624b; transform:translateY(-1px); }
.app-sidebar nav { gap:7px; margin-top:18px; }
.nav-item {
  min-height:48px;
  gap:12px;
  padding:12px 14px;
  border-radius:12px;
  font-size:.88rem;
}
.nav-item .nav-icon { width:20px; height:20px; flex:none; }
.nav-item span { width:auto; color:inherit; text-align:left; }
.nav-item:hover { background:#f1f5f2; }
.nav-item.active {
  background:#e5f3ed;
  color:#0b5b43;
}
.sidebar-divider { margin:18px 3px; background:var(--line-soft); }
.sidebar-label {
  margin:0 6px 10px;
  color:#78827e;
  font-size:.67rem;
  letter-spacing:.09em;
}
.recent-chats {
  flex:1 1 auto;
  padding-bottom:18px;
  scrollbar-width:thin;
  scrollbar-color:#ced5d1 transparent;
}
.recent-chat {
  gap:4px;
  padding:12px 14px;
  border-radius:11px;
}
.recent-chat:hover { background:#f5f6f3; }
.recent-chat.active {
  background:#f0f1ed;
  box-shadow:inset 3px 0 #2d8266;
}
.recent-chat strong { font-size:.84rem; }
.recent-chat small { font-size:.7rem; }

.sidebar-bottom {
  position:relative;
  z-index:3;
  flex:0 0 auto;
  display:block;
  margin:auto -18px 0;
  padding:8px 14px 10px;
  border-top:1px solid var(--line-soft);
  background:#fffefa;
  box-shadow:0 -5px 16px rgba(20,33,29,.035);
}
.account-button {
  min-height:42px;
  gap:11px;
  padding:4px 6px;
  border-radius:11px;
}
.account-button:hover,.account-button[aria-expanded="true"] { background:#f1f4f1; }
.account-button strong {
  text-transform:capitalize;
  font-size:.88rem;
  font-weight:760;
}
.account-icon {
  width:34px;
  height:34px;
  flex:none;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#07533f;
  color:white;
  font-size:.9rem;
  font-weight:850;
  text-transform:uppercase;
}
.account-menu { left:18px; right:18px; bottom:58px; }
.sidebar-collapsed .app-sidebar { padding:16px 10px 0; }
.sidebar-collapsed .new-chat-button { width:44px; height:44px; min-height:44px; margin-inline:auto; padding:0; }
.sidebar-collapsed .new-chat-button img { width:20px; height:20px; }
.sidebar-collapsed .new-chat-button span { display:none; }
.sidebar-collapsed .nav-item { width:44px; min-height:44px; justify-content:center; margin-inline:auto; padding:0; }
.sidebar-collapsed .nav-item .nav-icon { width:21px; height:21px; }
.sidebar-collapsed .nav-item span { display:none; }
.sidebar-collapsed .sidebar-bottom { margin-inline:-10px; padding:8px 15px 10px; }
.sidebar-collapsed .account-button { width:44px; min-height:44px; justify-content:center; margin-inline:auto; padding:0; }
.sidebar-collapsed .account-icon { width:34px; height:34px; }
.sidebar-collapsed .account-menu { left:64px; bottom:8px; }

.chat-view {
  grid-template-rows:74px minmax(0,1fr) auto;
  background:var(--chat);
}
.chat-view::before { display:none; }
.chat-header {
  min-height:74px;
  gap:14px;
  padding:0 clamp(22px,3vw,36px);
  border-bottom:1px solid var(--line-soft);
  background:rgba(255,254,250,.98);
  box-shadow:0 1px 4px rgba(20,33,29,.025);
}
.assistant-avatar {
  width:44px;
  height:44px;
  border-radius:13px;
  background:#07533f;
  font-size:1rem;
}
.chat-header>div:nth-child(2) { gap:3px; }
.chat-header strong { font-size:.94rem; }
.chat-header span { font-size:.74rem; }
.online-dot {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid var(--line-soft);
  border-radius:11px;
  background:#fff;
  box-shadow:0 2px 8px rgba(20,33,29,.035);
}
.online-dot::after {
  content:"";
  width:9px;
  height:9px;
  border-radius:50%;
  background:#25a66f;
}

.message-stream {
  padding:26px clamp(28px,7vw,104px) 34px;
  background:#edf2ee;
}
.day-separator { margin-bottom:22px; }
.day-separator span {
  padding:6px 12px;
  border:1px solid rgba(23,60,50,.08);
  background:rgba(255,255,255,.72);
  box-shadow:0 2px 9px rgba(20,33,29,.035);
}
.message {
  max-width:min(680px,82%);
  margin-bottom:16px;
  padding:17px 22px 28px;
  border:1px solid rgba(23,60,50,.075);
  border-radius:7px 18px 18px 18px;
  background:#fff;
  box-shadow:var(--shadow-card);
  line-height:1.55;
}
.message p { margin:4px 0 10px; }
.message p { white-space:pre-line; }
.message-author {
  margin-bottom:6px;
  color:#187653;
  font-size:.73rem;
  letter-spacing:.01em;
}
.message time { right:15px; bottom:9px; font-size:.64rem; }
.user-message {
  min-width:88px;
  max-width:min(560px,76%);
  padding:12px 15px 10px;
  border-color:rgba(24,118,83,.08);
  border-radius:18px 7px 18px 18px;
  background:#dff4e9;
}
.user-message p { margin:0; }
.user-message time { margin-top:5px; font-size:.62rem; }
.purchase-summary {
  width:min(680px,82%);
  padding:22px;
  border-color:#75bfa1;
  border-radius:17px;
  box-shadow:var(--shadow-soft);
}
.purchase-summary>strong { font-size:1rem; }
.quick-actions {
  width:100%;
  max-width:1000px;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin:26px 0 0;
}
.quick-action {
  grid-template-columns:42px minmax(0,1fr);
  gap:3px 12px;
  min-height:94px;
  padding:18px;
  border-color:rgba(23,60,50,.11);
  border-radius:16px;
  background:rgba(255,255,255,.96);
  box-shadow:0 5px 18px rgba(20,33,29,.055);
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.quick-action:hover {
  border-color:#67ad91;
  box-shadow:0 8px 24px rgba(20,33,29,.09);
}
.quick-action>span {
  width:42px;
  height:42px;
  border-radius:13px;
  background:#e6f3ed;
  font-size:1.05rem;
}
.quick-action strong { align-self:end; font-size:.84rem; }
.quick-action small { align-self:start; font-size:.7rem; }

.composer {
  min-height:132px;
  grid-template-columns:48px minmax(0,1fr) 48px;
  align-content:center;
  gap:12px;
  padding:18px clamp(24px,5vw,72px) max(16px,env(safe-area-inset-bottom));
  border-top:1px solid var(--line-soft);
  background:#fffefa;
  box-shadow:0 -6px 24px rgba(20,33,29,.045);
}
.composer textarea {
  min-height:52px;
  max-height:132px;
  padding:15px 18px;
  border-color:#ccd4cf;
  border-radius:26px;
  background:#fff;
  box-shadow:inset 0 1px 2px rgba(20,33,29,.025);
}
.composer textarea:focus {
  border-color:#55a586;
  box-shadow:0 0 0 3px rgba(40,120,94,.1);
}
.attach-button,.send-button {
  width:48px;
  height:48px;
}
.attach-button {
  border:1px solid var(--line-soft);
  background:#f2f4f1;
  color:#176246;
}
.attach-button:hover { background:#e8efeb; }
.send-button {
  background:#07533f;
  box-shadow:0 5px 14px rgba(7,83,63,.18);
}
.send-button:hover { background:#0b624b; transform:translateY(-1px); }
.composer>p {
  margin:2px 0 0;
  color:#7d8783;
  font-size:.65rem;
}

@media (max-width:1050px) and (min-width:721px) {
  .chat-app { grid-template-columns:272px minmax(0,1fr); }
  .workspace-switcher { max-width:44vw; }
  .message-stream { padding-inline:38px; }
  .quick-actions { grid-template-columns:1fr; max-width:680px; }
  .quick-action { min-height:74px; }
}
@media (max-width:720px) {
  .chat-app,.chat-app.sidebar-collapsed {
    grid-template-columns:1fr;
    grid-template-rows:60px minmax(0,1fr);
  }
  .app-header { min-height:60px; padding:0 12px; }
  .app-brand .brand-mark { width:34px; height:34px; }
  .workspace-switcher {
    top:60px;
    transform:translateX(-50%);
    min-height:34px;
    max-width:86%;
    padding:6px 11px;
    border-radius:0 0 10px 10px;
  }
  .app-sidebar,.sidebar-collapsed .app-sidebar {
    top:60px;
    padding:16px 12px 0;
  }
  .sidebar-bottom,.sidebar-collapsed .sidebar-bottom {
    margin-inline:-12px;
    padding:12px 14px max(14px,env(safe-area-inset-bottom));
  }
  .account-menu,.sidebar-collapsed .account-menu {
    left:12px;
    right:12px;
    bottom:68px;
  }
  .sidebar-collapsed .new-chat-button { width:100%; height:auto; min-height:50px; justify-content:center; padding:12px; }
  .sidebar-collapsed .new-chat-button span { display:inline; }
  .sidebar-collapsed .nav-item { width:100%; min-height:48px; justify-content:flex-start; margin:0; padding:12px 14px; }
  .sidebar-collapsed .nav-item span { display:inline; }
  .chat-view {
    grid-template-rows:62px minmax(0,1fr) auto;
    padding-top:25px;
  }
  .chat-header { min-height:62px; padding:0 14px; }
  .assistant-avatar { width:38px; height:38px; }
  .online-dot { width:34px; height:34px; }
  .message-stream { padding:17px 12px 22px; }
  .message,.purchase-summary {
    max-width:90%;
    padding:14px 16px 26px;
  }
  .user-message {
    min-width:82px;
    max-width:82%;
    padding:11px 13px 9px;
  }
  .quick-actions { grid-template-columns:1fr; gap:8px; margin-top:18px; }
  .quick-action { min-height:72px; padding:13px; border-radius:14px; }
  .quick-action>span { width:38px; height:38px; }
  .composer {
    min-height:auto;
    grid-template-columns:42px minmax(0,1fr) 42px;
    gap:7px;
    padding:9px 9px max(9px,env(safe-area-inset-bottom));
  }
  .composer textarea { min-height:42px; padding:11px 13px; }
  .attach-button,.send-button { width:42px; height:42px; }
}
/* Gestión e historial de conversaciones */
.sidebar-label-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:0 3px 8px 6px;
}
.sidebar-label-row .sidebar-label { margin:0; }
.conversation-search-toggle {
  width:30px;
  height:30px;
  flex:none;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  cursor:pointer;
}
.conversation-search-toggle:hover,.conversation-search-toggle[aria-expanded="true"] { background:#edf3ef; }
.conversation-search-toggle img { width:16px; height:16px; }
.conversation-search-panel {
  position:relative;
  margin:0 3px 10px;
}
.conversation-search-panel>img {
  position:absolute;
  z-index:1;
  left:12px;
  top:50%;
  width:16px;
  height:16px;
  transform:translateY(-50%);
  opacity:.7;
  pointer-events:none;
}
.conversation-search-panel input {
  height:40px;
  padding:9px 12px 9px 36px;
  border-color:#d7ded9;
  border-radius:10px;
  background:#fff;
  font-size:.78rem;
}
.recent-chat-row { position:relative; }
.recent-chat-row .recent-chat { padding-right:76px; }
.recent-chat-row .recent-chat strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.recent-chat-actions {
  position:absolute;
  top:50%;
  right:7px;
  display:flex;
  gap:2px;
  opacity:0;
  transform:translateY(-50%);
  pointer-events:none;
  transition:opacity .14s ease;
}
.recent-chat-row:hover .recent-chat-actions,.recent-chat-row:focus-within .recent-chat-actions {
  opacity:1;
  pointer-events:auto;
}
.recent-chat-actions button {
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:8px;
  background:#fff;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(20,33,29,.09);
}
.recent-chat-actions button:hover { background:#eaf3ee; }
.recent-chat-actions .delete-conversation:hover { background:#faecea; }
.recent-chat-actions img { width:16px; height:16px; }
.account-live {
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  margin-left:auto;
  border:1px solid #dfe7e2;
  border-radius:8px;
  background:#fff;
}
.account-live>span {
  width:8px;
  height:8px;
  border-radius:50%;
  background:#25a66f;
  animation:triama-pulse 1.8s ease-out infinite;
}
@keyframes triama-pulse {
  0% { box-shadow:0 0 0 0 rgba(37,166,111,.42); }
  70%,100% { box-shadow:0 0 0 7px rgba(37,166,111,0); }
}
.sidebar-collapsed .sidebar-label-row,.sidebar-collapsed .conversation-search-panel { display:none; }
.sidebar-collapsed .account-button { position:relative; }
.sidebar-collapsed .account-live {
  position:absolute;
  right:2px;
  bottom:2px;
  width:13px;
  height:13px;
  border-radius:50%;
}
.sidebar-collapsed .account-live>span { width:6px; height:6px; }

/* Adjuntos conservados dentro del chat */
.attachment-preview,.attachment-file {
  width:min(360px,72vw);
  display:grid;
  padding:0;
  overflow:hidden;
  border:1px solid rgba(23,60,50,.12);
  border-radius:13px;
  background:#fff;
  color:var(--ink);
  text-align:left;
  cursor:zoom-in;
}
.attachment-preview>img {
  width:100%;
  max-height:260px;
  display:block;
  object-fit:cover;
  background:#f0f2ef;
}
.attachment-preview>span,.attachment-file>span { min-width:0; display:grid; gap:2px; }
.attachment-preview>span { padding:10px 12px; }
.attachment-preview strong,.attachment-file strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.78rem;
}
.attachment-preview small,.attachment-file small { color:var(--muted); font-size:.68rem; }
.attachment-file {
  grid-template-columns:42px minmax(0,1fr);
  align-items:center;
  gap:12px;
  padding:12px;
}
.attachment-file>img { width:32px; height:32px; }
.user-message:has(.attachment-preview),.user-message:has(.attachment-file) { padding:10px; }
.user-message:has(.attachment-preview)>p,.user-message:has(.attachment-file)>p { padding:0 3px 7px; }

.attachment-dialog,.confirm-dialog {
  padding:0;
  border:1px solid rgba(20,33,29,.13);
  background:#fffefa;
  box-shadow:0 28px 90px rgba(20,33,29,.3);
}
.attachment-dialog::backdrop,.confirm-dialog::backdrop { background:rgba(10,26,21,.68); backdrop-filter:blur(3px); }
.attachment-dialog { width:min(1100px,94vw); height:min(850px,92vh); border-radius:18px; }
.attachment-dialog-shell { height:100%; display:grid; grid-template-rows:auto minmax(0,1fr); }
.attachment-dialog header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-bottom:1px solid var(--line-soft);
}
.attachment-dialog header>div:first-child { min-width:0; display:grid; gap:3px; }
.attachment-dialog header strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.9rem; }
.attachment-dialog header small { color:var(--muted); font-size:.7rem; }
.attachment-dialog-actions { display:flex; align-items:center; gap:8px; }
.attachment-dialog-actions a,.attachment-dialog-actions button {
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:8px 11px;
  border:1px solid var(--line-soft);
  border-radius:10px;
  background:#fff;
  color:var(--forest);
  text-decoration:none;
  cursor:pointer;
  font-size:.76rem;
  font-weight:750;
}
.attachment-dialog-actions button { width:38px; padding:0; }
.attachment-dialog-actions img { width:18px; height:18px; }
.attachment-dialog-content { min-height:0; display:grid; place-items:center; padding:18px; overflow:auto; background:#edf2ee; }
.attachment-dialog-content img { max-width:100%; max-height:100%; object-fit:contain; border-radius:9px; box-shadow:var(--shadow-card); }
.attachment-dialog-content iframe { width:100%; height:100%; border:0; border-radius:9px; background:white; }
.confirm-dialog { width:min(430px,calc(100vw - 30px)); border-radius:17px; }
.confirm-dialog form { padding:24px; }
.confirm-dialog h3 { margin:0 0 10px; color:var(--forest); font-size:1.08rem; }
.confirm-dialog p { margin:0; color:var(--muted); font-size:.85rem; line-height:1.55; }
.confirm-dialog form>div { display:flex; justify-content:flex-end; gap:9px; margin-top:22px; }
.confirm-dialog button { padding:10px 14px; border-radius:10px; cursor:pointer; font-size:.8rem; font-weight:800; }
.dialog-cancel { border:1px solid var(--line); background:#fff; color:var(--ink); }
.dialog-delete { border:1px solid #a3453d; background:#a3453d; color:white; }
.toast {
  position:fixed;
  z-index:120;
  right:22px;
  bottom:22px;
  padding:11px 15px;
  border-radius:11px;
  background:#173c32;
  color:white;
  box-shadow:0 12px 34px rgba(20,33,29,.22);
  font-size:.8rem;
  font-weight:750;
}

.chat-actions { display:flex; flex-wrap:wrap; gap:8px; width:min(680px,88%); margin:0 0 16px; }
.chat-actions button { min-height:42px; padding:9px 14px; border:1px solid #77b89c; border-radius:11px; background:#fff; color:var(--forest); font:inherit; font-size:.8rem; font-weight:800; text-align:left; cursor:pointer; }
.chat-actions button:hover,.chat-actions button:focus-visible { background:#e4f5ed; outline:2px solid transparent; }
.chat-actions button:disabled { cursor:wait; opacity:.55; }
.receipt-review { width:min(760px,90%); margin:0 0 16px; padding:18px; border:1px solid #79bfa0; border-radius:15px; background:#fff; box-shadow:0 5px 18px rgba(20,33,29,.09); }
.receipt-review>strong { display:block; margin-bottom:13px; color:var(--forest); font-size:1rem; }
.receipt-review h4 { margin:18px 0 9px; color:var(--ink); font-size:.86rem; }
.receipt-general,.receipt-totals { display:grid; gap:6px; }
.receipt-general>div,.receipt-totals>div { display:flex; justify-content:space-between; gap:18px; padding:6px 0; border-bottom:1px solid #edf0ec; }
.receipt-general span,.receipt-totals span { color:var(--muted); font-size:.76rem; }
.receipt-general b,.receipt-totals b { font-size:.8rem; text-align:right; }
.receipt-lines { display:grid; gap:8px; margin:0; padding-left:25px; }
.receipt-lines li { padding:9px 10px; border:1px solid #e1e7e3; border-radius:9px; background:#fbfcfb; }
.receipt-lines strong,.receipt-lines span { display:block; }
.receipt-lines strong { font-size:.8rem; }
.receipt-lines span { margin-top:3px; color:var(--muted); font-size:.72rem; }
.receipt-lines.editable li { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; }
.receipt-line-body { min-width:0; }
.receipt-line-amount { color:var(--forest); font-size:.98rem; white-space:nowrap; }
.receipt-line-edit { min-height:34px; padding:6px 11px; border:1px solid #77b89c; border-radius:9px; background:#fff; color:var(--forest); font:inherit; font-size:.74rem; font-weight:800; cursor:pointer; }
.receipt-line-form { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.receipt-line-form label { display:grid; gap:5px; color:var(--muted); font-size:.72rem; font-weight:750; }
.receipt-line-form .wide { grid-column:1/-1; }
.receipt-line-form input,.receipt-line-form select { width:100%; min-height:39px; padding:8px 10px; border:1px solid #ced8d2; border-radius:8px; background:#fff; color:var(--ink); font:inherit; }
.receipt-package-suggestion { margin:0; padding:9px 11px; border-radius:8px; background:#e4f5ed; color:var(--forest); font-size:.74rem; font-weight:750; }
.receipt-line-form-actions,.receipt-review-actions { display:flex; flex-wrap:wrap; gap:8px; }
.receipt-line-form-actions button,.receipt-review-actions button { min-height:40px; padding:8px 13px; border:1px solid #77b89c; border-radius:9px; background:#fff; color:var(--forest); font:inherit; font-size:.76rem; font-weight:800; cursor:pointer; }
.receipt-line-form-actions button:first-child,.receipt-review-actions .primary { background:var(--forest); color:#fff; }
.receipt-line-form-actions .danger { margin-left:auto; border-color:#b95a51; color:#9c3028; }
.receipt-totals { margin-top:15px; }
.receipt-totals>div:last-child { padding-top:11px; border:0; color:var(--forest); font-size:1.08rem; }
.receipt-totals>div:last-child b { font-size:1.15rem; }
.receipt-review>p { margin:14px 0 0; padding:10px 11px; border-radius:9px; background:#f3f5f3; color:#65706c; font-size:.72rem; }
.receipt-review>.receipt-error { background:#fff0ee; color:#9c3028; font-weight:750; }
.receipt-review-actions { justify-content:flex-end; margin-top:12px; }
.receipt-review-actions .primary { min-width:190px; }

@media (hover:none) {
  .recent-chat-row .recent-chat-actions { opacity:1; pointer-events:auto; }
}
@media (prefers-reduced-motion:reduce) {
  .account-live>span { animation:none; }
}
@media (max-width:720px) {
  .sidebar-collapsed .sidebar-label-row { display:flex; }
  .sidebar-collapsed .account-live { position:static; width:24px; height:24px; border-radius:8px; }
  .sidebar-collapsed .account-live>span { width:8px; height:8px; }
  .recent-chat-row .recent-chat-actions { opacity:1; pointer-events:auto; }
  .attachment-dialog { width:100vw; height:100dvh; max-width:none; max-height:none; border:0; border-radius:0; }
  .attachment-dialog-actions a span { display:none; }
  .attachment-dialog-content { padding:10px; }
  .toast { right:12px; bottom:12px; left:12px; text-align:center; }
  .receipt-review,.chat-actions { width:94%; max-width:94%; }
  .chat-actions { display:grid; grid-template-columns:1fr; }
  .receipt-general>div,.receipt-totals>div { align-items:flex-start; }
  .receipt-lines.editable li { grid-template-columns:minmax(0,1fr) auto; }
  .receipt-line-edit { grid-column:1/-1; width:100%; }
  .receipt-line-form { grid-template-columns:1fr; }
  .receipt-line-form .wide { grid-column:auto; }
  .receipt-line-form-actions,.receipt-review-actions { display:grid; grid-template-columns:1fr; }
  .receipt-line-form-actions .danger { margin-left:0; }
  .receipt-review-actions .primary { min-width:0; }
}

.account-view{min-width:0;min-height:0;overflow:auto;padding:clamp(28px,5vw,58px);background:#f6f4ee}.account-page-heading,.account-panel-view{max-width:920px;margin-inline:auto}.account-page-heading{margin-bottom:22px}.account-page-heading h2{margin:4px 0 6px;font-size:2rem}.profile-form{display:grid;grid-template-columns:220px 1fr;gap:30px}.profile-photo-column{display:flex;flex-direction:column;align-items:center;gap:11px;padding-right:28px;border-right:1px solid var(--line)}.profile-avatar{width:106px;height:106px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:var(--forest);color:white;font-size:2rem;font-weight:900}.profile-avatar img,.account-icon img,.brand-preview img,.favicon-preview img{width:100%;height:100%;object-fit:cover}.account-icon{overflow:hidden}.secondary-upload{display:inline-flex;align-items:center;justify-content:center;width:max-content;padding:9px 13px;border:1px solid #b9ccc4;border-radius:9px;background:#edf6f2;color:var(--forest);cursor:pointer;font-size:.78rem;font-weight:800}.secondary-upload input{display:none}.profile-photo-column small,.brand-asset-row small,.preference-row small{display:block;color:var(--muted);font-size:.72rem}.profile-fields{display:grid;grid-template-columns:1fr 1fr;gap:17px}.profile-fields label{display:grid;gap:6px;font-size:.76rem;font-weight:800}.profile-fields input{min-height:43px;padding:9px 11px;border:1px solid #cad5d0;border-radius:9px;font:inherit}.account-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:9px;margin-top:12px}.secondary-action,.account-save{padding:10px 15px;border-radius:9px;font-size:.8rem;font-weight:800;cursor:pointer}.secondary-action{border:1px solid var(--line);background:white;color:var(--ink)}.account-save{border:0}.account-panel-view h3{margin:5px 0 14px}.preference-row{display:grid;grid-template-columns:1fr auto;align-items:center;padding:17px 0;border-bottom:1px solid var(--line);cursor:pointer}.preference-row input{width:20px;height:20px;accent-color:#28785e}.credits-card{display:grid;grid-template-columns:180px 1fr;align-items:center;gap:20px;padding:17px;border-radius:12px;background:#f2f7f4}.credits-card span{display:grid}.credits-card span strong{font-size:1.7rem}.credits-card>div{height:8px;overflow:hidden;border-radius:9px;background:#d8e4df}.credits-card i{display:block;width:84%;height:100%;background:#28785e}.admin-notice{display:grid;gap:3px;margin:-5px -5px 22px;padding:14px 16px;border:1px solid #bcdccc;border-radius:11px;background:#e9f6ef;color:var(--forest)}.brand-asset-row{display:grid;grid-template-columns:98px 1fr;align-items:center;gap:19px;padding:20px 0;border-bottom:1px solid var(--line)}.brand-asset-row>span{display:grid;gap:5px}.brand-preview,.favicon-preview{display:grid;place-items:center;overflow:hidden;background:var(--forest);color:#fff;font-weight:900}.brand-preview{width:96px;height:64px;border-radius:11px}.favicon-preview{width:50px;height:50px;margin-left:22px;border-radius:10px}.chat-processing-indicator{width:min(680px,88%);display:flex;align-items:center;gap:12px;margin:0 0 16px;padding:13px 15px;border:1px solid #b8d9cd;border-radius:13px;background:#f8fbf9}.thinking-brand{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#28785e;color:#fff;font-weight:900}.chat-processing-indicator>span:nth-child(2){display:grid}.chat-processing-indicator small{color:var(--muted);font-size:.72rem}.thinking-dots{display:flex;gap:5px;margin-left:auto}.thinking-dots i{width:7px;height:7px;border-radius:50%;background:#28785e;animation:thinkingDot 1.15s infinite}.thinking-dots i:nth-child(2){animation-delay:.15s}.thinking-dots i:nth-child(3){animation-delay:.3s}@keyframes thinkingDot{0%,60%,100%{transform:translateY(0);opacity:.35}30%{transform:translateY(-6px);opacity:1}}@media(max-width:760px){.profile-form{grid-template-columns:1fr}.profile-photo-column{border-right:0;border-bottom:1px solid var(--line);padding:0 0 22px}.profile-fields{grid-template-columns:1fr}.brand-asset-row{grid-template-columns:76px 1fr}}

.quick-actions + .message { margin-top:28px; }
@media(max-width:720px){.quick-actions + .message{margin-top:22px}}
