:root {
    color-scheme: light;
    font-family: Arial, Helvetica, sans-serif;
}

html,
body {
    height: 100%;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow: hidden;
    background: #f6f8fb;
    color: #1f2937;
}

.page {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 8px;
}

.panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 41, 55, .08);
}

.header {
    margin-bottom: 12px;
}

.eyebrow {
    color: #0284c7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1 {
    margin: 4px 0 6px;
    font-size: 20px;
}

h2 {
    margin: 8px 0;
    font-size: 19px;
}

h3 {
    margin: 12px 0 2px;
    font-size: 16px;
}

.header p,
.form-message {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.error {
    color: #b91c1c !important;
}

.content-view {
    flex: 1;
    min-height: 0;
    overflow-y: scroll;
    padding: 0 6px 16px 0;
    scrollbar-gutter: stable;
}

.content-view[hidden],
[hidden] {
    display: none !important;
}

.content-view::-webkit-scrollbar {
    width: 8px;
}

.content-view::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}

.content-view::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.action-toggle {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.action-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 62px;
    margin: 0;
    padding: 9px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.action-option:has(input:checked) {
    border-color: #0ea5e9;
    background: #f0f9ff;
    color: #075985;
}

.action-option input {
    flex: 0 0 auto;
    width: auto;
    margin: 2px 0 0;
}

.action-option span {
    display: grid;
    gap: 3px;
}

.action-option small {
    color: #64748b;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
}

.ticket-list {
    display: grid;
    gap: 9px;
}

.ticket-card {
    width: 100%;
    margin: 0;
    padding: 12px;
    text-align: left;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
}

.ticket-card:hover {
    border-color: #38bdf8;
    background: #f8fcff;
}

.ticket-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ticket-card strong {
    font-size: 14px;
}

.ticket-card p {
    display: -webkit-box;
    margin: 7px 0 0;
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ticket-card time {
    color: #94a3b8;
    font-size: 11px;
}

.empty-state {
    padding: 28px 12px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
}

.status-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
}

.ticket-detail {
    padding: 14px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #f8fafc;
}

.ticket-detail>p {
    margin: 0 0 12px;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 12px;
    margin: 0;
    font-size: 12px;
}

dt {
    color: #64748b;
    font-weight: 700;
}

dd {
    margin: 0;
}

.back-button {
    width: auto;
    margin: 0 0 10px;
    padding: 6px 0;
    background: transparent;
    color: #0369a1;
}

.back-button:hover {
    background: transparent;
    color: #075985;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.finish-form {
    margin-top: 12px;
    padding-top: 4px;
    border-top: 1px solid #e2e8f0;
}

label {
    display: block;
    margin: 9px 0 4px;
    font-size: 13px;
    font-weight: 700;
}

label small {
    color: #64748b;
    font-weight: 400;
}

input,
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-size: 14px;
}

textarea {
    min-height: 54px;
    height: auto;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #bae6fd;
    border-color: #0ea5e9;
}

.form-message {
    min-height: 18px;
    margin-top: 10px;
}

.form-message.error {
    color: #b91c1c;
}

.form-message.success {
    color: #15803d;
    font-weight: 700;
}

button {
    width: 100%;
    margin-top: 10px;
    padding: 11px 16px;
    border: 0;
    border-radius: 6px;
    background: #0284c7;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

button:hover:not(:disabled) {
    background: #0369a1;
}

button.is-loading {
    cursor: wait;
}

button.secondary {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
}

button.secondary:hover:not(:disabled) {
    background: #f8fafc;
}

button.danger {
    border-color: #fecaca;
    color: #b91c1c;
}

button:disabled {
    cursor: not-allowed;
    opacity: .65;
}

button.is-loading:disabled {
    cursor: wait;
}
