* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav a,
.link-button {
    color: #2563eb;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.site-main {
    padding: 40px 0;
}

.auth-section,
.cabinet-section {
    display: flex;
    justify-content: center;
}

.auth-card,
.page-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

h1 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 28px;
}

.muted {
    color: #6b7280;
    margin-bottom: 24px;
}

.form-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

label {
    font-weight: 600;
    font-size: 14px;
}

input {
    height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 16px;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 0 18px;
}

.button.secondary {
    background: #111827;
}

.alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.hidden {
    display: none;
}

.info-grid {
    display: grid;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.label {
    color: #6b7280;
}

.value {
    font-weight: 600;
    text-align: right;
}

.actions {
    margin-top: 20px;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.nav a.active {
    font-weight: 700;
    color: #111827;
}

.actions-grid {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.configs-card {
    max-width: 900px;
}

.config-list {
    display: grid;
    gap: 16px;
}

.config-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: #f9fafb;
}

.config-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.config-title {
    font-size: 18px;
    font-weight: 700;
}

.config-subtitle {
    color: #6b7280;
    margin-top: 4px;
}

.config-badge {
    background: #e0f2fe;
    color: #075985;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
}

.config-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 14px;
}

.config-textarea {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px;
    font-family: monospace;
    font-size: 13px;
    background: #fff;
    margin-bottom: 12px;
}

.config-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.subscription-url-block {
    display: grid;
    gap: 12px;
}

.subscription-url-block input {
    width: 100%;
}

.plans-card {
    max-width: 960px;
}

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

.plan-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    background: #f9fafb;
}

.plan-card h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 22px;
}

.plan-meta {
    display: grid;
    gap: 8px;
    margin: 16px 0;
    font-size: 14px;
}

.plan-form {
    display: grid;
    gap: 12px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.admin-nav {
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.admin-table th,
.admin-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.admin-table th {
    background: #f3f4f6;
    font-weight: 700;
}

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

.admin-form {
    display: grid;
    gap: 12px;
    max-width: 700px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 15px;
    background: #fff;
}

.admin-form textarea {
    height: auto;
    min-height: 120px;
    padding: 12px;
}

.admin-form label {
    font-size: 14px;
    font-weight: 600;
}

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

.search-form input {
    min-width: 260px;
}

.inline-link-button {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.healthy {
    background: #dcfce7;
    color: #166534;
}

.status-badge.degraded {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.unhealthy {
    background: #fee2e2;
    color: #991b1b;
}

.button.danger {
    background: #b91c1c;
}

.status-badge.status-active {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.status-maintenance {
    background: #ede9fe;
    color: #6d28d9;
}

.status-badge.status-disabled {
    background: #e5e7eb;
    color: #374151;
}
