/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f3f4f6;
    color: #111827;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: #4f46e5; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout helpers */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.container--narrow {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.page { padding-top: 2.5rem; padding-bottom: 2.5rem; }

/* Public app layout (login, etc.) */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fff;
}
.app-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 0;
}
.app-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.app-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    padding: 3.5rem 1.5rem 2rem;
}
.app-layout__center {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}
.app-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
}
.app-footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6b7280;
}
.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

/* Navigation */
.nav {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    height: 56px;
    display: flex;
    align-items: center;
}

.nav--dark {
    background: #0f172a;
    border-bottom: none;
}

.nav__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: #4f46e5;
    text-decoration: none;
}

.nav__links { display: flex; align-items: center; gap: 1.5rem; }
.nav__right { display: flex; align-items: center; gap: 1rem; }

.nav__link {
    font-size: 0.9rem;
    color: #374151;
}

.nav__link:hover { color: #111827; text-decoration: none; }

.nav--dark .nav__link { color: rgba(255,255,255,0.75); }
.nav--dark .nav__link:hover,
.nav--dark .nav__link--active { color: #fff; text-decoration: none; }

.nav__email {
    font-size: 0.875rem;
    color: #6b7280;
}

.nav-logo--light { filter: brightness(0) invert(1); }

.btn--logout {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 0.875rem;
    padding: 0.3rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.15s;
}
.btn--logout:hover { background: rgba(255,255,255,0.1); }

/* Admin body */
.admin-body {
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    width: 100%;
    overflow-x: hidden;
    max-width: 100%;
}

/* Admin footer */
.admin-footer {
    border-top: 1px solid #e5e7eb;
    padding: 0.875rem 0;
    margin-top: 0;
}
.admin-footer__inner {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Cards / panels */
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.card__header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card__title { font-weight: 600; font-size: 0.95rem; }

.card__body { padding: 1.25rem; }

/* Buttons */
.btn {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 1rem;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s;
}

.btn--primary { background: #4f46e5; color: #fff; }
.btn--primary:hover { background: #4338ca; color: #fff; text-decoration: none; }

.btn--secondary { background: #f3f4f6; color: #374151; }
.btn--secondary:hover { background: #e5e7eb; color: #111827; text-decoration: none; }

.btn--danger { background: transparent; color: #dc2626; }
.btn--danger:hover { color: #b91c1c; text-decoration: none; }

.btn--small { font-size: 0.8rem; padding: 0.3rem 0.75rem; }

.btn--full { width: 100%; text-align: center; display: block; padding: 0.65rem 1rem; }

.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 1.15rem; }

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

label, .label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.3rem;
}

.label--xs {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.required { color: #dc2626; margin-left: 2px; }

.help-text { font-size: 0.78rem; color: #9ca3af; margin-bottom: 0.4rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.5;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

input.w-auto { width: auto; }

textarea { resize: vertical; min-height: 100px; }

input[type="checkbox"],
input[type="radio"] {
    accent-color: #4f46e5;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    flex-shrink: 0;
}

input[type="range"] {
    width: 100%;
    accent-color: #4f46e5;
    cursor: pointer;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.6rem 1rem;
}

.checkbox-label:hover,
.radio-label:hover { background: #f9fafb; }

.radio-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Scale / range wrapper */
.scale-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.scale-wrap__label { font-size: 0.8rem; color: #9ca3af; white-space: nowrap; }

.scale-value {
    font-size: 1rem;
    font-weight: 700;
    min-width: 2rem;
    text-align: center;
    color: #4f46e5;
}

/* Stars */
.stars { display: flex; gap: 0.35rem; }

.star-label { cursor: pointer; font-size: 2rem; color: #d1d5db; line-height: 1; }
.star-label:hover { color: #fbbf24; }

.star-input { display: none; }
.star-input:checked ~ .star-label { color: #fbbf24; }

.stars-display { display: flex; gap: 0.25rem; font-size: 1.5rem; }
.star-filled { color: #fbbf24; }
.star-empty  { color: #d1d5db; }

/* Tables */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

thead { background: #f9fafb; }

th {
    text-align: left;
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

td {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f3f4f6;
    vertical-align: middle;
}

tr:hover td { background: #fafafa; }

.td-actions { text-align: right; white-space: nowrap; }
.td-actions > * + * { margin-left: 0.75rem; }

/* Badges / status chips */
.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.badge--pending  { background: #eff6ff; color: #1d4ed8; }
.badge--used     { background: #f0fdf4; color: #15803d; }
.badge--voided   { background: #f3f4f6; color: #6b7280; }
.badge--expired  { background: #fef2f2; color: #dc2626; }
.badge--active   { background: #f0fdf4; color: #15803d; }
.badge--archived { background: #f3f4f6; color: #6b7280; }

/* Alerts */
.alert {
    border-radius: 8px;
    padding: 0.85rem 1.1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert--error   { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.alert--info    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.alert ul { list-style: disc; padding-left: 1.1rem; margin-top: 0.25rem; }

/* Pagination */
.pagination { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }

/* Laravel's default pagination classes */
nav[role="navigation"] { margin-top: 1rem; }

.pagination > * > span,
.pagination > * > a {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #374151;
    text-decoration: none;
}

.pagination > * > a:hover { background: #f3f4f6; }

/* Flex / grid utilities */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.flex-wrap     { flex-wrap: wrap; }
.gap-xs        { gap: 0.5rem; }
.gap-sm        { gap: 0.75rem; }
.gap-md        { gap: 1.25rem; }

/* Spacing utilities */
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.mb-4  { margin-bottom: 2rem; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }

/* Text utilities */
.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.78rem; }
.text-lg   { font-size: 1.15rem; }
.text-xl   { font-size: 1.4rem; }
.text-2xl  { font-size: 1.75rem; }
.font-bold { font-weight: 700; }
.font-semi { font-weight: 600; }
.text-muted   { color: #6b7280; }
.text-primary { color: #4f46e5; }
.text-success { color: #15803d; }
.text-danger  { color: #dc2626; }

/* Stats / dashboard cards */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }

.stat-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.25rem 1.5rem 1.5rem; }

.stat-card__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.5rem;
}

.stat-card__value { font-size: 2rem; font-weight: 700; color: #111827; line-height: 1; }

/* One-time link box */
.link-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.link-box__meta { min-width: 0; flex: 0 0 auto; }
.link-box__meta strong { display: block; font-size: 0.875rem; }
.link-box__meta span   { font-size: 0.78rem; color: #6b7280; }

.link-box__url { flex: 1; min-width: 0; }
.link-box__url input { font-size: 0.78rem; color: #374151; background: #f9fafb; }

/* Invitee checklist */
.invitee-list {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-height: 260px;
    overflow-y: auto;
    divide-y: 1px solid #f3f4f6;
}

.invitee-list .checkbox-label { border-top: 1px solid #f3f4f6; }
.invitee-list .checkbox-label:first-child { border-top: none; }

/* Dashboard section */
.dash-section { margin-top: 0.5rem; }

.dash-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}

.dash-section__title { font-size: 1.125rem; font-weight: 600; color: #111827; }

.dash-section__count { font-size: 0.8rem; color: #9ca3af; }

.dash-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.dash-search__input {
    flex: 1 1 0%;
    width: 0 !important;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
    outline: none;
    box-shadow: none !important;
    background: #fff;
}
.dash-search__input:focus { border-color: #9ca3af; box-shadow: none !important; }

.btn--dark {
    height: 36px;
    padding: 0 1rem;
    background: #fff;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.btn--dark:hover { background: #f9fafb; border-color: #9ca3af; }

.dash-search__select {
    flex: 0 0 auto;
    width: auto !important;
    height: 36px;
    padding: 0 2rem 0 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
    background: #fff;
    cursor: pointer;
    outline: none;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 12px 12px;
}

.dash-search__reset {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    white-space: nowrap;
}
.dash-search__reset:hover { color: #111827; text-decoration: none; }

.resp-name { font-weight: 500; color: #111827; }
.resp-email { font-size: 0.8rem; color: #6b7280; margin-left: 0.25rem; }

.link-action { font-size: 0.875rem; color: #4f46e5; text-decoration: none; }
.link-action:hover { text-decoration: underline; }

.empty-row { text-align: center; color: #9ca3af; font-size: 0.875rem; padding: 2rem 1rem; }

/* Dashboard custom pagination */
.dash-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.dash-pagination__nav { display: flex; align-items: center; gap: 0.5rem; }

.dash-pagination__btn {
    color: #374151;
    text-decoration: none;
    font-size: 0.8rem;
}
.dash-pagination__btn:hover { color: #111827; text-decoration: none; }

.dash-pagination__btn--disabled { color: #d1d5db; cursor: default; }

.dash-pagination__pages { font-size: 0.8rem; color: #374151; }

/* Clients page two-column layout */
.clients-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.clients-main { min-width: 0; }

.client-name-link {
    font-weight: 500;
    color: #111827;
    text-decoration: none;
}
.client-name-link:hover { text-decoration: underline; color: #111827; }

.fb-count--total     { color: #dc2626; font-weight: 500; }
.fb-count--sep       { color: #d1d5db; }
.fb-count--responded { color: #6b7280; }

.btn-archive {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.2rem 0.7rem;
    border: 1px solid #dc2626;
    border-radius: 6px;
    color: #dc2626;
    background: transparent;
    cursor: pointer;
    line-height: 1.5;
    transition: background 0.15s;
}
.btn-archive:hover { background: #fef2f2; }

/* Add client card */
.add-client-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5rem;
    background: #fff;
}

.add-client-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.25rem;
}

.btn--black {
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.25rem;
}
.btn--black:hover { background: #1f2937; color: #fff; text-decoration: none; }

/* Client show page */
.cs-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.cs-back {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #9ca3af;
    text-decoration: none;
    margin-bottom: 0.35rem;
}
.cs-back:hover { color: #374151; text-decoration: none; }

.cs-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin: 0;
}

.cs-header__actions { display: flex; gap: 0.75rem; align-items: center; }
.proj-status { font-size: 0.8rem; color: #6b7280; margin: 0.15rem 0 0; }

/* Cycle show page */
.cyc-show-header { margin-bottom: 1.5rem; }
.cyc-show-meta {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.15rem 0 0;
    line-height: 1.5;
}

.cyc-links-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.cyc-links-banner__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.cyc-links-banner__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #14532d;
    margin: 0 0 0.2rem;
}
.cyc-links-banner__sub {
    font-size: 0.78rem;
    color: #166534;
    margin: 0;
}
.cyc-links-list { display: flex; flex-direction: column; gap: 0.6rem; }
.cyc-link-row {
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 7px;
    padding: 0.6rem 0.875rem;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.3rem 0.75rem;
    align-items: center;
}
.cyc-link-row__meta { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 0.6rem; }
.cyc-link-row__actions { grid-column: 2; grid-row: 1; }
.cyc-link-row__name { font-size: 0.875rem; font-weight: 600; color: #111827; }
.cyc-link-row__email { font-size: 0.8rem; color: #6b7280; }
.cyc-link-row__url {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.78rem;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 0.35rem 0.6rem;
    word-break: break-all;
}

.cyc-link-row__no-url {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.78rem;
    color: #9ca3af;
    font-style: italic;
}

/* Invitation revision tag */
.inv-rev-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* History expansion rows */
.inv-history-row { background: #f9fafb; }
.inv-history-cell { padding: 0 !important; }
.inv-history-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #9ca3af;
    padding: 0.6rem 1rem 0.35rem;
    text-transform: uppercase;
}
.inv-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
}
.inv-history-item:first-of-type { border-top: 1px solid #e5e7eb; }
.inv-history-item__right { display: flex; align-items: center; gap: 0.75rem; }

/* Outlined button variant */
.btn--outline {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
    transition: border-color 0.15s, background 0.15s;
}
.btn--outline:hover { border-color: #9ca3af; background: #f9fafb; }

.cs-section__title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cs-section__count {
    font-size: 0.85rem;
    font-weight: 400;
    color: #9ca3af;
}

/* Bordered list used for cycles, users, projects */
.cs-list {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.cs-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}
.cs-list__row:last-child { border-bottom: none; }
.cs-list__row:hover { background: #fafafa; text-decoration: none; }
.cs-list__row--plain { cursor: default; }
.cs-list__row--plain:hover { background: #fff; }

.cs-list__empty {
    padding: 1.25rem 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
    text-align: center;
}

/* Cycle row */
.cs-cycle__info { display: flex; flex-direction: column; gap: 0.2rem; }
.cs-cycle__label { font-weight: 500; color: #111827; font-size: 0.9rem; }
.cs-cycle__meta  { font-size: 0.78rem; color: #9ca3af; }
.cs-cycle__ratio { font-size: 0.875rem; color: #9ca3af; white-space: nowrap; }

/* User row */
.cs-user__name  { font-weight: 500; font-size: 0.9rem; color: #111827; }
.cs-user__email { font-size: 0.78rem; color: #9ca3af; }

/* Project row */
.cs-list__row--project { color: #111827; }
.cs-project__name { font-size: 0.9rem; font-weight: 400; }
.cs-project__arrow { color: #9ca3af; font-size: 0.9rem; }

/* Add row (collapsible) */
.cs-add-row { border-bottom: none; }

.cs-add-row__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
    list-style: none;
    border-top: 1px solid #f3f4f6;
    user-select: none;
}
.cs-add-row__toggle::-webkit-details-marker { display: none; }
.cs-add-row__toggle::after { content: '\25B8'; font-size: 0.7rem; color: #9ca3af; }
details[open] .cs-add-row__toggle::after { content: '\25BE'; }
.cs-add-row__toggle:hover { background: #fafafa; color: #374151; }

.cs-add-row__form {
    padding: 1rem 1rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
}

/* Bottom two-column grid */
.cs-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Clickable table rows */
.table-row-link:hover td { background: #f9fafb; }

/* Cycle create page */
.cyc-create { max-width: 560px; }

.cyc-create__sub {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin-top: 0.25rem;
}

.cyc-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.4rem;
}

.cyc-label__opt {
    font-weight: 400;
    color: #9ca3af;
    font-size: 0.8rem;
}

.cyc-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.55rem 0.875rem;
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}
.cyc-input:focus { border-color: #6b7280; box-shadow: none; }

.cyc-invitees-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cyc-invitees-header__count {
    font-size: 0.8rem;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 0.3rem;
}

.cyc-invitees-header__actions { display: flex; gap: 0.5rem; }

.cyc-invitee-list {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.cyc-invitee-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.875rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    font-size: 0.875rem;
}
.cyc-invitee-row:last-child { border-bottom: none; }
.cyc-invitee-row:hover { background: #f9fafb; }

.cyc-invitee-name { font-weight: 500; color: #111827; }
.cyc-invitee-email { color: #9ca3af; font-size: 0.8rem; margin-left: 0.25rem; }

/* Section spacing */
.section + .section { margin-top: 1.75rem; }

/* Response answer block */
.answer-block { padding: 1.1rem 1.25rem; border-top: 1px solid #f3f4f6; }
.answer-block:first-child { border-top: none; }
.answer-block__question { font-size: 0.72rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.answer-block__value { font-size: 0.95rem; color: #111827; }
.answer-block__value--big { font-size: 2rem; font-weight: 800; color: #4f46e5; }
.answer-block__max { font-size: 0.875rem; font-weight: 400; color: #9ca3af; }

/* Page header */
.page-header { margin-bottom: 1.75rem; }
.page-header__back { font-size: 0.85rem; color: #9ca3af; display: inline-block; margin-bottom: 0.25rem; }
.page-header__back:hover { color: #6b7280; }
.page-header__title { font-size: 1.6rem; font-weight: 700; margin: 0; line-height: 1.2; }
.page-header__subtitle { font-size: 0.875rem; color: #6b7280; margin-top: 0.25rem; }

/* Logo in nav and public layout */
.nav-logo { height: 28px; width: auto; display: block; }
.layout-logo { height: 32px; width: auto; }

/* Splash / Home page */
.splash-body { background: #fff; }

.splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 3rem 1.25rem 2rem;
}

.splash__logo { margin-bottom: 3rem; }
.splash__logo img { height: 36px; width: auto; display: block; }

.splash__hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 480px;
    gap: 1.5rem;
    padding-top: 2rem;
}

.splash__icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.splash__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.splash__subtitle {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
}

.splash__footer {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
}

/* ===== Error pages ===== */
.err-layout {
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Shared inner container — aligns content with the 540px card + its 1.25rem gutters */
.err-container {
    max-width: 580px;   /* 540px card + 2 × 1.25rem (20px) padding */
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
}

/* Left-aligned header (error pages) */
.err-layout__header {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.875rem 0;
    display: flex;
    align-items: center;
}

.err-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1.25rem;
}

/* Base card - warm orange (410, 409) */
.err-card {
    max-width: 540px;
    width: 100%;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/* Pink card variant (404) */
.err-card--pink {
    background: #fef2f2;
    border-color: #fecaca;
}

/* Base icon - orange ! */
.err-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #fcd9b0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #ea580c;
    margin-top: 0.05rem;
}

/* Red × icon variant (404) */
.err-icon--red {
    border-color: #fca5a5;
    color: #ef4444;
    font-size: 1.1rem;
}

.err-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.35rem;
    line-height: 1.3;
}

.err-desc {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

.err-footer {
    border-top: 1px solid #e5e7eb;
    padding: 0.875rem 0;
}

.err-footer .err-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ===== Feedback form layout ===== */
.fb-layout {
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.fb-layout__main--nobar {
    padding-top: 3rem;
    padding-bottom: 2rem;
    flex: 1;
}

.fb-layout__header {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.875rem 0;
}

/* Aligns logo with the left edge of the form cards (max-width 640px + 1.25rem gutters) */
.fb-layout__header-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
}

.fb-layout__main {
    max-width: 640px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 6rem;
}

.fb-layout__footer {
    border-top: 1px solid #e5e7eb;
    padding: 0.875rem 0;
    margin-top: auto;
}

.fb-layout__footer-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Thank-you page */
.ty-card {
    background: linear-gradient(160deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 3rem 3rem 2.75rem;
    text-align: center;
    margin-bottom: 1.25rem;
    width: 100%;
}

.ty-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
}

.ty-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.ty-desc {
    font-size: 1rem;
    color: #374151;
    line-height: 1.65;
}

.ty-close {
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Per-field validation error card */
.fb-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    color: #dc2626;
    font-size: 0.875rem;
    padding: 0.875rem 1.1rem;
    margin-bottom: 0.625rem;
}

/* Greeting card */
.fb-header {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}

.fb-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.fb-tag {
    font-size: 0.72rem;
    color: #9ca3af;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.fb-private {
    font-size: 0.72rem;
    font-weight: 500;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 0.18rem 0.6rem;
}

.fb-header__body {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.fb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1f2937;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fb-greeting {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.15rem;
}

.fb-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* Question cards */
.fb-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}

.fb-card--answered { border-color: #14b8a6; }

.fb-question {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.fb-qnum {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.15rem;
    transition: background 0.2s, color 0.2s;
}

.fb-qnum--done {
    background: #22c55e;
    color: transparent;
    font-size: 0;
}

.fb-qnum--done::after {
    content: '✓';
    font-size: 0.75rem;
    color: #fff;
    font-weight: 700;
}

.fb-qbody { flex: 1; min-width: 0; }

.fb-qlabel {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin: 0 0 0.875rem;
    line-height: 1.4;
}

.fb-asterisk { color: #ef4444; margin-left: 0.2rem; }

.fb-optional {
    color: #9ca3af;
    font-size: 0.82rem;
    font-weight: 400;
    margin-left: 0.3rem;
}

.fb-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.65rem;
    margin-top: -0.4rem;
}

/* Scale - clickable 0-10 button row (must fit one line) */
.fb-scale {
    display: flex;
    gap: 0.3rem;
    flex-wrap: nowrap;
    margin-bottom: 0.4rem;
}

.fb-scale__input { display: none; }

.fb-scale__btn {
    width: 42px;
    min-width: 0;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #fff;
    font-size: 0.825rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.1s, background 0.1s, color 0.1s;
    user-select: none;
}

.fb-scale__btn:hover {
    border-color: #a5b4fc;
    color: #4f46e5;
    background: #f5f3ff;
}

/* Default selected state — overridden per NPS category below */
.fb-scale__input:checked + .fb-scale__btn {
    background: #1f2937;
    border-color: #1f2937;
    color: #fff;
}

/* NPS-category selected colours */
.fb-scale--detractor .fb-scale__input:checked + .fb-scale__btn {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}
.fb-scale--passive .fb-scale__input:checked + .fb-scale__btn {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}
.fb-scale--promoter .fb-scale__input:checked + .fb-scale__btn {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

/* NPS badge below scale */
.fb-nps {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.775rem;
    font-weight: 500;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
}
.fb-nps--detractor { background: #fee2e2; color: #ef4444; }
.fb-nps--passive   { background: #fef3c7; color: #d97706; }
.fb-nps--promoter  { background: #dcfce7; color: #16a34a; }

.fb-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.35rem;
}

/* Stars row: stars + count side by side */
.fb-stars-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.fb-stars-count {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
}

/* Stars - CSS-only hover/select using row-reverse trick */
.fb-stars {
    display: flex;
    flex-direction: row-reverse;
    gap: 0.3rem;
    width: fit-content;
}

.fb-star__input { display: none; }

.fb-star__label {
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    line-height: 1;
    transition: color 0.1s;
}

.fb-star__label:hover,
.fb-star__label:hover ~ .fb-star__label,
.fb-star__input:checked ~ .fb-star__label {
    color: #fbbf24;
}

/* Text areas with char counter */
.fb-textarea-wrap { position: relative; }

.fb-textarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.7rem 0.875rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: #111827;
    resize: vertical;
    background: #fff;
    display: block;
}

.fb-textarea::placeholder { color: #9ca3af; }

.fb-textarea:focus {
    outline: none;
    border-color: #a5b4fc;
}

.fb-char-count {
    display: block;
    text-align: right;
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 0.3rem;
}

/* Choice buttons - emoji pill selectors */
.fb-choices { display: flex; gap: 0.75rem; }

.fb-choice__input { display: none; }

.fb-choice__btn {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: border-color 0.1s, background 0.1s, color 0.1s;
    user-select: none;
}

.fb-choice__btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

/* Per-value selected colours */
.fb-choice__input[value="Yes"]:checked + .fb-choice__btn {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #15803d;
    font-weight: 600;
}

.fb-choice__input[value="Maybe"]:checked + .fb-choice__btn {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
    font-weight: 600;
}

.fb-choice__input[value="No"]:checked + .fb-choice__btn {
    border-color: #f97316;
    background: #fff1f2;
    color: #be123c;
    font-weight: 600;
}

/* Sticky submit bar */
.fb-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 100;
}

.fb-bar__inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fb-bar__left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.fb-bar__left-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.fb-bar__count {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
}

.fb-bar__track {
    height: 4px;
    background: #e5e7eb;
    border-radius: 999px;
    width: 160px;
    overflow: hidden;
}

.fb-bar__fill {
    height: 100%;
    background: #22c55e;
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Avatar: shared base */
.fb-bar__avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #1f2937;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Desktop: show avatar in bar left, hide avatar inside button */
.fb-bar__avatar--bar { display: flex; }
.fb-bar__avatar--btn { display: none; }

.fb-bar__submit {
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s;
    white-space: nowrap;
}

.fb-bar__submit:hover { background: #374151; }

/* ── Response detail page ──────────────────────────────────────────────── */

.resp-wrap {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.resp-back {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    text-decoration: none;
}
.resp-back:hover { color: #111827; text-decoration: none; }

/* Notices */
.resp-notice {
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
}
.resp-notice--warn {
    background: #fefce8;
    border: 1px solid #fde047;
}
.resp-notice--info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
}
.resp-notice__title { font-weight: 600; color: #92400e; }
.resp-notice--info .resp-notice__title { color: #1e40af; }
.resp-notice__sub { margin-top: 0.35rem; font-size: 0.75rem; opacity: 0.75; }
.resp-notice__sub a { color: inherit; text-decoration: underline; }

/* User card */
.resp-user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.resp-avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.resp-user-info { flex: 1; min-width: 0; }
.resp-user-name { font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.resp-user-email { font-size: 0.875rem; color: #6b7280; margin-top: 0.2rem; }
.resp-user-context {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-top: 0.5rem;
}
.resp-submitted { text-align: right; font-size: 0.75rem; color: #9ca3af; flex-shrink: 0; }
.resp-submitted__label { text-transform: none; }
.resp-submitted__time { font-size: 0.875rem; color: #374151; margin-top: 0.2rem; }

/* Recommend banner */
.resp-recommend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
}
.resp-recommend--good  { background: #f0fdf4; border-color: #86efac; }
.resp-recommend--ok    { background: #fffbeb; border-color: #fcd34d; }
.resp-recommend--bad   { background: #fff1f2; border-color: #fca5a5; }
.resp-recommend--neutral { background: #f9fafb; border-color: #e5e7eb; }
.resp-recommend__label { font-size: 0.9rem; color: #374151; }
.resp-recommend__value { font-size: 1.25rem; font-weight: 700; }
.resp-recommend--good  .resp-recommend__value { color: #15803d; }
.resp-recommend--ok    .resp-recommend__value { color: #b45309; }
.resp-recommend--bad   .resp-recommend__value { color: #b91c1c; }
.resp-recommend--neutral .resp-recommend__value { color: #374151; }

/* Section */
.resp-section { display: flex; flex-direction: column; gap: 0.75rem; }
.resp-section__title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

/* Ratings grid */
.resp-ratings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}
@media (max-width: 700px) {
    .resp-ratings-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Rating card */
.resp-rating-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid transparent;
}
.resp-rating-card--good    { background: #f0fdf4; border-color: #86efac; }
.resp-rating-card--ok      { background: #fffbeb; border-color: #fcd34d; }
.resp-rating-card--bad     { background: #fff1f2; border-color: #fca5a5; }
.resp-rating-card--neutral { background: #f9fafb; border-color: #e5e7eb; border-style: dashed; }

.resp-rating-card__label { font-size: 0.75rem; line-height: 1.4; color: #6b7280; }
.resp-rating-card__score { display: flex; align-items: baseline; gap: 0.35rem; }
.resp-rating-card__value { font-size: 1.875rem; font-weight: 700; line-height: 1; }
.resp-rating-card__value--good    { color: #15803d; }
.resp-rating-card__value--ok      { color: #b45309; }
.resp-rating-card__value--bad     { color: #b91c1c; }
.resp-rating-card__value--neutral { color: #374151; }
.resp-rating-card__max { font-size: 0.875rem; color: #9ca3af; }

/* Progress bar */
.resp-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.resp-progress__fill { height: 100%; border-radius: 999px; }
.resp-progress__fill--good  { background: #22c55e; }
.resp-progress__fill--ok    { background: #f59e0b; }
.resp-progress__fill--bad   { background: #ef4444; }

/* Stars */
.resp-stars { display: flex; gap: 2px; font-size: 1rem; line-height: 1; }
.resp-star { }
.resp-star--good  { color: #15803d; }
.resp-star--ok    { color: #b45309; }
.resp-star--bad   { color: #b91c1c; }
.resp-star--empty { color: #d1d5db; }

/* Comments grid */
.resp-comments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (max-width: 560px) {
    .resp-comments-grid { grid-template-columns: 1fr; }
}

.resp-comment-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}
.resp-comment-card__label { font-size: 0.8rem; font-weight: 500; color: #6b7280; }
.resp-comment-card__text  { font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; color: #111827; }

.resp-no-answer { font-size: 0.875rem; color: #9ca3af; }

/* Stale keys */
.resp-stale-pre {
    margin-top: 0.5rem;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.7rem;
    overflow-x: auto;
}

/* ── Feedback form responsiveness ────────────────────────────────────────── */

/* ── Mobile: 0–639px ─────────────────────────────────────────────────────── */
@media (max-width: 639px) {
    /* Outer padding */
    .fb-layout__main {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-bottom: 8.5rem;
    }

    .fb-card   { padding: 1rem 0.875rem; }
    .fb-header { padding: 0.875rem 1rem; }

    /* Typography */
    .fb-greeting     { font-size: 1rem; }
    .fb-subtitle     { font-size: 0.8rem; }
    .fb-qlabel       { font-size: 0.8rem; margin-bottom: 0.65rem; }
    .fb-optional     { font-size: 0.73rem; }
    .fb-hint         { font-size: 0.7rem; }
    .fb-scale-labels { font-size: 0.7rem; }
    .fb-stars-count  { font-size: 0.8rem; }

    /* Prevent iOS auto-zoom on input focus */
    .fb-textarea { font-size: 16px; }

    /* Scale: wrap to 2 rows (0-5 / 6-10) */
    .fb-scale { flex-wrap: wrap; gap: 0.3rem; }

    /* Stars */
    .fb-star__label { font-size: 1.75rem; }

    /* Choice buttons: stack vertically, full width */
    .fb-choices     { flex-direction: column; gap: 0.5rem; }
    .fb-choice__btn { padding: 0.75rem 1rem; font-size: 0.925rem; border-radius: 10px; }

    /* Sticky bar: count text above, full-width pill button below */
    .fb-bar {
        border-top: 1px solid #f3f4f6;
        padding: 0.75rem 1rem 0.75rem;
    }
    .fb-bar__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        max-width: none;
        padding: 0;
    }
    .fb-bar__left        { gap: 0; flex-direction: column; align-items: flex-start; width: 100%; }
    .fb-bar__left-body   { width: 100%; }
    .fb-bar__count       { font-size: 0.8rem; }
    .fb-bar__track       { width: 100%; }

    /* Swap avatars: hide bar avatar, show button avatar */
    .fb-bar__avatar--bar { display: none; }
    .fb-bar__avatar--btn { display: flex; }

    .fb-bar__submit {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1.25rem;
        font-size: 0.925rem;
        font-weight: 500;
        gap: 0.65rem;
    }
}

/* ── Minimum: 360px ──────────────────────────────────────────────────────── */
@media (max-width: 360px) {
    .fb-layout__main { padding-left: 0.5rem; padding-right: 0.5rem; }
    .fb-card         { padding: 0.875rem 0.75rem; }

    .fb-greeting     { font-size: 0.95rem; }
    .fb-qlabel       { font-size: 0.75rem; margin-bottom: 0.55rem; }
    .fb-hint         { font-size: 0.67rem; }
    .fb-scale-labels { font-size: 0.67rem; }

    /* 40px buttons → 6 per row at 360px */
    .fb-scale__btn { width: 40px; height: 34px; font-size: 0.8rem; }
}

/* ── Landscape phone ─────────────────────────────────────────────────────── */
@media (max-height: 500px) and (max-width: 900px) {
    .fb-bar__left    { display: none; }
    .fb-bar          { padding: 0.5rem 1rem; }
    .fb-layout__main { padding-bottom: 4.5rem; }
}
