@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #eceff4;
    --shell-bg: #f5f7fb;
    --green-main: #0d5a43;
    --green-soft: #118763;
    --text-main: #1e2a3a;
    --text-soft: #6e7b8f;
    --line: #d8dde7;
    --card: #ffffff;
    --blue: #396ddb;
    --orange: #ea8a35;
    --mint: #20a574;
}

* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Poppins", sans-serif;
    color: var(--text-main);
    background: var(--bg-main);
}

a {
    color: inherit;
    text-decoration: none;
}

.admin-body {
    min-height: 100vh;
    padding: 0;
}

.admin-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    background: var(--shell-bg);
    border-radius: 0;
    border: none;
    overflow-x: clip;
    overflow-y: visible;
}

.admin-top-meta {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.meta-left,
.meta-right {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #4f5b6b;
    font-size: 14px;
}

.admin-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f4fa;
    border: 1px solid #dae3f0;
    border-radius: 999px;
    padding: 7px 12px;
    color: #2d3a4d;
    font-size: 13px;
}

.meta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4a627f;
}

.admin-brandbar {
    background: var(--green-main);
    color: #ecf7f1;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #ecf7f1;
    color: var(--green-main);
    font-size: 22px;
}

.brand-left h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0.4px;
    font-weight: 800;
}

.brand-left p {
    margin: 2px 0 0;
    color: #b7dfd0;
    font-size: 14px;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #daf3e8;
    font-size: 13px;
    font-weight: 600;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #1aa87a;
    border-color: #1aa87a;
    color: #ffffff;
}

.admin-main {
    background: var(--bg-main);
    padding: 20px clamp(14px, 2vw, 28px);
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    margin-bottom: 12px;
}

.alert.success {
    background: #e7f8ef;
    border-color: #7bc7a0;
    color: #1d7244;
}

.alert.error {
    background: #fdecec;
    border-color: #e9abab;
    color: #9a2a2a;
}

.admin-section {
    display: grid;
    gap: 16px;
    max-width: 100%;
    min-width: 0;
}

.admin-head h2,
.admin-hero-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: clamp(30px, 2.8vw, 48px);
    line-height: 1.12;
    white-space: normal;
}

.admin-head p,
.admin-hero-head p {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.4;
    max-width: 840px;
}

.admin-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-hero-head > div {
    flex: 1 1 520px;
    min-width: 0;
}

.participants-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 520px;
    min-width: 320px;
    justify-content: flex-end;
    max-width: 100%;
}

.search-control {
    position: relative;
    width: auto;
    flex: 1 1 340px;
    min-width: 220px;
}

.search-control i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #96a2b3;
    font-size: 14px;
}

.search-control input {
    padding-left: 34px;
}

.status-filter-select {
    min-width: 140px;
    flex: 0 0 180px;
}

.btn-main-action,
.btn-soft,
button,
.btn-small,
.btn-link {
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.btn-main-action,
button {
    background: var(--green-soft);
    color: #fff;
}

.btn-main-action:hover,
button:hover {
    filter: brightness(0.96);
}

.btn-soft,
.btn-link {
    background: #ffffff;
    color: #3f546f;
    border-color: #d6deea;
}

.btn-small {
    background: #f0f5ff;
    color: #3c4f69;
    border-color: #d5e0f2;
}

.btn-small.danger {
    background: #fff1f1;
    color: #ad2f2f;
    border-color: #f2c3c3;
}

.participants-stat-grid,
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.participants-stat-card,
.stat-card,
.status-card,
.box-card {
    background: var(--card);
    border-radius: 14px;
    border: 1px solid #dfe4ed;
    padding: 16px;
}

.participants-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.participants-stat-card p,
.stat-card h3 {
    margin: 0;
    color: #708095;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.participants-stat-card strong,
.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: clamp(32px, 2.2vw, 40px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 22px;
}

.stat-icon.blue {
    background: #eaf1ff;
    color: var(--blue);
}

.stat-icon.orange {
    background: #fff1e3;
    color: var(--orange);
}

.stat-icon.green {
    background: #e8f7f1;
    color: var(--mint);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.status-card span {
    display: block;
    color: #76879a;
    font-size: 13px;
}

.status-card strong {
    display: block;
    margin-top: 5px;
    font-size: 28px;
}

.box-card h3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 20px;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    border-bottom: 1px solid #e8edf4;
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
    font-size: 15px;
}

th {
    color: #4e6075;
    font-size: 16px;
    font-weight: 700;
}

tbody tr:last-child td {
    border-bottom: none;
}

.participants-table td strong {
    font-size: 20px;
    font-weight: 700;
}

.row-main {
    font-weight: 700;
    font-size: 16px;
    color: #3c4e64;
}

.row-sub {
    margin-top: 3px;
    color: #52647b;
    font-size: 14px;
}

.table-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    background: #ebeff5;
    color: #51647a;
    font-size: 12px;
    font-weight: 700;
}

.badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
}

.badge {
    background: #eef2f9;
    color: #4b5d74;
}

.status-pill.done {
    background: #dff6ea;
    color: #178153;
}

.status-pill.process {
    background: #fff2de;
    color: #b96f17;
}

.status-pill.active {
    background: #e6efff;
    color: #2b63d0;
}

.status-pill.reject {
    background: #ffe3e3;
    color: #b33030;
}

.action-col {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.action-col.icon-only {
    flex-wrap: nowrap;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #dbe2ef;
    color: #4d5f76;
    background: #f8fafc;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.icon-btn.danger {
    color: #b73535;
    background: #fff3f3;
    border-color: #f4cbcb;
}

.filter-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-row label,
.form-grid-admin label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

.form-grid-admin {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.full-span {
    grid-column: span 2;
}

.inline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.participant-delete-form {
    margin-top: 10px;
}

input,
select,
textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #cad3df;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2b8c66;
    box-shadow: 0 0 0 3px rgba(43, 140, 102, 0.18);
}

form {
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-list {
    margin: 0;
    display: grid;
    gap: 8px;
}

.detail-list div {
    display: grid;
    gap: 3px;
}

.detail-list dt {
    font-size: 13px;
    color: #63748a;
}

.detail-list dd {
    margin: 0;
    font-weight: 600;
}

.doc-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.5;
}

.doc-manual-value {
    margin-top: 4px;
    color: #2b3f55;
}

.hash-code {
    display: inline-block;
    max-width: 100%;
    overflow: auto;
    background: #f5f8fc;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    color: #44566e;
}

.inline-note {
    margin-top: 10px;
    color: #5c6f87;
    font-size: 13px;
    display: inline-flex;
    align-items: flex-start;
    gap: 7px;
    line-height: 1.4;
}

.inline-checkbox {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4c6078;
}

.inline-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.news-thumb {
    width: 82px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d9e1ec;
    display: block;
}

.news-image-preview {
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    border: 1px solid #dde4ef;
    display: block;
}

.upload-preview-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
}

.upload-preview-grid h4 {
    margin: 0 0 8px;
    font-size: 15px;
}

.participant-photo {
    width: 100%;
    max-width: 260px;
    border-radius: 12px;
    border: 1px solid #dfe4ed;
    display: block;
}

.inline-form {
    display: grid;
    grid-template-columns: 1.3fr 1.2fr 140px 120px auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.admin-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, #1b4a7d, #0d1f34);
    padding: 16px;
}

.login-card {
    width: min(460px, 92%);
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid #d8dfeb;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.login-card h1 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.login-card p {
    margin: 6px 0 14px;
    color: #63748a;
}

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: #0f65b3;
    font-size: 14px;
}

@media (max-width: 1160px) {
    .admin-brandbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .participants-toolbar {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
    }

    .admin-hero-head > div {
        flex-basis: 100%;
    }

    .participants-toolbar .search-control {
        width: auto;
        flex: 1 1 100%;
        min-width: 0;
    }

    .status-filter-select {
        flex: 1 1 200px;
    }

    .participants-stat-grid,
    .stat-grid,
    .status-grid,
    .detail-grid,
    .upload-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .admin-body {
        padding: 0;
    }

    .admin-main {
        padding: 14px;
    }

    .admin-top-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .meta-right {
        flex-wrap: wrap;
    }

    .admin-hero-head h2 {
        font-size: clamp(28px, 7.5vw, 38px);
    }

    .participants-toolbar {
        gap: 8px;
    }

    .search-control,
    .status-filter-select,
    .participants-toolbar .btn-soft,
    .participants-toolbar .btn-main-action {
        flex: 1 1 100%;
        width: 100%;
    }

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

    .full-span {
        grid-column: span 1;
    }

    .participants-table td strong {
        font-size: 18px;
    }

    th {
        font-size: 16px;
    }

    .row-main,
    .row-sub {
        font-size: 14px;
    }
}
