:root {
    --primary: #1677ff;
    --primary-dark: #0958d9;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 18px 45px rgba(21, 42, 89, .08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: inherit; text-decoration: none; }

.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 248px;
    color: #dbeafe;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
}

.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
}
.brand strong { display: block; color: #fff; font-size: 16px; }
.brand small { color: #93c5fd; }

.menu { display: grid; gap: 8px; }
.menu-item {
    padding: 12px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    transition: .2s;
}
.menu-item:hover, .menu-item.active { color: #fff; background: rgba(22, 119, 255, .22); }
.sidebar-footer { margin-top: auto; color: #64748b; font-size: 12px; }

.main { flex: 1; min-width: 0; }
.topbar {
    min-height: 76px;
    padding: 0 32px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.topbar-title { min-width: 0; }
.profile { display: flex; gap: 10px; align-items: center; min-width: 0; }
.profile-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-balance { padding: 6px 10px; border-radius: 999px; background: #eef6ff; color: var(--primary-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e8f3ff;
    color: var(--primary-dark);
    font-weight: 700;
}
.notify-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff4d4f; }

.content { padding: 28px 32px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.stat-card, .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.stat-card { padding: 22px; }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card strong { display: block; margin: 12px 0; font-size: 30px; }
.stat-card small { color: #10b981; }

.panel { padding: 22px; margin-bottom: 18px; }
.panel-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-header h2 { margin: 0; font-size: 18px; }
.btn-primary, .btn-link {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}
.btn-primary:hover, .btn-link:hover { background: var(--primary-dark); }

.chart-card { height: 260px; display: flex; align-items: end; gap: 16px; padding-top: 28px; }
.bar { flex: 1; border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg, #69b1ff, #1677ff); }
.quick-list { display: grid; gap: 12px; }
.quick-list a { padding: 14px; border-radius: 12px; background: #f4f8ff; color: var(--primary-dark); }
.activity-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.activity-list span { display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--primary); }
.ranking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ranking-table { min-width: 640px; }
.pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}
.pager .disabled {
    opacity: .45;
    pointer-events: none;
    cursor: not-allowed;
}

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { color: var(--muted); font-weight: 600; background: #fafafa; }
.tag { padding: 4px 9px; border-radius: 999px; background: #e8f3ff; color: var(--primary-dark); font-size: 12px; }
.empty-state { padding: 42px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 16px; background: #fafafa; }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--text); font-size: 20px; }

@media (max-width: 960px) {
    .admin-shell { display: block; }
    .sidebar { width: 100%; min-height: auto; }
    .stats-grid, .panel-grid { grid-template-columns: 1fr; }
    .topbar { min-height: 64px; gap: 12px; padding: 12px 16px; align-items: center; }
    .topbar-left { flex: 1; min-width: 0; }
    .topbar h1 { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .content { padding: 18px; }
}

.login-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(22, 119, 255, .22), transparent 34%), #f5f7fb;
}
.login-shell {
    width: min(1040px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 28px;
}
.login-shell-simple {
    width: min(420px, calc(100% - 32px));
    grid-template-columns: 1fr;
}
.login-hero, .login-card {
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}
.login-hero { padding: 52px; }
.login-hero h1 { margin: 24px 0 12px; font-size: 40px; }
.login-hero p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.login-switch { display: flex; gap: 12px; margin-top: 34px; }
.login-switch a {
    padding: 11px 16px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #e8f3ff;
}
.login-switch a.active { color: #fff; background: var(--primary); }
.login-card { padding: 38px; }
.login-card h2 { margin: 0 0 8px; font-size: 28px; }
.login-subtitle { margin: 0 0 24px; color: var(--muted); }
.login-form { display: grid; gap: 18px; }
.login-form label { display: grid; gap: 8px; font-weight: 600; }
.login-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 15px;
    outline: none;
}
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 119, 255, .12); }
.login-submit { width: 100%; margin-top: 4px; font-size: 16px; }
.alert-error {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #b42318;
    background: #fff1f0;
    border: 1px solid #ffccc7;
}
.demo-account {
    display: grid;
    gap: 6px;
    margin-top: 22px;
    padding: 14px;
    border-radius: 14px;
    color: var(--muted);
    background: #fafafa;
}
.demo-account strong { color: var(--text); }
.logout-form { margin: 0; }
.logout-form button {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
}
.logout-form button:hover { color: var(--primary-dark); border-color: #91caff; }
.profile-list { list-style: none; display: grid; gap: 14px; margin: 0; padding: 0; }
.profile-list li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.profile-list span { color: var(--muted); }
.welcome-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    margin-bottom: 18px;
    padding: 30px;
    color: #fff;
    background: linear-gradient(135deg, #1677ff, #36cfc9);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.welcome-panel span { opacity: .9; }
.welcome-panel h2 { margin: 8px 0; font-size: 32px; }
.welcome-panel p { margin: 0; opacity: .9; }
.avatar-large { width: 58px; height: 58px; font-size: 22px; background: rgba(255, 255, 255, .2); color: #fff; }
.user-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.user-card {
    padding: 24px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.user-card span, .user-card p { color: var(--muted); }
.user-card strong { display: block; margin: 12px 0 6px; font-size: 30px; }
.user-card p { margin: 0; }

@media (max-width: 960px) {
    .login-shell, .user-card-grid { grid-template-columns: 1fr; }
    .login-shell { padding: 24px 0; }
    .login-hero, .login-card { padding: 28px; }
    .login-hero h1 { font-size: 30px; }
}


.panel-subtitle { margin: 8px 0 0; color: var(--muted); }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-secondary {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
}
.btn-secondary:hover { border-color: #91caff; color: var(--primary-dark); }
.table-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.table-toolbar-item {
    padding: 10px 14px;
    border-radius: 12px;
    background: #f5f7fb;
    color: var(--muted);
    border: 1px solid var(--border);
}
.table-toolbar-item.success { color: #059669; background: #ecfdf5; border-color: #a7f3d0; }
.table-toolbar-item.warning { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.table-toolbar-item.danger { color: #b42318; background: #fff1f0; border-color: #ffccc7; }
.table-wrap { overflow: auto; }
.admin-user-table { min-width: 960px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(22, 119, 255, .12); }
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.status-badge.status-success { color: #059669; background: #ecfdf5; }
.status-badge.status-warning { color: #b45309; background: #fffbeb; }
.status-badge.status-info { color: #155e75; background: #ecfeff; }
.status-badge.status-danger { color: #b42318; background: #fff1f0; }
.action-group { display: flex; gap: 14px; flex-wrap: wrap; }
.action-group a { color: var(--primary-dark); }
.action-group a:hover { text-decoration: underline; }


.filter-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 160px auto auto;
    gap: 12px;
    align-items: center;
    margin: 18px 0;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
}
.search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}
.search-field span { color: var(--muted); font-size: 18px; }
.search-field input, .filter-form select {
    width: 100%;
    height: 42px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}
.filter-form select,
.filter-form > input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--text);
    font-size: 14px;
}
.visit-filter-form { grid-template-columns: minmax(260px, 1.4fr) 150px 180px 190px 190px auto auto; }
.visit-table { min-width: 880px; }
.filter-reset { display: inline-flex; justify-content: center; align-items: center; height: 42px; }
.table-empty { padding: 34px; text-align: center; color: var(--muted); }

@media (max-width: 960px) {
    .filter-form { grid-template-columns: 1fr; }
}



.alert-success {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.alert-error {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #b42318;
    background: #fff1f0;
    border: 1px solid #ffccc7;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    color: var(--text);
}
.mobile-sidebar-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    z-index: 18;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .42);
    z-index: 30;
}
.modal-overlay.active { display: flex; }
.modal-card {
    width: min(560px, 100%);
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 24px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 18px;
}
.modal-header h3 { margin: 0 0 8px; font-size: 22px; }
.modal-header p { margin: 0; color: var(--muted); }
.modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 22px;
    cursor: pointer;
}
.modal-form { display: grid; gap: 14px; }
[hidden] { display: none !important; }
.site-create-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px;
    text-align: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(8px);
}
.site-create-loading strong { font-size: 20px; color: var(--text); }
.site-create-loading p { max-width: 360px; margin: 0; color: var(--muted); line-height: 1.7; }
.loading-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid #dbeafe;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: loading-spin .8s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }
.modal-form label { display: grid; gap: 8px; font-weight: 600; }
.modal-form input,
.modal-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
}

.password-field {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.password-field input {
    border: 0;
    border-radius: 0;
    flex: 1;
}
.password-toggle {
    width: 46px;
    height: 42px;
    border: 0;
    border-left: 1px solid var(--border);
    background: #f8fafc;
    cursor: pointer;
    font-size: 16px;
}
.password-toggle:hover { background: #eef6ff; }
.field-help {
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
}

.modal-form input[readonly] { background: #f8fafc; color: var(--muted); }
.form-hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}
@media (max-width: 960px) {
    .sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .mobile-sidebar-mask { display: none; }
    .admin-shell { display: block; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 20;
        min-height: 100vh;
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .mobile-sidebar-mask { display: block; }
    .sidebar-footer { padding-bottom: 18px; }
    .topbar { min-height: 62px; padding: 10px 14px; gap: 10px; }
    .content { padding: 16px; }
    .profile { gap: 8px; flex-wrap: nowrap; justify-content: flex-end; }
    .notify-dot, .profile-name { display: none; }
    .avatar { width: 32px; height: 32px; font-size: 13px; }
    .profile-balance { padding: 5px 8px; font-size: 11px; }
    .logout-form button { padding: 7px 10px; }
    .panel-actions { width: 100%; }
}

@media (max-width: 520px) {
    .topbar { padding: 10px 12px; }
    .sidebar-toggle { width: 36px; height: 36px; border-radius: 10px; }
    .topbar-left { gap: 10px; }
    .topbar h1 { font-size: 18px; }
    .profile { gap: 6px; }
    .profile-balance { max-width: 86px; overflow: hidden; text-overflow: ellipsis; }
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.inline-form { margin: 0; }
.btn-danger {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    background: #fff1f0;
    color: #b42318;
    cursor: pointer;
}
.btn-danger:hover { background: #ffccc7; }
.action-dropdown { position: relative; }
.action-trigger { min-width: 72px; }
.action-menu {
    display: none;
    position: fixed;
    min-width: 142px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 9999;
}
.action-dropdown.open .action-menu { display: grid; gap: 4px; }
.action-menu form { margin: 0; }
.action-menu button {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    border-radius: 9px;
    padding: 9px 10px;
    cursor: pointer;
    font-size: 14px;
}
.action-menu button:hover { background: #f4f8ff; color: var(--primary-dark); }
.renew-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}
.renew-summary div {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
}
.renew-summary span { color: var(--muted); font-size: 12px; }
.renew-summary strong {
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.renew-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.renew-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
    cursor: pointer;
    font-weight: 700;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.renew-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--primary);
}
.renew-option span { color: var(--text); line-height: 1.3; }
.renew-option:hover {
    border-color: rgba(59, 130, 246, .38);
    background: #f8fbff;
    transform: translateY(-1px);
}
.renew-option:has(input:checked) {
    border-color: rgba(37, 99, 235, .72);
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 12px 28px rgba(37, 99, 235, .16);
}
.renew-option:has(input:checked)::after {
    content: '已选择';
    position: absolute;
    right: 14px;
    top: 12px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .10);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}
@media (max-width: 560px) {
    .renew-summary,
    .renew-options { grid-template-columns: 1fr; }
}
.modal-card-wide { width: min(640px, 100%); }

.modal-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

.site-filter-form { grid-template-columns: minmax(320px, 1fr) auto auto; }
.site-table { min-width: 1180px; }
.tag-strong { font-weight: 700; }
.domain-text { color: var(--primary-dark); font-weight: 600; }

.wildcard-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--primary-dark);
    font-size: 16px;
}
.download-wildcard-switch { margin-top: 10px; }
.time-info { display: grid; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.modal-card-wide { width: min(720px, 100%); }
.download-modal-card { width: min(960px, 100%); }
.site-option-list { display: grid; gap: 12px; }
.site-option-switch {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 12px !important;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fbfdff;
}
.site-option-switch input { width: 18px; height: 18px; flex: 0 0 auto; }
.site-option-switch span { display: grid; gap: 4px; }
.site-option-switch small { color: var(--muted); font-weight: 400; }
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.input-button-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}
.input-button-group .btn-secondary { white-space: nowrap; }
@media (max-width: 720px) {
    .form-grid-2,
    .input-button-group { grid-template-columns: 1fr; }
    .modal-card { max-height: calc(100vh - 32px); overflow-y: auto; }
}
.qr-modal-card { width: min(420px, 100%); }
.qr-box {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 8px 0 4px;
}
.qr-code {
    display: grid;
    place-items: center;
    width: 260px;
    height: 260px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}
.qr-code canvas,
.qr-code table {
    width: 240px !important;
    height: 240px !important;
}
.qr-domain {
    max-width: 100%;
    color: var(--primary-dark);
    font-weight: 700;
    text-align: center;
    word-break: break-all;
}
.domain-table { min-width: 760px; }
.template-table { min-width: 820px; }
.settings-form { display: grid; gap: 18px; }
.settings-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fbfdff;
}
.template-ftp-list { display: grid; gap: 14px; }
.template-ftp-item {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}
.template-ftp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.template-ftp-remove { padding: 8px 12px; }
.template-ftp-remove.is-disabled { opacity: .45; cursor: not-allowed; }
.template-ftp-actions { display: flex; justify-content: flex-start; }
.settings-card-title h3 { margin: 0 0 6px; font-size: 18px; }
.settings-card-title p { margin: 0; color: var(--muted); }
.settings-form label { display: grid; gap: 8px; font-weight: 600; }
.settings-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
}
.settings-actions { display: flex; justify-content: flex-end; }
@media (max-width: 720px) {
    .settings-actions .btn-primary { width: 100%; }
}

.server-filter-form { grid-template-columns: minmax(280px, 1fr) 150px 150px auto auto; }
.server-table { min-width: 1120px; }
.server-conn-info {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}
.is-hidden { display: none !important; }
@media (max-width: 960px) {
    .server-filter-form { grid-template-columns: 1fr; }
}
