* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f4f7fb;
    color: #172033;
    font-family: Arial, Helvetica, sans-serif;
}

.claim-page,
.admin-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.claim-panel {
    width: min(100%, 460px);
    background: #ffffff;
    border: 1px solid #d9e1ee;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 14px 36px rgba(23, 32, 51, 0.08);
}

.admin-page {
    align-items: start;
}

.admin-shell {
    width: min(100%, 980px);
}

.admin-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(118px, 1fr));
    gap: 10px;
}

.stats div {
    min-width: 118px;
    background: #ffffff;
    border: 1px solid #d9e1ee;
    border-radius: 8px;
    padding: 12px;
}

.stats span {
    display: block;
    color: #536175;
    font-size: 13px;
    font-weight: 700;
}

.stats strong {
    display: block;
    font-size: 26px;
    margin-top: 4px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
    gap: 18px;
}

.admin-card {
    display: grid;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #d9e1ee;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 14px 36px rgba(23, 32, 51, 0.08);
}

.stock-card {
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid #d9e1ee;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 14px 36px rgba(23, 32, 51, 0.08);
}

.table-wrap {
    overflow-x: auto;
    margin-top: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    border-bottom: 1px solid #e5ebf3;
    padding: 11px 10px;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    background: #f8fafc;
    color: #536175;
    font-size: 13px;
}

.empty-cell {
    color: #536175;
    text-align: center;
}

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

.brand {
    color: #0f766e;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 8px;
}

h1 {
    margin: 0 0 22px;
    font-size: 30px;
    line-height: 1.15;
}

.claim-form {
    display: grid;
    gap: 10px;
}

label {
    font-size: 14px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #b8c4d6;
    border-radius: 6px;
    padding: 13px 14px;
    font-size: 16px;
    background: #ffffff;
}

input {
    text-transform: uppercase;
}

input[type="password"] {
    text-transform: none;
}

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

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(15, 118, 110, 0.18);
    border-color: #0f766e;
}

button {
    border: 0;
    border-radius: 6px;
    background: #0f766e;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    padding: 13px 16px;
}

button:hover {
    background: #115e59;
}

.danger-button {
    background: #be123c;
}

.danger-button:hover {
    background: #9f1239;
}

.danger-card {
    align-content: start;
}

.danger-card p {
    margin: 0;
    color: #536175;
    line-height: 1.45;
}

.telegram-box {
    display: grid;
    gap: 12px;
}

.instruction {
    margin: 0;
    color: #536175;
}

.command {
    background: #f8fafc;
    border: 1px solid #d9e1ee;
    border-radius: 6px;
    color: #172033;
    font-family: Consolas, Monaco, monospace;
    overflow-wrap: anywhere;
    padding: 13px 14px;
}

.telegram-button {
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
    border-radius: 6px;
    background: #0f766e;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    padding: 13px 16px;
}

.telegram-button:hover {
    background: #115e59;
}

.logout-link {
    color: #0f766e;
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    margin-top: 6px;
    text-decoration: none;
}

.logout-link:hover {
    color: #115e59;
}

.notice,
.result {
    margin-top: 18px;
    border-radius: 8px;
    padding: 16px;
}

.notice.error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
}

.notice.success {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #115e59;
    margin-bottom: 18px;
}

.result {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
}

.result-title {
    margin: 0 0 14px;
    font-weight: 700;
}

dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

dt {
    color: #536175;
    font-size: 13px;
    font-weight: 700;
}

dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.coupon-output {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.coupon-output p {
    margin: 0;
    color: #536175;
    font-size: 13px;
    font-weight: 700;
}

pre {
    min-height: 215px;
    max-height: 360px;
    overflow: auto;
    margin: 0;
    background: #f8fafc;
    border: 1px solid #d9e1ee;
    border-radius: 6px;
    padding: 13px 14px;
    white-space: pre-wrap;
}

@media (max-width: 760px) {
    .admin-header {
        align-items: stretch;
        flex-direction: column;
    }

    .stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }
}
