body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: #1f2933;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: #0f172a;
    color: #fff;
}

.brand {
    font-weight: 700;
    color: #fff;
}

.page {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 56px);
}

.nav-column {
    background-color: #111827;
    color: #e5e7eb;
    padding: 1rem 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    margin: 0.25rem 0;
    color: inherit;
}

.nav-link.active, .nav-link:hover {
    background-color: #1f2937;
}

.nav-link-form {
    margin: 0;
}

.nav-link-button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0.65rem 1rem;
    color: inherit;
}

.nav-link-button:hover {
    cursor: pointer;
}

.content {
    padding: 1.5rem;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card h3 {
    margin-top: 0;
}

.form-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.button {
    background-color: #2563eb;
    border: none;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
}

.button.disabled {
    background: #999;
    cursor: not-allowed;
}

.button.secondary {
    background-color: #0f172a;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.form-inline {
    display: inline-flex;
    gap: 0.5rem;
    margin: 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-paid {
    background-color: #ecfdf3;
    color: #166534;
}

.status-pending {
    background-color: #fef9c3;
    color: #854d0e;
}

.status-error {
    background-color: #fef2f2;
    color: #991b1b;
}

.actions-column,
.table td.actions {
    text-align: right!important;
    white-space: nowrap;
}

.actions-buttons {
    display: inline-flex;
    justify-content: flex-end;
    gap: 0.5rem;
    width: 100%;
}

.icon-button {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    padding: 0.45rem;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.icon-button:hover {
    background-color: #e0e7ff;
    border-color: #cbd5e1;
    color: #1d4ed8;
}

.icon-button.danger {
    color: #b91c1c;
}

.icon-button.danger:hover {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.icon {
    width: 1.1rem;
    height: 1.1rem;
}

.auth-body {
    background-color: #f3f4f6;
}

.auth-header {
    display: flex;
    justify-content: center;
    padding: 1.5rem 1rem 0.5rem;
}

.auth-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.auth-container {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.auth-main {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 1.75rem;
}

.auth-title {
    margin: 0 0 0.25rem;
}

.auth-subtitle {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #6b7280;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
    display: block;
}

.auth-label.inline {
    margin: 0;
    font-weight: 500;
}

.auth-input {
    padding: 0.65rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

.auth-input:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.auth-field {
    display: flex;
    flex-direction: column;
}

.auth-remember {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.auth-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: #2563eb;
}

.auth-submit {
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.auth-submit:hover {
    background-color: #1e4fd7;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.auth-links a {
    color: #2563eb;
    font-weight: 600;
}

.auth-validation {
    color: #dc2626;
    font-weight: 600;
}

.auth-error {
    color: #dc2626;
    margin-top: 0.35rem;
    font-size: 0.95rem;
}

.auth-footer {
    margin-top: 1.5rem;
    padding: 1rem 0;
    text-align: center;
    color: #6b7280;
}

.auth-footer__content {
    font-size: 0.95rem;
}

.changelog {
    list-style: none; 
    padding-left: 0;
    margin: 0;
}

.changelog .date {
    font-weight: 600;
    display: inline-block;
    margin-right: 0.7rem;
}

.changelog li {
    margin-bottom: 6px;
}

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.alert strong {
    font-weight: 600;
}

.alert.success {
    background: #e6ffed;
    border: 1px solid #80e5a1;
    color: #006622;
}

.alert.warning {
    background: #fff7e6;
    border: 1px solid #ffcc80;
    color: #a36100;
}

.alert.danger {
    background: #ffeaea;
    border: 1px solid #ff9b9b;
    color: #b30000;
}

.subscription-card {
    overflow: hidden;
}

.subscription-section {
    margin-top: 15px;
}

.elem-wallet {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 12px;
}

.elem-wallet__go {
    margin: 0;
    border-radius: 10px 0 0 10px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 700;
    color: #0f172a;
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    border-right: none;
}

.elem-wallet__field {
    border-radius: 0 10px 10px 0;
    padding: 10px 14px;
    background: #fafafa;
    flex: 1;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
}

.elem-wallet__address {
    flex: 1;
}

.wallet-highlight {
    background: linear-gradient(90deg, #f6f8ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.06);
}

.wallet-placeholder {
    color: #999;
}

.wallet-copy-button {
    white-space: nowrap;
    padding: 0.5rem 0.9rem;
}

.subscription-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.subscription-info {
    background: #f8f8f8;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.subscription-option {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.subscription-option:hover,
.subscription-option:focus-visible {
    background: #eef2ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
    border-color: #c7d2fe;
    outline: none;
    text-decoration: none;
}

.subscription-option:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.subscription-info__title {
    font-weight: 700;
    margin-bottom: 6px;
}

.subscription-info__value {
    font-weight: 400;
}

.info-muted {
    color: #777;
}

.subscription-note {
    background: #f8f8f8;
    padding: 24px;
    line-height: 1.8;
    border-radius: 10px;
    margin-top: 20px;
}

.subscription.b-help__head {
    padding-bottom: 12px;
}

.subscription.b-help__body {
    border-top: 1px solid #e0e0e0;
}



/* Responsive adjustments */
@media (max-width: 1200px) {
    .page {
        grid-template-columns: 200px 1fr;
    }

    .content {
        padding: 1.25rem;
    }

    .card {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .top-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .page {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .nav-column {
        padding: 0.5rem 0.75rem;
        overflow-x: auto;
        position: sticky;
        top: 0;
        z-index: 10;
    }

        .nav-column nav {
            display: inline-flex;
            gap: 0.5rem;
            width: 100%;
        }

    .nav-link {
        padding: 0.55rem 0.75rem;
        margin: 0;
        white-space: nowrap;
    }

    .content {
        padding: 1rem;
    }

    .button-group,
    .auth-links {
        flex-wrap: wrap;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

        .form-inline .button,
        .form-inline .input {
            width: 100%;
        }
}

.card.add .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card.add .form-group {
    display: flex;
    flex-direction: column;
}

.card.add .form-group label {
    font-weight: 600;
    margin-bottom: 4px;
}

.card.add .full-width {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.yaml-block {
    background-color: #fff;
    border-radius: 12px;
    margin: 0px;
    overflow-x: auto;
    font-family: 'Fira Code', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.55;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.yaml-block code {
    display: block;
    white-space: pre;
}

.hljs {
    color: #727b84 !important;
    background: #fff !important;
}

.hljs-meta .hljs-string, .hljs-regexp, .hljs-string {
    color: #4f5b66 !important;
}

.hljs-attr, .hljs-attribute, .hljs-literal, .hljs-meta, .hljs-number, .hljs-operator, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id, .hljs-variable {
    color: #155894 !important;
}

.client-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem;
    margin-right: 0.4rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    color: #b91c1c;
}

.client-icon.active {
    color: #16a34a;
    background-color: #ecfdf3;
    border-color: #bbf7d0;
}

.client-icon.inactive {
    color: #b91c1c;
    background-color: #fef2f2;
    border-color: #fecdd3;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-field label {
    font-size: 0.85rem;
}