/* CF-175 urrsunn product identity pass.
   Marketing stays expressive; authenticated product stays compact, quiet and operational. */

.urrsunn-product {
  --brand-forest: #0b2f27;
  --brand-forest-2: #123d33;
  --brand-forest-3: #1b5143;
  --brand-sun: #d98932;
  --brand-sun-deep: #b96c23;
  --brand-sun-soft: #f4e4cb;
  --brand-paper: #f4f5f1;
  --brand-surface: #fffefa;
  --brand-surface-muted: #f7f8f5;
  --brand-line: #d8e0da;
  --brand-line-strong: #bdcbc3;
  --brand-ink: #162820;
  --brand-muted: #64736d;
  --bg: var(--brand-paper);
  --bg-accent: #e7eee9;
  --surface: var(--brand-surface);
  --surface-strong: #fffefa;
  --surface-muted: var(--brand-surface-muted);
  --border: var(--brand-line);
  --border-strong: var(--brand-line-strong);
  --line: var(--brand-line);
  --text: var(--brand-ink);
  --muted: var(--brand-muted);
  --primary: var(--brand-forest-2);
  --primary-dark: var(--brand-forest);
  --accent: #557e6f;
  --accent-deep: var(--brand-forest-2);
  --focus: #8b6a32;
  --shadow: 0 10px 30px rgba(18, 52, 43, .065);
  color: var(--brand-ink);
  background:
    radial-gradient(circle at 8% -8%, rgba(217,137,50,.07), transparent 24rem),
    linear-gradient(180deg, #f7f8f4 0%, #f0f3ef 100%);
  font-family: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.urrsunn-product::before {
  height: 210px !important;
  background:
    linear-gradient(118deg, rgba(229,163,74,.055), transparent 26%),
    linear-gradient(145deg, rgba(22,72,59,.06), rgba(111,145,131,.025) 58%, transparent) !important;
}

/* Brand lockup: same identity as public landing, deliberately quieter in-product. */
.urrsunn-product .product-brand,
.urrsunn-product .tg-brandlock {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  color: var(--brand-forest);
  text-decoration: none;
  line-height: 1;
}
.urrsunn-product .product-brand-mark {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.urrsunn-product .product-mark-frame,
.urrsunn-product .product-mark-floor { stroke: var(--brand-forest); stroke-width: 2.6; }
.urrsunn-product .product-mark-light { stroke: var(--brand-sun); stroke-width: 2.8; }
.urrsunn-product .product-mark-light-soft { stroke: #efc27c; stroke-width: 1.35; opacity: .8; }
.urrsunn-product .product-brand-name {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  color: var(--brand-forest);
  font-size: 22px;
  font-weight: 820;
  letter-spacing: -.055em;
}
.urrsunn-product .product-sun-seam { position: relative; }
.urrsunn-product .product-sun-seam::after {
  content: "";
  position: absolute;
  left: 8%; right: 5%; bottom: -4px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-sun-deep), #efbd73);
}

/* Product chrome */
.urrsunn-product .card {
  border-color: var(--brand-line);
  background: rgba(255,254,250,.975);
  box-shadow: 0 7px 22px rgba(18,52,43,.05);
}
.urrsunn-product .app-header,
.urrsunn-product .owner-header,
.urrsunn-product .site-header {
  position: relative;
}
.urrsunn-product .app-header::before,
.urrsunn-product .owner-header::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 22px;
  width: 74px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-sun), rgba(217,137,50,0));
}
.urrsunn-product .customer-header,
.urrsunn-product .owner-header,
.urrsunn-product .integrations-header,
.urrsunn-product.admin-page .app-header,
.urrsunn-product.internal-page .app-header {
  border-color: #d6dfd9;
  background: rgba(255,254,250,.97);
  box-shadow: 0 8px 24px rgba(18,52,43,.055);
}
.urrsunn-product .customer-heading h1,
.urrsunn-product .owner-heading h1,
.urrsunn-product .integrations-heading h1,
.urrsunn-product.internal-page h1 {
  color: var(--brand-ink);
  letter-spacing: -.035em;
}
.urrsunn-product .eyebrow { color: #5d786d; }
.urrsunn-product .lead { color: #64736d; }

/* Controls: forest is action, amber is attention/identity — not a second CTA color. */
.urrsunn-product .button.primary,
.urrsunn-product button.primary {
  border-color: var(--brand-forest-2);
  background: var(--brand-forest-2);
  color: #fff;
  box-shadow: 0 6px 16px rgba(11,47,39,.14);
}
.urrsunn-product .button.primary:hover,
.urrsunn-product button.primary:hover {
  border-color: var(--brand-forest-3);
  background: var(--brand-forest-3);
}
.urrsunn-product .button.secondary,
.urrsunn-product button.secondary {
  border-color: #c5d3cb;
  background: #f1f6f2;
  color: #2e594b;
}
.urrsunn-product .button.ghost,
.urrsunn-product button.ghost {
  border-color: #d6dfd9;
  background: #fffefa;
  color: #41544d;
}
.urrsunn-product input:focus,
.urrsunn-product select:focus,
.urrsunn-product textarea:focus,
.urrsunn-product button:focus-visible,
.urrsunn-product a:focus-visible,
.urrsunn-product summary:focus-visible {
  outline-color: rgba(217,137,50,.28) !important;
  border-color: #b78345 !important;
  box-shadow: 0 0 0 2px rgba(217,137,50,.14) !important;
}

/* Contractor workspace: object first, calm daily command surface. */
.urrsunn-product.customer-page .project-context-bar {
  border-color: #cedbd3;
  background:
    linear-gradient(90deg, rgba(217,137,50,.04), transparent 26%),
    linear-gradient(135deg, #fffefa, #f3f7f4);
}
.urrsunn-product.customer-page .customer-task-nav {
  border-color: #d6dfd9;
  background: rgba(255,254,250,.96);
  box-shadow: 0 5px 16px rgba(18,52,43,.045);
}
.urrsunn-product.customer-page .customer-task-nav a {
  color: #566861;
  border-radius: 9px;
}
.urrsunn-product.customer-page .customer-task-nav a:hover { background: #edf3ef; color: #244e41; }
.urrsunn-product.customer-page .customer-task-nav a.active,
.urrsunn-product.customer-page .customer-task-nav a[aria-current="location"] {
  position: relative;
  border-color: #c7d6cd;
  background: #e8f0eb;
  color: #214d3f;
  box-shadow: none;
}
.urrsunn-product.customer-page .customer-task-nav a.active::after,
.urrsunn-product.customer-page .customer-task-nav a[aria-current="location"]::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-sun);
}
.urrsunn-product.customer-page .role-workday {
  border-color: #b9ccc1;
  background:
    radial-gradient(circle at 100% 0, rgba(217,137,50,.065), transparent 15rem),
    linear-gradient(145deg,#fbfdf9,#f2f7f3 68%);
  box-shadow: 0 10px 24px rgba(18,52,43,.065);
}
.urrsunn-product.customer-page .role-workday::before { background: linear-gradient(180deg,var(--brand-sun),#dca65b); }
.urrsunn-product.customer-page .metric-card,
.urrsunn-product.customer-page .role-workday-stat,
.urrsunn-product.customer-page .role-workday-item { background: #fffefa; border-color: #d8e1db; }
.urrsunn-product.customer-page .role-workday-item:hover { border-color: #b9cbc1; box-shadow: 0 6px 16px rgba(18,52,43,.06); }
.urrsunn-product.customer-page .notification-unread { border-left-color: var(--brand-sun); }

/* Owner: less contractor chrome, more enduring object record. */
.urrsunn-product.owner-page { background: linear-gradient(180deg,#f7f8f5,#f0f3ef); }
.urrsunn-product.owner-page .owner-header { border-color: #d5dfd9; }
.urrsunn-product.owner-page .owner-property-context {
  border-color: #d5dfd9;
  background: linear-gradient(135deg,#fffefa,#f4f7f4);
  box-shadow: 0 5px 16px rgba(18,52,43,.035);
}
.urrsunn-product.owner-page .owner-nav {
  background: linear-gradient(#f4f6f2 76%,rgba(244,246,242,0));
}
.urrsunn-product.owner-page .owner-nav button {
  border-color: #d5dfd9;
  background: #fffefa;
  color: #465a52;
}
.urrsunn-product.owner-page .owner-nav button:hover { border-color: #9eb8aa; color: #285748; }
.urrsunn-product.owner-page .owner-nav button.active {
  border-color: var(--brand-forest-2);
  background: var(--brand-forest-2);
  color: #fff;
  box-shadow: inset 0 -2px var(--brand-sun);
}
.urrsunn-product.owner-page .owner-metric,
.urrsunn-product.owner-page .owner-stage,
.urrsunn-product.owner-page .owner-commercial-columns>section,
.urrsunn-product.owner-page .owner-item { border-color:#dce4df; background:#fffefa; }
.urrsunn-product.owner-page .owner-decision-pending { border-color:#e0b473; box-shadow: inset 4px 0 var(--brand-sun); background:#fffaf2; }
.urrsunn-product.owner-page .owner-line-details summary { color:#356656; }

/* Auth / integrations / admin: same product family, less decorative than landing. */
.urrsunn-product.account-page .site-header {
  border-bottom-color: #d8e1db;
  background: rgba(248,249,245,.94);
  backdrop-filter: blur(14px);
}
.urrsunn-product.account-page .auth-card,
.urrsunn-product.integrations-page .card,
.urrsunn-product.admin-page .card { border-color:#d8e1db; }
.urrsunn-product.account-page .auth-tabs { background:#e9efea; }
.urrsunn-product.account-page .auth-tab.active { box-shadow: inset 0 -2px var(--brand-sun), 0 2px 8px rgba(18,52,43,.05); }

/* Internal demo/admin surface: brand it without pretending it is customer-facing. */
.urrsunn-product.internal-page .internal-heading .product-brand { margin-bottom: 18px; }
.urrsunn-product.internal-page .app-view-nav a,
.urrsunn-product.internal-page .anchor-link { border-color:#d5dfd9; }
.urrsunn-product.internal-page .app-view-nav a.active { box-shadow: inset 0 -2px var(--brand-sun); }

/* Communications inherit brand tokens, but messages remain semantic and calm. */
.urrsunn-product .communication-card,
.urrsunn-product .communication-sidebar,
.urrsunn-product .communication-thread { border-color:#d7e0da; }
.urrsunn-product .communication-conversation.active {
  border-color:#a9c0b4;
  box-shadow: inset 3px 0 var(--brand-sun);
  background:#f0f6f2;
}
.urrsunn-product .communication-message.mine { background:#eaf4ef; border-color:#cedfd5; }

/* Telegram / MAX Mini App: same identity within host theme constraints. */
.urrsunn-product.tg-product {
  color-scheme: light;
  --bg: #f4f6fa;
  --card: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f7f9fc;
  --text: #172033;
  --muted: #5d687a;
  --accent: #176b5b;
  --primary: #176b5b;
  --primary-dark: #0d5145;
  --accent-text: #ffffff;
  --border: #d9e0ea;
  background: var(--bg);
  color: var(--text);
}
.urrsunn-product.tg-product .tg-brandlock {
  justify-content: center;
  margin: 0 auto 2px;
}
.urrsunn-product.tg-product .product-brand-name { color: var(--text); font-size: 24px; }
.urrsunn-product.tg-product .product-mark-frame,
.urrsunn-product.tg-product .product-mark-floor { stroke: var(--text); }
.urrsunn-product.tg-product .context-card,
.urrsunn-product.tg-product .card,
.urrsunn-product.tg-product .card-lite,
.urrsunn-product.tg-product .metric,
.urrsunn-product.tg-product .receipt-row {
  border-color: var(--border);
  box-shadow: 0 7px 20px rgba(18,52,43,.055);
}
.urrsunn-product.tg-product .tab.active {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* Small screens: preserve working density and keep the identity out of the way. */
@media (max-width: 720px) {
  .urrsunn-product .product-brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .urrsunn-product .product-brand-name { font-size: 20px; }
  .urrsunn-product .customer-header::before,
  .urrsunn-product .owner-header::before { left: 14px; width: 56px; }
}
