:root {
    --NANO_RED: #941100;
    --NANO_BLUE: #004080;
    --NANO_GREEN: #458B00;
    --NANO_GRAY: #C9C9C9;
    --NANO_DARK: #4D4D4D;
    --NANO_CHECKED: ⬛;
    --NANO_UNCHECKED: ⬜;
    --nano-surface: #ffffff;
    --nano-surface-soft: #f8fafc;
    --nano-border: #d5d9e2;
    --nano-border-strong: #bfc7d4;
    --nano-text: #0f172a;
    --nano-text-muted: #64748b;
    --nano-text-subtle: #94a3b8;
    --nano-page-bg: #f8f8f8;
    --nano-primary: #1d4ed8;
    --nano-primary-soft: #dbeafe;
    --nano-success: #065f46;
    --nano-success-soft: #d1fae5;
    --nano-warning: #92400e;
    --nano-warning-soft: #fef3c7;
    --nano-danger: #991b1b;
    --nano-danger-soft: #fee2e2;
    --nano-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --nano-shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --nano-radius-sm: 10px;
    --nano-radius-md: 14px;
    --nano-space-1: 4px;
    --nano-space-2: 8px;
    --nano-space-3: 12px;
    --nano-space-4: 16px;
    --nano-space-5: 20px;
    --nano-table-font: sans-serif;
    --nano-table-header-bg: #f9fafb;
    --nano-table-header-text: #374151;
    --nano-table-row-alt: #eef2ff;
    --nano-table-cell-text: #111827;
    --nano-table-border: #e5e7eb;
}

.page-wrapper {
    max-width: 600px;
    width: 100%;
}

body {
    margin: 0;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    color: white;
    background: black;
    min-height: 100%;
}

.body-index {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100dvh; /* Modern mobile-safe height */
}

.header-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    border: none;
    z-index: 1000;
}

.content-frame {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    border: none;
    transition: height 0.3s ease;
}

.grid-container {
    margin: 0;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    color: white;
    background: black;
    justify-content: center;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr auto 1fr;
    height: 100vh;
    gap: 12px;
}

.logo-blur-container {
    margin-top: 100px;
    position: relative;
    max-width: 600px;
    width: 70%;
    height: auto;
    display: inline-block;
}

.hero {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.4), rgba(96, 165, 250, 0.5));
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin: 0.5rem;
}

.logo-base {
    width: 100%;
    border-radius: 10px;
    display: block;
    z-index: 1;
}

.logo-blur {
    width: 100%;
    border-radius: 10px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    filter: blur(10px);
    z-index: 2;
    pointer-events: none;
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 60%);
    -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 60%);
    mask-size: 200% 200%;
    -webkit-mask-size: 200% 200%;
    animation: blurSweep 6s linear infinite;
}

@keyframes blurSweep {
    0% {
        mask-position: 0% 0%;
        -webkit-mask-position: 0% 0%;
    }

    100% {
        mask-position: 100% 100%;
        -webkit-mask-position: 100% 100%;
    }
}

/* Top row, center column */
.row1 {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
}

/* Middle row, center column */
.row2 {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tile {
    width: 100%;
    max-width: 600px;
    padding: 16px;
    background: white;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* Bottom row, center column */
.row3 {
    grid-column: 2;
    grid-row: 3;
    text-align: center;
    padding: 12px;
    font-size: 0.9em;
    color: #777;
}

h1 {
    color: white;
    font-size: clamp(24px, 2vw, 36px);;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #111;
    color: white;
    display: flex;
    align-items: center; /* vertically align items in row */
    justify-content: space-between; /* space out logo and button */
    padding: 0 10px;
    height: 70px;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.with-side-nav {
    padding-left: 240px;
}

body.with-side-nav.nav-collapsed {
    padding-left: 80px;
}

body.with-side-nav .footer {
    padding-left: 240px;
}

body.with-side-nav.nav-collapsed .footer {
    padding-left: 80px;
}

.nano-side-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 220px;
    height: calc(100vh - 70px);
    background: #333;
    color: #fff;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 8px;
    box-sizing: border-box;
    z-index: 900;
    transition: width .2s ease;
}

.nano-side-nav.collapsed {
    width: 64px;
}

.nano-side-top {
    display: flex;
    justify-content: flex-start;
    padding: 4px 6px;
}

.nano-side-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
}

.nano-side-toggle .menu-icon {
    width: 20px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    display: block;
}

.nano-side-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nano-side-row {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
}

.nano-side-row:hover {
    background: #3b3b3b;
}

.nano-side-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #444;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.nano-side-icon svg {
    display: block;
}

.nano-side-label {
    flex: 1;
    text-align: left;
}

.nano-side-caret {
    font-size: 12px;
    transition: transform .15s ease;
    display: inline-flex;
}

.nano-side-section.expanded .nano-side-caret {
    transform: rotate(180deg);
}

.nano-side-items {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 0 0 6px 36px;
}

.nano-side-section.expanded .nano-side-items {
    display: flex;
}

.nano-side-items a {
    color: #fff;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 6px;
}

.nano-side-items a:hover,
.nano-side-items a.active {
    background: #444;
}

.nano-side-nav.authenticated .guest-only {
    display: none;
}

.nano-side-nav:not(.authenticated) .auth-only {
    display: none;
}

.nano-side-nav.collapsed .nano-side-label,
.nano-side-nav.collapsed .nano-side-caret,
.nano-side-nav.collapsed .nano-side-items {
    display: none;
}

.nano-side-flyout {
    position: fixed;
    top: 80px;
    left: 76px;
    min-width: 220px;
    max-width: 320px;
    background: #2f2f2f;
    border: 1px solid #4a4a4a;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 1200;
    display: none;
}

.nano-side-flyout.open {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nano-side-flyout-title {
    color: #c9ced8;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
}

.nano-side-flyout a {
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
}

.nano-side-flyout a:hover,
.nano-side-flyout a.active {
    background: #444;
}

@media (max-width: 900px) {
    body.with-side-nav {
        padding-left: 80px;
    }
    .nano-side-nav {
        width: 64px;
    }
}

.header-left {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.header-logo {
    width: auto;
    height: 60px;
    margin-left: 5px;
    border-radius: 10px;
}

.brand-name {
    font-size: clamp(24px, 2vw, 30px);
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-weight: bold;
    color: #fff;
    margin-left: 10px;
}

.menu-button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    margin-right: 15px;
    margin-left: 16px;
}

.menu-icon {
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    display: block;
}

.graytext24 {
    width: 100%;
    max-width: 600px;
    color: lightgray;
    font-size: clamp(14px, 2vw, 24px);
    font-weight: lighter;
    line-height: 1.6;
    text-align: center;
}

.whitetext30 {
    width: 100%;
    max-width: 600px;
    color: white;
    font-size: clamp(16px, 2vw, 30px);
    font-weight: bold;
    line-height: 1.6;
    text-align: center;
}

.dropdown-menu {
    position: absolute;
    display: none;
    min-width: 180px;
    top: 70px;
    right: 10px;
    background-color: #222;
    width: 150px;
    padding: 10px 0;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.dropdown-menu.visible {
    display: block;
}

.dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu li {
    padding: 10px 10px 10px 10px;
}

.dropdown-menu a {
    color: #fff;
    text-decoration: none;
    display: block;
    font-size: 1rem;
}

.dropdown-menu a:hover {
    background-color: #333;
}

.dropdown-menu hr {
    margin: 5px 5px;
    border: 0;
    border-top: 1px solid #444;
}

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.login-box {
    background: white;
    padding-top: 0px;
    padding-right: 15px;
    padding-bottom: 15px;
    padding-left: 20px;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    width: 100%;
    max-width: 310px;
}

.login-box h2 {
    margin-top: 0;
    text-align: center;
    color: #333333;
    font-size: clamp(18px, 1.5vw, 18px);;
}

.login-box label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: #333333;
}

.login-box input {
    width: 95%;
    padding: 8px;
    margin-top: 4px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.login-actions a {
    font-size: 0.9em;
    text-decoration: underline;
    cursor: pointer;
}

.login-actions button {
    margin-left: 10px;
    padding: 6px 12px;
    border: none;
    background-color: #222;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.login-actions button:hover {
    background-color: #0257AEFF;
}

.login-actions button:first-child {
    margin-left: 0;
}

.login-box textarea {
    width: 95%;
    padding: 8px;
    margin-top: 4px;
    margin-bottom: 10px;
    margin-right: 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
}

/* login Modal header */
.wrapper-login {
    width: 100%;
    max-width: 310px;
    height: 60px;
    display: flex;
    align-items: center; /*vertical alignment */
    gap: 5px; /* optional spacing between image and text */
    padding-top: 0px;
    padding-right: 15px;
    padding-bottom: 0px;
    padding-left: 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
}

.modal-logo {
    width: auto;
    height: 40px;
    margin-left: 0px;
}

.modal-name {
    font-size: clamp(18px, 1.5vw, 24px);
    font-weight: bold;
    color: #111;
    margin-left: 0px;
}

.login-box h3 {
    color: black;
    text-align: center;
    width: 100%;
}

.login-box h4 {
    color: black;
    width: 100%;
}

.main-container {
    padding: 20px;
    margin-top: 0;
    box-sizing: border-box;
    height: 100%;
    width: 100%;
}

.error {
    color: var(--NANO_RED) !important;
    font-size: small;
}

.disabled-btn {
    background-color: gray !important;
    color: white;
    cursor: not-allowed;
}

.header-icons {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-left: auto;
    margin-right: 16px;
}

.icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
    fill: white;
}

#userIcons {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    align-items: center; /* Vertical alignment */
    height: 100%; /* Ensure it matches header height */
}

.icon:hover {
    transform: scale(1.5);
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center; /* Ensures vertical centering */
    margin-right: 20px;
}

.sign-in-button {
    border-radius: 6px;
    background-color: white;
    color: black; /* or transparent if you actually want no text color */
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sign-in-button:hover {
    background-color: #0257AEFF;
    color: white;
}

.sign-in-button:focus-visible {
    background-color: #0257AEFF;
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.nano-header-wrapper {
    margin: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    vertical-align: middle;
}

.nano-header-wrapper h1 {
    margin: 0; /* Remove default margins */
    line-height: 1.2; /* Optional: tighten alignment */
}

.nano-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 32px;
    padding: 0;

    background: black;
    color: white;
    border: none;
    border-radius: 6px;

    font-size: 20px;
    line-height: 1;

    appearance: none;
    -webkit-appearance: none;
}

.nano-back-button:hover {
    background-color: #ddd;
}

.avatar-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}

.avatar-icon:hover {
    transform: scale(1.5);
}

.notification-icon {
    position: relative;
    display: inline-block;
    align-items: center;
    margin-top: 5px;
}

/* 5px red dot, hidden by default */
.notification-icon .notif-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e11900; /* red */
    left: -2px; /* slight overlap to the left */
    top: 4px; /* tweak to taste */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); /* subtle edge */
    visibility: hidden; /* default hidden */
    pointer-events: none; /* don’t block clicks on the icon */
}

/* Make the dot visible by toggling this class */
.notification-icon.has-alert .notif-dot {
    visibility: visible;
}

.nano-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--nano-space-4);
    margin-bottom: var(--nano-space-3);
}

.nano-page-header-main {
    min-width: 0;
}

.nano-page-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.nano-page-header h1 {
    margin: 0;
    color: var(--nano-text);
    font-size: clamp(22px, 1.8vw, 28px);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.nano-page-subtitle {
    margin-top: var(--nano-space-1);
    color: var(--nano-text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.nano-toolbar {
    display: flex;
    align-items: center;
    gap: var(--nano-space-3);
}

.nano-panel {
    background: var(--nano-surface);
    border: 1px solid var(--nano-border);
    border-radius: var(--nano-radius-md);
    box-shadow: var(--nano-shadow-sm);
}

.nano-section-label {
    margin: 0 0 var(--nano-space-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nano-text-muted);
}

.nano-meta {
    color: var(--nano-text-muted);
}

.nano-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--nano-border);
    border-radius: 999px;
    background: var(--nano-surface-soft);
    color: var(--nano-text-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.nano-badge-primary {
    background: var(--nano-primary-soft);
    border-color: #bfdbfe;
    color: var(--nano-primary);
}

.nano-badge-dark {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.nano-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
}

.nano-checkbox-row label {
    margin: 0;
    line-height: 1;
    font-size: 14px;
}

.nano-checkbox-icon {
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 6px;
    flex: 0 0 20px;
}

.nano-checkbox-icon:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.nano-prefixed-input {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.nano-prefixed-input-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 0 12px;
    border: 1px solid var(--border, #d5d9e3);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: #fff;
    color: var(--ink, #1f2937);
    font-size: 13px;
    font-weight: 600;
    box-sizing: border-box;
}

.nano-prefixed-input-control {
    border-left: 0 !important;
    border-radius: 0 10px 10px 0 !important;
    min-width: 0;
}

.nano-btn {
    appearance: none;
    border-radius: 12px;
    border: 1px solid var(--nano-border);
    padding: 10px 14px;
    background: var(--nano-surface);
    color: var(--nano-text);
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.nano-btn:hover {
    border-color: var(--nano-border-strong);
    transform: translateY(-1px);
}

.nano-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.nano-btn-primary {
    background: var(--nano-text);
    border-color: var(--nano-text);
    color: #fff;
}

.nano-btn-ghost {
    background: var(--nano-surface);
    color: var(--nano-text);
}

.nano-input {
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    padding: 0 12px;
    border-radius: var(--nano-radius-sm);
    border: 1px solid var(--nano-border);
    background: var(--nano-surface);
    color: var(--nano-text);
    font-size: 14px;
    box-shadow: none;
}

.nano-input::placeholder {
    color: #9ca3af;
}

.nano-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, .2);
}

.nano-admin-page {
    max-width: none;
    margin: 0;
    padding: 94px 28px 28px 28px;
    box-sizing: border-box;
    min-height: 100dvh;
    color: var(--nano-text);
    background: var(--nano-page-bg);
}

body.with-side-nav.nano-admin-page {
    padding-left: 268px;
}

body.with-side-nav.nav-collapsed.nano-admin-page {
    padding-left: 108px;
}

.nano-admin-shell {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    box-sizing: border-box;
}

.nano-admin-stack {
    display: grid;
    gap: 16px;
}

.nano-admin-lead {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nano-admin-lead-top {
    margin-top: 12px;
}

.nano-admin-lead-bottom {
    margin-bottom: 16px;
}

.nano-admin-note {
    color: var(--nano-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.nano-tablebox {
    border: 1px solid var(--nano-table-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    font-family: var(--nano-table-font);
}

.nano-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: inherit;
}

.nano-table thead th {
    background: var(--nano-table-header-bg);
    color: var(--nano-table-header-text);
    font-weight: 700;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--nano-table-border);
    font-size: 12px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

.nano-table tbody td {
    padding: 12px;
    border-top: 1px solid var(--nano-table-border);
    vertical-align: middle;
    font-size: 12px;
    color: var(--nano-table-cell-text);
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.nano-table-zebra tbody tr:nth-child(odd) td {
    background: var(--nano-table-row-alt);
}

.nano-table-zebra tbody tr:nth-child(even) td {
    background: #fff;
}

.nano-table-compact thead th,
.nano-table-compact tbody td {
    padding: 10px;
}

.nano-table-tight thead th,
.nano-table-tight tbody td {
    padding: 8px;
}

.nano-table-fixed {
    table-layout: fixed;
}

.nano-table-actions {
    white-space: nowrap;
}

.nano-table td.nano-table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nano-admin-warning {
    background: var(--nano-warning-soft);
    border: 1px solid #fcd34d;
    border-radius: var(--nano-radius-md);
    padding: 12px 14px;
    color: var(--nano-warning);
    font-size: 14px;
    font-weight: 600;
}

.nano-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0 auto;
    gap: 0;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
    min-height: calc(100dvh - 118px);
}

.nano-admin-left-panel {
    min-width: 0;
    padding-right: 16px;
    align-self: stretch;
}

.nano-admin-splitter {
    width: 0;
    position: relative;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
    display: none;
    align-self: stretch;
}

.nano-admin-splitter::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--nano-border);
}

.nano-admin-layout.with-right-panel {
    grid-template-columns: minmax(0, 1fr) 12px auto;
}

.nano-admin-layout.with-right-panel .nano-admin-splitter {
    width: 10px;
    display: block;
    margin-right: 2px;
}

.nano-admin-right-wrap {
    width: 0;
    overflow: hidden;
    transition: width .22s ease;
    background: transparent;
    margin-left: auto;
    justify-self: end;
    grid-column: 3;
    align-self: start;
    position: sticky;
    top: 94px;
    height: calc(100dvh - 118px);
    max-height: calc(100dvh - 118px);
}

.nano-admin-right-wrap.open {
    width: var(--admin-right-width, min(45vw, 900px));
}

.nano-admin-right-panel {
    height: 100%;
    padding-left: 12px;
}

.nano-admin-surface {
    padding: 16px;
}

.nano-admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.nano-admin-toolbar-left,
.nano-admin-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nano-admin-status {
    color: var(--nano-text-muted);
    font-size: 14px;
}

.nano-admin-status.error {
    color: var(--nano-danger);
}

.nano-admin-link {
    color: var(--nano-text-muted);
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

.nano-admin-section-title {
    margin: 0;
    color: var(--nano-text-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nano-admin-surface-top {
    margin-top: 12px;
}

.nano-admin-surface-compact {
    color: var(--nano-text);
    font-size: 12px;
}

.nano-admin-chart-panel,
.wrapper-table.nano-admin-chart-panel {
    background: #333333;
    border: 1px solid #3f3f46;
    box-shadow: none;
    padding: 20px;
    border-radius: 10px;
}

.nano-admin-form-page {
    min-height: 100dvh;
    width: 100%;
    display: flex;
    justify-content: center;
}

.nano-admin-form-wrap {
    width: min(980px, 100%);
    margin: 0 auto 80px;
    padding: 0 16px 100px;
}

.nano-admin-form {
    display: grid;
    gap: 12px;
    margin-bottom: 80px;
}

.nano-admin-field {
    display: grid;
    gap: 6px;
}

.nano-admin-field label {
    font-weight: 600;
    font-size: 13px;
    color: var(--nano-text);
}

.nano-admin-field input[type=text],
.nano-admin-field input[type=number],
.nano-admin-field textarea,
.nano-admin-field select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--nano-border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    color: var(--nano-text);
}

.nano-admin-field textarea {
    min-height: 100px;
    resize: vertical;
}

.nano-admin-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--nano-border);
}

.nano-admin-footer-bar {
    max-width: 980px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    gap: 10px;
}

.nano-admin-footer-status {
    margin-left: auto;
    color: var(--nano-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer.nano-editor-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--nano-border);
    z-index: 20;
}

.footer.nano-editor-footer .bar {
    max-width: 980px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.embedded .footer.nano-editor-footer {
    padding-left: 0 !important;
}

body.embedded .footer.nano-editor-footer .bar {
    max-width: none;
    padding-inline: 12px;
}

.nano-editor-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer.nano-editor-footer .status,
.nano-editor-footer-status {
    margin-left: auto;
    color: var(--nano-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

body.embedded .header,
body.embedded .nano-side-nav {
    display: none !important;
}

body.embedded.with-side-nav,
body.embedded.with-side-nav.nav-collapsed {
    padding-left: 0 !important;
}

html.embedded {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

body.embedded {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.nano-embedded-wrap {
    max-width: 980px;
    margin: 16px auto 80px;
    padding: 0 16px 100px;
}

body.embedded .nano-embedded-wrap {
    max-width: none;
    min-width: 0;
    margin: 0;
    height: calc(100dvh - var(--embedded-footer-h, 68px));
    max-height: calc(100dvh - var(--embedded-footer-h, 68px));
    padding: 12px 12px calc(var(--embedded-footer-h, 68px) + 8px);
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.nano-embedded-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 16px;
    flex-wrap: wrap;
    margin-top: 80px;
}

body.embedded .nano-embedded-header {
    margin-top: 60px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    text-align: left;
}

body.embedded .nano-embedded-header .nano-header-wrapper {
    justify-content: flex-start;
    text-align: left;
}

.nano-embedded-header h1 {
    font-size: 20px;
    margin: 0;
    line-height: 1.1;
    display: flex;
    align-items: center;
    color: #000;
}

body.embedded .nano-embedded-header h1 {
    justify-content: flex-start;
    text-align: left;
    width: auto;
}

body.embedded .nano-embedded-header .nano-header-wrapper svg,
body.embedded .nano-embedded-header .nano-header-wrapper .nano-back-button {
    display: none !important;
}

.nano-embedded-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.nano-embedded-badge {
    background: #eef2ff;
    color: #1e3a8a;
    border: 1px solid #e0e7ff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
}

@media (max-width: 980px) {
    .nano-admin-page {
        padding-right: 16px;
        padding-left: 16px;
    }

    body.with-side-nav.nano-admin-page,
    body.with-side-nav.nav-collapsed.nano-admin-page {
        padding-left: 16px;
    }

    .nano-admin-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .nano-admin-left-panel {
        padding-right: 0;
    }

    .nano-admin-splitter,
    .nano-admin-layout.with-right-panel .nano-admin-splitter {
        display: none;
        width: 0;
    }

    .nano-admin-right-wrap,
    .nano-admin-right-wrap.open {
        width: 100%;
        position: static;
        height: auto;
        max-height: none;
    }

    .nano-admin-right-panel {
        padding-left: 0;
    }

    .nano-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .nano-page-header-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .footer.nano-editor-footer .bar {
        padding-bottom: 14px;
    }

    .nano-editor-footer-actions .btn,
    .nano-editor-footer-actions .nano-btn {
        flex: 1;
    }

    body.embedded .nano-embedded-header {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    body.embedded .nano-embedded-header .nano-header-wrapper,
    body.embedded .nano-embedded-header h1,
    body.embedded .nano-embedded-badges {
        width: auto;
        text-align: left;
        justify-content: flex-start;
    }

    body.embedded .nano-editor-footer-actions .btn,
    body.embedded .nano-editor-footer-actions .nano-btn {
        flex: 0 0 auto;
    }
}

body.nano-public-page {
    background: var(--nano-page-bg);
    color: var(--nano-text);
}

.nano-public-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.nano-public-home-wrap {
    max-width: 1100px;
    margin: 0 auto;
    margin-top: 70px;
    padding: 24px;
}

.nano-public-hero {
    display: grid;
    gap: 14px;
}

.nano-public-hero h1 {
    margin: 0;
    color: var(--nano-text);
}

.nano-public-hero p {
    color: var(--nano-text-muted);
    max-width: 100%;
    margin: 0;
    line-height: 1.6;
}

.nano-public-cta {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nano-public-grid {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.nano-public-card {
    padding: 18px;
}

.nano-public-card h2,
.nano-public-card h3 {
    margin-top: 0;
}

.nano-public-card p {
    color: var(--nano-text-muted);
    line-height: 1.6;
}

.nano-public-card a,
.nano-public-card a:visited,
.nano-doc-links a,
.nano-doc-links a:visited {
    color: var(--nano-primary);
}

.nano-public-card a:hover,
.nano-public-card a:focus-visible,
.nano-doc-links a:hover,
.nano-doc-links a:focus-visible {
    color: #1e40af;
}

.nano-doc-lead {
    color: var(--nano-text-muted);
}

.nano-doc-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 12px 0 0;
}

.nano-doc-note {
    color: var(--nano-text-muted);
    font-size: 13px;
}

.nano-doc-html ul,
.nano-doc-html ol {
    margin: 1em 0 1em 18px;
}

.nano-doc-html li {
    line-height: 1.6;
    margin: 0.35em 0;
}

.nano-doc-html code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95em;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1px 5px;
}

.nano-doc-html pre {
    overflow-x: auto;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
}

.nano-doc-html pre code {
    border: 0;
    background: transparent;
    padding: 0;
}

.nano-doc-html table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    background: white;
}

.nano-doc-html th,
.nano-doc-html td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.nano-doc-html th {
    background: #f8fafc;
}

.nano-doc-html blockquote {
    margin: 1.2em 0;
    padding-left: 14px;
    border-left: 4px solid #d1d5db;
    color: #475569;
}

.nano-doc-image {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 20px auto;
    border-radius: 10px;
}

.nano-cookie-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    bottom: 16px;
    z-index: 9999;
    width: min(720px, 92vw);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--nano-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    color: var(--nano-text);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.nano-cookie-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.nano-cookie-text {
    font-size: 13px;
    line-height: 1.35;
}

.nano-cookie-link {
    color: var(--nano-primary);
    text-decoration: underline;
}

.nano-cookie-btn {
    margin-left: auto;
}

.nano-help-shell,
.nano-help-doc-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nano-help-head h1,
.nano-help-doc-head h1 {
    margin-bottom: 8px;
}

.nano-help-doc-summary {
    margin: 0;
    color: #5f6d87;
    max-width: 760px;
}

.nano-help-search-row {
    width: 100%;
}

.nano-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.nano-help-card {
    padding: 18px;
}

.nano-help-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.nano-help-card-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.nano-help-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #66758f;
    background: #eef3fb;
    flex: 0 0 28px;
}

.nano-help-card-head h2 {
    margin: 0;
    font-size: 1rem;
}

.nano-help-card-head span,
.nano-help-meta,
.nano-help-doc-category {
    color: #5f6d87;
    font-size: 0.9rem;
}

.nano-help-card-links,
.nano-help-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nano-help-results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nano-help-link,
.nano-help-result {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.nano-help-link span,
.nano-help-result p {
    margin: 0;
    color: #5f6d87;
}

.nano-help-link-label {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 400;
    color: #253247;
}

.nano-help-result {
    padding: 16px 18px;
}

.nano-help-result-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.nano-help-results-group {
    padding: 0;
    overflow: hidden;
}

.nano-help-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    color: var(--nano-text);
    text-decoration: none;
    transition: background .15s ease;
}

.nano-help-result-row:hover {
    background: var(--nano-primary-soft);
}

.nano-help-result-row--divided {
    border-bottom: 1px solid var(--nano-border);
}

.nano-help-result-row-title {
    color: #253247;
    font-size: 15px;
    line-height: 1.45;
}

.nano-help-result-row-category {
    color: #5f6d87;
    font-size: 14px;
    white-space: nowrap;
}

.nano-help-doc-back {
    margin-bottom: -6px;
}

.nano-help-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nano-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.nano-panel-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.nano-panel-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.nano-panel-close:hover {
    background: #eef2f7;
}

.nano-panel-close:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.nano-help-inline-doc {
    padding: 18px 20px 24px;
}

.nano-help-inline-doc-head {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--nano-border);
}

.nano-help-inline-doc-title-block {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.nano-help-inline-doc-title {
    margin: 0;
    color: var(--nano-text);
    font-size: 2rem;
    line-height: 1.1;
}

.nano-help-inline-doc-close {
    flex: 0 0 auto;
}

.nano-help-doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nano-help-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #c8d4e6;
    color: #50627f;
    font-size: 0.82rem;
    background: #f8fbff;
}

.nano-public-widget-center {
    width: min(600px, 100%);
    margin: 0;
    margin-top: 24px;
    min-height: 400px;
}

@media (min-width: 720px) {
    .nano-public-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
