html {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

* {
    box-sizing: border-box;
}

body.gpa-portal-body {
    display: block !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0;
    padding: 0 !important;
    background: #f3f6f8;
    color: #17202a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.gpa-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px clamp(18px, 4vw, 44px);
    background: #ffffff;
    border-bottom: 1px solid #d8e0e6;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.gpa-portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #17202a;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.gpa-portal-brand img {
    display: block;
    width: auto;
    max-width: min(420px, 58vw);
    height: 76px;
    object-fit: contain;
}

.gpa-portal-brand span {
    border-left: 1px solid #d8e0e6;
    padding-left: 14px;
    white-space: nowrap;
}

.gpa-portal-header nav {
    display: flex;
    gap: 14px;
}

.gpa-portal-header nav a {
    color: #285d72;
    font-weight: 600;
    text-decoration: none;
}

.gpa-portal-main {
    padding: 28px clamp(18px, 4vw, 44px) 56px;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.gpa-site-version {
    position: fixed;
    left: 12px;
    bottom: 8px;
    z-index: 9999;
    pointer-events: none;
    color: #65727d;
    font-size: 11px;
    font-weight: 700;
    opacity: 0.85;
}

.gpa-panel [hidden] {
    display: none !important;
}

.gpa-wrap {
    max-width: 1280px;
    margin: 0 auto;
}

.gpa-wrap h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 0;
}

.gpa-lead {
    max-width: 720px;
    color: #51606a;
    font-size: 16px;
}

.gpa-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 20px;
    align-items: start;
}

.gpa-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.gpa-card,
.gpa-panel {
    background: #ffffff;
    border: 1px solid #d8e0e6;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(23, 32, 42, 0.06);
}

.gpa-card {
    display: grid;
    gap: 10px;
    min-height: 165px;
    padding: 20px;
    color: #17202a;
    text-decoration: none;
}

.gpa-card-main {
    display: grid;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.gpa-card:hover,
.gpa-card:focus {
    border-color: #2f718a;
    box-shadow: 0 0 0 2px rgba(47, 113, 138, 0.16), 0 12px 28px rgba(23, 32, 42, 0.08);
}

.gpa-card .dashicons {
    width: 34px;
    height: 34px;
    color: #2f718a;
    font-size: 34px;
}

.gpa-card strong {
    font-size: 19px;
}

.gpa-card span:not(.dashicons),
.gpa-card small {
    color: #51606a;
}

.gpa-panel {
    padding: 20px;
}

.gpa-page-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
}

.gpa-subcategory-card form {
    align-self: end;
    margin: 0;
}

.gpa-modal {
    width: min(560px, calc(100vw - 32px));
    border: 0;
    padding: 0;
    background: transparent;
}

.gpa-modal::backdrop {
    background: rgba(23, 32, 42, 0.46);
}

.gpa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.gpa-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.gpa-button-small {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 12px;
}

.gpa-danger-soft,
.button.gpa-danger-soft {
    border-color: #e6a8a2;
    background: #fceeee;
    color: #b42318;
}

.gpa-danger-soft:hover,
.button.gpa-danger-soft:hover {
    border-color: #b42318;
    background: #f8d7d3;
    color: #8a1f14;
}

.gpa-panel h2 {
    margin-top: 0;
    font-size: 20px;
}

.gpa-form,
.gpa-panel form {
    display: grid;
    gap: 12px;
}

.gpa-form label,
.gpa-panel label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.gpa-form .gpa-checkbox,
.gpa-panel .gpa-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gpa-active-toggle {
    justify-content: center;
    margin: 0 auto;
    width: 18px;
}

.gpa-active-toggle input[type="checkbox"] {
    width: 16px;
    min-height: 16px;
    height: 16px;
    padding: 0;
    border-left-width: 1px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #c8d2da;
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
}

textarea {
    min-height: 96px;
    resize: none;
}

.gpa-person-picker-search {
    min-height: 36px;
}

.gpa-person-picker {
    min-height: 180px;
    padding: 6px;
    resize: none;
}

.gpa-person-picker option {
    padding: 6px 8px;
}

.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 38px;
    border: 1px solid #2f718a;
    border-radius: 6px;
    padding: 8px 14px;
    background: #2f718a;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button:hover,
button:hover {
    background: #245a6f;
    color: #ffffff;
}

.button-link-delete {
    border-color: #b42318;
    background: #ffffff;
    color: #b42318;
}

.button-link-delete:hover {
    background: #b42318;
    color: #ffffff;
}

table.widefat {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

table.widefat th,
table.widefat td {
    padding: 12px;
    border-bottom: 1px solid #e3e8ed;
    text-align: left;
}

.gpa-document-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.gpa-document-upload-form .button {
    justify-self: start;
    width: auto;
    min-width: 160px;
}

.gpa-document-item {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(320px, 1.7fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #dce5ec;
    border-radius: 8px;
    background: #fbfdfe;
}

.gpa-document-main {
    min-width: 0;
}

.gpa-document-type {
    display: block;
    margin-bottom: 4px;
    color: #52606d;
    font-size: 13px;
    font-weight: 700;
}

.gpa-document-name {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.gpa-document-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(105px, 1fr));
    gap: 10px;
    margin: 0;
}

.gpa-document-meta div {
    min-width: 0;
}

.gpa-document-meta dt {
    margin-bottom: 3px;
    color: #52606d;
    font-size: 12px;
    font-weight: 700;
}

.gpa-document-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.gpa-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.gpa-document-actions form {
    display: inline-flex;
}

.gpa-document-actions .button {
    width: auto;
    white-space: nowrap;
}

.gpa-empty-state {
    margin: 18px 0 0;
    padding: 14px;
    border: 1px dashed #c8d2da;
    border-radius: 8px;
    color: #52606d;
}

.notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 4px solid #2f718a;
    background: #ffffff;
}

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

.gpa-inline-form {
    display: inline-flex;
}

.gpa-order-form {
    display: inline-flex;
    align-items: center;
}

.gpa-order-display {
    min-width: 34px;
    min-height: 30px;
    border: 1px solid transparent;
    background: transparent;
    color: #1f3443;
    padding: 4px 8px;
}

.gpa-order-display:hover {
    border-color: #c8d2da;
    background: #f7fafb;
    color: #1f3443;
}

.gpa-order-input {
    width: 64px;
    min-height: 30px;
    padding: 4px 8px;
    text-align: center;
}

.gpa-timeline {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.gpa-timeline article {
    border-left: 4px solid #2f718a;
    background: #f7fafb;
    padding: 10px 12px;
}

.gpa-timeline time {
    display: block;
    color: #65727d;
}

.gpa-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 3px 9px;
    font-weight: 800;
    white-space: nowrap;
}

.gpa-status-active {
    background: #e9f8ee;
    color: #137333;
}

.gpa-status-expired {
    background: #fdecec;
    color: #b42318;
}

.gpa-status-missing {
    background: #edf1f4;
    color: #65727d;
}

.gpa-field-warning {
    margin: -6px 0 0;
    border-left: 4px solid #b42318;
    background: #fdecec;
    color: #8a1f14;
    padding: 8px 10px;
    font-weight: 800;
}

.gpa-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.gpa-section-header h2 {
    margin: 0;
}

.gpa-search-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.gpa-search-form input[type="search"] {
    min-width: min(320px, 100%);
}

.gpa-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.gpa-tabs a {
    border: 1px solid #c9d4dc;
    border-radius: 8px;
    color: #1f3443;
    font-weight: 800;
    padding: 8px 12px;
    text-decoration: none;
}

.gpa-tabs a.is-active {
    background: #1f3443;
    border-color: #1f3443;
    color: #ffffff;
}

.gpa-review-session {
    border: 1px solid #d8e0e6;
    border-radius: 8px;
    margin-top: 14px;
    padding: 12px;
}

.gpa-review-session summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    cursor: pointer;
    margin-bottom: 12px;
}

.gpa-review-session summary span {
    color: #65727d;
    font-size: 13px;
    font-weight: 700;
}

.gpa-review-session small,
.widefat small {
    color: #65727d;
}

.gpa-compact-form {
    grid-template-columns: minmax(120px, 180px) auto;
    align-items: end;
}

@media (max-width: 900px) {
    .gpa-layout {
        grid-template-columns: 1fr;
    }

    .gpa-portal-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .gpa-portal-brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .gpa-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .gpa-document-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .gpa-document-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gpa-document-actions {
        justify-content: flex-start;
    }

    .gpa-portal-brand span {
        border-left: 0;
        padding-left: 0;
    }
}
