/* Public UI Styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
    color: #e5e7eb;
    min-height: 100vh;
    padding: 16px;
    box-sizing: border-box;
}

.shell {
    width: min(100%, 960px);
    max-width: 960px;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.9);
    padding: 18px 16px 16px;
    position: relative;
    margin: 0 auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 32px);
}

@media (min-width: 640px) {
    .shell {
        padding: 20px 20px 18px;
    }
}

.shell::before {
    content: '';
    position: absolute;
    inset: -140px;
    background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.12), transparent 55%),
                radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.18), transparent 55%);
    opacity: 0.9;
    pointer-events: none;
    z-index: -1;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 0, #4ade80, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #022c22;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
}

.title-block h1 {
    font-size: 18px;
    margin: 0;
    letter-spacing: 0.02em;
}

.title-block p {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
}

.pill {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #9ca3af;
    background: rgba(15, 23, 42, 0.95);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 14px;
    flex: 1;
    min-height: 0;
}

@media (max-width: 780px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

.sidebar {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 14px;
    border: 1px solid rgba(31, 41, 55, 0.9);
    padding: 10px 10px;
}

main {
    min-height: 0;
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 13px;
    margin: 0 0 6px 0;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav li {
    margin-bottom: 4px;
}

.nav a {
    display: block;
    padding: 6px 9px;
    border-radius: 9px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nav a:hover {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(148, 163, 184, 0.5);
}

.nav a.active {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

main {
    min-width: 0;
}

.card {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 60%),
                radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.12), transparent 55%), #020617;
    border-radius: 14px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    padding: 12px 12px 10px;
    margin-bottom: 12px;
    overflow-x: auto;
}

.card h2 {
    font-size: 15px;
    margin: 0 0 6px 0;
}

.card p {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 8px 0;
}

.card-error {
    border-color: rgba(248, 113, 113, 0.8);
    background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.25), transparent 60%), #020617;
}

label {
    font-size: 12px;
    color: #9ca3af;
    display: block;
    margin-bottom: 3px;
}

input[type='text'] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.98);
    color: #e5e7eb;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-sizing: border-box;
}

input[type='text']:focus {
    border-color: rgba(34, 197, 94, 0.9);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.7);
    background: #020617;
}

button {
    border-radius: 9px;
    border: none;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #22c55e, #4ade80);
    color: #022c22;
    box-shadow: 0 8px 22px rgba(34, 197, 94, 0.55);
}

button:hover {
    filter: brightness(1.05);
}

.muted {
    color: #9ca3af;
    font-size: 11px;
}

.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 6px;
}

th, td {
    border: 1px solid rgba(55, 65, 81, 0.9);
    padding: 5px 6px;
    text-align: left;
}

th {
    background: rgba(15, 23, 42, 0.98);
}

tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.85);
}

tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.7);
}

.footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(55, 65, 81, 0.9);
    font-size: 11px;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.footer a {
    color: #22c55e;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.token-pre {
    background: rgba(15, 23, 42, 0.98);
    border-radius: 9px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    padding: 8px 10px;
    font-size: 12px;
    overflow: auto;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
}

/* Collapsible sections for documentation */
.collapsible {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
    text-align: left;
    outline: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.collapsible:hover {
    opacity: 0.9;
}

.section-button-title {
    margin: 0;
    padding: 10px 16px;
    background-color: #22c55e;
    color: #000000;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.section-toggle {
    display: inline-block;
    margin-left: 8px;
    padding: 10px 12px;
    background-color: #22c55e;
    color: #000000;
    border-radius: 8px;
    font-size: 14px;
    min-width: 32px;
    text-align: center;
}

.collapsible-content {
    padding: 0 0 8px 0;
    overflow: hidden;
}

code {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(55, 65, 81, 0.9);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.9em;
    color: #22c55e;
}

ul {
    margin: 8px 0;
    padding-left: 20px;
}

ul li {
    margin-bottom: 4px;
    font-size: 12px;
}

@media (max-width: 600px) {
    th, td {
        font-size: 11px;
        padding: 4px;
    }
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.5);
    background: rgba(15, 23, 42, 0.9);
    color: #38bdf8;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.button-link:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.8);
}

.docs-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.docs-wrapper .card {
    margin-bottom: 0;
}

.doc-section {
    margin-top: 16px;
}

.doc-section:first-of-type {
    margin-top: 16px;
}

.changelog-entry {
    border-left: 4px solid rgba(56, 189, 248, 0.6);
}

.changelog-entry__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.changelog-entry__header h3 {
    margin: 0;
    font-size: 15px;
    color: #f8fafc;
}

.changelog-entry__body h4 {
    margin: 12px 0 6px;
    font-size: 13px;
    color: #e0f2fe;
}

.changelog-entry__body p {
    margin: 6px 0 8px;
    font-size: 12px;
    color: #cbd5f5;
}

.changelog-entry__body ul {
    margin: 6px 0 10px 18px;
    padding: 0;
    color: #cbd5f5;
    font-size: 12px;
}

.changelog-entry__body li {
    margin-bottom: 4px;
}

