}

html[data-theme="dark"] img[src*="/public/assets/icons/"] {
    filter: brightness(0) invert(1);
}

html[data-theme="dark"] .icon-badge {
    background: rgba(127, 119, 255, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease, opacity 0.2s ease;
}

body.theme-transition {
    transition: background-color 0.6s ease, color 0.6s ease, opacity 0.2s ease;
}

.card,
.form-card,
.table-card,
.hero-card,
.chat-bubble {
    transition: background-color 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

body.page-loading {
    opacity: 0;
}

body.page-ready {
    opacity: 1;
}

body.page-exit {
    opacity: 0;
}

.page-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 18, 32, 0.35);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.page-loader.is-active {
    opacity: 1;
    pointer-events: auto;
}

.loader-card {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 18px 22px;
    border-radius: 16px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    min-width: 140px;
}

.loader-ring {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(109, 93, 252, 0.2);
    border-top-color: var(--color-primary);
    animation: spin 0.8s linear infinite;
}

.loader-text {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 600;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.page-back {
    margin: 18px 0 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-text);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.back-btn img {
    width: 16px;
    height: 16px;
}

.back-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(30, 30, 47, 0.12);
}

.site-header {
    background: var(--color-card);
    box-shadow: 0 4px 16px rgba(30, 30, 47, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    color: var(--color-primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    font-weight: 500;
.toast-container {
    position: fixed;
    top: 88px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
}

.toast {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    min-width: 240px;
    animation: toast-in 0.25s ease;
}

.toast-success {
    border-color: rgba(34, 211, 179, 0.5);
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.5);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.page-loading .card,
body.page-loading .form-card,
body.page-loading .table-card,
body.page-loading .hero-card,
body.page-loading .chat {
    position: relative;
    overflow: hidden;
    color: transparent !important;
}

body.page-loading .card::after,
body.page-loading .form-card::after,
body.page-loading .table-card::after,
body.page-loading .hero-card::after,
body.page-loading .chat::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.2s infinite;
}

html[data-theme="dark"] body.page-loading .card::after,
html[data-theme="dark"] body.page-loading .form-card::after,
html[data-theme="dark"] body.page-loading .table-card::after,
html[data-theme="dark"] body.page-loading .hero-card::after,
html[data-theme="dark"] body.page-loading .chat::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

@keyframes shimmer {
    to {
        transform: translateX(100%);
    }
}
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link img {
    width: 16px;
    height: 16px;
}


.nav-badge {
    background: var(--color-accent);
    color: #ffffff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 4px;
}

.nav-link:hover {
    background: rgba(108, 99, 255, 0.1);
    color: var(--color-primary);
}

.nav-form {
    margin: 0;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-text);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle .theme-icon {
    display: inline-block;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.theme-toggle.is-animating .theme-icon {
    transform: rotate(180deg) scale(1.1);
    opacity: 0.9;
}

.theme-toggle:hover {
    background: rgba(108, 99, 255, 0.12);
    color: var(--color-primary);
}

.theme-icon {
    font-size: 14px;
}

.burger {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    padding: 60px 0;
}

.hero-card {
    background: var(--color-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-illustration {
    display: flex;
    align-items: center;
}

.section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.section-title {
    margin-top: 32px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    background: var(--color-card);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-link {
    display: block;
    color: inherit;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(30, 30, 47, 0.12);
}

.form-card {
    background: var(--color-card);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 560px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

input,
select,
textarea {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    font-family: inherit;
    font-size: 14px;
    background: var(--color-card);
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, color 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-small {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-small img {
    width: 12px;
    height: 12px;
}

.btn-small img {
    width: 14px;
    height: 14px;
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
}

.btn-secondary {
    background: #eef2ff;
    color: var(--color-primary);
}

html[data-theme="dark"] .btn-secondary {
    background: rgba(127, 119, 255, 0.18);
    color: #c9c6ff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(108, 99, 255, 0.18);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-card {
    position: relative;
    overflow: hidden;
}

.icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(108, 99, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.admin-card .icon-badge {
    background: rgba(0, 194, 168, 0.12);
}

.admin-card .btn {
    margin-top: 10px;
}

.icon-badge img {
    width: 22px;
    height: 22px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
}

.info-label {
    color: var(--color-text-muted);
    font-weight: 500;
    min-width: 80px;
}

.info-value {
    font-weight: 600;
    color: var(--color-text);
}

.info-row img {
    width: 16px;
    height: 16px;
}

.profile-avatar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 12px;
}

.premium-profile {
    padding: 18px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.08), rgba(255, 255, 255, 0) 55%);
}

.profile-banner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
}

.profile-avatar img,
.avatar-fallback {
    width: 76px;
    height: 76px;
    border-radius: 20px;
}

.profile-identity {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
}

.profile-with-us {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(108, 99, 255, 0.08);
    font-size: 12px;
    font-weight: 600;
}

.profile-tag.muted {
    background: rgba(148, 163, 184, 0.08);
    color: var(--color-text-muted);
}

.profile-tag img,
.profile-actions img {
    width: 14px;
    height: 14px;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.profile-summary {
    margin-top: 14px;
}

.summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    font-weight: 600;
    color: var(--color-text);
}

.summary-pill img {
    width: 14px;
    height: 14px;
}

@media (max-width: 800px) {
    .profile-banner {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
    .profile-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.profile-avatar img,
.avatar-preview img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--color-border);
}

.avatar-fallback {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(108, 99, 255, 0.12);
    border: 1px dashed var(--color-border);
}

.avatar-fallback img {
    width: 22px;
    height: 22px;
}

.file-input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
}

.ticket-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    font-size: 12px;
    cursor: pointer;
}

.pin-btn img {
    width: 12px;
    height: 12px;
}

.pinned-card {
    border: 1px solid rgba(108, 99, 255, 0.2);
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.08), transparent 60%);
}

.pinned-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(108, 99, 255, 0.12);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.pinned-badge img {
    width: 12px;
    height: 12px;
}

.estimate-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(34, 211, 179, 0.3);
    background: rgba(34, 211, 179, 0.12);
    color: var(--color-text);
    font-weight: 600;
    margin: 10px 0 16px;
}

.estimate-banner img {
    width: 14px;
    height: 14px;
}

.login-history-table td {
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-history-table td:last-child {
    white-space: normal;
    word-break: break-word;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.action-list .btn img {
    width: 16px;
    height: 16px;
}

.chat {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.chat-message {
    display: flex;
}

.chat-user {
    justify-content: flex-end;
}

.chat-admin {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 70%;
    background: var(--color-card);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
}

.chat-user .chat-bubble {
    background: rgba(108, 99, 255, 0.12);
}

.chat-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.sender-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.sender-name {
    font-weight: 600;
    color: var(--color-text);
}

.sender-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(108, 99, 255, 0.08);
    font-size: 11px;
    font-weight: 600;
}

.sender-role.sender-client {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
}

.sender-role.sender-support {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.12);
}

.sender-role.sender-admin {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
}

.sender-role.sender-system {
    border-color: rgba(17, 24, 39, 0.45);
    background: rgba(17, 24, 39, 0.08);
}

html[data-theme="dark"] .sender-role.sender-system {
    border-color: rgba(243, 244, 246, 0.5);
    background: rgba(243, 244, 246, 0.08);
}

.sender-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: var(--color-text);
}

.sender-client .sender-dot {
    background: #22c55e;
}

.sender-support .sender-dot {
    background: #f59e0b;
}

.sender-admin .sender-dot {
    background: #ef4444;
}

.sender-system .sender-dot {
    background: #111827;
}

html[data-theme="dark"] .sender-system .sender-dot {
    background: #f3f4f6;
}

.chat-form .btn img {
    width: 16px;
    height: 16px;
}

.template-bar {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

body.templates-hidden .template-bar {
    display: none;
}

.template-bar .field {
    flex: 1;
    min-width: 220px;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 500;
}

.alert-success {
    background: rgba(0, 194, 168, 0.15);
    color: #0f766e;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.maintenance-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 10px 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.12);
    font-weight: 600;
}

.maintenance-banner img {
    width: 16px;
    height: 16px;
}

.meta {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.code-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--color-card);
    border: 1px dashed var(--color-border);
    font-weight: 600;
    color: var(--color-primary);
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.toggle input[type="checkbox"] {
    appearance: none;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--color-border);
    position: relative;
    transition: background 0.2s ease;
    border: 1px solid var(--color-border);
}

.toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.toggle input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.toggle input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}

.muted {
    color: var(--color-text-muted);
    font-size: 14px;
}

.link {
    color: var(--color-primary);
    font-weight: 500;
}

.table-card {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.icon-btn img {
    width: 18px;
    height: 18px;
    display: block;
}

.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(30, 30, 47, 0.12);
}

.icon-btn.danger {
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.icon-btn.warning {
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.icon-btn.success {
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.inline-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-input {
    width: 100%;
    min-width: 140px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--color-border-soft);
}

th,
td {
    padding: 12px 14px;
    text-align: left;
    font-size: 14px;
}

.site-footer {
    margin-top: 40px;
    background: var(--color-card);
    padding: 24px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.site-footer {
    margin-top: 40px;
    padding: 28px 0 20px;
    border-top: 1px solid var(--color-border);
    background: var(--color-card);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
}

.footer-col h4 {
    margin: 0 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.footer-col a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 500;
}

.footer-col img {
    width: 14px;
    height: 14px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border-soft);
    margin-top: 20px;
    padding-top: 12px;
    font-size: 12px;
}

.helpbot {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
}

.helpbot-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-weight: 600;
}

.helpbot-icon {
    font-size: 18px;
}

.helpbot-panel {
    position: absolute;
    right: 0;
    bottom: 52px;
    width: 280px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 14px;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.helpbot.open .helpbot-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.helpbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.helpbot-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent;
    cursor: pointer;
}

.helpbot-links {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.helpbot-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: rgba(109, 93, 252, 0.08);
    font-weight: 600;
}

.helpbot.hidden {
    display: none;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
}

/* Premium theme overrides */
:root {
    --color-primary: #6d5dfc;
    --color-accent: #1bd4b1;
    --shadow: 0 18px 50px rgba(12, 16, 36, 0.12);
}

body {
    background: linear-gradient(180deg, #f6f7fb 0%, #eef1f8 100%);
}

html[data-theme="dark"] body {
    background: linear-gradient(180deg, #0c0f1b 0%, #12172a 100%);
}

.card,
.form-card,
.table-card,
.hero-card {
    border-radius: 18px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}

.section-header h1 {
    font-size: 28px;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: 22px;
    letter-spacing: -0.02em;
}

.badge {
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.16), rgba(27, 212, 177, 0.14));
    border: 1px solid rgba(109, 93, 252, 0.25);
}

.btn {
    border-radius: 12px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #6d5dfc, #4f46e5);
}

.btn-secondary {
    background: rgba(109, 93, 252, 0.12);
    border: 1px solid rgba(109, 93, 252, 0.18);
}

.btn-ghost {
    border-color: rgba(109, 93, 252, 0.4);
}

.table-card table th {
    background: rgba(109, 93, 252, 0.06);
}

.table-card table td,
.table-card table th {
    border-color: var(--color-border-soft);
}

.site-header {
    backdrop-filter: blur(12px);
}

.auth-page {
    display: flex;
    align-items: center;
    min-height: 70vh;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 32px;
    align-items: center;
}

.auth-info h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.auth-brand {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.auth-highlights {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    font-weight: 600;
    font-size: 13px;
}

.auth-pill img {
    width: 14px;
    height: 14px;
}

.auth-card h2 {
    margin-bottom: 6px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
    color: var(--color-text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: var(--color-border);
}

.auth-vk {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.auth-vk img {
    width: 14px;
    height: 14px;
}

.auth-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #b91c1c;
    padding: 8px 12px;
    border-radius: 10px;
    margin: 8px 0 10px;
    font-size: 12px;
    font-weight: 600;
}

.vk-widget {
    margin-top: 14px;
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }
}

.nav-link:hover {
    background: rgba(109, 93, 252, 0.12);
}

.card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(12, 16, 36, 0.18);
}

.icon-badge {
    border-radius: 14px;
}

.profile-banner {
    box-shadow: 0 18px 40px rgba(12, 16, 36, 0.12);
}

.pinned-card {
    border: 1px solid rgba(109, 93, 252, 0.25);
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.12), transparent 55%);
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .nav {
        position: absolute;
        right: 4%;
        top: 70px;
        background: var(--color-card);
        flex-direction: column;
        padding: 16px;
        border-radius: 12px;
        box-shadow: var(--shadow);
        display: none;
    }

    .nav.open {
        display: flex;
    }

    .burger {
        display: flex;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 40px 0;
    }

    .form-card {
        padding: 20px;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.analytics-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.12), rgba(34, 211, 179, 0.08));
    border: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.analytics-hero h1 {
    margin: 0 0 6px;
}

.analytics-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.tag {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    font-size: 12px;
    color: var(--color-text-muted);
}

.analytics-hero-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--color-card);
    box-shadow: var(--shadow);
    min-width: 220px;
}

.analytics-hero-card.compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 200px;
}

.analytics-hero-card .hero-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.analytics-hero-card .hero-title img {
    width: 12px;
    height: 12px;
}

.hero-title {
    font-size: 12px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-value {
    font-size: 22px;
    font-weight: 700;
}

.hero-sub {
    font-size: 12px;
    color: var(--color-text-muted);
}

.stat-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    width: 12px;
    height: 12px;
}

.analytics-page .stat-label img,
.analytics-page .hero-title img {
    width: 12px !important;
    height: 12px !important;
    display: inline-block;
}

.stat-meta {
    color: var(--color-text-muted);
    font-size: 12px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}


.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.analytics-card {
    position: relative;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.card-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(108, 99, 255, 0.12);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
}

.card-badge.accent {
    background: rgba(34, 211, 179, 0.15);
    color: #0f766e;
}

.chart {
    height: 140px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.chart-bar {
    flex: 1;
    background: rgba(108, 99, 255, 0.2);
    border-radius: 10px 10px 6px 6px;
    position: relative;
    min-height: 10px;
}

.chart-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(108, 99, 255, 0.3), rgba(108, 99, 255, 0));
    opacity: 0.7;
}

.chart-bar.accent {
    background: rgba(34, 211, 179, 0.2);
}

.chart-bar.accent::after {
    background: linear-gradient(180deg, rgba(34, 211, 179, 0.35), rgba(34, 211, 179, 0));
}

.chart-bar span {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--color-text-muted);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.category-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.category-label img {
    width: 16px;
    height: 16px;
}

.category-count {
    font-weight: 600;
}

.rating-dist {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.rating-row {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 10px;
    align-items: center;
}

.rating-bar {
    background: var(--color-border-soft);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.rating-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.rating-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.rating-item {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.08), transparent 60%);
}

.rating-meta {
    display: flex;
    justify-content: space-between;
    color: var(--color-text-muted);
    font-size: 12px;
}

.rating-card {
    margin-top: 16px;
}

.rating-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rating-stars {
    display: inline-flex;
    gap: 8px;
    font-size: 22px;
}

.rating-stars input {
    display: none;
}


.rating-stars label,
.rating-stars .star {
    cursor: pointer;
    color: #cbd5e1;
    transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
}

.rating-interactive label {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
}

.rating-interactive label span {
    font-size: 22px;
    line-height: 1;
}

.rating-interactive label em {
    font-style: normal;
    font-size: 11px;
    color: var(--color-text-muted);
}

.rating-interactive label:hover,
.rating-interactive input:focus + label {
    transform: translateY(-2px) scale(1.02);
    border-color: var(--color-border);
    box-shadow: 0 6px 14px rgba(108, 99, 255, 0.12);
}

.rating-interactive input:checked + label,
.rating-interactive label:hover {
    color: #f59e0b;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.rating-stars.static {
    flex-direction: row;
}

.rating-stars.static .star {
    cursor: default;
}

.rating-stars .star.is-active {
    color: #f59e0b;
}

.rating-hint {
    font-size: 12px;
    color: var(--color-text-muted);
}

.rating-submit {
    align-self: flex-start;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
}

.rating-submit img {
    width: 14px;
    height: 14px;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-comment {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

@media (max-width: 900px) {
    .analytics-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .analytics-hero-card {
        width: 100%;
    }
}

.maintenance-hero {
    padding: 80px 0 100px;
}

.maintenance-card {
    text-align: center;
    display: grid;
    gap: 12px;
    justify-items: center;
}

.maintenance-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(108, 99, 255, 0.12);
    font-size: 28px;
}

.maintenance-meta {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(34, 211, 179, 0.12);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 13px;
}

.log-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(108, 99, 255, 0.12);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
}
