:root {
    --bg: #f3f5f8;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #d7deea;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --brand-soft: #d5f5ef;
    --accent: #f59e0b;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --success: #15803d;
    --success-soft: #dcfce7;
    --blue-soft: #dbeafe;
    --slate-soft: #e2e8f0;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.18), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.public-shell,
.admin-auth-shell,
.admin-shell {
    min-height: 100vh;
}

.hero-shell,
.auth-shell,
.centered-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 64px;
}

.hero-card,
.ticket-grid,
.stats-grid,
.feature-grid {
    display: grid;
    gap: 24px;
}

.hero-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
    align-items: start;
}

.hero-card-form-only {
    grid-template-columns: minmax(0, 780px);
    justify-content: center;
}

.hero-card-form-only .panel-public-form {
    max-height: calc(100vh - 70px);
    overflow: auto;
}

.hero-card-form-only .hero-copy {
    display: none;
}

.hero-copy {
    padding: 36px 8px 0 0;
}

.hero-copy h1,
.success-card h1,
.auth-card h1,
.section-heading h1 {
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: 1;
    margin: 0 0 16px;
    letter-spacing: -0.04em;
}

.hero-copy p,
.section-heading p,
.panel-heading p,
.auth-card p,
.success-card p,
.ticket-description p,
.timeline-item p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: var(--brand-dark);
    font-weight: 800;
    margin-bottom: 18px;
}

.feature-grid,
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.feature-card,
.stat-card,
.panel,
.auth-card,
.success-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(215, 222, 234, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-card {
    padding: 18px;
}

.feature-card strong,
.stat-card strong {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.feature-card span {
    color: var(--muted);
    line-height: 1.6;
}

.panel,
.auth-card,
.success-card {
    padding: 28px;
}

.panel-wide {
    margin-top: 24px;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    margin-bottom: 20px;
}

.panel-heading h2,
.ticket-description h3 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.form-grid,
.filter-grid,
.auth-form {
    display: grid;
    gap: 18px;
}

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

.full-width {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
    font-size: 0.96rem;
    font-weight: 700;
}

label span {
    color: var(--text);
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    border-radius: 16px;
    padding: 14px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

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

.file-field input {
    padding: 12px;
    background: #f8fafc;
}

.file-field small,
.auth-footer small {
    color: var(--muted);
    line-height: 1.6;
}

.file-list {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 700;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 13px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--line);
    color: var(--text);
}

.form-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.full-width.button,
.button.full-width {
    width: 100%;
}

.alert {
    border-radius: 18px;
    padding: 14px 18px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.alert-success {
    background: var(--success-soft);
    color: #166534;
    border-color: rgba(22, 101, 52, 0.16);
}

.alert-danger {
    background: var(--danger-soft);
    color: #991b1b;
    border-color: rgba(153, 27, 27, 0.16);
}

.centered-shell,
.auth-shell {
    display: grid;
    place-items: center;
}

.success-card,
.auth-card {
    width: min(560px, 100%);
}

.ticket-number {
    margin: 20px 0;
    border-radius: 20px;
    background: #0f172a;
    color: #f8fafc;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 18px 20px;
    text-align: center;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(215, 222, 234, 0.85);
}

.topbar-inner {
    min-height: 74px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%);
    color: #ffffff;
}

.topnav {
    display: flex;
    gap: 18px;
    color: var(--muted);
}

.topnav a:hover {
    color: var(--brand-dark);
}

.user-pill {
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 700;
}

.dashboard-shell,
.ticket-shell {
    padding: 36px 0 64px;
}

.admin-shell {
    background:
        linear-gradient(180deg, #f8fbff 0%, #eef1ff 100%);
}

.admin-app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    border-radius: 30px;
    padding: 22px 18px 18px;
    background: linear-gradient(180deg, #485a98 0%, #8d8ac2 100%);
    box-shadow: 0 24px 48px rgba(72, 90, 152, 0.28);
    color: rgba(255, 255, 255, 0.92);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.admin-brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 800;
}

.admin-brand-text {
    display: grid;
    gap: 4px;
}

.admin-brand-text strong {
    font-size: 1rem;
    line-height: 1.1;
}

.admin-brand-text small,
.admin-user-card small {
    color: rgba(255, 255, 255, 0.72);
}

.admin-nav {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.82);
    transition: background 0.18s ease, transform 0.18s ease;
}

.admin-nav-link:hover,
.admin-nav-link.is-active {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.admin-nav-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.admin-nav-link span:last-child {
    font-size: 0.92rem;
    font-weight: 700;
    text-align: left;
}

.admin-sidebar-footer {
    display: grid;
    gap: 14px;
    margin-top: auto;
}

.admin-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
}

.admin-user-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.admin-logout {
    text-align: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.9rem;
    font-weight: 700;
}

.admin-stage {
    min-width: 0;
    padding-right: 6px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(221, 228, 242, 0.95);
    border-radius: 30px;
    padding: 18px 22px;
    box-shadow: 0 14px 30px rgba(111, 130, 188, 0.12);
    backdrop-filter: blur(12px);
}

.admin-topbar-copy .eyebrow {
    margin-bottom: 10px;
}

.admin-topbar-copy h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2.3rem);
    letter-spacing: -0.04em;
}

.admin-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #eef3ff;
    color: #51628f;
    font-weight: 800;
}

.topbar-chip-strong {
    background: linear-gradient(135deg, #7f8ff2 0%, #b7a6ef 100%);
    color: #ffffff;
}

.admin-content {
    padding-top: 18px;
}

.admin-hero-grid,
.dashboard-board-grid,
.ticket-hero-grid,
.ticket-workspace-grid {
    display: grid;
    gap: 18px;
}

.admin-hero-grid,
.ticket-hero-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    margin-bottom: 20px;
}

.admin-hero-card,
.admin-side-card,
.board-stat-card,
.panel-emphasis,
.manage-panel,
.history-panel,
.queue-card,
.insight-card {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid #e7ecfb;
    box-shadow: 0 18px 38px rgba(136, 151, 201, 0.14);
}

.admin-hero-card,
.admin-side-card,
.board-stat-card {
    border-radius: 28px;
}

.admin-hero-card {
    padding: 26px 28px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(240, 243, 255, 0.96) 100%);
}

.admin-hero-card h2 {
    margin: 14px 0 10px;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.admin-hero-card p {
    color: #6c7897;
    max-width: 68ch;
}

.hero-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-status-pill,
.hero-status-note {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-status-pill {
    background: #fdd6d8;
    color: #a94d64;
}

.hero-status-note {
    background: #edf2ff;
    color: #6070a6;
}

.hero-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.hero-mini-stats div {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #e6ebfb;
    padding: 14px 16px;
}

.hero-mini-stats strong {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 6px;
    color: #3f4a6a;
}

.hero-mini-stats span {
    color: #7381a3;
    font-size: 0.9rem;
}

.admin-side-card {
    padding: 22px;
}

.panel-heading.compact {
    margin-bottom: 14px;
}

.signal-list {
    display: grid;
    gap: 10px;
}

.signal-list-spaced {
    gap: 14px;
}

.signal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #f5f7ff;
    border: 1px solid #e7ebfa;
}

.signal-label {
    color: #7c89ab;
    font-weight: 700;
}

.signal-item strong {
    font-size: 1.1rem;
}

.board-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.board-stat-card {
    padding: 16px;
}

.board-stat-card span {
    display: inline-flex;
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 0.74rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.board-stat-card strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 6px;
    color: #3d4867;
}

.board-stat-card small {
    color: #7d87a3;
}

.tone-red span,
.signal-dot.tone-red {
    background: #fbd3d8;
    color: #b25566;
}

.tone-orange span,
.signal-dot.tone-orange {
    background: #ffe1cf;
    color: #d5793f;
}

.tone-blue span,
.signal-dot.tone-blue {
    background: #d9e7ff;
    color: #5078d0;
}

.tone-purple span {
    background: #e6dcff;
    color: #7b62ca;
}

.tone-slate span {
    background: #e5e9f4;
    color: #66758f;
}

.tone-gold span,
.signal-dot.tone-gold {
    background: #ffefc8;
    color: #c7942e;
}

.board-filter-card {
    margin-top: 0;
    margin-bottom: 20px;
}

.dashboard-board-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
    align-items: start;
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-overview-card,
.dashboard-workflow-card {
    border-radius: 24px;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #e7ecfb;
    box-shadow: 0 16px 34px rgba(136, 151, 201, 0.12);
}

.dashboard-overview-card h2 {
    margin: 12px 0 10px;
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.dashboard-overview-card p {
    color: #6c7897;
}

.compact-board-stats {
    margin-bottom: 18px;
}

.dashboard-filter-card {
    margin-bottom: 18px;
}

.filter-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    align-items: end;
}

.filter-grid .filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 4px;
}

.priority-board-section {
    display: grid;
    gap: 16px;
}

#tickets-board {
    scroll-margin-top: 18px;
}

.board-heading {
    margin-bottom: 0;
}

.priority-board-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.priority-column {
    min-width: 0;
    border-radius: 24px;
    border: 1px solid #e6ebfa;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 28px rgba(136, 151, 201, 0.12);
    overflow: hidden;
}

.priority-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #edf1fb;
}

.priority-column-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.priority-column-title h3 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.priority-column-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f4f6fd;
    color: #5d6a94;
    font-size: 0.85rem;
    font-weight: 800;
}

.priority-ticket-list {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.priority-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.priority-dot-low {
    background: #9ca3af;
}

.priority-dot-medium {
    background: #60a5fa;
}

.priority-dot-high {
    background: #fb923c;
}

.priority-dot-urgent {
    background: #f87171;
}

.priority-column-low .priority-column-header {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.priority-column-medium .priority-column-header {
    background: linear-gradient(180deg, #eef5ff 0%, #ffffff 100%);
}

.priority-column-high .priority-column-header {
    background: linear-gradient(180deg, #fff4e8 0%, #ffffff 100%);
}

.priority-column-urgent .priority-column-header {
    background: linear-gradient(180deg, #fff0f0 0%, #ffffff 100%);
}

.ticket-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #edf1fb;
    box-shadow: 0 10px 22px rgba(156, 167, 205, 0.12);
}

.ticket-card-empty {
    min-height: 120px;
    place-items: center;
    color: #7b88a7;
    background: #fafbff;
}

.ticket-card-empty p {
    margin: 0;
}

.ticket-card-top,
.ticket-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ticket-ref {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #7583a6;
}

.ticket-card h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
    color: #26324f;
}

.ticket-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.ticket-card-meta strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.94rem;
}

.ticket-card-meta span {
    color: #7d89a7;
    font-size: 0.88rem;
}

.ticket-date {
    color: #7d89a7;
    font-size: 0.82rem;
}

.ticket-open-link {
    color: #5b6be6;
    font-weight: 800;
    font-size: 0.88rem;
}

.queue-card,
.insight-card,
.panel-emphasis,
.manage-panel,
.history-panel {
    border-radius: 28px;
}

.queue-card .data-table th {
    background: #f7f9ff;
}

.data-table tr:hover td {
    background: rgba(244, 247, 255, 0.74);
}

.mini-category-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f1f3ff;
    color: #5c6798;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 8px 11px;
}

.signal-item-note {
    align-items: start;
    justify-content: start;
}

.signal-item-note small {
    display: block;
    color: #7a88a8;
    line-height: 1.6;
    margin-top: 4px;
}

.signal-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    margin-top: 4px;
    flex: 0 0 auto;
}

.ticket-workspace-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    margin-bottom: 20px;
}

.ticket-hero-card {
    margin-bottom: 0;
}

.hero-ticket-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.panel-emphasis {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 255, 0.98) 100%);
}

.manage-panel textarea {
    min-height: 170px;
}

.history-panel .timeline-item {
    background: #f8faff;
    border-radius: 18px;
    border-left-width: 6px;
    border-left-color: #a3b6f2;
    padding: 16px 18px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.stat-card {
    padding: 22px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}

.stat-card strong {
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #e8edf4;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table-link {
    color: var(--brand-dark);
    font-weight: 800;
}

.cell-subtext {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.88rem;
}

.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 28px 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.85rem;
    font-weight: 800;
}

.badge-blue {
    background: var(--blue-soft);
    color: #1d4ed8;
}

.badge-amber {
    background: #fef3c7;
    color: #b45309;
}

.badge-green {
    background: var(--success-soft);
    color: #15803d;
}

.badge-red {
    background: var(--danger-soft);
    color: #b91c1c;
}

.badge-slate {
    background: var(--slate-soft);
    color: #334155;
}

.badge-outline {
    border: 1px solid var(--line);
    color: var(--text);
}

.ticket-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
}

.details-list {
    display: grid;
    gap: 16px;
    margin: 0;
}

.details-list div {
    padding-bottom: 14px;
    border-bottom: 1px solid #ecf1f6;
}

.details-list dt {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.details-list dd {
    margin: 0;
    font-weight: 700;
}

.ticket-description {
    margin-top: 24px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.image-card {
    margin: 0;
    overflow: hidden;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e6edf5;
}

.image-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.image-card figcaption {
    display: grid;
    gap: 4px;
    padding: 14px;
}

.image-card span {
    color: var(--muted);
    font-size: 0.9rem;
}

.timeline {
    display: grid;
    gap: 16px;
}

.timeline-item {
    border-left: 4px solid rgba(15, 118, 110, 0.22);
    padding: 10px 0 10px 16px;
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.timeline-meta span,
.timeline-note {
    color: var(--muted);
}

.auth-footer {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

@media (max-width: 960px) {
    .hero-card,
    .ticket-grid,
    .admin-hero-grid,
    .dashboard-board-grid,
    .dashboard-overview-grid,
    .ticket-hero-grid,
    .ticket-workspace-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding-right: 0;
    }

    .admin-app-shell {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        border-radius: 24px;
        padding: 16px;
    }

    .admin-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-nav-link {
        justify-content: center;
        padding: 10px 8px;
        flex-direction: column;
        text-align: center;
    }

    .admin-nav-link span:last-child {
        text-align: center;
    }

    .admin-topbar,
    .section-heading-row,
    .panel-heading {
        grid-template-columns: 1fr;
        display: grid;
    }

    .board-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .hero-mini-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .form-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .topnav,
    .form-actions,
    .filter-actions {
        flex-direction: column;
    }

    .wrap,
    .hero-shell,
    .centered-shell,
    .auth-shell {
        width: min(100% - 20px, 100%);
    }

    .panel,
    .auth-card,
    .success-card {
        padding: 22px;
    }

    .hero-shell,
    .dashboard-shell,
    .ticket-shell {
        padding-top: 24px;
    }

    .hero-card-form-only .panel-public-form {
        max-height: calc(100vh - 40px);
    }

    .admin-nav {
        grid-template-columns: 1fr;
    }

    .admin-brand,
    .admin-user-card {
        align-items: center;
        text-align: center;
        justify-content: center;
    }

    .board-stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar-actions {
        flex-direction: column;
    }

    .priority-board-grid {
        grid-template-columns: 1fr;
    }

    .ticket-card-meta,
    .ticket-card-footer {
        flex-direction: column;
        align-items: start;
    }
}
