body {
    margin: 0;
    font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
    background: #f5f7fb;
    color: #1d2330;
}

a {
    color: #1e5a95;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.admin-wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: #1a2433;
    color: #eaf0fa;
    padding: 1rem;
}

.admin-sidebar h1 {
    font-size: 1rem;
    margin: 0 0 1rem;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.admin-menu a {
    color: #eaf0fa;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
}

.admin-menu a.active,
.admin-menu a:hover {
    background: rgba(255, 255, 255, 0.14);
    text-decoration: none;
}

.admin-main {
    padding: 1.1rem;
    background: radial-gradient(circle at top right, #ecf3ff 0%, #f6f8fc 44%, #f5f7fb 100%);
}

.admin-top {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1rem;
}

.card {
    background: #fff;
    border: 1px solid #d6ddea;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid #e6ebf3;
    text-align: left;
    padding: 0.55rem 0.4rem;
    font-size: 0.92rem;
}

th {
    background: #f2f5fb;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #ced6e4;
    border-radius: 8px;
    padding: 0.55rem 0.6rem;
}

button,
.btn {
    border: none;
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    background: #1f6eb0;
    color: #fff;
    cursor: pointer;
    display: inline-block;
}

.btn-muted {
    background: #4a566f;
}

.row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.75rem;
    row-gap: 1.1rem;
}
.row > *,
.row-3 > *,
.row-4 > * {
    min-width: 0;
    overflow: hidden;
}
.row input,
.row textarea,
.row select,
.row-3 input,
.row-3 textarea,
.row-3 select,
.row-4 input,
.row-4 textarea,
.row-4 select {
    width: 100%;
    box-sizing: border-box;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.stat {
    background: #fff;
    border: 1px solid #d6ddea;
    border-radius: 12px;
    padding: 0.9rem;
    box-shadow: 0 8px 18px rgba(19, 36, 66, 0.06);
}

.stat strong {
    display: block;
    font-size: 1.32rem;
}

.stat span {
    color: #4f617e;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid #cfd9ec;
    background: linear-gradient(120deg, #ffffff 0%, #eef4ff 100%);
}

.dashboard-hero h3 {
    margin: 0 0 0.3rem;
}

.dashboard-hero .hint {
    margin: 0;
    color: #536684;
}

.dashboard-hero-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-chip {
    border-radius: 999px;
    background: #dde8ff;
    color: #173154;
    padding: 0.35rem 0.7rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.dashboard-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat--accent {
    border-color: #b9d4ff;
}

.stat--blue {
    border-color: #c7e0ff;
}

.stat--green {
    border-color: #bce8cc;
}

.stat--violet {
    border-color: #d8c9ff;
}

.stat--amber {
    border-color: #ffe4b2;
}

.dashboard-actions .quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.dashboard-actions .btn {
    text-align: center;
    font-weight: 600;
}

.dashboard-activity table td {
    vertical-align: middle;
}

.activity-badge {
    display: inline-block;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.36rem 0.55rem;
    color: #10233d;
    background: #dfe8f7;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.activity-badge--registration {
    background: #d3e6ff;
}

.activity-badge--donation {
    background: #d7f3de;
}

.activity-badge--sponsor {
    background: #f5ddff;
}

.activity-badge--contact {
    background: #ffe8ca;
}

.btn-danger {
    background: #c62828;
}

.btn-success {
    background: #1f8f46;
}

.btn-sm {
    padding: 0.28rem 0.55rem;
    font-size: 0.83rem;
    border-radius: 6px;
}

.btn-icon {
    padding: 0.28rem 0.45rem;
    font-size: 0.8rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.75rem;
    row-gap: 1.1rem;
}

.row-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 1.75rem;
    row-gap: 1.1rem;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    margin-bottom: 0.9rem;
}

.search-bar input {
    max-width: 280px;
}

.edit-panel {
    border: 2px solid #1f6eb0;
    background: #f0f7ff;
}

.edit-panel h3 {
    margin: 0 0 0.9rem;
    color: #1a4f87;
}

.table-actions {
    display: flex;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.status-badge {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge--paid    { background: #d7f3de; color: #196a3b; }
.status-badge--pending { background: #fff3cd; color: #7a5500; }
.status-badge--failed  { background: #fae7e7; color: #8a2525; }
.status-badge--canceled{ background: #ebebeb; color: #444; }

.full-message {
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8f9fc;
    border: 1px solid #d6ddea;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.2rem;
}

.detail-grid dt {
    font-weight: 700;
    font-size: 0.82rem;
    color: #4f617e;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-grid dd {
    margin: 0 0 0.4rem;
}

.alert {
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.8rem;
}

.alert-success {
    background: #e6f4ec;
    border: 1px solid #b8e0c5;
    color: #196a3b;
}

.alert-error {
    background: #fae7e7;
    border: 1px solid #f0b9b9;
    color: #8a2525;
}

@media (max-width: 980px) {
    .admin-wrap {
        grid-template-columns: 1fr;
    }

    .stats,
    .dashboard-stats,
    .dashboard-actions .quick-actions-grid,
    .row {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}
