:root {
  --bg: #eef5ff;
  --bg2: #f8fbff;
  --panel: rgba(255,255,255,.76);
  --panel2: rgba(255,255,255,.92);
  --text: #152033;
  --muted: #63748b;
  --line: rgba(72, 96, 130, .18);
  --brand: #40c7f4;
  --brand2: #8b7cf6;
  --ok: #18a76b;
  --warn: #d89000;
  --bad: #d94b67;
  --shadow: 0 22px 70px rgba(48, 70, 110, .14);
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(64,199,244,.24), transparent 34rem),
    radial-gradient(circle at 88% 10%, rgba(139,124,246,.18), transparent 34rem),
    linear-gradient(135deg, #edf6ff 0%, #f7faff 52%, #edf3ff 100%);
  min-height: 100vh;
}
.bg-orb { position: fixed; width: 28rem; height: 28rem; filter: blur(46px); opacity: .28; border-radius: 999px; pointer-events: none; }
.orb-a { left: -10rem; top: 18rem; background: #22d3ee; }
.orb-b { right: -8rem; bottom: -8rem; background: #8b5cf6; }

.shell { width: min(1360px, calc(100vw - 36px)); margin: 26px auto 42px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 26px;
  background: var(--panel); backdrop-filter: blur(18px); box-shadow: var(--shadow);
}
.logo { display:flex; gap:14px; align-items:center; min-width: 0; }
.logo-mark {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display:grid; place-items:center; color:#06101f; font-weight:900; letter-spacing:-.08em;
}
.logo h1 { margin:0; font-size:22px; letter-spacing:.01em; }
.logo p { margin:3px 0 0; color:var(--muted); font-size:13px; }
.actions { display:flex; gap:10px; align-items:center; flex-wrap: wrap; justify-content: flex-end; }
.badge { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.6); }

.tabs { display:flex; gap:9px; flex-wrap:wrap; margin:16px 0; }
.tab { padding:12px 18px; border-radius:16px; }
.tab.active { color:#06101f; background: linear-gradient(135deg, var(--brand), #a78bfa); border: none; }

.grid { display:grid; gap:18px; }
.grid.two { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.customers-layout { grid-template-columns: minmax(340px, .46fr) minmax(0, 1fr); }
.mt { margin-top:18px; }
.mt-sm { margin-top:12px; }
.card, .detail-card {
  border: 1px solid var(--line); border-radius: 26px; background: var(--panel);
  backdrop-filter: blur(18px); box-shadow: var(--shadow); min-width: 0;
}
.soft-card { background: rgba(255,255,255,.68); }
.card h2, .card h3, .detail-card h2, .detail-card h3 { margin:0; }
.card-head { padding:20px 22px 0; display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.card-head.inner { padding: 0 0 16px; }
.card-body { padding:20px 22px 22px; }
.no-pad-x { padding-left:0; padding-right:0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
.customer-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
label { display:block; color:var(--muted); font-size:12px; margin: 0 0 7px 2px; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); outline: none; color: var(--text);
  background: rgba(255,255,255,.86); border-radius: 15px; padding: 12px 13px; font: inherit;
}
textarea { min-height: 86px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(64,199,244,.8); box-shadow: 0 0 0 4px rgba(64,199,244,.14); }
input[readonly] { background: rgba(230,238,250,.7); color: #53657a; }
button {
  border: 0; color: var(--text); border-radius: 15px; padding: 11px 15px; font-weight: 800; cursor:pointer;
  background: rgba(255,255,255,.72); border: 1px solid var(--line);
}
button.primary { color:#06101f; background: linear-gradient(135deg, var(--brand), #a78bfa); border: none; }
button.danger { background: rgba(251,113,133,.10); border-color: rgba(217,75,103,.34); color: #9f1239; }
button:disabled { opacity:.55; cursor:wait; filter: grayscale(.2); }
a { color: #167eb0; font-weight: 800; text-decoration: none; }
a:hover { text-decoration: underline; }

.modules { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:9px; }
.check { display:flex; align-items:center; gap:9px; padding:10px 11px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.56); }
.check input { width:auto; }
.force-check { margin: 14px 0; width: fit-content; max-width: 100%; }

.kpis { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:12px; }
.overview-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { border:1px solid var(--line); border-radius:20px; padding:15px; background: rgba(255,255,255,.62); min-width:0; overflow:hidden; }
.kpi b { display:block; font-size:20px; margin-top:4px; overflow-wrap:anywhere; }
pre { margin:12px 0 0; white-space:pre-wrap; word-break:break-word; border-radius:18px; padding:15px; background: #112033; color:#dbeafe; border:1px solid rgba(255,255,255,.1); max-height:380px; overflow:auto; }
.mini-pre { max-height:160px; }

.table-wrap { width:100%; overflow-x:auto; border-radius:18px; border:1px solid var(--line); background: rgba(255,255,255,.38); }
.table { width:100%; border-collapse:collapse; min-width: 760px; }
.table th, .table td { text-align:left; padding:11px 10px; border-bottom:1px solid var(--line); font-size:13px; vertical-align: top; }
.table th { color:var(--muted); font-weight:800; background: rgba(255,255,255,.42); position: sticky; top: 0; }
.table tr:last-child td { border-bottom: 0; }
.id-cell { font-weight: 900; max-width: 170px; overflow-wrap:anywhere; }
.table-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; min-width: 190px; }
.table-actions button, .table-actions a { padding: 7px 9px; border-radius: 10px; font-size: 12px; }
.table-actions a { display:inline-flex; align-items:center; border:1px solid var(--line); background:rgba(255,255,255,.7); }

.toast { margin:12px 0; padding:12px 14px; border-radius:16px; border:1px solid var(--line); background:rgba(255,255,255,.8); }
.toast.ok { border-color: rgba(24,167,107,.35); color:#05603a; }
.toast.bad { border-color: rgba(217,75,103,.35); color:#9f1239; }
.login-wrap { width:min(520px, calc(100vw - 36px)); margin: 8vh auto; }
.login-card { padding:30px; }
.hero-title { font-size:38px; letter-spacing:-.04em; margin:14px 0 8px; }
.hidden { display:none !important; }

.status-pill { display:inline-flex; align-items:center; border-radius:999px; padding:5px 9px; font-size:12px; font-weight:900; border:1px solid var(--line); background:rgba(255,255,255,.7); }
.status-active { color:#047857; border-color:rgba(24,167,107,.35); background:rgba(24,167,107,.10); }
.status-delivered { color:#0369a1; border-color:rgba(64,199,244,.35); background:rgba(64,199,244,.12); }
.status-working { color:#15803d; border-color:rgba(34,197,94,.50); background:rgba(34,197,94,.13); }
.status-test, .status-prospect, .status-draft { color:#92400e; border-color:rgba(217,144,0,.35); background:rgba(251,191,36,.16); }
.status-revoked, .status-void, .status-archived { color:#9f1239; border-color:rgba(217,75,103,.34); background:rgba(217,75,103,.10); }
.status-paused { color:#475569; border-color:rgba(100,116,139,.35); background:rgba(100,116,139,.13); }

.filters, .mini-filter { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:14px; }
.filters input { flex: 1 1 280px; }
.filters select { flex: 0 1 220px; }
.detail-card { margin-top:18px; padding:22px; background: rgba(255,255,255,.72); }
.detail-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:12px; margin-bottom:18px; }
.info-box { border:1px solid var(--line); border-radius:20px; padding:15px; background:rgba(255,255,255,.55); }
.info-box h3 { margin: 0 0 8px; }

@media (max-width: 1150px) {
  .grid.two, .customers-layout { grid-template-columns: 1fr; }
  .overview-kpis, .compact-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .shell { width: min(100vw - 18px, 1360px); margin-top: 12px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .actions { justify-content:flex-start; }
  .form-grid, .customer-form, .kpis, .overview-kpis, .compact-kpis, .detail-grid { grid-template-columns: 1fr; }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo h1 { font-size: 18px; }
  .hero-title { font-size: 30px; }
}

/* v1.6 compact workspace polish */
body::before {
  content:"";
  position: fixed;
  inset: 0 0 auto 0;
  height: 190px;
  pointer-events: none;
  background: repeating-linear-gradient(90deg,
    rgba(31,118,215,.10) 0 18px,
    transparent 18px 58px,
    rgba(64,199,244,.08) 58px 82px,
    transparent 82px 138px);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent);
  opacity: .8;
}
.shell { width: min(1280px, calc(100vw - 44px)); margin-top: 34px; }
.topbar { padding: 14px 18px; border-radius: 22px; }
.brand-logo { width: 120px; height: auto; object-fit: contain; flex: 0 0 auto; }
.brand-logo.big { width: 156px; margin-right: 10px; }
.logo h1 { font-size: 19px; letter-spacing: -.02em; }
.logo p { font-size: 12px; }
.login-logo { align-items: center; gap: 18px; }
.login-card { max-width: 560px; padding: 28px; }
.hero-title { font-size: 25px; line-height: 1.05; }
.tab { padding: 10px 16px; border-radius: 14px; font-size: 14px; }
.card-head { padding: 18px 20px 0; }
.card-head h2 { font-size: 22px; letter-spacing: -.025em; }
.card h3, .detail-card h3 { font-size: 16px; }
.card-body { padding: 16px 20px 20px; }
.kpis { gap: 10px; }
.kpi { padding: 13px 14px; border-radius: 18px; }
.kpi b { font-size: 18px; line-height: 1.18; }
input, textarea, select { padding: 10px 12px; border-radius: 14px; font-size: 14px; }
button { padding: 9px 13px; border-radius: 13px; font-size: 13px; }
.table { min-width: 680px; }
.table th, .table td { font-size: 12px; padding: 9px 10px; }
.id-cell { max-width: 160px; word-break: normal; overflow-wrap: anywhere; }
.overview-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.workspace-page { display: grid; gap: 14px; }
.workspace-hero { padding: 20px; display:flex; justify-content:space-between; align-items:center; gap:18px; }
.workspace-hero h2 { margin:0 0 6px; font-size:24px; letter-spacing:-.03em; }
.workspace-tabs { display:flex; gap:9px; flex-wrap:wrap; }
.chip { display:inline-flex; align-items:center; gap:8px; padding:9px 12px; border-radius:999px; background:rgba(255,255,255,.7); border:1px solid var(--line); font-weight:800; }
.chip.active { background:linear-gradient(135deg,var(--brand),#a78bfa); color:#06101f; border-color:transparent; }
.chip span { min-width:20px; height:20px; display:grid; place-items:center; border-radius:999px; background:rgba(255,255,255,.65); font-size:12px; }
.workspace-layout { grid-template-columns: 330px minmax(0, 1fr); align-items:start; }
.task-form-card { position: sticky; top: 16px; }
.board { display:grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap:12px; align-items:start; overflow-x:auto; padding-bottom:4px; }
.task-column { min-height: 210px; border:1px solid var(--line); background:rgba(255,255,255,.54); border-radius:22px; padding:12px; }
.column-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; color:#27415f; }
.column-head span { border-radius:999px; background:#edf6ff; padding:3px 8px; font-size:12px; color:#456; }
.task-card { cursor:pointer; border:1px solid rgba(74,101,134,.20); background:rgba(255,255,255,.86); border-radius:18px; padding:13px; margin-bottom:10px; box-shadow: 0 12px 28px rgba(42,68,110,.08); transition:.16s transform, .16s box-shadow; }
.task-card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(42,68,110,.14); }
.task-card h3 { margin: 7px 0 6px; font-size:15px; line-height:1.2; }
.task-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.35; }
.task-top, .task-meta { display:flex; gap:6px; flex-wrap:wrap; justify-content:space-between; align-items:center; }
.task-id, .priority, .task-meta span { font-size:11px; padding:4px 7px; border-radius:999px; background:#eef6ff; color:#3d5876; font-weight:800; }
.priority-high .priority { background:#fff1c7; color:#92400e; }
.priority-critical .priority { background:#ffe4ea; color:#9f1239; }
.priority-low .priority { background:#ecfdf5; color:#047857; }
.task-meta { justify-content:flex-start; margin-top:10px; }
.empty-note { border:1px dashed var(--line); border-radius:16px; padding:18px; text-align:center; color:var(--muted); font-size:13px; }
.task-detail { position:relative; }
.comment-box { display:grid; gap:8px; margin:14px 0; }
.comment { border:1px solid var(--line); background:rgba(255,255,255,.62); border-radius:16px; padding:12px; margin:8px 0; }
.comment span { margin-left:8px; color:var(--muted); font-size:12px; }
.comment p { margin:8px 0 0; }
.full-row { grid-column: 1 / -1; }
.row.wrap { flex-wrap:wrap; }

@media (max-width: 1180px) {
  .overview-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .workspace-layout { grid-template-columns: 1fr; }
  .task-form-card { position: static; }
  .board { grid-template-columns: repeat(2, minmax(230px,1fr)); }
}
@media (max-width: 760px) {
  .brand-logo { width: 104px; }
  .brand-logo.big { width: 128px; }
  .overview-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .board { grid-template-columns: 1fr; }
}


/* v1.8 company portal login + restored workflow */
.company-login-page {
  min-height: 100vh;
  padding: 32px clamp(18px, 3vw, 48px);
  display: grid;
  place-items: center;
}
.company-portal-shell {
  width: min(1540px, calc(100vw - 44px));
  min-height: min(820px, calc(100vh - 64px));
  padding: clamp(24px, 3vw, 46px);
  border: 1px solid rgba(75, 100, 135, .14);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,.84), rgba(255,255,255,.68));
  box-shadow: 0 28px 90px rgba(40,70,120,.13);
  backdrop-filter: blur(20px);
}
.company-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(34px, 5vh, 72px);
}
.brand-lockup { display:flex; align-items:center; gap:22px; min-width:0; }
.brand-logo-img { width: clamp(180px, 18vw, 270px); height:auto; display:block; object-fit: contain; }
.brand-divider { width:1px; height:48px; background:var(--line); }
.brand-title b { display:block; font-size:20px; letter-spacing:-.02em; }
.brand-title span { display:block; margin-top:4px; color:var(--muted); font-size:14px; }
.security-chip {
  display:flex; align-items:center; gap:12px;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:18px;
  background: rgba(255,255,255,.62);
  color:var(--muted);
}
.security-chip b { display:block; color:#22314a; font-size:13px; }
.security-chip span { display:block; font-size:12px; }
.chip-icon { font-size:21px !important; }
.company-hero-grid {
  display:grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, .7fr);
  gap: clamp(34px, 6vw, 84px);
  align-items: center;
}
.company-hero-content { max-width: 900px; }
.eyebrow {
  color:#1c8fd3;
  font-size:12px;
  font-weight:900;
  letter-spacing:.16em;
  margin-bottom:16px;
}
.company-hero-content h1 {
  margin:0;
  font-size: clamp(34px, 4vw, 58px);
  line-height:1.06;
  letter-spacing:-.045em;
  color:#102142;
}
.company-hero-content h1 span { color:#09a8e5; }
.hero-copy {
  margin:20px 0 26px;
  max-width: 760px;
  color:#536783;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height:1.65;
}
.feature-cards {
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:14px;
  margin: 24px 0 28px;
}
.feature-cards article {
  min-height: 150px;
  padding:18px 18px 16px;
  border:1px solid var(--line);
  border-radius:20px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 14px 40px rgba(50, 80, 130, .08);
}
.feature-cards article span {
  display:grid; place-items:center;
  width:36px; height:36px; margin-bottom:18px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(64,199,244,.18), rgba(139,124,246,.18));
  color:#0a9ee0;
  font-weight:900;
}
.feature-cards b { display:block; font-size:15px; line-height:1.35; color:#132440; }
.feature-cards p { margin:10px 0 0; color:var(--muted); font-size:12.5px; line-height:1.45; }
.directions h3 { margin:0 0 12px; font-size:15px; }
.directions > div { display:flex; flex-wrap:wrap; gap:10px; }
.directions span {
  display:inline-flex; align-items:center;
  padding:11px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.60);
  color:#253752;
  font-size:13px;
  font-weight:800;
}
.trust-row { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:16px; margin-top:34px; }
.trust-row > div {
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.55);
  padding:18px 20px;
}
.trust-row b { display:block; font-size:14px; color:#172845; }
.trust-row span { display:block; margin-top:5px; color:var(--muted); font-size:12.5px; line-height:1.45; }
.login-panel {
  width: min(100%, 430px);
  justify-self: center;
  padding:34px 34px 30px;
  border:1px solid rgba(75,100,135,.16);
  border-radius:30px;
  background:rgba(255,255,255,.82);
  box-shadow:0 26px 80px rgba(40,70,120,.16);
  backdrop-filter: blur(20px);
}
.login-panel-head { display:flex; align-items:center; gap:15px; margin-bottom:24px; }
.login-icon { width:58px; height:58px; object-fit:contain; }
.login-panel h2 { margin:0; font-size:25px; letter-spacing:-.035em; }
.login-panel p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.login-panel input { padding:14px 15px; border-radius:16px; background:#eef7ff; }
.login-main-btn { width:100%; margin-top:16px; padding:15px 18px; font-size:15px; border-radius:16px; box-shadow: 0 12px 30px rgba(45,128,230,.20); }
.safe-note { text-align:center; color:#7c8da5; font-size:12.5px; margin-top:18px; }
.logo-header { gap:16px; }
.header-logo-img { width:150px; height:auto; object-fit:contain; flex:0 0 auto; }
.logo-header h1 { font-size:20px; }
.logo-header p { font-size:12.5px; }
.card h2, .detail-card h2 { font-size:22px; letter-spacing:-.025em; }
.card h3, .detail-card h3 { font-size:16px; }
.table th, .table td { font-size:12.5px; line-height:1.35; }
button { font-size:13px; padding:9px 13px; }
.tab { padding:10px 15px; }
.kpi { padding:13px 14px; }
.kpi b { font-size:18px; line-height:1.18; }
@media (max-width: 1180px) {
  .company-hero-grid { grid-template-columns: 1fr; }
  .login-panel { justify-self:start; }
  .feature-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .company-login-page { padding:14px; place-items:start center; }
  .company-portal-shell { width:100%; min-height:auto; padding:20px; border-radius:24px; }
  .company-header { flex-direction:column; align-items:flex-start; margin-bottom:28px; }
  .brand-logo-img { width:190px; }
  .brand-divider { display:none; }
  .feature-cards, .trust-row { grid-template-columns:1fr; }
  .login-panel { width:100%; padding:24px; }
}

/* v1.8 readable workflow labels */
.tabs .tab { white-space: nowrap; }
.workspace-hero h2 { font-size: 22px; }
.task-column { min-width: 0; }
.column-head b { font-size: 14px; }
.task-card h3 { word-break: normal; overflow-wrap: anywhere; }
.status-pill, .chip, button { white-space: nowrap; }
.brand-logo { width: 138px; max-height: 58px; object-fit: contain; }
.login-icon { width: 50px; height: 50px; }
@media (max-width: 900px){ .brand-logo-img{ width:150px; } }


/* v1.9 workspace polish: project cards + quick ideas + human labels */
.workspace-hero-v2 { padding: 18px 20px; }
.workspace-hero-v2 .eyebrow.compact { margin-bottom: 7px; font-size: 10px; letter-spacing: .18em; }
.project-cards { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; }
.project-card {
  display:block; text-align:left; padding:16px; border-radius:22px; min-height:132px;
  background:rgba(255,255,255,.68); border:1px solid var(--line); box-shadow:0 12px 34px rgba(40,70,120,.08);
  white-space: normal;
}
.project-card:hover { transform: translateY(-1px); box-shadow:0 18px 44px rgba(40,70,120,.12); }
.project-card.active { border-color: rgba(64,199,244,.55); background:linear-gradient(135deg, rgba(64,199,244,.18), rgba(167,139,250,.18)); }
.project-card-top { display:flex; align-items:center; gap:10px; min-width:0; }
.project-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:13px; background:rgba(255,255,255,.8); box-shadow: inset 0 0 0 1px rgba(80,100,130,.08); }
.project-card b { font-size:15px; line-height:1.2; white-space: normal; }
.project-card p { margin:10px 0 12px; color:var(--muted); font-size:12px; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.project-card-bottom { display:flex; justify-content:space-between; gap:10px; color:#4e637d; font-size:12px; font-weight:800; }
.progress { margin-top:10px; height:7px; border-radius:999px; background:#e8f1fb; overflow:hidden; }
.progress i { display:block; height:100%; border-radius:999px; background:linear-gradient(135deg,var(--brand),#a78bfa); }
.workspace-focus { grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); }
.quick-idea-card .card-head { padding-top:18px; }
.quick-idea-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.quick-idea-text { min-height:108px; font-size:14px; line-height:1.45; background:rgba(255,255,255,.92); }
.workspace-summary-card .card-body { padding-top:14px; }
.mini-stats { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:10px; margin:16px 0; }
.mini-stats div { border:1px solid var(--line); background:rgba(255,255,255,.62); border-radius:16px; padding:12px; }
.mini-stats b { display:block; font-size:20px; }
.mini-stats span { color:var(--muted); font-size:11px; font-weight:800; }
.workspace-tips { border:1px solid rgba(64,199,244,.28); background:rgba(64,199,244,.08); border-radius:18px; padding:14px; }
.workspace-tips p { margin:6px 0 0; color:var(--muted); font-size:12.5px; line-height:1.45; }
.details-card { padding:0; overflow:hidden; }
.details-card summary { cursor:pointer; padding:16px 18px; font-weight:900; list-style:none; }
.details-card summary::-webkit-details-marker { display:none; }
.workspace-layout-v2 { grid-template-columns: 300px minmax(0, 1fr); }
.board-v2 { grid-template-columns: repeat(3, minmax(210px, 1fr)); }
.auth-links { display:flex; gap:9px; flex-wrap:wrap; margin: 10px 0 12px; }
.auth-links a { font-size:12px; padding:8px 10px; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.68); }
@media (max-width: 1180px) {
  .project-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .workspace-focus { grid-template-columns:1fr; }
  .workspace-layout-v2 { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .project-cards { grid-template-columns:1fr; }
  .quick-idea-grid { grid-template-columns:1fr; }
  .mini-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* v2.0 admin-only licensing portal */
.main-tabs { align-items:center; }
.licensing-portal { display:block; }
.license-hero {
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  padding:18px 20px;
  background:linear-gradient(135deg, rgba(255,255,255,.86), rgba(237,248,255,.72));
}
.license-hero h2 { margin:0 0 5px; font-size:22px; letter-spacing:-.02em; }
.license-lock {
  flex:0 0 auto;
  padding:10px 13px;
  border-radius:999px;
  border:1px solid rgba(64,199,244,.28);
  background:rgba(64,199,244,.10);
  color:#24415f;
  font-size:12.5px;
  font-weight:900;
  white-space:nowrap;
}
.subtabs {
  margin:12px 0 14px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(255,255,255,.55);
  box-shadow:0 12px 34px rgba(40,70,120,.07);
}
.subtabs .tab { padding:9px 13px; font-size:12.5px; }
.overview-home .home-hero { padding:18px 20px; display:flex; align-items:center; justify-content:space-between; gap:18px; }
.overview-home .home-hero h2 { margin:0 0 6px; font-size:23px; }
.mini-row {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:10px 0;
  border-bottom:1px solid rgba(148,163,184,.18);
}
.mini-row:last-child { border-bottom:0; }
.mini-row b { font-size:13.5px; overflow-wrap:anywhere; }
.mini-row span { color:var(--muted); font-size:12px; font-weight:800; white-space:nowrap; }
.home-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.home-chips span {
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.68);
  font-size:12px;
  font-weight:900;
  color:#243954;
}
@media (max-width: 760px) {
  .license-hero, .overview-home .home-hero { flex-direction:column; align-items:flex-start; }
  .license-lock { white-space:normal; }
}

/* v2.1 workspace quick ideas + clearer project cards */
.project-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.project-card {
  text-align: left;
  min-height: 132px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(245,250,255,.68));
  box-shadow: 0 18px 48px rgba(40,70,120,.09);
  transition: .18s transform, .18s box-shadow, .18s border-color;
}
.project-card:hover { transform: translateY(-2px); box-shadow: 0 22px 58px rgba(40,70,120,.14); }
.project-card.active { border-color: rgba(64,199,244,.85); background: linear-gradient(135deg, rgba(222,246,255,.94), rgba(239,235,255,.86)); }
.project-card-top { display:flex; gap:12px; align-items:center; margin-bottom:10px; }
.project-card-top b { font-size: 17px; letter-spacing: -.02em; }
.project-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:12px; background:rgba(255,255,255,.74); border:1px solid rgba(72,96,130,.14); }
.project-card p { min-height: 36px; margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.project-card-bottom { display:flex; justify-content:space-between; gap:12px; font-size:12px; font-weight:900; color:#35506f; }
.progress { height:7px; overflow:hidden; border-radius:999px; background:#e6f0fb; margin-top:10px; }
.progress i { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,var(--brand),var(--brand2)); }

.idea-compose-card {
  border-style: dashed;
  border-color: rgba(64,199,244,.55);
  background: linear-gradient(135deg, rgba(236,250,255,.92), rgba(246,242,255,.84));
  cursor: default;
}
.idea-compose-title { font-weight: 900; color:#1b3558; margin-bottom:8px; font-size:13px; }
.idea-compose-card textarea {
  min-height: 92px;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  font-size: 13px;
  line-height: 1.4;
}
.idea-compose-row { display:grid; grid-template-columns: minmax(0, 1fr) auto; gap:8px; margin-top:8px; align-items:center; }
.idea-compose-row select { min-width: 0; height: 40px; padding: 8px 10px; }
.idea-compose-row button { height: 40px; white-space: nowrap; }
.idea-column .empty-note { margin-top: 8px; }
.quick-idea-card .card-head h2::after { content: "  · можно и прямо в колонке “Идеи”"; font-size: 12px; color: var(--muted); font-weight: 700; }

@media (max-width: 1180px) { .project-cards { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .idea-compose-row { grid-template-columns: 1fr; } }

/* v2.2 Workflow actions: context menu, claim, reactions */
.task-card { position: relative; }
.task-menu-btn {
  position:absolute;
  top:10px;
  right:10px;
  width:28px;
  height:28px;
  border-radius:10px;
  padding:0;
  display:grid;
  place-items:center;
  font-size:18px;
  line-height:1;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(85,112,150,.18);
  color:#31506f;
  opacity:.35;
  z-index:2;
}
.task-card:hover .task-menu-btn,
.task-menu-btn:hover { opacity:1; }
.task-context-menu {
  position:absolute;
  top:40px;
  right:10px;
  width:210px;
  padding:8px;
  border-radius:16px;
  background:rgba(255,255,255,.98);
  border:1px solid rgba(72,101,136,.18);
  box-shadow:0 22px 60px rgba(26,48,86,.18);
  z-index:20;
  display:grid;
  gap:4px;
}
.task-context-menu button {
  width:100%;
  justify-content:flex-start;
  text-align:left;
  border:none;
  background:transparent;
  box-shadow:none;
  padding:8px 10px;
  border-radius:11px;
  font-size:12px;
  font-weight:850;
}
.task-context-menu button:hover { background:#eef7ff; }
.task-context-menu .danger-link { color:#b4233a; background:#fff3f5; }
.menu-separator { height:1px; background:rgba(72,101,136,.14); margin:4px 2px; }
.reaction-row {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:14px 0 10px;
}
.reaction-row button {
  padding:8px 11px;
  border-radius:999px;
  font-size:12px;
  background:rgba(255,255,255,.72);
}
.delete-note {
  display:flex;
  align-items:center;
  gap:10px;
  margin:10px 0 4px;
  color:var(--muted);
  font-size:12px;
}
.danger-soft {
  color:#b4233a;
  border-color:rgba(244,63,94,.25);
  background:#fff3f5;
}
.comment-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.comment-head > div {
  display:flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
}
.comment-del {
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  color:#b4233a;
  background:#fff7f8;
  border-color:rgba(244,63,94,.22);
}
.task-detail .card-head .row { justify-content:flex-end; }
@media (max-width:760px){
  .task-context-menu { right:6px; width:190px; }
  .reaction-row button { flex:1 1 auto; }
}

/* v2.3 Workflow cleanup: compact board, stable menus, admin delete */
.workspace-summary-wide {
  margin-top: 14px;
  margin-bottom: 14px;
}
.workspace-summary-wide .card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
  gap: 18px;
  align-items: start;
}
.workspace-summary-wide .mini-stats {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2px;
}
.workspace-tips.compact-tip {
  grid-column: 1 / -1;
  padding: 13px 15px;
  margin-top: 0;
}
.quick-idea-card { display: none !important; }
.quick-idea-card .card-head h2::after { content: none; }
.board-v2,
.workspace-layout-v2,
.task-column,
.task-card {
  overflow: visible;
}
.task-card.menu-open {
  z-index: 9000;
  position: relative;
}
.task-card.menu-open .task-menu-btn {
  opacity: 1;
}
.task-context-menu {
  z-index: 99999;
  top: 34px;
  right: 8px;
  width: 218px;
  max-height: 70vh;
  overflow-y: auto;
  backdrop-filter: blur(16px);
}
.task-context-menu button.danger-link {
  color: #b4233a;
  font-weight: 950;
}
.idea-compose-card {
  margin-bottom: 12px;
}
.idea-compose-card textarea {
  min-height: 82px;
}
.delete-note span {
  color: var(--muted);
}
@media (max-width: 980px) {
  .workspace-summary-wide .card-body { grid-template-columns: 1fr; }
  .workspace-summary-wide .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
