* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: linear-gradient(140deg, #f1f5f9, #e7eef9);
    color: #12202f;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.container.wide {
    display: block;
    width: 80vw;
    max-width: 1700px;
    min-width: 1200px;
    margin: 0 auto;
}

.container.wide .card {
    max-width: none;
}

.card {
    width: 100%;
    max-width: 720px;
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid #dbe4ef;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
    margin-bottom: 14px;
}

h1 {
    margin-top: 0;
}

.subtitle {
    color: #34475e;
}

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

label {
    font-weight: 600;
}

input,
select,
button {
    font: inherit;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #ccd7e3;
}

button,
.button-link {
    background: #134074;
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    padding: 10px 14px;
    border-radius: 10px;
}

.button-link:hover,
button:hover {
    background: #0f3057;
}

.button-link {
    white-space: nowrap;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}

.actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.tabs-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid #dbe4ef;
    padding-bottom: 12px;
}

.tab-link {
    border: 1px solid transparent;
}

.tab-link.active {
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.55);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.stat-card {
    background: #f8fbff;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card span {
    color: #3e556f;
    font-size: 13px;
}

.stat-card strong {
    font-size: 20px;
    color: #10243a;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
}

table {
    width: max-content;
    min-width: 1600px;
    border-collapse: collapse;
    font-size: 14px;
}

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

th {
    background: #f3f7fc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.error {
    color: #b00020;
    font-weight: 600;
    background: #ffe6eb;
    border: 1px solid #ffc9d4;
    border-radius: 8px;
    padding: 8px 10px;
}

.message-ok {
    color: #14532d;
    background: #e7f8ed;
    border: 1px solid #bfe9cc;
    border-radius: 8px;
    padding: 8px 10px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.status-paid {
    background: #d7f3df;
    color: #166534;
}

.status-pending {
    background: #fff5cc;
    color: #8a5b00;
}

.status-refunded {
    background: #ffe0e0;
    color: #991b1b;
}

.empty-row {
    text-align: center;
    color: #4b5f75;
    font-style: italic;
    padding: 14px;
}
