* { box-sizing: border-box; }
body {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    line-height: 1.5;
}
.page-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
.page-header h1 { margin: 0; font-size: 1.1rem; }
.page-main { padding: 1rem; max-width: 960px; margin: 0 auto; }
@media (min-width: 640px) {
    .page-header { padding: 1rem 2rem; }
    .page-header h1 { font-size: 1.25rem; }
    .page-main { padding: 1.5rem 2rem; }
}
form { display: grid; gap: 0.75rem; }
label { display: grid; gap: 0.25rem; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
    font: inherit;
    padding: 0.4rem 0.5rem;
    border: 1px solid #999;
    border-radius: 4px;
    width: 100%;
}
textarea { min-height: 6rem; resize: vertical; }
.field-hint { color: #666; font-size: 0.8rem; margin-top: -0.5rem; }
select[disabled] { background: #f1f1f1; color: #555; cursor: not-allowed; }
button {
    font: inherit;
    padding: 0.45rem 0.9rem;
    border: 1px solid #444;
    background: #eee;
    border-radius: 4px;
    cursor: pointer;
}
button:hover { background: #ddd; }
button[disabled] { opacity: 0.6; cursor: progress; }
progress { width: 100%; height: 0.6rem; }
.notice { padding: 0.5rem 0.75rem; border-radius: 4px; margin: 0.5rem 0; }
.notice-error { background: #fee; border: 1px solid #c66; }
.notice-success { background: #efe; border: 1px solid #6c6; }
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tabs button { background: transparent; border: 1px solid #999; }
.tabs button.active { background: #444; color: #fff; }
.ticket-list { display: grid; gap: 0.5rem; }
.ticket-card {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.75rem;
    cursor: pointer;
}
.ticket-card:hover { background: #f7f7f7; }
.ticket-card .meta { font-size: 0.8rem; color: #666; }
.ticket-detail { border: 1px solid #ccc; padding: 1rem; border-radius: 4px; margin-top: 1rem; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.notes { display: grid; gap: 0.5rem; margin-top: 1rem; }
.note { background: #f6f6f6; padding: 0.5rem; border-radius: 4px; font-size: 0.9rem; }
.note .meta { font-size: 0.75rem; color: #555; }
.assets { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.assets a { font-size: 0.85rem; }

/* Stepper — mobile first */
.steps {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    gap: 0.25rem;
}
.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #888;
    text-align: center;
    min-width: 0;
}
.step .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ccc;
    color: #888;
    font-weight: 600;
    font-size: 0.9rem;
}
.step .label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.step.active { color: #222; }
.step.active .num {
    background: #444;
    border-color: #444;
    color: #fff;
}
.step.done { color: #2a7; }
.step.done .num {
    background: #6c6;
    border-color: #6c6;
    color: #fff;
}
@media (min-width: 480px) {
    .steps { gap: 1rem; margin-bottom: 1.5rem; }
    .step { font-size: 0.875rem; }
    .step .num { width: 2.25rem; height: 2.25rem; }
}

.step-panel { display: block; }
.step-panel[hidden] { display: none; }
.step-panel h2 { margin: 0 0 0.75rem 0; font-size: 1.1rem; }
#progress-text { color: #666; font-size: 0.85rem; margin: 0.5rem 0 0 0; }

.result { padding: 1rem; border-radius: 6px; }
.result h2 { margin-top: 0; }
.result-success { background: #efe; border: 1px solid #6c6; }
.result-error { background: #fee; border: 1px solid #c66; }
.result .reference {
    margin: 0.25rem 0 1rem 0;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    word-break: break-all;
    font-size: 1rem;
}
.result .reference code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Bigger tap targets on touch devices */
@media (pointer: coarse) {
    button { padding: 0.6rem 1rem; }
    input, select, textarea { padding: 0.55rem 0.6rem; }
}
