/* Grants page — wide MainLayout content with compact actions. */

.grants-page {
    max-width: 960px;
    margin: 0 auto;
}

.sw-grants-header {
    margin-bottom: 1.5rem;
}

.sw-grants-header h1 {
    margin: 0 0 0.35rem;
    font-family: var(--sw-font-title);
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--sw-gray-800);
}

.sw-grants-lead {
    margin: 0;
    font-family: var(--sw-font-ui);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--sw-gray-600);
}

.sw-grants-empty {
    margin: 0;
    font-family: var(--sw-font-ui);
    font-size: 0.9375rem;
    border-radius: var(--sw-auth-input-radius);
}

.sw-grant-card {
    margin-top: 1rem;
    border: 1px solid var(--sw-gray-300);
    border-radius: var(--sw-auth-input-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(17, 25, 40, 0.04);
}

.sw-grant-card:first-of-type {
    margin-top: 0;
}

.sw-grant-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--sw-white);
    border-bottom: 1px solid var(--sw-gray-200);
}

.sw-grant-card-title {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
    flex: 1 1 auto;
}

.sw-grant-card-logo {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.sw-grant-card-name {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sw-grant-card-name strong {
    font-family: var(--sw-font-ui);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--sw-gray-800);
}

.sw-grant-card-id {
    font-family: var(--sw-font-ui);
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--sw-gray-500) !important;
    word-break: break-all;
}

.sw-grant-revoke-form {
    flex: 0 0 auto;
    margin: 0;
}

.sw-grant-revoke-form .btn {
    white-space: nowrap;
}

.sw-app-theme .sw-grant-revoke-form .btn-outline-danger {
    color: var(--sw-red-700);
    border-color: var(--sw-red-300);
    background: var(--sw-white);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    min-height: auto;
    line-height: 1.5;
    border-radius: var(--sw-auth-button-radius);
}

.sw-app-theme .sw-grant-revoke-form .btn-outline-danger:hover,
.sw-app-theme .sw-grant-revoke-form .btn-outline-danger:focus {
    color: var(--sw-white);
    background: var(--sw-red-600);
    border-color: var(--sw-red-600);
}

.sw-grant-details .list-group-item {
    display: grid;
    grid-template-columns: minmax(7rem, 10rem) 1fr;
    gap: 0.75rem 1rem;
    align-items: start;
    padding: 0.875rem 1.25rem;
    font-family: var(--sw-font-ui);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--sw-gray-700);
    border-color: var(--sw-gray-200);
}

.sw-grant-label {
    font-weight: 600;
    color: var(--sw-gray-600);
}

.sw-grant-value,
.sw-grant-value-list {
    margin: 0;
    min-width: 0;
}

.sw-grant-value-list {
    padding-left: 1.1rem;
}

.sw-grant-value-list li + li {
    margin-top: 0.25rem;
}

@media (max-width: 767.98px) {
    .sw-grant-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .sw-grant-revoke-form {
        width: 100%;
    }

    .sw-grant-revoke-form .btn {
        width: 100%;
    }

    .sw-grant-details .list-group-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}
