* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 28px;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    background: #f5f5f5;
    color: #242424;
}

.app {
    max-width: 900px;
    margin: 0 auto;

    background: #ffffff;

    padding: 32px;

    border-radius: 12px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}

h1 {
    margin: 0;
    font-size: 28px;
}

h2 {
    margin: 0;
    font-size: 22px;
}

h3 {
    margin: 0;
    font-size: 17px;
}

.subtitle {
    margin: 6px 0 0;
    color: #666666;
}

.status {
    padding: 8px 12px;

    border-radius: 6px;

    background: #eeeeee;

    font-size: 13px;
    white-space: nowrap;
}

.status.success {
    background: #e7f6ea;
    color: #14532d;
}

.status.error {
    background: #fde7e9;
    color: #9f1239;
}

.user-box {
    padding: 15px;

    background: #f5f5f5;

    border-radius: 8px;

    margin-bottom: 22px;
}

.user-box span,
.user-box strong,
.user-box small {
    display: block;
}

.user-box span {
    font-size: 12px;
    color: #666666;
}

.user-box strong {
    margin-top: 3px;
}

.user-box small {
    margin-top: 3px;
    color: #666666;
}


/* Tabs */

.tabs {
    display: flex;

    gap: 6px;

    padding-bottom: 10px;

    margin-bottom: 28px;

    border-bottom: 1px solid #dedede;
}

.tab-button {
    border: none;

    background: transparent;

    color: #555555;

    padding: 10px 16px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    border-radius: 6px;
}

.tab-button:hover {
    background: #f1f1f1;
}

.tab-button.active {
    background: #6264a7;
    color: white;
}


/* Section */

.section-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 24px;
}

.section-header p {
    margin: 5px 0 0;
    color: #666666;
}


/* Form */

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 20px;
}

label {
    display: block;

    font-weight: 600;

    margin-bottom: 7px;
}

input,
select,
textarea {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid #cccccc;

    border-radius: 6px;

    font-family: inherit;
    font-size: 14px;

    background: white;
    color: #242424;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;

    border-color: #6264a7;

    box-shadow:
        0 0 0 1px #6264a7;
}

.hint {
    display: block;

    margin-top: 6px;

    color: #777777;
}


/* Buttons */

.primary-button,
.secondary-button {
    border: none;

    border-radius: 6px;

    font-family: inherit;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.primary-button {
    padding: 12px 22px;

    background: #6264a7;
    color: white;
}

.primary-button:hover {
    opacity: 0.92;
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.secondary-button {
    padding: 9px 14px;

    background: #eeeeee;
    color: #242424;
}

.secondary-button:hover {
    background: #dddddd;
}


/* Result */

.result {
    margin-top: 25px;

    padding: 18px;

    border-radius: 8px;
}

.success-result {
    background: #e7f6ea;
}

.error-result {
    background: #fde7e9;
    color: #9f1239;
}

.ticket-id {
    color: #666666;
    font-size: 13px;
}


/* Ticket List */

.ticket-card {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 18px;

    margin-bottom: 12px;

    border: 1px solid #dddddd;

    border-radius: 9px;

    background: white;

    transition:
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.ticket-card:hover {
    border-color: #bcbcbc;

    box-shadow:
        0 2px 8px
        rgba(0, 0, 0, 0.05);
}

.ticket-main {
    flex: 1;
    min-width: 0;
}

.ticket-title-row {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 10px;
}

.ticket-title-row h3 {
    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.ticket-status {
    flex-shrink: 0;

    padding: 4px 8px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
}

.status-not-started {
    background: #e8eefc;
}

.status-in-progress {
    background: #eeeeee;
}

.status-waiting {
    background: #fff4c2;
}

.status-completed {
    background: #dff7ed;
}

.status-scheduled {
    background: #ffe2dc;
}

.status-missing {
    background: #ffe9cc;
}

.status-on-hold {
    background: #f3e2ca;
}

.status-default {
    background: #eeeeee;
}

.ticket-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 8px;
}

.ticket-meta span {
    background: #f5f5f5;

    padding: 4px 8px;

    border-radius: 5px;

    color: #555555;

    font-size: 12px;
}

.ticket-date {
    color: #777777;
}

.ticket-actions {
    flex-shrink: 0;
}

.ticket-link {
    display: inline-block;

    padding: 8px 12px;

    border-radius: 6px;

    text-decoration: none;

    background: #eeeeee;

    color: #242424;

    font-size: 13px;
    font-weight: 600;
}

.ticket-link:hover {
    background: #dddddd;
}


/* Loading / Empty */

.loading {
    padding: 25px;

    text-align: center;

    color: #666666;
}

.empty-state {
    padding: 35px;

    text-align: center;

    border: 1px dashed #cccccc;

    border-radius: 8px;

    color: #666666;
}

.empty-state strong {
    color: #242424;
}

.empty-state p {
    margin-bottom: 0;
}


/* Helper */

.hidden {
    display: none !important;
}


/* Responsive */

@media (max-width: 700px) {

    body {
        padding: 12px;
    }

    .app {
        padding: 20px;
    }

    .app-header,
    .section-header,
    .ticket-card {
        align-items: stretch;
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .ticket-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-actions {
        width: 100%;
    }

    .ticket-link {
        width: 100%;
        text-align: center;
    }
}