html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #222;
    background: #f6f7fb;
}

.wrap {
    max-width: 1280px;
    margin: 16px auto;
    padding: 0 12px;
}

.card {
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

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

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.topbar-user {
    font-size: 13px;
    color: #666;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 14px 0;
    color: #222;
}

.toolbar-block {
    margin-bottom: 12px;
}

.toolbar-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.toolbar-row.compact {
    gap: 6px;
}

.btn,
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #cfd6e3;
    border-radius: 10px;
    background: #eef2f7;
    color: #2a2f37;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    box-sizing: border-box;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover,
.btn-link:hover {
    background: #e7ecf4;
}

.btn.active,
.btn-link.active {
    background: #2f6fe4;
    border-color: #2f6fe4;
    color: #fff;
}

.btn-danger,
.btn-link-danger {
    background: #fff2f2;
    border-color: #e5bcbc;
    color: #bb3b3b;
}

.btn-danger:hover,
.btn-link-danger:hover {
    background: #ffe9e9;
}

.btn-primary {
    background: #2f6fe4;
    border-color: #2f6fe4;
    color: #fff;
}

.btn-primary:hover {
    background: #255fd0;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.inline-form label {
    font-size: 13px;
    color: #444;
}

.inline-form input[type="date"],
.inline-form input[type="text"],
.inline-form select {
    height: 36px;
    padding: 0 10px;
    border: 1px solid #cfd6e3;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    color: #222;
    box-sizing: border-box;
}

.inline-form input[type="date"] {
    min-width: 150px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
}

.checkbox-row input[type="checkbox"] {
    transform: scale(1.05);
    margin: 0;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4px 18px;
    margin-top: 12px;
    font-size: 13px;
    color: #555;
}

.meta-grid strong {
    color: #222;
}

.meta-wide {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

.total-line {
    margin-top: 14px;
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.notice {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid;
}

.notice-ok {
    background: #edf8ef;
    border-color: #b9dfbd;
    color: #2f6b37;
}

.notice-warn {
    background: #fff8e7;
    border-color: #ead28a;
    color: #886200;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    background: #f1f4f8;
    border-bottom: 1px solid #d9dee8;
    padding: 10px 10px;
    color: #2b3138;
    font-size: 13px;
}

.data-table td {
    border-bottom: 1px solid #eceff5;
    padding: 10px 10px;
    vertical-align: top;
}

.data-table th.num,
.data-table td.num {
    text-align: right;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #596272;
    font-size: 12px;
    line-height: 1.3;
}

.muted {
    color: #8a93a1;
    font-size: 12px;
}

.spacer-8 {
    height: 8px;
}

.spacer-12 {
    height: 12px;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 21px;
    }

    .btn,
    .btn-link,
    .btn-danger,
    .btn-link-danger,
    .btn-primary {
        height: 34px;
        padding: 0 12px;
        font-size: 12px;
    }

    .inline-form input[type="date"],
    .inline-form input[type="text"],
    .inline-form select {
        height: 34px;
        font-size: 12px;
    }

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