:root {
  --bg: #1e1f21; --sidebar: #252628; --panel: #2a2b2d; --panel-2: #353638; --border: #424244;
  --text: #f1f1f1; --muted: #a2a0a2; --accent: #FE7E11; --accent-ink: #1a1a1a;
  --st-new: #a2a0a2; --st-in_progress: #6ea8fe; --st-in_review: #b9a7ff; --st-done: #6dd3b3;
  --pr-normal: #a2a0a2; --pr-high: #ffd84d; --pr-urgent: #FE7E11;
  --danger: #ff6b6b; --radius: 10px; --topbar-h: 56px; --sidebar-w: 248px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
a { color: inherit; text-decoration: none; }
svg { flex: none; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Estructura */
.shell { display: grid; grid-template: var(--topbar-h) 1fr / var(--sidebar-w) 1fr; height: 100vh; }
.topbar { grid-column: 1 / -1; display: grid; grid-template-columns: var(--sidebar-w) 1fr auto; align-items: center; gap: 12px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border); overflow-y: auto; padding: 12px 10px 24px; }
.content { overflow: auto; padding: 24px 32px 48px; }
.menu-btn { display: none; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .2px; padding: 4px 8px 14px; }
.brand i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* Botones y campos */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); font-weight: 500; transition: background .12s; }
.btn:hover { background: var(--panel-2); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: #ff9238; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted); position: relative; }
.icon-btn:hover { background: var(--panel); color: var(--text); }
.input, .select, .textarea { width: 100%; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; outline: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(254,126,17,.18); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
label.field { display: grid; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.error-text { color: var(--danger); font-size: 13px; min-height: 18px; }

/* Buscador */
.search { position: relative; justify-self: center; width: min(560px, 100%); }
.search .input { padding-left: 36px; border-radius: 20px; background: var(--panel); }
.search .s-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: flex; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px 'Inter', sans-serif; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; pointer-events: none; }
.dropdown { position: absolute; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.45); z-index: 40; overflow: hidden; }
.search .dropdown { left: 0; right: 0; max-height: 420px; overflow-y: auto; }
.dd-group { padding: 8px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.dd-item:hover, .dd-item.active { background: var(--panel-2); }
.dd-empty { padding: 14px 12px; color: var(--muted); }

/* Navegación */
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: #d6d6d6; cursor: pointer; }
.nav-item:hover { background: var(--panel); }
.nav-item.active { background: var(--panel-2); color: #fff; font-weight: 600; }
.nav-item.active svg { color: var(--accent); }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 16px 10px 6px; }
.client-dot { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; color: #1a1a1a; flex: none; }
.client-dot svg { width: 14px; height: 14px; }
.nav-item .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Avatares y chips */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; flex: none; user-select: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--panel-2); border: 1px solid var(--border); white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.st-new { color: var(--st-new); } .st-in_progress { color: var(--st-in_progress); } .st-in_review { color: var(--st-in_review); } .st-done { color: var(--st-done); }
.pr-normal { color: var(--pr-normal); } .pr-high { color: var(--pr-high); } .pr-urgent { color: var(--pr-urgent); }
.badge { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.overdue { color: var(--danger); }
.bar { width: 100%; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* Páginas */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 700; }
.page-head .spacer { flex: 1; }
.section-title { font-size: 15px; font-weight: 600; margin: 24px 0 10px; display: flex; align-items: center; gap: 8px; }
.count { color: var(--muted); font-weight: 500; font-size: 13px; }
.empty { color: var(--muted); padding: 18px 4px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }

/* Tabla / filas */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--text); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; } .tbl tbody tr:hover { background: var(--panel); }
.tbl .t-title { font-weight: 500; }
.tbl .id { color: var(--muted); font-variant-numeric: tabular-nums; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.row-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--muted); display: inline-grid; place-items: center; color: transparent; flex: none; }
.row-check:hover { border-color: var(--st-done); color: var(--st-done); }
.row-check.on { background: var(--st-done); border-color: var(--st-done); color: #1a1a1a; }
.task-row { display: grid; grid-template-columns: 24px 1fr auto auto auto; gap: 12px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.task-row:hover { background: var(--panel); }
.task-row .t-title { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input { max-width: 280px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* Inicio */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.activity-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.activity-item .tt { font-weight: 500; } .activity-item .tx { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Tablero */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--sidebar); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 160px; }
.col.drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-weight: 600; }
.bcard { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 10px 11px; margin-bottom: 8px; cursor: grab; display: grid; gap: 8px; }
.bcard:hover { border-color: #5a5a5d; } .bcard.dragging { opacity: .45; }
.bcard .t { font-weight: 500; } .bcard .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

/* Calendario */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-head h2 { margin: 0 8px; font-size: 18px; min-width: 170px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-dow { padding: 6px 8px; font-size: 12px; color: var(--muted); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-cell { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.cal-cell.out { background: var(--sidebar); opacity: .6; }
.cal-cell .n { font-size: 12px; color: var(--muted); } .cal-cell.today .n { color: var(--accent-ink); background: var(--accent); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.cal-task { font-size: 12px; padding: 2px 6px; border-radius: 5px; background: var(--panel-2); border-left: 3px solid var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal-task:hover { background: #404144; } .cal-task.done { opacity: .55; text-decoration: line-through; }

/* Clientes */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; }
.tile:hover { background: var(--panel); border-color: var(--border); }
.tile .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #1a1a1a; flex: none; }
.tile .ico svg { width: 24px; height: 24px; }
.tile .nm { font-weight: 600; font-size: 15px; } .tile .sub { font-size: 12px; color: var(--muted); }
.tile.new .ico { background: transparent; border: 1.5px dashed var(--muted); color: var(--muted); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; } .swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; } .swatch.on { border-color: #fff; }

/* Equipo / Admin */
.load-row { display: grid; grid-template-columns: 220px repeat(3, 100px) 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.load-row:hover { background: var(--panel); }
.storage-bar { height: 10px; background: var(--panel-2); border-radius: 5px; overflow: hidden; margin: 8px 0; } .storage-bar > i { display: block; height: 100%; background: var(--accent); }

/* Modal y panel */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; display: grid; place-items: start center; padding: 6vh 16px; overflow-y: auto; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.modal-head { display: flex; align-items: center; padding: 16px 20px 6px; } .modal-head h3 { margin: 0; font-size: 17px; flex: 1; }
.modal-body { padding: 10px 20px 20px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
.side-panel { position: fixed; top: var(--topbar-h); right: 0; bottom: 0; width: min(620px, 100vw); background: var(--panel); border-left: 1px solid var(--border); box-shadow: -16px 0 40px rgba(0,0,0,.4); z-index: 30; overflow-y: auto; transform: translateX(100%); transition: transform .18s ease; }
.side-panel.open { transform: none; }
.sp-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.sp-body { padding: 18px; display: grid; gap: 20px; }
.sp-title { font-size: 20px; font-weight: 700; width: 100%; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin: 0 -8px; outline: none; }
.sp-title:hover { border-color: var(--border); } .sp-title:focus { border-color: var(--accent); background: var(--bg); }
.props { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; align-items: center; }
.props > span { color: var(--muted); font-size: 13px; }
.sec-h { font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.sub-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.sub-row .tt { flex: 1; min-width: 0; } .sub-row.done .tt { color: var(--muted); text-decoration: line-through; }
.sub-row .input { padding: 4px 8px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.att { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--bg); position: relative; }
.att .pv { height: 96px; display: grid; place-items: center; background: #151617; color: var(--muted); overflow: hidden; }
.att .pv img, .att .pv video { width: 100%; height: 100%; object-fit: cover; }
.att .nm { padding: 6px 8px 2px; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .att .sz { padding: 0 8px 7px; font-size: 11px; color: var(--muted); }
.att .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); display: none; place-items: center; } .att:hover .rm { display: grid; }
.dropzone { border: 1.5px dashed var(--border); border-radius: 9px; padding: 12px; text-align: center; color: var(--muted); margin-top: 10px; cursor: pointer; } .dropzone.over { border-color: var(--accent); color: var(--text); }
.upl { font-size: 12px; margin-top: 6px; display: grid; gap: 4px; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); } .comment .by { font-weight: 600; } .comment .when { color: var(--muted); font-size: 12px; margin-left: 6px; } .comment .body { white-space: pre-wrap; word-break: break-word; } .mention { color: var(--accent); font-weight: 500; }
.hist { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.lightbox video, .lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; }

/* Toast */
#toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; }
.toast { background: #f1f1f1; color: #1a1a1a; padding: 9px 16px; border-radius: 8px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.4); } .toast.err { background: var(--danger); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 30px 28px; display: grid; gap: 14px; }
.login-card h1 { margin: 0; font-size: 22px; } .login-card .brand { padding: 0; }

/* Responsive */
@media (max-width: 900px) {
  .shell { grid-template: var(--topbar-h) 1fr / 1fr; }
  .topbar { grid-template-columns: auto 1fr auto; padding: 0 10px; }
  .menu-btn { display: inline-grid; }
  .sidebar { position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: 270px; z-index: 35; transform: translateX(-100%); transition: transform .18s; }
  .sidebar.open { transform: none; box-shadow: 12px 0 30px rgba(0,0,0,.5); }
  .content { padding: 18px 14px 40px; }
  .home-grid { grid-template-columns: 1fr; } .search kbd { display: none; }
  .topbar-left .btn span.lbl { display: none; }
  .form-grid { grid-template-columns: 1fr; } .load-row { grid-template-columns: 1fr 70px 70px 70px; } .load-row .bar { display: none; }
  .tbl .hide-sm { display: none; } .props { grid-template-columns: 96px 1fr; }
}

/* Chat por cliente */
.nav-badge { margin-left: auto; background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 18px; min-width: 18px; text-align: center; flex: none; }
.chat { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; min-height: 380px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.chat-main.over::after { content: 'Soltá los archivos para adjuntarlos'; position: absolute; inset: 0; background: rgba(30,31,33,.88); border: 2px dashed var(--accent); border-radius: 12px; display: grid; place-items: center; font-weight: 600; z-index: 5; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 4px 12px 0; overscroll-behavior: contain; }
.chat-side { overflow-y: auto; border-left: 1px solid var(--border); padding-left: 22px; }
.sec-h { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.side-task { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--panel); }
.side-task:hover { border-color: var(--accent); }
.side-file { display: flex; gap: 8px; justify-content: space-between; color: var(--text); }
.side-file .nm, .chat-file .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.day-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0 8px; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.msg { display: flex; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; }
.msg:hover { background: rgba(255,255,255,.03); }
.msg.flash { background: rgba(254,126,17,.16); }
.msg .mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mhead { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.mhead .when { color: var(--muted); font-size: 12px; }
.macts { margin-left: auto; display: none; gap: 2px; }
.msg:hover .macts { display: inline-flex; }
.macts .icon-btn { width: 28px; height: 28px; }
.mbody { white-space: pre-wrap; overflow-wrap: anywhere; }
.mention { color: #8fb8ff; background: rgba(143,184,255,.14); border-radius: 4px; padding: 0 3px; }
.quote, .reply-bar { border-left: 3px solid #3e63dd; background: var(--panel); border-radius: 6px; padding: 6px 10px; font-size: 13px; max-width: 420px; }
.quote { cursor: pointer; }
.qname { color: #8fb8ff; font-weight: 600; font-size: 12px; }
.qtext { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card { max-width: 340px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); padding: 10px 12px; display: grid; gap: 8px; cursor: pointer; }
.task-card:hover { border-color: var(--accent); }
.matts { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-img { max-width: min(320px, 100%); max-height: 260px; border-radius: 10px; border: 1px solid var(--border); cursor: zoom-in; display: block; }
.chat-video { max-width: min(340px, 100%); border-radius: 10px; }
.chat-audio { width: min(300px, 100%); height: 40px; }
.chat-file { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); max-width: 320px; }
.lightbox { display: grid; } .lightbox img { max-width: 100%; max-height: 80vh; margin: auto; }
.msg.deleted .mbody { font-size: 13px; }
.chat-compose { flex: none; border-top: 1px solid var(--border); padding-top: 10px; display: grid; gap: 8px; }
.chat-input { width: 100%; box-sizing: border-box; resize: none; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; font: inherit; outline: none; max-height: 160px; }
.chat-input:focus { border-color: var(--accent); }
.chat-tools { display: flex; align-items: center; gap: 4px; }
.reply-bar { display: flex; gap: 8px; align-items: center; max-width: none; }
.pending { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { position: relative; display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; font-size: 12px; cursor: pointer; overflow: hidden; max-width: 100%; }
.pchip .pbar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
.dd-item .chip { flex: none; }
@media (max-width: 900px) {
  .chat { grid-template-columns: minmax(0, 1fr); } .chat-side { display: none; }
  .macts { display: inline-flex; } .macts .icon-btn { width: 32px; height: 32px; }
  .tabs { overflow-x: auto; } .tab { white-space: nowrap; }
}

/* Audios */
.aplayer { display: flex; align-items: center; gap: 8px; width: min(320px, 100%); box-sizing: border-box; padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 22px; background: var(--panel); }
.aplayer .ap-play { background: var(--accent); color: var(--accent-ink); border-radius: 50%; flex: none; }
.aplayer .ap-play:hover { background: var(--accent); color: var(--accent-ink); filter: brightness(1.08); }
.aplayer .seek { flex: 1; min-width: 0; accent-color: var(--accent); }
.aplayer .adur { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.ap-speed { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 10px; padding: 2px 6px; min-width: 34px; }
.rec-bar { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); padding: 6px 8px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; animation: recpulse 1s infinite; }
@keyframes recpulse { 50% { opacity: .25; } }
#rec-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.hidden { display: none !important; }
@media (pointer: coarse) { .chat-compose.empty #chat-send { display: none; } .chat-compose:not(.empty) #chat-mic { display: none; } #chat-send { padding: 8px 12px; } }
