@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --background: #f3f6fb;
  --foreground: #0f172a;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --line: #d3deec;
  --brand: #0b7285;
  --brand-strong: #075985;
  --accent: #ea580c;
  --shadow-soft: 0 12px 36px rgba(2, 6, 23, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--foreground);
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  background-image:
    radial-gradient(circle at 8% 0%, rgba(11, 114, 133, 0.16), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(234, 88, 12, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
}

p {
  margin: 0;
}

main {
  width: 100%;
}

.lucide {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid color-mix(in srgb, var(--line), #ffffff 25%);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.78rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.main-nav {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 650;
  color: #334155;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.main-nav a:hover {
  background: #e8f1fb;
  color: #0f172a;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #0f172a;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.brand span {
  display: grid;
  gap: 0.12rem;
}

.brand strong {
  font-size: 1.05rem;
  line-height: 1;
}

.brand small {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.container.narrow {
  max-width: 980px;
}

.hero {
  background:
    linear-gradient(135deg, rgba(11, 114, 133, 0.16), rgba(234, 88, 12, 0.12)),
    var(--panel);
  border: 1px solid color-mix(in srgb, var(--line), #ffffff 10%);
  box-shadow: var(--shadow-soft);
  border-radius: 22px;
  padding: clamp(1.1rem, 2vw, 2rem);
  display: grid;
  gap: 0.9rem;
}

.hero.compact {
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.45rem, 2.7vw, 2.35rem);
  line-height: 1.12;
  max-width: 24ch;
}

.hero p {
  max-width: 68ch;
  color: #1e293b;
}

.badge {
  display: inline-block;
  width: fit-content;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--brand), white 45%);
  color: var(--brand-strong);
  border-radius: 999px;
  padding: 0.28rem 0.64rem;
  background: color-mix(in srgb, var(--brand), white 88%);
}

.cta-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.cta-row a,
button,
.link-button {
  background: var(--brand);
  color: white;
  border: 1px solid color-mix(in srgb, var(--brand), #000000 10%);
  border-radius: 10px;
  padding: 0.46rem 0.8rem;
  font-weight: 650;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.cta-row a:hover,
button:hover,
.link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(7, 89, 133, 0.24);
  background: var(--brand-strong);
}

.cta-row a.ghost,
button.ghost,
.link-button.ghost {
  background: white;
  color: #0f172a;
  border-color: #9ab8da;
  padding: 0.46rem 0.8rem;
}

.cta-row a.ghost:hover,
button.ghost:hover,
.link-button.ghost:hover {
  background: #edf4ff;
}

.card {
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--line), #ffffff 20%);
  border-radius: 14px;
  padding: clamp(0.75rem, 1.2vw, 1rem);
  display: grid;
  gap: 0.58rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.card p {
  color: #2f3e52;
}

.card a {
  font-weight: 650;
}

.card-icon {
  color: var(--brand-strong);
}

.title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
}

.title-with-icon svg {
  color: var(--brand-strong);
}

.stat-card {
  text-align: center;
  place-items: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 1), rgba(247, 250, 255, 1));
}

.stat-card h2 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.stats-grid,
.grid-cards {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.site-footer {
  margin-top: 2rem;
  background: linear-gradient(180deg, #070707 0%, #040404 100%);
  color: #f8fafc;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.1rem 1rem 0.7rem;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1.1rem;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.footer-column h3 {
  margin: 0;
  color: rgba(248, 250, 252, 0.85);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding: 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  width: fit-content;
  color: rgba(248, 250, 252, 0.9);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 120ms ease, color 120ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #ffffff;
  transform: translateX(2px);
}

.social-icon {
  flex-shrink: 0;
  width: 0.86rem;
  height: 0.86rem;
  opacity: 0.92;
}

.footer-contact-form {
  display: grid;
  gap: 0.36rem;
}

.footer-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.36rem;
}

.footer-contact-form label {
  display: grid;
  gap: 0.12rem;
  color: rgba(248, 250, 252, 0.75);
  font-size: 0.68rem;
}

.footer-contact-form input,
.footer-contact-form textarea {
  min-height: 2.05rem;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  padding: 0.5rem 0.62rem;
  font: inherit;
}

.footer-contact-form textarea {
  min-height: 4.2rem;
  resize: vertical;
}

.footer-contact-form input::placeholder,
.footer-contact-form textarea::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.footer-contact-form button {
  width: fit-content;
  padding: 0.42rem 0.8rem;
  font-size: 0.76rem;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.74rem 1rem 1.2rem;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(248, 250, 252, 0.66);
  letter-spacing: 0.03em;
}

@media (max-width: 720px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-bottom p {
  margin: 0;
}

.compact-settings-form {
  display: grid;
  gap: 0.9rem;
}

.settings-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.small-help-text {
  margin: -0.15rem 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #475569;
}

.dashboard-metrics {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.metric-card {
  gap: 0.18rem;
  text-decoration: none;
  color: inherit;
  min-height: 110px;
  align-content: start;
  padding: 0.7rem 0.68rem;
}

.dashboard-metrics > a.metric-card,
.dashboard-metrics > button.metric-card,
.dashboard-metrics > form.metric-card {
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.dashboard-metrics > a.metric-card:hover,
.dashboard-metrics > button.metric-card:hover,
.dashboard-metrics > form.metric-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(7, 89, 133, 0.18);
  border-color: color-mix(in srgb, var(--brand), white 35%);
  background: linear-gradient(180deg, rgba(236, 254, 255, 0.75), rgba(255, 255, 255, 1));
}

.dashboard-metrics > form.metric-card {
  padding: 0.72rem 0.68rem;
}

.dashboard-metrics > form.metric-card button {
  width: 100%;
  justify-content: center;
  margin-top: 0.18rem;
}

.metric-card .kicker {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.metric-card h2 {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  line-height: 1.1;
}

.metric-card p:last-child {
  font-size: 0.72rem;
  line-height: 1.2;
}

.metric-card-toggle {
  width: 100%;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--line), #ffffff 20%);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  display: grid;
  gap: 0.4rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  text-align: left;
  color: #4b5d76;
  font: inherit;
  min-height: 120px;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.metric-card-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(7, 89, 133, 0.18);
  background: #f8fbff;
  border-color: color-mix(in srgb, var(--brand), white 45%);
}

.metric-card-toggle.is-active {
  background: linear-gradient(180deg, rgba(236, 254, 255, 0.9), rgba(255, 255, 255, 1));
  border-color: color-mix(in srgb, var(--brand), white 35%);
  box-shadow: 0 12px 28px rgba(11, 114, 133, 0.12);
  color: var(--brand-strong);
}

.metric-card-toggle.is-active .kicker,
.metric-card-toggle.is-active h2,
.metric-card-toggle.is-active p:last-child {
  color: var(--brand-strong);
}

.metric-card-link {
  color: inherit;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.metric-card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: color-mix(in srgb, var(--brand), white 45%);
}

.metric-card-link.is-active {
  border-color: color-mix(in srgb, var(--brand), white 35%);
  background: linear-gradient(160deg, rgba(236, 254, 255, 1), rgba(255, 255, 255, 1));
}

.kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  font-weight: 700;
}

.metric-card h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
}

.metric-card-toggle h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  line-height: 1.1;
  color: #334155;
}

.metric-card-toggle p:last-child {
  font-size: 0.8rem;
  color: #64748b;
}

.metric-card-toggle.is-active .kicker,
.metric-card-toggle.is-active p:last-child,
.metric-card-toggle.is-active h2 {
  color: var(--brand-strong);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  padding: 0.1rem 0.52rem;
  font-size: 0.76rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: #f8fafc;
  color: #334155;
}

.status-pill.open,
.status-pill.pending {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.status-pill.assigned,
.status-pill.accepted,
.status-pill.approved {
  background: #ecfeff;
  border-color: #99f6e4;
  color: #0f766e;
}

.status-pill.completed {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.status-pill.rejected,
.status-pill.cancelled {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.status-pill.role {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.status-with-icon {
  gap: 0.28rem;
}

.status-with-icon svg {
  flex-shrink: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.edit-details {
  border: 1px dashed #c7d2e1;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
}

.edit-details summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--brand-strong);
  list-style: none;
  gap: 0.38rem;
}

.edit-details summary::-webkit-details-marker {
  display: none;
}

.edit-details[open] {
  border-style: solid;
  border-color: color-mix(in srgb, var(--brand), white 55%);
  background: color-mix(in srgb, var(--brand), white 94%);
}

html.compact-ui .edit-details {
  padding: 0.42rem 0.6rem;
}

.stack-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.job-meta-grid {
  display: grid;
  gap: 0.45rem;
}

.media-section {
  display: grid;
  gap: 0.55rem;
}

.compact-media-section {
  gap: 0.45rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
}

.compact-media-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.45rem;
}

.media-card {
  display: grid;
  gap: 0.35rem;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  padding: 0.45rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #334155;
  font-size: 0.79rem;
  font-weight: 600;
}

.sortable-media-grid .media-card {
  cursor: grab;
}

.sortable-media-grid .media-card.dragging {
  opacity: 0.6;
  transform: scale(0.98);
}

.media-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.file-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
}

.compact-file-list {
  gap: 0.25rem;
  padding-left: 0.9rem;
}

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: #334155;
  font-size: 0.86rem;
}

.compact-file-list li {
  font-size: 0.8rem;
}

.file-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tiny-inline-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  background: #edf6ff;
  border: 1px solid #d9ebff;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 600;
}

.message-thread {
  display: grid;
  gap: 0.18rem;
}

.message-item {
  display: grid;
  gap: 0.06rem;
  padding: 0.18rem 0.32rem 0.2rem;
  border-radius: 9px;
  border: 1px solid #e5edf7;
  background: #f8fafc;
  width: 100%;
}

.message-item.own {
  margin-left: auto;
  background: #edfdf5;
  border-color: #caebd8;
  border-radius: 9px 9px 3px 9px;
  max-width: 85%;
}

.message-item.other {
  background: #f8fafc;
  border-color: #e5edf7;
  border-radius: 9px 9px 9px 3px;
  max-width: 85%;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  font-size: 0.55rem;
  color: #475569;
}

.message-head strong {
  color: #0f172a;
  font-size: 0.62rem;
}

.message-head span {
  padding: 0.05rem 0.16rem;
  border-radius: 999px;
  background: #ebf2fb;
  color: #334155;
  font-size: 0.5rem;
  font-weight: 700;
}

.message-head time {
  margin-left: auto;
  opacity: 0.8;
  font-size: 0.5rem;
}

.message-bubble {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 7px;
  padding: 0.22rem 0.32rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.message-item.own .message-bubble {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(22, 163, 74, 0.08);
}

.message-item p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.32;
  font-size: 0.72rem;
  color: #1f2937;
}

.message-replies {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.02rem;
  padding-left: 0.42rem;
  border-left: 1.5px solid #e5edf7;
}

.reply-form {
  display: grid;
  gap: 0.12rem;
  margin-top: 0.04rem;
  padding-top: 0.12rem;
  border-top: 1px solid #edf2f7;
}

.reply-form textarea {
  resize: vertical;
  min-height: 34px;
  padding: 0.3rem 0.38rem;
  font-size: 0.7rem;
  border: 1px solid #dfeaf7;
  background: #ffffff;
}

.reply-form button {
  width: fit-content;
  padding: 0.2rem 0.34rem;
  font-size: 0.62rem;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #475569;
}

.check-inline input {
  width: auto;
  margin: 0;
}

.inline-form {
  margin: 0;
}

.proposal-actions {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.proposal-actions a,
.proposal-actions button,
.proposal-actions .inline-form {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  scroll-snap-align: start;
}

.link-danger {
  background: transparent;
  border: none;
  color: #b91c1c;
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  width: auto;
}

.link-danger:hover {
  color: #991b1b;
  transform: none;
  box-shadow: none;
}

.flow-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.3rem;
}

.flow-step {
  text-align: center;
  border-radius: 999px;
  border: 1px dashed #cbd5e1;
  padding: 0.24rem 0.38rem;
  font-size: 0.72rem;
  color: #64748b;
  background: #f8fafc;
  font-weight: 600;
}

.flow-step.active {
  border-style: solid;
  border-color: #67e8f9;
  color: #0f766e;
  background: #ecfeff;
}

.deadline-progress {
  display: grid;
  gap: 0.35rem;
}

.deadline-progress-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.deadline-progress-track.has-goal::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 2px;
  background: #0f172a;
  opacity: 0.65;
}

.deadline-progress-track.has-overrun {
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.35) inset;
}

.deadline-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b7285 0%, #ea580c 100%);
}

.deadline-progress-fill.is-over {
  background: linear-gradient(90deg, #ea580c 0%, #dc2626 100%);
}

.deadline-meta {
  font-size: 0.82rem;
  color: #475569;
}

.milestones-builder {
  display: grid;
  gap: 0.6rem;
  padding: 0.7rem;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fbff;
}

.milestones-rows {
  display: grid;
  gap: 0.6rem;
}

.milestone-row {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.milestone-progress-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.4rem;
}

.milestone-progress-card {
  display: grid;
  gap: 0.35rem;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #fbfdff;
}

.timeline-list {
  position: relative;
  padding-left: 0.6rem;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 0.7rem;
  align-items: start;
  padding-left: 0.3rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: -12px;
  width: 2px;
  background: #d7e4f3;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #5bb7ff);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  position: relative;
  z-index: 1;
}

.completion-stats {
  background: #f8fbff;
  border: 1px solid #d7e4f3;
}

.time-visual {
  display: grid;
  gap: 0.38rem;
}

.time-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
}

.time-bar-estimated {
  background: #2563eb;
}

.time-bar-actual {
  display: flex;
  background: #e2e8f0;
}

.time-segment {
  height: 100%;
  display: block;
}

.time-segment.within {
  background: #16a34a;
}

.time-segment.over {
  background: #dc2626;
}

.final-rating {
  display: grid;
  gap: 0.28rem;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.star {
  font-size: 1.15rem;
  line-height: 1;
}

.star.filled {
  color: #f59e0b;
}

.star.empty {
  color: #cbd5e1;
}

.action-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  font-size: 0.84rem;
}

.label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #1f2a44;
  font-weight: 600;
}

.label-with-icon svg {
  color: #0b7285;
  flex-shrink: 0;
}

.stack-list {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.2rem;
}

.stack-list li {
  color: #1e293b;
  padding: 0.12rem 0;
}

.stack-list li p {
  font-size: 0.88rem;
  line-height: 1.4;
}

.stack-list li strong {
  font-size: 0.9rem;
}

.freelancers-grid .card h2,
.freelancers-grid .card p,
.freelancers-grid .stack-list li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.freelancers-grid {
  align-items: stretch;
}

.freelancers-grid .freelancer-card {
  display: flex;
  flex-direction: column;
  align-content: start;
  height: 100%;
  min-height: 25rem;
}

.freelancers-grid .freelancer-card > * {
  min-width: 0;
}

.freelancer-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.freelancer-name {
  margin: 0;
  flex: 1 1 14rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.freelancer-card-head .status-pill {
  flex: 0 0 auto;
  margin-top: 0.08rem;
}

.freelancers-grid .title-with-icon {
  flex-wrap: wrap;
  align-items: flex-start;
}

.freelancer-bio-toggle {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.freelancer-bio-summary {
  cursor: pointer;
  color: var(--brand-strong);
  font-weight: 700;
  list-style: none;
  width: fit-content;
  border: 1px solid #c7d2e1;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  background: #f8fbff;
  font-size: 0.78rem;
}

.freelancer-bio-summary::-webkit-details-marker {
  display: none;
}

.freelancer-bio-summary::after {
  content: "Ver más";
}

.freelancer-bio-toggle[open] .freelancer-bio-summary::after {
  content: "Ver menos";
}

.freelancer-bio-text {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.freelancer-bio-toggle[open] .freelancer-bio-text {
  display: block;
  overflow: visible;
}

.freelancer-skills,
.freelancer-rating {
  margin: 0;
}

.freelancer-reviews {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.freelancer-reviews li {
  display: grid;
  gap: 0.25rem;
}

.freelancer-review-rating {
  width: fit-content;
}

.freelancer-review-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.form-grid {
  display: grid;
  gap: 0.6rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.84rem;
  color: #2f3e52;
}

label small {
  font-size: 0.78rem;
  color: #64748b;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #c7d2e1;
  border-radius: 10px;
  padding: 0.52rem 0.62rem;
  background: white;
  font: inherit;
  color: #0f172a;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid color-mix(in srgb, var(--brand), white 60%);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--brand), #ffffff 30%);
}

#edit-proposal-form {
  transition: opacity 180ms ease, transform 180ms ease;
}

#edit-proposal-form[hidden] {
  display: none !important;
}

#edit-proposal-form:not([hidden]) {
  animation: reveal-soft 180ms ease;
}

@keyframes reveal-soft {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tiny {
  font-size: 0.8rem;
  opacity: 0.8;
}

.session-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.compact-toggle {
  background: #f0f7ff;
  color: #0f172a;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 0.38rem 0.58rem;
  font-size: 0.76rem;
  line-height: 1.2;
  font-weight: 700;
}

.compact-toggle:hover {
  background: #e0edff;
  box-shadow: none;
  transform: none;
}

.session-box > span:first-child {
  font-weight: 700;
}

.link-button {
  padding: 0.4rem 0.72rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: white;
}

th,
td {
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  padding: 0.62rem;
  font-size: 0.9rem;
}

th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.muted {
  background: #eef2f8;
  color: #0f172a;
  border-color: #cbd5e1;
}

.muted:hover {
  background: #e2e8f0;
  box-shadow: none;
}

.error-text {
  color: #9b1c1c;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.section-note {
  color: #475569;
  font-size: 0.92rem;
  max-width: 34ch;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: end;
}

.search-input-wrap {
  display: block;
}

.jobs-list {
  display: grid;
  gap: 0.8rem;
}

.job-preview {
  display: grid;
  gap: 0.6rem;
  padding: 0.95rem 1rem;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.job-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.job-preview-header h3 {
  font-size: 1.02rem;
}

.job-preview-client {
  color: #475569;
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

.job-preview-meta {
  display: flex;
  gap: 0.5rem 0.7rem;
  flex-wrap: wrap;
  color: #475569;
  font-size: 0.85rem;
}

.jobs-list-compact {
  display: grid;
  gap: 0.55rem;
}

.category-chart-wrap {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  margin: 0.65rem 0 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

.donut-chart {
  position: relative;
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.donut-inner {
  display: grid;
  place-items: center;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #edf2f7;
  text-align: center;
  box-shadow: none;
}

.donut-inner strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
  color: #0f172a;
}

.donut-inner span {
  display: block;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.chart-legend {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.2rem;
  margin: 0;
  padding: 0;
}

.chart-legend li {
  display: block;
}

.chart-legend-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.26rem;
  padding: 0.16rem 0.24rem;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font-size: 0.66rem;
  text-decoration: none;
}

.chart-legend-item:hover,
.chart-legend-item:focus-visible,
.chart-legend-item.active {
  background: #edf6ff;
  outline: none;
}

.legend-swatch {
  width: 0.54rem;
  height: 0.54rem;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.legend-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend strong {
  color: #0f172a;
  font-size: 0.66rem;
}

.category-projects {
  margin-top: 0.8rem;
  border-top: 1px solid #edf2f7;
  padding-top: 0.8rem;
}

.category-projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.category-projects-header h3 {
  margin: 0;
  font-size: 0.96rem;
  color: #0f172a;
}

.category-projects-header a {
  font-size: 0.72rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.project-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #f8fbff;
}

.project-list-main {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.project-list-main strong {
  color: #0f172a;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-list-main span {
  color: #64748b;
  font-size: 0.72rem;
}

.project-list-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.72rem;
  color: #475569;
}

.project-list-meta a {
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.empty-state {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .category-chart-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .donut-chart {
    max-width: 150px;
  }

  .chart-legend {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .category-chart-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .donut-chart {
    max-width: 130px;
  }

  .chart-legend {
    width: 100%;
  }
}

.job-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.7rem;
}

.job-summary-card {
  display: grid;
  gap: 0.6rem;
  height: 100%;
  padding: 0.8rem;
  border: 1px solid #dfe7f5;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.03);
}

.job-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.job-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #eef6ff;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.7rem;
}

.job-summary-card h4 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #0f172a;
}

.job-card-client {
  margin: 0;
  color: #475569;
  font-size: 0.78rem;
}

.job-card-description {
  margin: 0;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.5;
}

.job-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.2rem;
  border-top: 1px solid #edf2f7;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 600;
}

.jobs-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.jobs-table {
  --job-col-title: 19rem;
  --job-col-client: 12rem;
  --job-col-category: 10rem;
  --job-col-time: 8rem;
  --job-col-budget: 9rem;
  --job-col-status: 10rem;
  --job-col-action: 12rem;
  min-width: calc(
    var(--job-col-title) +
    var(--job-col-client) +
    var(--job-col-category) +
    var(--job-col-time) +
    var(--job-col-budget) +
    var(--job-col-status) +
    var(--job-col-action) +
    3.3rem
  );
  display: grid;
  gap: 0;
}

.jobs-table-head,
.jobs-table-row {
  display: grid;
  grid-template-columns: var(--job-col-title) var(--job-col-client) var(--job-col-category) var(--job-col-time) var(--job-col-budget) var(--job-col-status) var(--job-col-action);
  gap: 0;
  align-items: center;
}

.jobs-table-head {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 0;
  background: #eaf2ff;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 0 rgba(30, 58, 138, 0.12);
}

.jobs-table-row {
  border: 1px solid #dbe3f3;
  border-radius: 0;
  padding: 0;
  background: #f9fbff;
}

.jobs-table-row + .jobs-table-row {
  border-top: 0;
}

.jobs-table-row:last-child {
  border-radius: 0 0 12px 12px;
}

.jobs-table-row > span {
  min-width: 0;
  font-size: 0.84rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jobs-table-row > span:nth-child(7) {
  overflow: visible;
}

.jobs-table-head > span,
.jobs-table-row > span {
  padding: 0.55rem 0.65rem;
  border-right: 1px solid #d7e3f4;
}

.jobs-table-head > span {
  border-bottom: 1px solid #cfe0ff;
}

.jobs-table-head > span:last-child,
.jobs-table-row > span:last-child {
  border-right: 0;
}

.jobs-table-row .cell-title {
  font-weight: 700;
}

.jobs-table-head > span:nth-child(4),
.jobs-table-head > span:nth-child(5),
.jobs-table-row > span:nth-child(4),
.jobs-table-row > span:nth-child(5) {
  text-align: right;
}

.jobs-table-head > span:nth-child(6),
.jobs-table-row > span:nth-child(6) {
  text-align: center;
}

.jobs-table-row .action-with-icon {
  justify-self: start;
  font-size: 0.8rem;
  padding: 0.35rem 0.55rem;
}

.icon-only-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #1d4ed8;
}

.icon-only-link:hover,
.icon-only-link:focus-visible {
  background: #dbeafe;
  color: #1e40af;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  text-decoration: none;
}

.icon-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.4rem);
  transform: translateX(-50%);
  padding: 0.24rem 0.48rem;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
  z-index: 20;
}

.icon-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f172a;
}

.icon-only-link:hover .icon-tooltip,
.icon-only-link:focus-visible .icon-tooltip {
  opacity: 1;
}

@media (hover: none) {
  .icon-tooltip {
    display: none;
  }
}

.job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #dbe3f3;
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  background: #f9fbff;
}

.job-row-main {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.job-row-main h3 {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.2;
}

.job-row-summary {
  margin: 0;
  font-size: 0.8rem;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-row-description {
  margin: 0;
  font-size: 0.79rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  padding: 0.56rem 0.88rem;
  border-radius: 12px;
  background: #eff6ff;
  color: #0f172a;
  font-weight: 700;
  border: 1px solid #bfdbfe;
}

.pagination-link.disabled {
  pointer-events: none;
  opacity: 0.48;
}

.pagination-status {
  color: #475569;
  font-size: 0.92rem;
  font-weight: 600;
}

.alert {
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
}

.alert.error {
  background: #fee2e2;
  color: #7f1d1d;
}

.alert.success {
  background: #dcfce7;
  color: #14532d;
}

.alert.info {
  background: #dbeafe;
  color: #1e3a8a;
}

.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;
}

html.compact-ui .container {
  padding-top: 0.85rem;
  padding-bottom: 1.8rem;
}

@media (max-width: 980px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }

  .main-nav a {
    white-space: nowrap;
  }

  .header-tools,
  .session-box {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .container {
    padding: 1rem 0.8rem 2rem;
  }

  .hero {
    border-radius: 16px;
  }

  .card {
    border-radius: 14px;
  }

  .stats-grid,
  .grid-cards,
  .stack-grid,
  .dashboard-metrics {
    gap: 0.8rem;
  }

  .flow-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .pagination-bar {
    align-items: stretch;
  }

  .pagination-link {
    width: 100%;
  }

  .cta-row {
    width: 100%;
  }

  .cta-row a,
  button,
  .link-button {
    width: 100%;
    text-align: center;
  }

  .actions form {
    width: 100%;
  }

  .actions button {
    width: 100%;
  }

  .proposal-actions,
  .proposal-actions .inline-form,
  .proposal-actions a,
  .proposal-actions button {
    width: auto;
  }

  .job-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .jobs-table {
    min-width: calc(
      var(--job-col-title) +
      var(--job-col-client) +
      var(--job-col-category) +
      var(--job-col-time) +
      var(--job-col-budget) +
      var(--job-col-status) +
      var(--job-col-action) +
      3.3rem
    );
  }

  .job-row-actions {
    width: 100%;
    justify-content: space-between;
  }

  .freelancers-grid .freelancer-card {
    min-height: 19rem;
  }
}

html.compact-ui .hero {
  gap: 0.55rem;
  padding: 0.92rem;
  border-radius: 14px;
}

html.compact-ui .hero h1 {
  font-size: clamp(1.12rem, 2vw, 1.5rem);
}

html.compact-ui .card {
  border-radius: 12px;
  padding: 0.72rem;
  gap: 0.45rem;
}

html.compact-ui .dashboard-metrics,
html.compact-ui .stats-grid,
html.compact-ui .grid-cards,
html.compact-ui .stack-grid {
  gap: 0.58rem;
  margin-top: 0.72rem;
}

html.compact-ui .metric-card h2,
html.compact-ui .stat-card h2 {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
}

html.compact-ui input,
html.compact-ui textarea,
html.compact-ui select {
  padding: 0.48rem 0.56rem;
  border-radius: 9px;
}

html.compact-ui .cta-row a,
html.compact-ui button,
html.compact-ui .link-button {
  padding: 0.46rem 0.68rem;
  border-radius: 9px;
}

@media (max-width: 760px) {
  html.compact-ui .topbar-inner {
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
  }

  html.compact-ui .brand-logo {
    width: 32px;
    height: 32px;
  }

  html.compact-ui .main-nav a {
    padding: 0.38rem 0.52rem;
    font-size: 0.82rem;
  }

  html.compact-ui .freelancers-grid .freelancer-card {
    min-height: 17rem;
  }

  html.compact-ui .container {
    padding: 0.72rem 0.7rem 1.2rem;
  }
}
