@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
    --bg:          #0A0A0B;
    --bg-surface:  #111114;
    --bg-card:     #161619;
    --bg-hover:    #1A1A1E;

    --border:      rgba(255,255,255,.07);
    --border-hi:   rgba(255,255,255,.12);

    --text:        #F0F0F5;
    --text-muted:  #8A8A9E;
    --text-dim:    #45454F;

    --accent:      #6C63FF;
    --accent-dim:  rgba(108,99,255,.15);
    --accent-glow: rgba(108,99,255,.08);

    --green:       #2DD4AA;
    --green-dim:   rgba(45,212,170,.12);
    --yellow:      #F5A623;
    --yellow-dim:  rgba(245,166,35,.12);
    --red:         #F05252;
    --red-dim:     rgba(240,82,82,.12);

    --radius:      8px;
    --radius-lg:   12px;
    --mono:        'DM Mono', monospace;
    --sans:        'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { font-size: 16px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1 {
    font-size: 1.625rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.2;
}
h2 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}
h3 {
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 2rem;
    background: rgba(10,10,11,.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--mono);
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}
.nav-brand svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}
.nav-brand .tld { color: var(--text-muted); }

.nav-right {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .25rem .6rem .25rem .25rem;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: .8rem;
    color: var(--text-muted);
}
.user-chip img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .85rem;
    border-radius: var(--radius);
    font-size: .8rem;
    font-weight: 500;
    font-family: var(--sans);
    cursor: pointer;
    border: none;
    transition: background .12s, color .12s, transform .1s;
    line-height: 1;
    letter-spacing: -0.01em;
    text-decoration: none;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: #7D75FF; }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border-hi);
}

.btn-danger {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(240,82,82,.2);
}
.btn-danger:hover { background: rgba(240,82,82,.22); }

.btn-success {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(45,212,170,.2);
}
.btn-success:hover { background: rgba(45,212,170,.22); }

.btn-lg {
    padding: .6rem 1.2rem;
    font-size: .875rem;
}
.btn-full {
    width: 100%;
    justify-content: center;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}
.container-wide {
    max-width: 1160px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.page-head {
    margin-bottom: 2.5rem;
}
.page-head .eyebrow {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: .75rem;
}
.page-head h1 { margin-bottom: .4rem; }
.page-head p {
    font-size: .9rem;
    color: var(--text-muted);
    max-width: 560px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    color: var(--text-dim);
    margin-bottom: 1.75rem;
}
.breadcrumb a {
    color: var(--text-dim);
    transition: color .12s;
}
.breadcrumb a:hover { color: var(--text-muted); }
.breadcrumb svg { width: 12px; height: 12px; }

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: -0.01em;
    margin-bottom: .4rem;
}

textarea,
input[type="text"] {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--sans);
    font-size: .875rem;
    padding: .7rem .9rem;
    resize: vertical;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
}
textarea:focus,
input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
textarea::placeholder,
input[type="text"]::placeholder {
    color: var(--text-dim);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .8rem 1rem;
    border-radius: var(--radius);
    font-size: .85rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(240,82,82,.2); }
.alert-warning { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(245,166,35,.2); }
.alert-info    { background: var(--accent-dim); color: #9D97FF;       border: 1px solid rgba(108,99,255,.2); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .55rem;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.status-badge svg { width: 10px; height: 10px; }
.badge-open     { background: var(--accent-dim); color: #9D97FF; }
.badge-in_review{ background: var(--yellow-dim); color: var(--yellow); }
.badge-closed   { background: rgba(255,255,255,.05); color: var(--text-dim); }

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}
.meta-cell {
    padding: .8rem 1rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: .8rem;
}
.meta-cell:nth-child(2n) { border-right: none; }
.meta-cell:nth-last-child(-n+2) { border-bottom: none; }
.meta-cell .label {
    color: var(--text-dim);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: .2rem;
}
.meta-cell .value {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: .78rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.text-muted { color: var(--text-muted); }
.text-dim   { color: var(--text-dim); }
.mono       { font-family: var(--mono); font-size: .82em; }
.flex       { display: flex; }
.items-center { align-items: center; }
.gap-2      { gap: .5rem; }
.gap-3      { gap: .75rem; }

@media (max-width: 640px) {
    nav { padding: 0 1rem; }
    .container, .container-wide { padding: 2rem 1rem; }
    h1 { font-size: 1.375rem; }
}