* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f4;
    color: #111;
}

.container {
    width: min(1100px, 92%);
    margin: 40px auto;
}

.container.narrow {
    width: min(700px, 92%);
}

.container.wide {
    width: min(1250px, 96%);
}

.form-shell {
    background: #fff;
    padding: 30px;
    border-radius: 22px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 24px;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 700;
}

.alert.success {
    background: #ecfdf5;
    color: #166534;
}

.alert.error {
    background: #fef2f2;
    color: #991b1b;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    justify-content: center;
}

.trust-row span {
    background: #f1f5f9;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
}

form {
    display: grid;
    gap: 14px;
}

.grid.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

input,
select,
textarea,
button {
    width: 100%;
    padding: 15px 16px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 16px;
}

textarea {
    min-height: 180px;
    resize: vertical;
}

button,
.link-button {
    background: #3b0000;
    color: white;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    font-weight: 700;
}

button:hover,
.link-button:hover {
    background: #5f0000;
}

.small-links {
    margin-top: 16px;
    text-align: center;
}

.small-links a {
    color: #1d4ed8;
    text-decoration: none;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.topbar p {
    margin: 0;
    color: #475569;
}

.topbar-actions {
    display: flex;
    gap: 12px;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 14px;
    margin-bottom: 20px;
}

.table-wrap {
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
}

.detail {
    margin-bottom: 14px;
    line-height: 1.6;
}

.message-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
}

@media (max-width: 800px) {
    .grid.two,
    .search-form,
    .topbar {
        grid-template-columns: 1fr;
        display: grid;
    }

    .topbar {
        justify-content: initial;
    }
}
