/* ================================
   API Keys Module
   AdThrive Media - Responsive CSS
================================ */

:root {
    --apikey-primary: #7CB947;
    --apikey-primary-hover: #659e38;
    --apikey-text: #111827;
    --apikey-muted: #6b7280;
    --apikey-border: #e5e7eb;
    --apikey-bg: #f7f8fa;
    --apikey-white: #ffffff;
    --apikey-danger: #dc2626;
    --apikey-radius: 10px;
    --apikey-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
}

.api-keys-module,
.api-keys-module * {
    box-sizing: border-box;
}

.api-keys-module {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px;
    color: var(--apikey-text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

/* Page heading */

.api-keys-module > section:first-child {
    margin-bottom: 26px;
}

.api-keys-module h1 {
    margin: 0 0 8px;
    color: var(--apikey-text);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
}

.api-keys-module h2 {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--apikey-border);
    color: var(--apikey-text);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.api-keys-module p {
    color: var(--apikey-muted);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.api-keys-module > section:first-child p {
    margin: 0;
    font-size: 15px;
}

/* Content cards */

.api-keys-module > section:not(:first-child) {
    margin-bottom: 22px;
    padding: 24px;
    border: 1px solid var(--apikey-border);
    border-radius: var(--apikey-radius);
    background: var(--apikey-white);
    box-shadow: var(--apikey-shadow);
}

/* Buttons */

.api-keys-module button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid var(--apikey-border);
    border-radius: 7px;
    background: var(--apikey-white);
    color: var(--apikey-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.api-keys-module button:hover {
    border-color: var(--apikey-primary);
    color: var(--apikey-primary-hover);
}

.api-keys-module button:active {
    transform: translateY(1px);
}

.api-keys-module button:focus-visible {
    outline: 3px solid rgba(124, 185, 71, 0.3);
    outline-offset: 2px;
}

.api-keys-module button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

#showCreateKeyBtn,
#createKeySubmitBtn,
#testApiKeyBtn {
    border-color: var(--apikey-primary);
    background: var(--apikey-primary);
    color: var(--apikey-white);
}

#showCreateKeyBtn:hover,
#createKeySubmitBtn:hover,
#testApiKeyBtn:hover {
    border-color: var(--apikey-primary-hover);
    background: var(--apikey-primary-hover);
    color: var(--apikey-white);
}

#refreshKeysBtn {
    margin-left: 8px;
}

/* General API key messages */

#apiKeyMessage {
    display: none;
    margin: 16px 0 0;
    padding: 12px 15px;
    border: 1px solid var(--apikey-border);
    border-radius: 7px;
    background: #f9fafb;
    color: var(--apikey-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#apiKeyMessage:not(:empty) {
    display: block;
}

#apiKeyMessage.success,
#apiKeyMessage[data-type="success"] {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

#apiKeyMessage.error,
#apiKeyMessage[data-type="error"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

#apiKeyMessage.warning,
#apiKeyMessage[data-type="warning"] {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Create key form */

#createKeySection[hidden],
#newSecretSection[hidden] {
    display: none !important;
}

#createKeyForm {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.api-keys-module label {
    display: block;
    margin-top: 4px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.api-keys-module input[type="text"],
.api-keys-module input[type="number"],
.api-keys-module input[type="search"],
.api-keys-module input[type="password"],
.api-keys-module input[type="datetime-local"],
.api-keys-module select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    outline: none;
    background: var(--apikey-white);
    color: var(--apikey-text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.api-keys-module input::placeholder {
    color: #9ca3af;
}

.api-keys-module input:focus,
.api-keys-module select:focus {
    border-color: var(--apikey-primary);
    box-shadow: 0 0 0 3px rgba(124, 185, 71, 0.15);
}

.api-keys-module input:disabled,
.api-keys-module select:disabled {
    background: #f3f4f6;
    color: var(--apikey-muted);
    cursor: not-allowed;
}

/* Permissions fieldset */

#createKeyForm fieldset {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 12px 0 2px;
    padding: 18px;
    border: 1px solid var(--apikey-border);
    border-radius: 8px;
    background: #fcfcfc;
}

#createKeyForm legend {
    padding: 0 8px;
    color: var(--apikey-text);
    font-size: 14px;
    font-weight: 700;
}

#createKeyForm fieldset label {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 11px 4px;
    border-bottom: 1px solid #f0f1f3;
    color: #4b5563;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

#createKeyForm fieldset label:last-child {
    border-bottom: none;
}

#createKeyForm fieldset input[type="checkbox"] {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--apikey-primary);
    cursor: pointer;
}

#createKeyForm > p {
    margin: 2px 0 8px;
    font-size: 13px;
}

#createKeyForm > button {
    align-self: flex-start;
    margin: 5px 8px 0 0;
}

#cancelCreateKeyBtn {
    background: var(--apikey-white);
    color: #4b5563;
}

/* Newly generated API secret */

#newSecretSection {
    border-color: #d1e7c0;
    background: #fcfef9;
}

#newSecretSection > p {
    margin: 0 0 18px;
}

#newSecretValue {
    margin-bottom: 12px;
    font-family: Consolas, "Courier New", monospace;
    letter-spacing: 0.04em;
}

#toggleSecretBtn,
#copySecretBtn,
#closeSecretBtn {
    margin: 5px 8px 0 0;
}

#copySecretBtn {
    border-color: var(--apikey-primary);
    background: var(--apikey-primary);
    color: var(--apikey-white);
}

#copySecretBtn:hover {
    border-color: var(--apikey-primary-hover);
    background: var(--apikey-primary-hover);
    color: var(--apikey-white);
}

/* API keys search and filters */

.api-keys-module > section:nth-of-type(4) > label {
    margin: 12px 0 7px;
}

#keySearch {
    max-width: 520px;
}

#keyStatusFilter {
    max-width: 260px;
    margin-bottom: 18px;
}

#keysLoading {
    margin: 12px 0;
    padding: 13px;
    border-radius: 7px;
    background: #f9fafb;
    color: var(--apikey-muted);
    font-size: 14px;
    text-align: center;
}

#keysLoading[hidden] {
    display: none !important;
}

/* API keys table */

.api-keys-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--apikey-border);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.api-keys-table-wrapper table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    border-spacing: 0;
    text-align: left;
}

.api-keys-table-wrapper thead {
    background: #f9fafb;
}

.api-keys-table-wrapper th {
    padding: 14px 15px;
    border-bottom: 1px solid var(--apikey-border);
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.api-keys-table-wrapper td {
    padding: 14px 15px;
    border-bottom: 1px solid #f0f1f3;
    color: #374151;
    font-size: 13px;
    line-height: 1.6;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.api-keys-table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

.api-keys-table-wrapper tbody tr:hover {
    background: #fafcf8;
}

.api-keys-table-wrapper td[colspan] {
    padding: 28px 15px;
    color: var(--apikey-muted);
    text-align: center;
}

.api-keys-table-wrapper td button {
    min-height: 34px;
    margin: 2px 4px 2px 0;
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
}

/* Optional status badges */

.api-key-status,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.api-key-status.active,
.status-badge.active {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.api-key-status.revoked,
.status-badge.revoked {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.api-key-status.test,
.status-badge.test {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.api-key-status.live,
.status-badge.live {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Authentication test */

.api-keys-module code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #374151;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

#testApiSecret {
    max-width: 650px;
    margin-bottom: 12px;
    font-family: Consolas, "Courier New", monospace;
}

#apiKeyTestResult {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 18px 0 0;
    padding: 14px;
    border: 1px solid var(--apikey-border);
    border-radius: 8px;
    background: #f9fafb;
    color: #374151;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-x: auto;
}

#apiKeyTestResult:empty {
    display: none;
}

/* Responsive: tablets */

@media (max-width: 1050px) {
    .api-keys-module {
        padding: 22px;
    }

    .api-keys-module h1 {
        font-size: 27px;
    }

    .api-keys-module > section:not(:first-child) {
        padding: 21px;
    }

    .api-keys-table-wrapper table {
        min-width: 1000px;
    }
}

/* Responsive: mobile */

@media (max-width: 600px) {
    .api-keys-module {
        padding: 16px;
        font-size: 15px;
    }

    .api-keys-module > section:first-child {
        margin-bottom: 20px;
    }

    .api-keys-module h1 {
        font-size: 24px;
    }

    .api-keys-module h2 {
        font-size: 19px;
    }

    .api-keys-module > section:not(:first-child) {
        margin-bottom: 17px;
        padding: 17px;
    }

    #showCreateKeyBtn,
    #refreshKeysBtn {
        width: 100%;
        margin: 0 0 9px;
    }

    #createKeyForm > button,
    #newSecretSection > button {
        width: 100%;
        margin: 5px 0 0;
    }

    #createKeyForm fieldset {
        padding: 12px;
    }

    #createKeyForm fieldset label {
        align-items: flex-start;
        padding: 12px 2px;
    }

    #keySearch,
    #keyStatusFilter,
    #testApiSecret {
        max-width: 100%;
    }

    .api-keys-table-wrapper table {
        min-width: 1000px;
    }

    .api-keys-table-wrapper th,
    .api-keys-table-wrapper td {
        padding: 12px;
    }

    #testApiKeyBtn {
        width: 100%;
    }

    #apiKeyTestResult {
        font-size: 12px;
    }
}

/* Responsive: small phones */

@media (max-width: 360px) {
    .api-keys-module {
        padding: 12px;
    }

    .api-keys-module h1 {
        font-size: 22px;
    }

    .api-keys-module > section:not(:first-child) {
        padding: 14px;
    }

    #createKeyForm fieldset {
        padding: 9px;
    }

    .api-keys-module button {
        padding: 9px 12px;
        font-size: 13px;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .api-keys-module *,
    .api-keys-module *::before,
    .api-keys-module *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}








/* ================================
   API Keys Module
   AdThrive Media - Responsive CSS
================================ */

:root {
    --apikey-primary: #7CB947;
    --apikey-primary-hover: #659e38;
    --apikey-text: #111827;
    --apikey-muted: #6b7280;
    --apikey-border: #e5e7eb;
    --apikey-bg: #f7f8fa;
    --apikey-white: #ffffff;
    --apikey-danger: #dc2626;
    --apikey-radius: 10px;
    --apikey-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
}

.api-keys-module,
.api-keys-module * {
    box-sizing: border-box;
}

.api-keys-module {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px;
    color: var(--apikey-text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

/* Page heading */

.api-keys-module > section:first-child {
    margin-bottom: 26px;
}

.api-keys-module h1 {
    margin: 0 0 8px;
    color: var(--apikey-text);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
}

.api-keys-module h2 {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--apikey-border);
    color: var(--apikey-text);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.api-keys-module p {
    color: var(--apikey-muted);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.api-keys-module > section:first-child p {
    margin: 0;
    font-size: 15px;
}

/* Content cards */

.api-keys-module > section:not(:first-child) {
    margin-bottom: 22px;
    padding: 24px;
    border: 1px solid var(--apikey-border);
    border-radius: var(--apikey-radius);
    background: var(--apikey-white);
    box-shadow: var(--apikey-shadow);
}

/* Buttons */

.api-keys-module button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid var(--apikey-border);
    border-radius: 7px;
    background: var(--apikey-white);
    color: var(--apikey-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.api-keys-module button:hover {
    border-color: var(--apikey-primary);
    color: var(--apikey-primary-hover);
}

.api-keys-module button:active {
    transform: translateY(1px);
}

.api-keys-module button:focus-visible {
    outline: 3px solid rgba(124, 185, 71, 0.3);
    outline-offset: 2px;
}

.api-keys-module button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

#showCreateKeyBtn,
#createKeySubmitBtn,
#testApiKeyBtn {
    border-color: var(--apikey-primary);
    background: var(--apikey-primary);
    color: var(--apikey-white);
}

#showCreateKeyBtn:hover,
#createKeySubmitBtn:hover,
#testApiKeyBtn:hover {
    border-color: var(--apikey-primary-hover);
    background: var(--apikey-primary-hover);
    color: var(--apikey-white);
}

#refreshKeysBtn {
    margin-left: 8px;
}

/* General API key messages */

#apiKeyMessage {
    display: none;
    margin: 16px 0 0;
    padding: 12px 15px;
    border: 1px solid var(--apikey-border);
    border-radius: 7px;
    background: #f9fafb;
    color: var(--apikey-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#apiKeyMessage:not(:empty) {
    display: block;
}

#apiKeyMessage.success,
#apiKeyMessage[data-type="success"] {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

#apiKeyMessage.error,
#apiKeyMessage[data-type="error"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

#apiKeyMessage.warning,
#apiKeyMessage[data-type="warning"] {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Create key form */

#createKeySection[hidden],
#newSecretSection[hidden] {
    display: none !important;
}

#createKeyForm {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.api-keys-module label {
    display: block;
    margin-top: 4px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.api-keys-module input[type="text"],
.api-keys-module input[type="number"],
.api-keys-module input[type="search"],
.api-keys-module input[type="password"],
.api-keys-module input[type="datetime-local"],
.api-keys-module select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    outline: none;
    background: var(--apikey-white);
    color: var(--apikey-text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.api-keys-module input::placeholder {
    color: #9ca3af;
}

.api-keys-module input:focus,
.api-keys-module select:focus {
    border-color: var(--apikey-primary);
    box-shadow: 0 0 0 3px rgba(124, 185, 71, 0.15);
}

.api-keys-module input:disabled,
.api-keys-module select:disabled {
    background: #f3f4f6;
    color: var(--apikey-muted);
    cursor: not-allowed;
}

/* Permissions fieldset */

#createKeyForm fieldset {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 12px 0 2px;
    padding: 18px;
    border: 1px solid var(--apikey-border);
    border-radius: 8px;
    background: #fcfcfc;
}

#createKeyForm legend {
    padding: 0 8px;
    color: var(--apikey-text);
    font-size: 14px;
    font-weight: 700;
}

#createKeyForm fieldset label {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 11px 4px;
    border-bottom: 1px solid #f0f1f3;
    color: #4b5563;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

#createKeyForm fieldset label:last-child {
    border-bottom: none;
}

#createKeyForm fieldset input[type="checkbox"] {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--apikey-primary);
    cursor: pointer;
}

#createKeyForm > p {
    margin: 2px 0 8px;
    font-size: 13px;
}

#createKeyForm > button {
    align-self: flex-start;
    margin: 5px 8px 0 0;
}

#cancelCreateKeyBtn {
    background: var(--apikey-white);
    color: #4b5563;
}

/* Newly generated API secret */

#newSecretSection {
    border-color: #d1e7c0;
    background: #fcfef9;
}

#newSecretSection > p {
    margin: 0 0 18px;
}

#newSecretValue {
    margin-bottom: 12px;
    font-family: Consolas, "Courier New", monospace;
    letter-spacing: 0.04em;
}

#toggleSecretBtn,
#copySecretBtn,
#closeSecretBtn {
    margin: 5px 8px 0 0;
}

#copySecretBtn {
    border-color: var(--apikey-primary);
    background: var(--apikey-primary);
    color: var(--apikey-white);
}

#copySecretBtn:hover {
    border-color: var(--apikey-primary-hover);
    background: var(--apikey-primary-hover);
    color: var(--apikey-white);
}

/* API keys search and filters */

.api-keys-module > section:nth-of-type(4) > label {
    margin: 12px 0 7px;
}

#keySearch {
    max-width: 520px;
}

#keyStatusFilter {
    max-width: 260px;
    margin-bottom: 18px;
}

#keysLoading {
    margin: 12px 0;
    padding: 13px;
    border-radius: 7px;
    background: #f9fafb;
    color: var(--apikey-muted);
    font-size: 14px;
    text-align: center;
}

#keysLoading[hidden] {
    display: none !important;
}

/* API keys table */

.api-keys-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--apikey-border);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.api-keys-table-wrapper table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    border-spacing: 0;
    text-align: left;
}

.api-keys-table-wrapper thead {
    background: #f9fafb;
}

.api-keys-table-wrapper th {
    padding: 14px 15px;
    border-bottom: 1px solid var(--apikey-border);
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.api-keys-table-wrapper td {
    padding: 14px 15px;
    border-bottom: 1px solid #f0f1f3;
    color: #374151;
    font-size: 13px;
    line-height: 1.6;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.api-keys-table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

.api-keys-table-wrapper tbody tr:hover {
    background: #fafcf8;
}

.api-keys-table-wrapper td[colspan] {
    padding: 28px 15px;
    color: var(--apikey-muted);
    text-align: center;
}

.api-keys-table-wrapper td button {
    min-height: 34px;
    margin: 2px 4px 2px 0;
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
}

/* Optional status badges */

.api-key-status,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.api-key-status.active,
.status-badge.active {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.api-key-status.revoked,
.status-badge.revoked {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.api-key-status.test,
.status-badge.test {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.api-key-status.live,
.status-badge.live {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Authentication test */

.api-keys-module code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #374151;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

#testApiSecret {
    max-width: 650px;
    margin-bottom: 12px;
    font-family: Consolas, "Courier New", monospace;
}

#apiKeyTestResult {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 18px 0 0;
    padding: 14px;
    border: 1px solid var(--apikey-border);
    border-radius: 8px;
    background: #f9fafb;
    color: #374151;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-x: auto;
}

#apiKeyTestResult:empty {
    display: none;
}

/* Responsive: tablets */

@media (max-width: 1050px) {
    .api-keys-module {
        padding: 22px;
    }

    .api-keys-module h1 {
        font-size: 27px;
    }

    .api-keys-module > section:not(:first-child) {
        padding: 21px;
    }

    .api-keys-table-wrapper table {
        min-width: 1000px;
    }
}

/* Responsive: mobile */

@media (max-width: 600px) {
    .api-keys-module {
        padding: 16px;
        font-size: 15px;
    }

    .api-keys-module > section:first-child {
        margin-bottom: 20px;
    }

    .api-keys-module h1 {
        font-size: 24px;
    }

    .api-keys-module h2 {
        font-size: 19px;
    }

    .api-keys-module > section:not(:first-child) {
        margin-bottom: 17px;
        padding: 17px;
    }

    #showCreateKeyBtn,
    #refreshKeysBtn {
        width: 100%;
        margin: 0 0 9px;
    }

    #createKeyForm > button,
    #newSecretSection > button {
        width: 100%;
        margin: 5px 0 0;
    }

    #createKeyForm fieldset {
        padding: 12px;
    }

    #createKeyForm fieldset label {
        align-items: flex-start;
        padding: 12px 2px;
    }

    #keySearch,
    #keyStatusFilter,
    #testApiSecret {
        max-width: 100%;
    }

    .api-keys-table-wrapper table {
        min-width: 1000px;
    }

    .api-keys-table-wrapper th,
    .api-keys-table-wrapper td {
        padding: 12px;
    }

    #testApiKeyBtn {
        width: 100%;
    }

    #apiKeyTestResult {
        font-size: 12px;
    }
}

/* Responsive: small phones */

@media (max-width: 360px) {
    .api-keys-module {
        padding: 12px;
    }

    .api-keys-module h1 {
        font-size: 22px;
    }

    .api-keys-module > section:not(:first-child) {
        padding: 14px;
    }

    #createKeyForm fieldset {
        padding: 9px;
    }

    .api-keys-module button {
        padding: 9px 12px;
        font-size: 13px;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .api-keys-module *,
    .api-keys-module *::before,
    .api-keys-module *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}









/* ================================
   API Keys Module
   AdThrive Media - Responsive CSS
================================ */

:root {
    --apikey-primary: #7CB947;
    --apikey-primary-hover: #659e38;
    --apikey-text: #111827;
    --apikey-muted: #6b7280;
    --apikey-border: #e5e7eb;
    --apikey-bg: #f7f8fa;
    --apikey-white: #ffffff;
    --apikey-danger: #dc2626;
    --apikey-radius: 10px;
    --apikey-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
}

.api-keys-module,
.api-keys-module * {
    box-sizing: border-box;
}

.api-keys-module {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px;
    color: var(--apikey-text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

/* Page heading */

.api-keys-module > section:first-child {
    margin-bottom: 26px;
}

.api-keys-module h1 {
    margin: 0 0 8px;
    color: var(--apikey-text);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
}

.api-keys-module h2 {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--apikey-border);
    color: var(--apikey-text);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.api-keys-module p {
    color: var(--apikey-muted);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.api-keys-module > section:first-child p {
    margin: 0;
    font-size: 15px;
}

/* Content cards */

.api-keys-module > section:not(:first-child) {
    margin-bottom: 22px;
    padding: 24px;
    border: 1px solid var(--apikey-border);
    border-radius: var(--apikey-radius);
    background: var(--apikey-white);
    box-shadow: var(--apikey-shadow);
}

/* Buttons */

.api-keys-module button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid var(--apikey-border);
    border-radius: 7px;
    background: var(--apikey-white);
    color: var(--apikey-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.api-keys-module button:hover {
    border-color: var(--apikey-primary);
    color: var(--apikey-primary-hover);
}

.api-keys-module button:active {
    transform: translateY(1px);
}

.api-keys-module button:focus-visible {
    outline: 3px solid rgba(124, 185, 71, 0.3);
    outline-offset: 2px;
}

.api-keys-module button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

#showCreateKeyBtn,
#createKeySubmitBtn,
#testApiKeyBtn {
    border-color: var(--apikey-primary);
    background: var(--apikey-primary);
    color: var(--apikey-white);
}

#showCreateKeyBtn:hover,
#createKeySubmitBtn:hover,
#testApiKeyBtn:hover {
    border-color: var(--apikey-primary-hover);
    background: var(--apikey-primary-hover);
    color: var(--apikey-white);
}

#refreshKeysBtn {
    margin-left: 8px;
}

/* General API key messages */

#apiKeyMessage {
    display: none;
    margin: 16px 0 0;
    padding: 12px 15px;
    border: 1px solid var(--apikey-border);
    border-radius: 7px;
    background: #f9fafb;
    color: var(--apikey-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#apiKeyMessage:not(:empty) {
    display: block;
}

#apiKeyMessage.success,
#apiKeyMessage[data-type="success"] {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

#apiKeyMessage.error,
#apiKeyMessage[data-type="error"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

#apiKeyMessage.warning,
#apiKeyMessage[data-type="warning"] {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Create key form */

#createKeySection[hidden],
#newSecretSection[hidden] {
    display: none !important;
}

#createKeyForm {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.api-keys-module label {
    display: block;
    margin-top: 4px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.api-keys-module input[type="text"],
.api-keys-module input[type="number"],
.api-keys-module input[type="search"],
.api-keys-module input[type="password"],
.api-keys-module input[type="datetime-local"],
.api-keys-module select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    outline: none;
    background: var(--apikey-white);
    color: var(--apikey-text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.api-keys-module input::placeholder {
    color: #9ca3af;
}

.api-keys-module input:focus,
.api-keys-module select:focus {
    border-color: var(--apikey-primary);
    box-shadow: 0 0 0 3px rgba(124, 185, 71, 0.15);
}

.api-keys-module input:disabled,
.api-keys-module select:disabled {
    background: #f3f4f6;
    color: var(--apikey-muted);
    cursor: not-allowed;
}

/* Permissions fieldset */

#createKeyForm fieldset {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 12px 0 2px;
    padding: 18px;
    border: 1px solid var(--apikey-border);
    border-radius: 8px;
    background: #fcfcfc;
}

#createKeyForm legend {
    padding: 0 8px;
    color: var(--apikey-text);
    font-size: 14px;
    font-weight: 700;
}

#createKeyForm fieldset label {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 11px 4px;
    border-bottom: 1px solid #f0f1f3;
    color: #4b5563;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

#createKeyForm fieldset label:last-child {
    border-bottom: none;
}

#createKeyForm fieldset input[type="checkbox"] {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--apikey-primary);
    cursor: pointer;
}

#createKeyForm > p {
    margin: 2px 0 8px;
    font-size: 13px;
}

#createKeyForm > button {
    align-self: flex-start;
    margin: 5px 8px 0 0;
}

#cancelCreateKeyBtn {
    background: var(--apikey-white);
    color: #4b5563;
}

/* Newly generated API secret */

#newSecretSection {
    border-color: #d1e7c0;
    background: #fcfef9;
}

#newSecretSection > p {
    margin: 0 0 18px;
}

#newSecretValue {
    margin-bottom: 12px;
    font-family: Consolas, "Courier New", monospace;
    letter-spacing: 0.04em;
}

#toggleSecretBtn,
#copySecretBtn,
#closeSecretBtn {
    margin: 5px 8px 0 0;
}

#copySecretBtn {
    border-color: var(--apikey-primary);
    background: var(--apikey-primary);
    color: var(--apikey-white);
}

#copySecretBtn:hover {
    border-color: var(--apikey-primary-hover);
    background: var(--apikey-primary-hover);
    color: var(--apikey-white);
}

/* API keys search and filters */

.api-keys-module > section:nth-of-type(4) > label {
    margin: 12px 0 7px;
}

#keySearch {
    max-width: 520px;
}

#keyStatusFilter {
    max-width: 260px;
    margin-bottom: 18px;
}

#keysLoading {
    margin: 12px 0;
    padding: 13px;
    border-radius: 7px;
    background: #f9fafb;
    color: var(--apikey-muted);
    font-size: 14px;
    text-align: center;
}

#keysLoading[hidden] {
    display: none !important;
}

/* API keys table */

.api-keys-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--apikey-border);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.api-keys-table-wrapper table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    border-spacing: 0;
    text-align: left;
}

.api-keys-table-wrapper thead {
    background: #f9fafb;
}

.api-keys-table-wrapper th {
    padding: 14px 15px;
    border-bottom: 1px solid var(--apikey-border);
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.api-keys-table-wrapper td {
    padding: 14px 15px;
    border-bottom: 1px solid #f0f1f3;
    color: #374151;
    font-size: 13px;
    line-height: 1.6;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.api-keys-table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

.api-keys-table-wrapper tbody tr:hover {
    background: #fafcf8;
}

.api-keys-table-wrapper td[colspan] {
    padding: 28px 15px;
    color: var(--apikey-muted);
    text-align: center;
}

.api-keys-table-wrapper td button {
    min-height: 34px;
    margin: 2px 4px 2px 0;
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
}

/* Optional status badges */

.api-key-status,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.api-key-status.active,
.status-badge.active {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.api-key-status.revoked,
.status-badge.revoked {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.api-key-status.test,
.status-badge.test {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.api-key-status.live,
.status-badge.live {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Authentication test */

.api-keys-module code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #374151;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

#testApiSecret {
    max-width: 650px;
    margin-bottom: 12px;
    font-family: Consolas, "Courier New", monospace;
}

#apiKeyTestResult {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 18px 0 0;
    padding: 14px;
    border: 1px solid var(--apikey-border);
    border-radius: 8px;
    background: #f9fafb;
    color: #374151;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-x: auto;
}

#apiKeyTestResult:empty {
    display: none;
}

/* Responsive: tablets */

@media (max-width: 1050px) {
    .api-keys-module {
        padding: 22px;
    }

    .api-keys-module h1 {
        font-size: 27px;
    }

    .api-keys-module > section:not(:first-child) {
        padding: 21px;
    }

    .api-keys-table-wrapper table {
        min-width: 1000px;
    }
}

/* Responsive: mobile */

@media (max-width: 600px) {
    .api-keys-module {
        padding: 16px;
        font-size: 15px;
    }

    .api-keys-module > section:first-child {
        margin-bottom: 20px;
    }

    .api-keys-module h1 {
        font-size: 24px;
    }

    .api-keys-module h2 {
        font-size: 19px;
    }

    .api-keys-module > section:not(:first-child) {
        margin-bottom: 17px;
        padding: 17px;
    }

    #showCreateKeyBtn,
    #refreshKeysBtn {
        width: 100%;
        margin: 0 0 9px;
    }

    #createKeyForm > button,
    #newSecretSection > button {
        width: 100%;
        margin: 5px 0 0;
    }

    #createKeyForm fieldset {
        padding: 12px;
    }

    #createKeyForm fieldset label {
        align-items: flex-start;
        padding: 12px 2px;
    }

    #keySearch,
    #keyStatusFilter,
    #testApiSecret {
        max-width: 100%;
    }

    .api-keys-table-wrapper table {
        min-width: 1000px;
    }

    .api-keys-table-wrapper th,
    .api-keys-table-wrapper td {
        padding: 12px;
    }

    #testApiKeyBtn {
        width: 100%;
    }

    #apiKeyTestResult {
        font-size: 12px;
    }
}

/* Responsive: small phones */

@media (max-width: 360px) {
    .api-keys-module {
        padding: 12px;
    }

    .api-keys-module h1 {
        font-size: 22px;
    }

    .api-keys-module > section:not(:first-child) {
        padding: 14px;
    }

    #createKeyForm fieldset {
        padding: 9px;
    }

    .api-keys-module button {
        padding: 9px 12px;
        font-size: 13px;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .api-keys-module *,
    .api-keys-module *::before,
    .api-keys-module *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}








/* ================================
   Billing & Payments Module
   AdThrive Media - Responsive CSS
================================ */

:root {
    --billing-primary: #7CB947;
    --billing-primary-hover: #659e38;
    --billing-text: #111827;
    --billing-muted: #6b7280;
    --billing-border: #e5e7eb;
    --billing-bg: #f7f8fa;
    --billing-white: #ffffff;
    --billing-danger: #dc2626;
    --billing-radius: 10px;
    --billing-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
}

.billing-page,
.billing-page * {
    box-sizing: border-box;
}

.billing-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px;
    color: var(--billing-text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

/* Page heading */

.billing-page .page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.billing-page .page-heading h1 {
    margin: 0 0 8px;
    color: var(--billing-text);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
}

.billing-page .page-heading p {
    margin: 0;
    color: var(--billing-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Buttons */

.billing-page button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid var(--billing-border);
    border-radius: 7px;
    background: var(--billing-white);
    color: var(--billing-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.billing-page button:hover {
    border-color: var(--billing-primary);
    color: var(--billing-primary-hover);
}

.billing-page button:active {
    transform: translateY(1px);
}

.billing-page button:focus-visible {
    outline: 3px solid rgba(124, 185, 71, 0.3);
    outline-offset: 2px;
}

.billing-page button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

#refreshBillingBtn,
#applyPaymentFilters {
    border-color: var(--billing-primary);
    background: var(--billing-primary);
    color: var(--billing-white);
}

#refreshBillingBtn:hover,
#applyPaymentFilters:hover {
    border-color: var(--billing-primary-hover);
    background: var(--billing-primary-hover);
    color: var(--billing-white);
}

/* Subscription summary cards */

.billing-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.billing-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--billing-border);
    border-radius: var(--billing-radius);
    background: var(--billing-white);
    box-shadow: var(--billing-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.billing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(17, 24, 39, 0.08);
}

.billing-card h3 {
    margin: 0 0 15px;
    color: var(--billing-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.billing-card p {
    margin: 0 0 9px;
    color: var(--billing-text);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.billing-card small {
    display: block;
    color: var(--billing-muted);
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* Optional status colors */

#subscriptionStatus.status-active,
#subscriptionStatus.active {
    color: #15803d;
}

#subscriptionStatus.status-expired,
#subscriptionStatus.expired,
#subscriptionStatus.status-failed {
    color: var(--billing-danger);
}

#subscriptionStatus.status-pending,
#subscriptionStatus.pending {
    color: #b45309;
}

/* Billing content sections */

.billing-section {
    min-width: 0;
    margin-bottom: 25px;
    padding: 24px;
    border: 1px solid var(--billing-border);
    border-radius: var(--billing-radius);
    background: var(--billing-white);
    box-shadow: var(--billing-shadow);
}

.billing-page .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.billing-page .section-heading h2 {
    margin: 0 0 7px;
    color: var(--billing-text);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.billing-page .section-heading p {
    margin: 0;
    color: var(--billing-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Payment filters */

.billing-filters {
    display: grid;
    grid-template-columns: auto minmax(150px, 1fr) auto minmax(150px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 17px;
    border: 1px solid var(--billing-border);
    border-radius: 8px;
    background: #fafbfc;
}

.billing-filters label {
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.billing-filters select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    outline: none;
    background: var(--billing-white);
    color: var(--billing-text);
    font-family: inherit;
    font-size: 14px;
}

.billing-filters select:focus {
    border-color: var(--billing-primary);
    box-shadow: 0 0 0 3px rgba(124, 185, 71, 0.15);
}

/* Billing messages */

#billingMessage {
    display: none;
    margin: 0 0 18px;
    padding: 12px 15px;
    border: 1px solid var(--billing-border);
    border-radius: 7px;
    background: #f9fafb;
    color: var(--billing-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#billingMessage:not(:empty) {
    display: block;
}

#billingMessage.success,
#billingMessage[data-type="success"] {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

#billingMessage.error,
#billingMessage[data-type="error"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

#billingMessage.warning,
#billingMessage[data-type="warning"] {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Tables */

.billing-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--billing-border);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.billing-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    border-spacing: 0;
    text-align: left;
}

.billing-table thead {
    background: #f9fafb;
}

.billing-table th {
    padding: 15px 16px;
    border-bottom: 1px solid var(--billing-border);
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.billing-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #f0f1f3;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

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

.billing-table tbody tr:hover {
    background: #fafcf8;
}

.billing-table td[colspan] {
    padding: 30px 16px;
    color: var(--billing-muted);
    text-align: center;
}

.billing-table td button {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
    white-space: nowrap;
}

/* Optional payment and subscription status badges */

.payment-status,
.subscription-status,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.payment-status.success,
.payment-status.paid,
.subscription-status.active,
.status-badge.success,
.status-badge.paid,
.status-badge.active {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.payment-status.pending,
.payment-status.created,
.subscription-status.pending,
.status-badge.pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.payment-status.failed,
.payment-status.refunded,
.subscription-status.expired,
.status-badge.failed,
.status-badge.refunded,
.status-badge.expired {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

/* Pagination */

.billing-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.billing-pagination span {
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
}

/* Subscription price cards */

.subscription-prices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.subscription-prices > p {
    grid-column: 1 / -1;
    margin: 0;
    padding: 20px;
    border: 1px dashed var(--billing-border);
    border-radius: 8px;
    color: var(--billing-muted);
    font-size: 14px;
    text-align: center;
}

/* Styling for common price card elements if rendered by JavaScript */

.subscription-price-card,
.price-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--billing-border);
    border-radius: 9px;
    background: var(--billing-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.subscription-price-card:hover,
.price-card:hover {
    border-color: #c7dfb4;
    box-shadow: var(--billing-shadow);
}

.subscription-price-card h3,
.price-card h3 {
    margin: 0 0 12px;
    color: var(--billing-text);
    font-size: 17px;
    line-height: 1.4;
}

.subscription-price-card p,
.price-card p {
    margin: 7px 0;
    color: var(--billing-muted);
    font-size: 14px;
    line-height: 1.6;
}

.subscription-price-card .price,
.price-card .price {
    color: var(--billing-text);
    font-size: 25px;
    font-weight: 700;
}

/* Payment details dialog */

#paymentDetailsDialog {
    width: min(650px, calc(100% - 32px));
    max-width: 650px;
    max-height: 85vh;
    padding: 0;
    border: 1px solid var(--billing-border);
    border-radius: 12px;
    background: var(--billing-white);
    color: var(--billing-text);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: auto;
}

#paymentDetailsDialog::backdrop {
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(2px);
}

.payment-dialog-content {
    padding: 26px;
}

.payment-dialog-content .section-heading {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--billing-border);
}

.payment-dialog-content .section-heading h2 {
    margin: 0;
    font-size: 21px;
}

#closePaymentDetails {
    flex-shrink: 0;
}

#paymentDetailsContent {
    color: #374151;
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

#paymentDetailsContent p {
    margin: 10px 0;
}

#paymentDetailsContent strong {
    color: var(--billing-text);
}

#paymentDetailsContent pre,
#paymentDetailsContent code {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#paymentDetailsContent pre {
    padding: 14px;
    border: 1px solid var(--billing-border);
    border-radius: 7px;
    background: #f9fafb;
    overflow-x: auto;
}

/* Responsive: tablets */

@media (max-width: 1100px) {
    .billing-page {
        padding: 22px;
    }

    .billing-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-filters {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .billing-filters label {
        align-self: end;
    }

    #applyPaymentFilters {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* Responsive: mobile */

@media (max-width: 600px) {
    .billing-page {
        padding: 16px;
        font-size: 15px;
    }

    .billing-page .page-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 20px;
    }

    .billing-page .page-heading h1 {
        font-size: 24px;
    }

    .billing-page .page-heading p {
        font-size: 14px;
    }

    #refreshBillingBtn {
        width: 100%;
    }

    .billing-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .billing-card {
        padding: 18px;
    }

    .billing-card h3 {
        margin-bottom: 10px;
    }

    .billing-card p {
        font-size: 22px;
    }

    .billing-section {
        margin-bottom: 18px;
        padding: 16px;
    }

    .billing-page .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .billing-page .section-heading h2 {
        font-size: 19px;
    }

    .billing-filters {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 13px;
    }

    .billing-filters label {
        margin-top: 7px;
    }

    #applyPaymentFilters {
        width: 100%;
        grid-column: auto;
    }

    .billing-table {
        min-width: 800px;
    }

    .billing-table th,
    .billing-table td {
        padding: 12px;
    }

    .billing-pagination {
        justify-content: space-between;
        gap: 8px;
    }

    .billing-pagination button {
        padding: 9px 12px;
    }

    .subscription-prices {
        grid-template-columns: minmax(0, 1fr);
    }

    .payment-dialog-content {
        padding: 18px;
    }

    .payment-dialog-content .section-heading {
        align-items: center;
        flex-direction: row;
    }

    .payment-dialog-content .section-heading h2 {
        font-size: 18px;
    }
}

/* Responsive: small phones */

@media (max-width: 360px) {
    .billing-page {
        padding: 12px;
    }

    .billing-page .page-heading h1 {
        font-size: 22px;
    }

    .billing-section {
        padding: 12px;
    }

    .billing-card {
        padding: 15px;
    }

    .billing-pagination {
        justify-content: center;
    }

    .billing-pagination button {
        flex: 1;
        min-width: 0;
        padding: 8px;
        font-size: 12px;
    }

    .billing-pagination span {
        width: 100%;
        order: -1;
        text-align: center;
    }

    .payment-dialog-content {
        padding: 14px;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .billing-page *,
    .billing-page *::before,
    .billing-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
} 









/* ================================
   Pricing & Plans Module
   AdThrive Media - Responsive CSS
================================ */

:root {
    --pricing-primary: #7CB947;
    --pricing-primary-hover: #659e38;
    --pricing-text: #111827;
    --pricing-muted: #6b7280;
    --pricing-border: #e5e7eb;
    --pricing-bg: #f7f8fa;
    --pricing-white: #ffffff;
    --pricing-danger: #dc2626;
    --pricing-radius: 10px;
    --pricing-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
}

.pricing-page,
.pricing-page * {
    box-sizing: border-box;
}

.pricing-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px;
    color: var(--pricing-text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

/* Page heading */

.pricing-page .page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.pricing-page .page-heading h1 {
    margin: 0 0 8px;
    color: var(--pricing-text);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
}

.pricing-page .page-heading p {
    margin: 0;
    color: var(--pricing-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Buttons */

.pricing-page button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid var(--pricing-border);
    border-radius: 7px;
    background: var(--pricing-white);
    color: var(--pricing-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.pricing-page button:hover {
    border-color: var(--pricing-primary);
    color: var(--pricing-primary-hover);
}

.pricing-page button:active {
    transform: translateY(1px);
}

.pricing-page button:focus-visible {
    outline: 3px solid rgba(124, 185, 71, 0.3);
    outline-offset: 2px;
}

.pricing-page button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

#refreshPricingBtn {
    flex-shrink: 0;
    border-color: var(--pricing-primary);
    background: var(--pricing-primary);
    color: var(--pricing-white);
}

#refreshPricingBtn:hover {
    border-color: var(--pricing-primary-hover);
    background: var(--pricing-primary-hover);
    color: var(--pricing-white);
}

/* Main sections */

.pricing-page .billing-section {
    min-width: 0;
    margin-bottom: 25px;
    padding: 24px;
    border: 1px solid var(--pricing-border);
    border-radius: var(--pricing-radius);
    background: var(--pricing-white);
    box-shadow: var(--pricing-shadow);
}

.pricing-page .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.pricing-page .section-heading h2,
.pricing-page .billing-section > h2 {
    margin: 0 0 8px;
    color: var(--pricing-text);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.pricing-page .section-heading p {
    margin: 0;
    color: var(--pricing-muted);
    font-size: 14px;
    line-height: 1.6;
}

.pricing-page .billing-section > h2 {
    margin-bottom: 20px;
}

/* Pricing messages */

#pricingMessage {
    display: none;
    margin: 0 0 20px;
    padding: 12px 15px;
    border: 1px solid var(--pricing-border);
    border-radius: 7px;
    background: #f9fafb;
    color: var(--pricing-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#pricingMessage:not(:empty) {
    display: block;
}

#pricingMessage.success,
#pricingMessage[data-type="success"] {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

#pricingMessage.error,
#pricingMessage[data-type="error"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

#pricingMessage.warning,
#pricingMessage[data-type="warning"] {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Available plans grid */

.pricing-page .subscription-prices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}

.pricing-page .subscription-prices > p {
    grid-column: 1 / -1;
    margin: 0;
    padding: 28px 20px;
    border: 1px dashed var(--pricing-border);
    border-radius: 8px;
    color: var(--pricing-muted);
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

/* Plan cards created dynamically by JavaScript */

.pricing-page .subscription-price-card,
.pricing-page .price-card,
.pricing-page .pricing-card,
.pricing-page .plan-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--pricing-border);
    border-radius: 10px;
    background: var(--pricing-white);
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.03);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.pricing-page .subscription-price-card:hover,
.pricing-page .price-card:hover,
.pricing-page .pricing-card:hover,
.pricing-page .plan-card:hover {
    transform: translateY(-3px);
    border-color: #c7dfb4;
    box-shadow: var(--pricing-shadow);
}

.pricing-page .subscription-price-card h3,
.pricing-page .price-card h3,
.pricing-page .pricing-card h3,
.pricing-page .plan-card h3 {
    margin: 0 0 12px;
    color: var(--pricing-text);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.pricing-page .subscription-price-card p,
.pricing-page .price-card p,
.pricing-page .pricing-card p,
.pricing-page .plan-card p {
    margin: 7px 0;
    color: var(--pricing-muted);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.pricing-page .subscription-price-card .price,
.pricing-page .price-card .price,
.pricing-page .pricing-card .price,
.pricing-page .plan-card .price {
    margin: 10px 0;
    color: var(--pricing-text);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
}

.pricing-page .subscription-price-card button,
.pricing-page .price-card button,
.pricing-page .pricing-card button,
.pricing-page .plan-card button {
    width: 100%;
    margin-top: auto;
    padding: 12px 15px;
    border-color: var(--pricing-primary);
    background: var(--pricing-primary);
    color: var(--pricing-white);
}

.pricing-page .subscription-price-card button:hover,
.pricing-page .price-card button:hover,
.pricing-page .pricing-card button:hover,
.pricing-page .plan-card button:hover {
    border-color: var(--pricing-primary-hover);
    background: var(--pricing-primary-hover);
    color: var(--pricing-white);
}

/* Optional popular plan highlight */

.pricing-page .subscription-price-card.popular,
.pricing-page .price-card.popular,
.pricing-page .pricing-card.popular,
.pricing-page .plan-card.popular {
    border: 2px solid var(--pricing-primary);
}

/* Current subscription */

.pricing-page .billing-section > .billing-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--pricing-border);
    border-radius: 9px;
    background: #fcfef9;
}

.pricing-page .billing-card h3 {
    margin: 0 0 14px;
    color: var(--pricing-text);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.pricing-page .billing-card p {
    margin: 10px 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

#currentPlanStatus {
    display: inline-block;
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid var(--pricing-border);
    border-radius: 20px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

#currentPlanStatus.active,
#currentPlanStatus.status-active {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

#currentPlanStatus.expired,
#currentPlanStatus.status-expired,
#currentPlanStatus.cancelled {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

#currentPlanStatus.pending,
#currentPlanStatus.status-pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Plan details dialog */

#pricingDetailsDialog {
    width: min(650px, calc(100% - 32px));
    max-width: 650px;
    max-height: 85vh;
    padding: 0;
    border: 1px solid var(--pricing-border);
    border-radius: 12px;
    background: var(--pricing-white);
    color: var(--pricing-text);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: auto;
}

#pricingDetailsDialog::backdrop {
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(2px);
}

.pricing-page .payment-dialog-content {
    padding: 26px;
}

.pricing-page .payment-dialog-content .section-heading {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--pricing-border);
}

.pricing-page .payment-dialog-content .section-heading h2 {
    margin: 0;
    font-size: 21px;
}

#closePricingDialog {
    flex-shrink: 0;
}

#pricingDetailsContent {
    color: #374151;
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

#pricingDetailsContent p {
    margin: 10px 0;
}

#pricingDetailsContent ul,
#pricingDetailsContent ol {
    padding-left: 22px;
}

#pricingDetailsContent li {
    margin-bottom: 7px;
}

#pricingDetailsContent strong {
    color: var(--pricing-text);
}

/* Tablet */

@media (max-width: 1050px) {
    .pricing-page {
        padding: 22px;
    }

    .pricing-page .page-heading h1 {
        font-size: 27px;
    }

    .pricing-page .subscription-prices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .pricing-page .billing-section {
        padding: 21px;
    }
}

/* Mobile */

@media (max-width: 600px) {
    .pricing-page {
        padding: 16px;
        font-size: 15px;
    }

    .pricing-page .page-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 20px;
    }

    .pricing-page .page-heading h1 {
        font-size: 24px;
    }

    .pricing-page .page-heading p {
        font-size: 14px;
    }

    #refreshPricingBtn {
        width: 100%;
    }

    .pricing-page .billing-section {
        margin-bottom: 18px;
        padding: 16px;
    }

    .pricing-page .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .pricing-page .section-heading h2,
    .pricing-page .billing-section > h2 {
        font-size: 19px;
    }

    .pricing-page .subscription-prices {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .pricing-page .subscription-price-card,
    .pricing-page .price-card,
    .pricing-page .pricing-card,
    .pricing-page .plan-card {
        padding: 20px;
    }

    .pricing-page .billing-section > .billing-card {
        padding: 18px;
    }

    .pricing-page .billing-card h3 {
        font-size: 19px;
    }

    .pricing-page .payment-dialog-content {
        padding: 18px;
    }

    .pricing-page .payment-dialog-content .section-heading {
        align-items: center;
        flex-direction: row;
    }

    .pricing-page .payment-dialog-content .section-heading h2 {
        font-size: 18px;
    }
}

/* Small phones */

@media (max-width: 360px) {
    .pricing-page {
        padding: 12px;
    }

    .pricing-page .page-heading h1 {
        font-size: 22px;
    }

    .pricing-page .billing-section {
        padding: 13px;
    }

    .pricing-page .subscription-price-card,
    .pricing-page .price-card,
    .pricing-page .pricing-card,
    .pricing-page .plan-card {
        padding: 16px;
    }

    .pricing-page .subscription-price-card .price,
    .pricing-page .price-card .price,
    .pricing-page .pricing-card .price,
    .pricing-page .plan-card .price {
        font-size: 26px;
    }

    .pricing-page .payment-dialog-content {
        padding: 14px;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .pricing-page *,
    .pricing-page *::before,
    .pricing-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}










/* =========================================================
   ADTHRIVE MEDIA — WALLET MODULE
   Header and Sidebar are intentionally excluded.
   ========================================================= */

/* ---------- Theme ---------- */
:root {
    --wallet-primary: #7CB947;
    --wallet-primary-hover: #659e38;
    --wallet-primary-light: #f1f8e9;

    --wallet-bg: #f6f8f5;
    --wallet-surface: #ffffff;
    --wallet-border: #e5eae1;

    --wallet-text: #202820;
    --wallet-muted: #748071;

    --wallet-success: #21864a;
    --wallet-success-bg: #e8f7ed;

    --wallet-warning: #a66a0b;
    --wallet-warning-bg: #fff4d8;

    --wallet-danger: #c73939;
    --wallet-danger-bg: #ffeded;

    --wallet-info: #326bc0;
    --wallet-info-bg: #edf4ff;

    --wallet-radius: 14px;
    --wallet-radius-sm: 9px;

    --wallet-shadow:
        0 4px 18px rgba(35, 55, 30, 0.055);

    --wallet-transition: 0.2s ease;
}

/* ---------- Main Wallet Container ---------- */
.wallet-container,
.wallet-container * {
    box-sizing: border-box;
}

.wallet-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px 34px 24px;

    color: var(--wallet-text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.wallet-container button,
.wallet-container input,
.wallet-container select {
    font: inherit;
}

.wallet-container button {
    cursor: pointer;
}

.wallet-container button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.wallet-container button:focus-visible,
.wallet-container input:focus-visible,
.wallet-container select:focus-visible {
    outline: 3px solid rgba(124, 185, 71, 0.28);
    outline-offset: 3px;
}

.wallet-container [hidden] {
    display: none !important;
}

/* ---------- Page Heading ---------- */
.wallet-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;

    margin-bottom: 25px;
}

.wallet-page-heading > div {
    min-width: 0;
}

.wallet-page-heading .eyebrow {
    margin: 0 0 7px;

    color: var(--wallet-primary-hover);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.wallet-page-heading h1 {
    margin: 0 0 6px;

    color: var(--wallet-text);
    font-size: clamp(28px, 3vw, 35px);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.8px;
}

.wallet-page-heading .muted {
    margin: 0;
}

/* ---------- Muted Text ---------- */
.wallet-container .muted {
    color: var(--wallet-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* ---------- Status Badge ---------- */
.wallet-container .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 6px;

    min-height: 30px;
    padding: 5px 12px;

    color: #586653;
    background: #f0f3ed;
    border: 1px solid #e0e6db;
    border-radius: 100px;

    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
    white-space: nowrap;
}

.wallet-container .status-badge.success,
.wallet-container .status-badge.active,
.wallet-container .status-badge.healthy {
    color: var(--wallet-success);
    background: var(--wallet-success-bg);
    border-color: #ccebd6;
}

.wallet-container .status-badge.pending,
.wallet-container .status-badge.loading {
    color: var(--wallet-warning);
    background: var(--wallet-warning-bg);
    border-color: #f1dfb0;
}

.wallet-container .status-badge.failed,
.wallet-container .status-badge.error,
.wallet-container .status-badge.inactive {
    color: var(--wallet-danger);
    background: var(--wallet-danger-bg);
    border-color: #f3d0d0;
}

/* ---------- Alert Messages ---------- */
.wallet-container .wallet-alert {
    margin-bottom: 22px;
    padding: 13px 16px;

    color: #52634c;
    background: #ffffff;
    border: 1px solid var(--wallet-border);
    border-left: 4px solid var(--wallet-primary);
    border-radius: 10px;

    font-size: 14px;
    overflow-wrap: anywhere;
}

.wallet-container .wallet-alert.success {
    color: var(--wallet-success);
    background: var(--wallet-success-bg);
    border-color: #ccebd6;
    border-left-color: var(--wallet-success);
}

.wallet-container .wallet-alert.error {
    color: var(--wallet-danger);
    background: var(--wallet-danger-bg);
    border-color: #f3d0d0;
    border-left-color: var(--wallet-danger);
}

.wallet-container .wallet-alert.warning {
    color: var(--wallet-warning);
    background: var(--wallet-warning-bg);
    border-color: #f1dfb0;
    border-left-color: var(--wallet-warning);
}

.wallet-container .wallet-alert.info {
    color: var(--wallet-info);
    background: var(--wallet-info-bg);
    border-color: #d6e5ff;
    border-left-color: var(--wallet-info);
}

/* ---------- Summary Grid ---------- */
.wallet-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 20px;

    margin-bottom: 24px;
}

/* ---------- Shared Cards ---------- */
.wallet-container .wallet-card {
    min-width: 0;
    padding: 25px;

    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border);
    border-radius: var(--wallet-radius);
    box-shadow: var(--wallet-shadow);

    transition:
        border-color var(--wallet-transition),
        box-shadow var(--wallet-transition);
}

.wallet-container .wallet-card:hover {
    border-color: #d5e2cd;
    box-shadow: 0 7px 24px rgba(35, 55, 30, 0.075);
}

/* ---------- Balance Card ---------- */
.wallet-container .balance-card {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(135deg, #ffffff 0%, #f6fbf1 100%);

    border-color: #dce9d3;
}

.wallet-container .balance-card::after {
    position: absolute;
    top: -75px;
    right: -65px;

    width: 190px;
    height: 190px;

    background: rgba(124, 185, 71, 0.07);
    border-radius: 50%;

    content: "";
    pointer-events: none;
}

.wallet-container .card-topline {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 19px;
}

.wallet-container .card-label {
    display: block;

    color: var(--wallet-muted);
    font-size: 14px;
    font-weight: 650;
}

.wallet-container .wallet-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    color: var(--wallet-primary-hover);
    background: #eaf5df;
    border: 1px solid #d9eacb;
    border-radius: 12px;

    font-size: 23px;
    font-weight: 750;
}

.wallet-container .balance-card h2 {
    position: relative;
    z-index: 1;

    margin: 0 0 5px;

    color: #253922;
    font-size: clamp(32px, 4vw, 43px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -1px;
    overflow-wrap: anywhere;
}

.wallet-container .balance-caption {
    position: relative;
    z-index: 1;

    margin: 0 0 23px;

    color: var(--wallet-muted);
    font-size: 13px;
}

.wallet-container .balance-card > .btn {
    position: relative;
    z-index: 1;
}

/* ---------- Account Card ---------- */
.wallet-container .wallet-summary-grid > .wallet-card:not(.balance-card) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.wallet-container #walletAccountStatus {
    margin: 14px 0 8px;

    color: var(--wallet-text);
    font-size: clamp(22px, 2.5vw, 29px);
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.wallet-container #walletAccountStatus + .muted {
    margin: 0;
}

/* ---------- Buttons ---------- */
.wallet-container .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 10px 17px;

    border: 1px solid transparent;
    border-radius: var(--wallet-radius-sm);

    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;

    transition:
        background var(--wallet-transition),
        color var(--wallet-transition),
        border-color var(--wallet-transition),
        box-shadow var(--wallet-transition),
        transform var(--wallet-transition);
}

.wallet-container .btn:not(:disabled):active {
    transform: translateY(1px);
}

.wallet-container .btn-primary {
    color: #ffffff;
    background: var(--wallet-primary);
    border-color: var(--wallet-primary);
    box-shadow: 0 3px 9px rgba(124, 185, 71, 0.16);
}

.wallet-container .btn-primary:hover:not(:disabled) {
    color: #ffffff;
    background: var(--wallet-primary-hover);
    border-color: var(--wallet-primary-hover);
    box-shadow: 0 5px 13px rgba(101, 158, 56, 0.2);
}

.wallet-container .btn-outline {
    color: #344232;
    background: #ffffff;
    border-color: var(--wallet-border);
}

.wallet-container .btn-outline:hover:not(:disabled) {
    color: var(--wallet-primary-hover);
    background: var(--wallet-primary-light);
    border-color: var(--wallet-primary);
}

/* ---------- Section Headings ---------- */
.wallet-container .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin-bottom: 22px;
}

.wallet-container .section-heading > div {
    min-width: 0;
}

.wallet-container .section-heading h2 {
    margin: 0 0 5px;

    color: var(--wallet-text);
    font-size: 21px;
    font-weight: 750;
    line-height: 1.4;
}

.wallet-container .section-heading p {
    margin: 0;
}

/* ---------- Add Funds Card ---------- */
.wallet-container .add-funds-card {
    margin-bottom: 24px;
}

/* ---------- Preset Amount Buttons ---------- */
.wallet-container .amount-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;

    margin-bottom: 24px;
}

.wallet-container .amount-preset {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 10px 12px;

    color: #42513c;
    background: #ffffff;
    border: 1px solid var(--wallet-border);
    border-radius: 10px;

    font-size: 15px;
    font-weight: 750;

    transition:
        color var(--wallet-transition),
        background var(--wallet-transition),
        border-color var(--wallet-transition),
        box-shadow var(--wallet-transition),
        transform var(--wallet-transition);
}

.wallet-container .amount-preset:hover {
    color: var(--wallet-primary-hover);
    background: var(--wallet-primary-light);
    border-color: #b8d7a4;
}

.wallet-container .amount-preset.active,
.wallet-container .amount-preset.selected,
.wallet-container .amount-preset[aria-pressed="true"] {
    color: #41682b;
    background: #edf7e5;
    border-color: var(--wallet-primary);
    box-shadow: 0 0 0 2px rgba(124, 185, 71, 0.12);
}

/* ---------- Top-up Form ---------- */
.wallet-container #topupForm {
    width: 100%;
    max-width: 600px;
    margin: 0;
    padding: 0;
}

.wallet-container #topupForm label {
    display: block;
    margin-bottom: 8px;

    color: #354331;
    font-size: 14px;
    font-weight: 700;
}

.wallet-container .amount-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    min-height: 50px;
    padding: 0 15px;

    background: #ffffff;
    border: 1px solid #dce4d7;
    border-radius: 10px;

    transition:
        border-color var(--wallet-transition),
        box-shadow var(--wallet-transition);
}

.wallet-container .amount-input-wrap:focus-within {
    border-color: var(--wallet-primary);
    box-shadow: 0 0 0 3px rgba(124, 185, 71, 0.13);
}

.wallet-container .amount-input-wrap > span {
    color: var(--wallet-primary-hover);
    font-size: 20px;
    font-weight: 750;
}

.wallet-container .amount-input-wrap input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0;

    color: var(--wallet-text);
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;

    font-size: 16px;
    font-weight: 600;
}

.wallet-container .amount-input-wrap input:focus {
    outline: none;
    box-shadow: none;
}

.wallet-container .amount-input-wrap input::placeholder {
    color: #a0a99b;
    font-weight: 400;
}

.wallet-container .field-help {
    margin: 9px 0 19px;

    color: var(--wallet-muted);
    font-size: 12px;
    line-height: 1.7;
}

.wallet-container #payNowButton {
    width: 100%;
    max-width: 320px;
    min-height: 46px;
}

.wallet-container .security-note {
    margin: 20px 0 0;
    padding: 13px 15px;

    color: #64725d;
    background: #f6f9f3;
    border: 1px solid #e8eee2;
    border-radius: 9px;

    font-size: 12px;
    line-height: 1.8;
}

/* ---------- Transaction History ---------- */
.wallet-container .transactions-card {
    margin-bottom: 23px;
}

.wallet-container .transactions-heading {
    margin-bottom: 22px;
}

/* ---------- Transaction Filters ---------- */
.wallet-container .transaction-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(190px, 0.8fr);
    gap: 12px;

    margin-bottom: 20px;
}

.wallet-container .transaction-filters input,
.wallet-container .transaction-filters select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 13px;

    color: #344232;
    background: #ffffff;
    border: 1px solid var(--wallet-border);
    border-radius: 9px;

    font-size: 13px;

    transition:
        border-color var(--wallet-transition),
        box-shadow var(--wallet-transition);
}

.wallet-container .transaction-filters input::placeholder {
    color: #99a394;
}

.wallet-container .transaction-filters input:focus,
.wallet-container .transaction-filters select:focus {
    border-color: var(--wallet-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 185, 71, 0.12);
}

/* ---------- Responsive Table Wrapper ---------- */
.wallet-container .table-responsive {
    width: 100%;
    overflow-x: auto;

    border: 1px solid var(--wallet-border);
    border-radius: 10px;

    scrollbar-width: thin;
    scrollbar-color: #c8d8be #f5f7f3;
}

.wallet-container .table-responsive::-webkit-scrollbar {
    height: 7px;
}

.wallet-container .table-responsive::-webkit-scrollbar-track {
    background: #f5f7f3;
}

.wallet-container .table-responsive::-webkit-scrollbar-thumb {
    background: #c8d8be;
    border-radius: 10px;
}

/* ---------- Wallet Table ---------- */
.wallet-container .wallet-table {
    width: 100%;
    min-width: 900px;

    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.wallet-container .wallet-table thead {
    background: #f7faf5;
}

.wallet-container .wallet-table th {
    padding: 15px 16px;

    color: #64715f;
    background: #f7faf5;
    border-bottom: 1px solid var(--wallet-border);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.45px;
    text-transform: uppercase;
    white-space: nowrap;
}

.wallet-container .wallet-table td {
    padding: 15px 16px;

    color: #445040;
    background: #ffffff;
    border-bottom: 1px solid #edf0ea;

    font-size: 13px;
    vertical-align: middle;
}

.wallet-container .wallet-table tbody tr:last-child td {
    border-bottom: none;
}

.wallet-container .wallet-table tbody tr {
    transition: background var(--wallet-transition);
}

.wallet-container .wallet-table tbody tr:hover td {
    background: #fbfdf9;
}

.wallet-container .wallet-table td:nth-child(1) {
    min-width: 155px;
    color: #2f402b;
    font-weight: 700;
}

.wallet-container .wallet-table td:nth-child(2) {
    min-width: 140px;
    overflow-wrap: anywhere;
}

.wallet-container .wallet-table td:nth-child(3) {
    min-width: 150px;
    white-space: nowrap;
}

.wallet-container .wallet-table td:nth-child(4),
.wallet-container .wallet-table td:nth-child(5) {
    font-weight: 700;
    white-space: nowrap;
}

.wallet-container .wallet-table td:nth-child(6) {
    white-space: nowrap;
}

/* ---------- Transaction Amounts ---------- */
.wallet-container .amount-credit {
    color: var(--wallet-success) !important;
    font-weight: 750;
}

.wallet-container .amount-debit {
    color: var(--wallet-danger) !important;
    font-weight: 750;
}

/* ---------- Transaction Type Labels ---------- */
.wallet-container .transaction-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 25px;
    padding: 4px 9px;

    border: 1px solid transparent;
    border-radius: 100px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.wallet-container .transaction-type.credit {
    color: var(--wallet-success);
    background: var(--wallet-success-bg);
    border-color: #ccebd6;
}

.wallet-container .transaction-type.debit {
    color: var(--wallet-danger);
    background: var(--wallet-danger-bg);
    border-color: #f3d0d0;
}

.wallet-container .transaction-type.refund {
    color: var(--wallet-info);
    background: var(--wallet-info-bg);
    border-color: #d6e5ff;
}

.wallet-container .transaction-type.adjustment {
    color: var(--wallet-warning);
    background: var(--wallet-warning-bg);
    border-color: #f1dfb0;
}

/* ---------- Transaction Status Labels ---------- */
.wallet-container .transaction-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-height: 26px;
    padding: 4px 10px;

    border: 1px solid transparent;
    border-radius: 100px;

    font-size: 11px;
    font-weight: 750;
    line-height: 1.3;
    white-space: nowrap;
}

.wallet-container .transaction-status.success,
.wallet-container .transaction-status.completed,
.wallet-container .transaction-status.captured {
    color: var(--wallet-success);
    background: var(--wallet-success-bg);
    border-color: #ccebd6;
}

.wallet-container .transaction-status.pending,
.wallet-container .transaction-status.processing {
    color: var(--wallet-warning);
    background: var(--wallet-warning-bg);
    border-color: #f1dfb0;
}

.wallet-container .transaction-status.failed,
.wallet-container .transaction-status.cancelled,
.wallet-container .transaction-status.error {
    color: var(--wallet-danger);
    background: var(--wallet-danger-bg);
    border-color: #f3d0d0;
}

.wallet-container .transaction-status.refunded {
    color: var(--wallet-info);
    background: var(--wallet-info-bg);
    border-color: #d6e5ff;
}

/* ---------- Loading / Empty Table ---------- */
.wallet-container .wallet-table .table-message {
    height: 110px;
    padding: 25px 16px;

    color: var(--wallet-muted);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Table Footer ---------- */
.wallet-container .table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;

    margin-top: 20px;
}

.wallet-container #transactionCount {
    color: var(--wallet-muted);
    font-size: 13px;
    font-weight: 550;
}

.wallet-container .pagination-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.wallet-container .pagination-controls .btn {
    min-height: 37px;
    padding: 8px 13px;
    font-size: 12px;
}

.wallet-container #pageIndicator {
    min-width: 62px;

    color: #586653;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- Footer ---------- */
.wallet-container .wallet-footer {
    padding: 4px 0 0;
    text-align: center;
}

.wallet-container .wallet-footer p {
    margin: 0;

    color: #899384;
    font-size: 12px;
    letter-spacing: 0.2px;
}

.wallet-heading-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
    .wallet-container {
        padding: 27px 22px 22px;
    }

    .wallet-container .wallet-card {
        padding: 22px;
    }

    .wallet-summary-grid {
        gap: 15px;
    }

    .wallet-container .amount-presets {
        gap: 10px;
    }
}

/* ---------- Small Tablet ---------- */
@media (max-width: 760px) {
    .wallet-container {
        padding: 23px 16px 20px;
    }

    .wallet-page-heading {
        align-items: flex-start;
        gap: 14px;
    }

    .wallet-page-heading h1 {
        font-size: 29px;
    }

    .wallet-summary-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .wallet-container .wallet-card {
        padding: 20px;
    }

    .wallet-container .balance-card h2 {
        font-size: 36px;
    }

    .wallet-container .section-heading {
        align-items: flex-start;
    }

    .wallet-container .transactions-heading {
        flex-direction: column;
        gap: 14px;
    }

    .wallet-container .transactions-heading > .btn {
        align-self: flex-start;
    }

    .wallet-container .transaction-filters {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .wallet-container .amount-presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wallet-container #payNowButton {
        max-width: none;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
    .wallet-container {
        padding: 19px 12px 18px;
        font-size: 14px;
    }

    .wallet-page-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .wallet-page-heading h1 {
        font-size: 27px;
    }

    .wallet-page-heading .muted {
        font-size: 13px;
    }

    .wallet-container .status-badge {
        font-size: 11px;
    }

    .wallet-container .wallet-alert {
        margin-bottom: 17px;
        padding: 12px;
        font-size: 13px;
    }

    .wallet-container .wallet-card {
        padding: 17px;
        border-radius: 12px;
    }

    .wallet-container .card-topline {
        margin-bottom: 15px;
    }

    .wallet-container .card-label {
        font-size: 13px;
    }

    .wallet-container .wallet-icon {
        width: 37px;
        height: 37px;
        font-size: 20px;
    }

    .wallet-container .balance-card h2 {
        font-size: 33px;
    }

    .wallet-container .balance-caption {
        margin-bottom: 19px;
        font-size: 12px;
    }

    .wallet-container .btn {
        min-height: 41px;
        padding: 9px 12px;
        font-size: 13px;
    }

    .wallet-container .section-heading {
        margin-bottom: 18px;
    }

    .wallet-container .section-heading h2 {
        font-size: 19px;
    }

    .wallet-container .section-heading p {
        font-size: 12px;
    }

    .wallet-container .amount-presets {
        gap: 9px;
        margin-bottom: 21px;
    }

    .wallet-container .amount-preset {
        min-height: 44px;
        padding: 8px;
        font-size: 14px;
    }

    .wallet-container .amount-input-wrap {
        min-height: 46px;
        padding: 0 12px;
    }

    .wallet-container .amount-input-wrap input {
        height: 44px;
        font-size: 15px;
    }

    .wallet-container .field-help {
        font-size: 11px;
    }

    .wallet-container .security-note {
        padding: 11px;
        font-size: 11px;
    }

    .wallet-container .transaction-filters input,
    .wallet-container .transaction-filters select {
        min-height: 43px;
        font-size: 12px;
    }

    .wallet-container .table-responsive {
        border-radius: 8px;
    }

    .wallet-container .wallet-table {
        min-width: 850px;
    }

    .wallet-container .wallet-table th,
    .wallet-container .wallet-table td {
        padding: 12px;
    }

    .wallet-container .table-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .wallet-container .pagination-controls {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .wallet-container .wallet-footer p {
        font-size: 11px;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .wallet-container *,
    .wallet-container *::before,
    .wallet-container *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}











:root {
    --billing-ink: #172033;
    --billing-muted: #64748b;
    --billing-border: #e2e8f0;
    --billing-primary: #4f46e5;
    --billing-surface: #ffffff;
}

/* Page layout */
.billing-page {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 22px 48px;
    color: var(--billing-ink);
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.page-heading h1 {
    font-size: 30px;
    margin: 0 0 7px;
}

.page-heading p,
.panel-heading p {
    color: var(--billing-muted);
    margin: 0;
    line-height: 1.5;
}

/* Summary cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 22px;
}

.stat-card,
.panel {
    background: var(--billing-surface);
    border: 1px solid var(--billing-border);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 16px #0f172a08;
}

.stat-card span {
    display: block;
    color: var(--billing-muted);
    font-size: 14px;
}

.stat-card strong {
    display: block;
    font-size: 27px;
    margin: 10px 0 4px;
    overflow-wrap: anywhere;
}

.stat-card small {
    color: var(--billing-muted);
}

/* Panel header */
.panel {
    padding: 0;
    overflow: hidden;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--billing-border);
}

.panel-heading h2 {
    font-size: 19px;
    margin: 0 0 6px;
}

/* Filters */
.filters {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filters select {
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    color: var(--billing-ink);
    max-width: 100%;
}

/* Buttons */
.btn {
    border: 0;
    border-radius: 8px;
    padding: 10px 15px;
    min-height: 40px;
    font-weight: 600;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--billing-primary);
    color: #ffffff;
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid var(--billing-border);
}

/* Status and notifications */
.notice {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 9px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.notice:empty {
    display: none;
}

.notice-success {
    background: #ecfdf5;
    color: #065f46;
}

.notice-error {
    background: #fef2f2;
    color: #991b1b;
}

.notice-warning {
    margin: 20px;
    background: #fffbeb;
    color: #92400e;
}

/* Data tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th,
td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f4;
    font-size: 14px;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
}

td.empty {
    text-align: center;
    color: var(--billing-muted);
    padding: 28px;
}

/* Status badges */
.status-pill {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.status-success,
.status-delivered,
.status-sent,
.status-paid,
.status-completed,
.status-succeeded {
    background: #dcfce7;
    color: #166534;
}

.status-failed,
.status-cancelled,
.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending,
.status-created,
.status-queued {
    background: #fef3c7;
    color: #92400e;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
}

.pagination span {
    font-size: 13px;
    color: var(--billing-muted);
}

/* Explanatory text */
.footnote {
    color: var(--billing-muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 18px 2px;
}

/* Existing dropdown logout button */
.services-menu button {
    margin: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

/* Tablet and mobile */
@media (max-width: 760px) {
    .billing-page {
        padding: 0 13px 30px;
        margin-top: 22px;
    }

    .page-heading,
    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading h1 {
        font-size: 25px;
    }

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

    .filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .filters select {
        flex: 1;
        min-width: 120px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card strong {
        font-size: 23px;
    }

    .pagination {
        padding: 14px;
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
