﻿html,
body {
    height: 100%;
}

.panel-app {
    min-height: 100dvh;
    background: #000;
    display: flex;
    flex-direction: column;
}

.panel-main {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.panel-main-content {
    flex: 1;
}

.panel-page-content {
    display: grid;
    gap: 1.5rem;
}

.panel-page-content > * {
    margin-top: 0 !important;
}

.panel-topnav.site-navbar {
    z-index: 35;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.panel-topnav.site-navbar.is-scrolled {
    position: sticky;
    top: 0;
    animation: none;
}

.panel-btn-icon {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e4e4e7;
    background: rgba(0, 0, 0, 0.3);
    transition: border-color 220ms ease, color 220ms ease, background-color 220ms ease;
}

.panel-btn-icon:hover,
.panel-btn-icon:focus-visible {
    border-color: #38b9c4;
    color: #fff;
    background: rgba(56, 185, 196, 0.15);
    outline: none;
}

.panel-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    width: 17rem;
    border-right: 1px solid var(--dream-stroke);
    background: #090909;
    transform: translateX(-100%);
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.panel-sidebar-inner {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.panel-sidebar-head {
    padding-top: 1.7rem;
    padding-bottom: 1.2rem;
}

.panel-sidebar-brand {
    width: 100%;
}

.panel-sidebar-brand-logo {
    align-self: center;
}

.panel-sidebar-brand-subtitle {
    align-self: flex-start;
    margin-top: 0.15rem;
}

.panel-sidebar-nav-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
    transform: translateY(-50px);
    min-height: 0;
}

.panel-side-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: relative;
    overflow: hidden;
    padding: 0.55rem 0.65rem;
    color: #d4d4d8;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: color 220ms ease, background-color 220ms ease;
}

.panel-side-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(56, 185, 196, 0.85) 0%,
        rgba(56, 185, 196, 0.45) 42%,
        rgba(56, 185, 196, 0) 100%
    );
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.panel-side-link > i,
.panel-side-link > span {
    position: relative;
    z-index: 1;
}

.panel-side-link:hover {
    color: #fff;
}

.panel-side-link:hover::before {
    transform: scaleX(1);
}

.panel-side-link.is-active {
    color: #fff;
}

.panel-side-link.is-active::before {
    transform: scaleX(1);
}

.panel-side-link-logout {
    border: 0;
    width: 100%;
    background: transparent;
    cursor: pointer;
    color: #ffd2dc;
}

.panel-side-link-logout::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 64, 96, 0.9) 0%,
        rgba(255, 64, 96, 0.52) 45%,
        rgba(255, 64, 96, 0) 100%
    );
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.panel-side-link-logout > i,
.panel-side-link-logout > span {
    position: relative;
    z-index: 1;
}

.panel-side-link-logout:hover,
.panel-side-link-logout:focus-visible {
    color: #ffeaf1;
    outline: none;
}

.panel-side-link-logout:hover::before,
.panel-side-link-logout:focus-visible::before {
    transform: scaleX(1);
}

.panel-profile-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: #d4d4d8;
    font-size: 0.84rem;
    line-height: 1.35;
    transition: opacity 220ms ease;
}

.panel-profile-row:hover,
.panel-profile-row:focus-visible {
    opacity: 0.86;
    outline: none;
}

.panel-profile-lines {
    min-width: 0;
}

.panel-profile-name {
    font-weight: 700;
    color: #e4e4e7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-profile-meta {
    margin-top: 0.15rem;
    color: #a1a1aa;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-profile-avatar {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    image-rendering: pixelated;
    flex-shrink: 0;
}

.panel-avatar-pixel {
    image-rendering: pixelated;
}

.panel-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

body.is-sidebar-open {
    overflow: hidden;
}

body.is-sidebar-open .panel-sidebar {
    transform: translateX(0);
}

body.is-sidebar-open .panel-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 1024px) {
    .panel-main {
        padding-left: 17rem;
    }

    .panel-sidebar {
        transform: none;
    }

    .panel-sidebar-overlay {
        display: none;
    }

    body.is-sidebar-open {
        overflow: auto;
    }
}

.panel-nav-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.panel-nav-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.panel-kpi {
    border: 1px solid var(--dream-stroke);
    background: #0b0b0b;
}

.panel-kpi:hover {
    border-color: var(--dream-accent);
}

.panel-table-shell {
    border: 1px solid var(--dream-stroke);
    background: #0b0b0b;
}

.panel-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.panel-table th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a1a1aa;
    text-align: left;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.panel-table td {
    font-size: 0.95rem;
    color: #e4e4e7;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-table tbody tr {
    transition: background-color 240ms ease;
}

.panel-table tbody tr:hover {
    background: rgba(56, 185, 196, 0.08);
}

.panel-table-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.panel-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d4d4d8;
    transition: color 180ms ease;
}

.panel-table-action:hover,
.panel-table-action:focus-visible {
    color: #38b9c4;
    outline: none;
}

.panel-table-action.is-danger:hover,
.panel-table-action.is-danger:focus-visible {
    color: #ff6b88;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.panel-badge.is-ok {
    border-color: rgba(56, 185, 196, 0.35);
    background: rgba(56, 185, 196, 0.2);
    color: #d9f8fb;
}

.panel-badge.is-muted {
    border-color: rgba(161, 161, 170, 0.35);
    background: rgba(161, 161, 170, 0.18);
    color: #d4d4d8;
}

.panel-badge.is-danger {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.2);
    color: #ffe4e4;
}

.panel-field,
.panel-select,
.panel-textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #000;
    color: #e4e4e7;
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color 240ms ease, box-shadow 240ms ease;
}

.panel-field::placeholder,
.panel-textarea::placeholder {
    color: #71717a;
}

.panel-field:focus,
.panel-select:focus,
.panel-textarea:focus {
    border-color: #38b9c4;
    box-shadow: 0 0 0 2px rgba(56, 185, 196, 0.2);
}

.panel-field[readonly] {
    color: #d4d4d8;
    background: #090909;
}

.panel-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7l5 5 5-5' stroke='%23a1a1aa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1rem;
    padding-right: 2.4rem;
}

.panel-select option {
    background: #090909;
    color: #e4e4e7;
}

.panel-radio {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    background: #000;
    display: inline-block;
    vertical-align: middle;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.panel-radio:checked {
    border-color: #38b9c4;
    background: radial-gradient(circle at center, #38b9c4 0 42%, transparent 48%);
}

.panel-radio:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(56, 185, 196, 0.22);
}

.panel-file {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #000;
    color: #e4e4e7;
    padding: 0.45rem 0.6rem;
}

.panel-file::file-selector-button {
    margin-right: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: #111111;
    color: #e4e4e7;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.panel-file::file-selector-button:hover {
    border-color: #38b9c4;
    background: rgba(56, 185, 196, 0.14);
    color: #ffffff;
}

.panel-btn-outline {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d4d4d8;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e4e4e7;
    transition: border-color 220ms ease, background-color 220ms ease, color 220ms ease;
}

.panel-btn-outline:hover,
.panel-btn-outline:focus-visible {
    border-color: #38b9c4;
    background: #38b9c4;
    color: #fff;
    outline: none;
}

.panel-btn-danger {
    border-color: rgba(248, 113, 113, 0.7);
    color: #ffd4d4;
}

.panel-btn-danger:hover,
.panel-btn-danger:focus-visible {
    border-color: rgba(248, 113, 113, 0.9);
    background: rgba(248, 113, 113, 0.2);
    color: #ffecec;
}

.panel-empty {
    border: 1px solid var(--dream-stroke);
    background: #0b0b0b;
}

.panel-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(6px);
}

.panel-modal[data-open="true"] {
    display: flex;
}

.panel-modal-frame {
    width: min(92vw, 900px);
    max-height: 88vh;
    overflow: auto;
    border: 1px solid var(--dream-stroke);
    background: #090909;
}

.panel-modal-close-btn {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #d4d4d8;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 220ms ease, color 220ms ease, background-color 220ms ease;
}

.panel-modal-close-btn:hover,
.panel-modal-close-btn:focus-visible {
    border-color: #38b9c4;
    color: #ffffff;
    background: rgba(56, 185, 196, 0.12);
    outline: none;
}

.toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 70;
    display: grid;
    gap: 0.5rem;
    width: min(24rem, calc(100vw - 2rem));
}

.toast-item {
    border: 0;
    background: linear-gradient(135deg, rgba(56, 185, 196, 0.04) 0%, rgba(56, 185, 196, 0.28) 100%), rgba(11, 11, 11, 0.96);
    color: #e4e4e7;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
    text-align: right;
    opacity: 0;
    transform: translate3d(24px, -18px, 0);
    animation: toast-enter 360ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast-item.toast-success {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.04) 0%, rgba(52, 211, 153, 0.28) 100%), rgba(11, 11, 11, 0.96);
}

.toast-item.toast-warning {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.04) 0%, rgba(250, 204, 21, 0.28) 100%), rgba(11, 11, 11, 0.96);
}

.toast-item.toast-danger {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.04) 0%, rgba(248, 113, 113, 0.28) 100%), rgba(11, 11, 11, 0.96);
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translate3d(24px, -18px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0ms !important;
    }
}



