* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 40px 16px;
    background: #f1f5f9;
    color: #183048;
    font-family: Tahoma, sans-serif;
    line-height: 1.9;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 12px 40px #1830480d;
}

.brand {
    color: #16756b;
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
}

h1 {
    margin-bottom: 8px;
    font-size: 24px;
}

.description {
    color: #64748b;
    font-size: 14px;
}

label {
    display: block;
    margin: 18px 0 6px;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
}

input:focus {
    outline: 3px solid #16756b26;
    border-color: #16756b;
}

button {
    width: 100%;
    margin-top: 24px;
    padding: 8px;
    border: 0;
    border-radius: 10px;
    background: #16756b;
    color: white;
    font: inherit;
    cursor: pointer;
}

button:hover {
    background: #105e56;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #d99524;
    outline-offset: 3px;
}

.alert {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
}

.alert p {
    margin: 4px 0;
}

.error {
    background: #fff1f2;
    color: #9f1239;
}

.success {
    background: #ecfdf5;
    color: #166534;
}

small {
    display: block;
    margin-top: 6px;
    color: #64748b;
}

@font-face {
    font-family: "BTitr";
    src: url("../fonts/TitrB.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.auth-card .brand,
.auth-card h1 {
    display: block;
    text-align: center;
    font-family: "BTitr", Tahoma, sans-serif;
    font-weight: normal;
}

.auth-card .brand {
    font-size: 22px;
}

.auth-card h1 {
    font-size: 32px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.auth-card button[type="submit"] {
    font-family: "BTitr", Tahoma, sans-serif;
    font-size: 20px;
    font-weight: normal;
}

select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #183048;
    font: inherit;
}

textarea {
    min-height: 160px;
    resize: vertical;
}

select:focus,
textarea:focus {
    outline: 3px solid #16756b26;
    border-color: #16756b;
}

.request-card {
    max-width: 680px;
}

.button-link {
    display: block;
    margin-top: 20px;
    padding: 8px;
    border-radius: 10px;
    background: #16756b;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-family: "BTitr", Tahoma, sans-serif;
    font-size: 20px;
}

.button-link:hover {
    background: #105e56;
}

.tracking-code {
    display: block;
    margin: 10px 0;
    direction: ltr;
    text-align: center;
    font-family: monospace;
    font-size: 22px;
    font-weight: bold;
    overflow-wrap: anywhere;
}

.dashboard-card {
    max-width: 900px;
}

.request-list {
    display: grid;
    gap: 16px;
    margin: 24px 0;
}

.request-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.request-categories .request-item {
    display: block;
    margin: 0;
    text-decoration: none;
}

.request-categories .request-item:hover,
.request-categories .request-item:focus-visible {
    border-color: #146457;
    background: #e8f3ef;
}

.request-item {
    padding: 20px;
    border: 1px solid #dce5e9;
    border-radius: 12px;
    background: #fafcfd;
}

.request-item h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.request-item p {
    margin: 6px 0;
    overflow-wrap: anywhere;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    background: #e8f3ef;
    color: #146457;
    font-size: 13px;
}

.details-link {
    display: inline-block;
    margin-top: 14px;
    color: #146457;
    font-weight: bold;
}

.multiline-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin: 24px 0;
}

.history-list {
    padding-right: 22px;
}

.history-list li {
    margin-bottom: 18px;
}

.panel-links {
    margin-top: 24px;
    text-align: center;
}

@media (max-width: 540px) {
    .dashboard-card {
        padding: 20px;
    }
}

.messages-section {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #dce5e9;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 520px;
    overflow-y: auto;
    margin: 20px 0;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.message-bubble {
    width: fit-content;
    max-width: 88%;
    padding: 14px 18px;
    border-radius: 14px;
}

.message-own {
    align-self: flex-start;
    background: #e3f2eb;
    border: 1px solid #c8e3d7;
}

.message-other {
    align-self: flex-end;
    background: #fff;
    border: 1px solid #dce5e9;
}

.message-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    font-size: 13px;
}

.message-meta small {
    margin: 0;
    font-size: 11px;
}

.message-text {
    margin: 10px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 540px) {
    .message-bubble {
        max-width: 100%;
        padding: 12px;
    }
}
