:root {
    --ej-green: #16a34a;
    --ej-green-dark: #15803d;
    --ej-bg: #f0fdf4;
    --ej-surface: #ffffff;
    --ej-text: #14532d;
    --ej-muted: #4b5563;
    --ej-border: #d1fae5;
    --ej-danger-bg: #fef2f2;
    --ej-danger-text: #b91c1c;
    --ej-success-bg: #ecfdf5;
    --ej-success-text: #047857;
    --ej-radius: 12px;
    --ej-shadow: 0 10px 30px rgba(22, 163, 74, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--ej-text);
    background: #fff;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-card {
    width: 100%;
    max-width: 360px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.auth-title {
    margin: 0 0 24px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: var(--ej-danger-bg);
    color: var(--ej-danger-text);
    border: 1px solid #fecaca;
}

.alert-success {
    background: var(--ej-success-bg);
    color: var(--ej-success-text);
    border: 1px solid #a7f3d0;
}

.dashboard-page .alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.dashboard-page .alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #d1d5db;
    border-radius: 0;
    font-size: 1rem;
    background: transparent;
    transition: border-color 0.15s;
}

.form-group input:focus {
    outline: none;
    border-bottom-color: var(--ej-green);
    box-shadow: none;
}

.btn-primary {
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: var(--ej-green);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: var(--ej-green-dark);
}

.btn-auth-submit {
    width: 100%;
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px solid var(--ej-green);
    border-radius: 8px;
    background: transparent;
    color: var(--ej-green);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-auth-submit:hover {
    background: rgba(22, 163, 74, 0.06);
    border-color: var(--ej-green-dark);
    color: var(--ej-green-dark);
}

.btn-auth-submit:focus-visible {
    outline: 2px solid var(--ej-green);
    outline-offset: 2px;
}

.btn-auth-submit .btn-text {
    color: var(--ej-green);
    padding: 0;
    text-decoration: none;
    cursor: inherit;
}

.btn-auth-submit:hover .btn-text {
    color: var(--ej-green-dark);
    text-decoration: none;
}

.btn-auth-submit .loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    margin: 0 auto;
    border: 2px solid rgba(22, 163, 74, 0.25);
    border-top-color: var(--ej-green);
    border-radius: 50%;
    animation: btn-spin 0.75s linear infinite;
}

.btn-auth-submit.loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-auth-submit.loading .btn-text {
    display: none;
}

.btn-auth-submit.loading .loading-spinner {
    display: block;
}

.btn-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary .btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary .loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.9s linear infinite;
    margin: 0 auto;
}

.btn-primary.loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .loading-spinner {
    display: block;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dashboard */
.dashboard-page {
    background: #0f172a;
    height: 100vh;
    overflow: hidden;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    color: #e2e8f0;
}

.dashboard-shell {
    height: 100vh;
    display: flex;
    overflow: hidden;
    background: #0f172a;
}

.dashboard-sidebar {
    width: 272px;
    flex-shrink: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border-right: none;
    padding: 24px 16px;
    overflow-y: auto;
    transition: width 0.2s ease, margin 0.2s ease;
}

.sidebar-brand {
    padding: 4px 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.sidebar-brand-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.sidebar-brand-sub {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link.is-active {
    background: var(--ej-green);
    color: #fff;
}

.sidebar-link.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.sidebar-link-icon {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-soon {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
}

.sidebar-link.is-active .sidebar-soon {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-group-toggle,
.sidebar-subgroup-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.sidebar-group-toggle:hover,
.sidebar-subgroup-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-group-toggle.is-active {
    color: #86efac;
    font-weight: 600;
}

.sidebar-chevron {
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar-group.is-open > .sidebar-group-toggle .sidebar-chevron,
.sidebar-subgroup.is-open > .sidebar-subgroup-toggle .sidebar-chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.sidebar-group-items,
.sidebar-subgroup-items {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding-left: 8px;
}

.sidebar-group.is-open > .sidebar-group-items,
.sidebar-subgroup.is-open > .sidebar-subgroup-items {
    display: flex;
}

.sidebar-sublink {
    display: block;
    padding: 8px 12px 8px 28px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.8125rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar-sublink-nested {
    padding-left: 40px;
    font-size: 0.75rem;
}

.sidebar-sublink:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

.sidebar-sublink.is-active {
    background: rgba(22, 163, 74, 0.2);
    color: #86efac;
}

.sidebar-subgroup {
    margin-top: 4px;
}

.sidebar-subgroup-toggle {
    padding: 8px 12px 8px 28px;
    font-size: 0.85rem;
    color: var(--ej-muted);
}

.sidebar-subgroup-items {
    max-height: 220px;
    overflow-y: auto;
    padding-left: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-subgroup-items::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    margin-bottom: 12px;
}

.sidebar-user-name {
    margin: 0 0 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
}

.sidebar-signout {
    display: block;
    text-align: center;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.sidebar-signout:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dashboard-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #0f172a;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    padding: 20px 32px;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    z-index: 5;
}

.dashboard-eyebrow {
    margin: 0 0 2px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.dashboard-header-text h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.dashboard-header-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-header-email {
    font-size: 0.8125rem;
    color: #94a3b8;
}

.dashboard-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 28px 32px 40px;
    width: 100%;
    background: #0f172a;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #1e293b;
    cursor: pointer;
}

.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: #e2e8f0;
    border-radius: 1px;
}

.dashboard-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 32px;
}

.dashboard-card h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.dashboard-card p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.6;
}

.dashboard-card code {
    font-size: 0.875em;
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

.btn-link {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--ej-border);
    color: var(--ej-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.btn-text {
    display: inline-block;
    padding: 8px 4px;
    border: none;
    background: transparent;
    color: var(--ej-green-dark);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-text:hover {
    color: var(--ej-green);
}

.btn-link:hover {
    background: var(--ej-bg);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.2);
    color: #86efac;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-muted {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.btn-inline {
    width: auto;
    padding: 10px 16px;
    white-space: nowrap;
}

.api-endpoints-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.api-base-url {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.table-wrap {
    overflow-x: auto;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.api-table th,
.api-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
    color: #e2e8f0;
}

.api-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.api-endpoint-cell code {
    font-size: 0.8rem;
    word-break: break-all;
}

.api-key-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.api-key-actions form {
    margin: 0;
}

.api-key-status {
    margin: 16px 0 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.api-actions form {
    margin: 0;
}

.api-key-list {
    margin: 0;
    padding-left: 18px;
}

.api-key-list li {
    margin-bottom: 10px;
}

.api-key-list code {
    display: block;
    margin-top: 4px;
    word-break: break-all;
}

/* Professional API documentation */
.api-doc {
    width: 100%;
}

.api-hero {
    background: #1e293b;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.api-hero--dashboard {
    background: #1e293b;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.api-hero--dashboard .api-hero__subtitle {
    color: #cbd5e1;
}

.api-hero__badge {
    display: inline-block;
    padding: 4px 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #86efac;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.api-hero--dashboard .api-hero__badge {
    background: rgba(255, 255, 255, 0.12);
    color: #86efac;
}

.api-hero__title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.api-hero__subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 560px;
}

.api-hero__subtitle code {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.api-hero__body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.api-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.api-chip {
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    color: #e2e8f0;
}

.api-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.api-breadcrumb a {
    color: #86efac;
    text-decoration: none;
}

.api-breadcrumb a:hover {
    text-decoration: underline;
}

.api-panel {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.api-panel--compact h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.api-panel--highlight {
    border-color: rgba(134, 239, 172, 0.4);
    background: #1e293b;
}

.api-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.api-panel__head h3,
.api-panel h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f8fafc;
}

.api-panel__head p,
.api-panel p {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
}

.api-panel__status {
    margin: 16px 0 0;
    font-size: 0.875rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.api-panel__link {
    margin: 16px 0 0;
    font-size: 0.875rem;
}

.api-panel__link a {
    color: #86efac;
    font-weight: 600;
    text-decoration: none;
}

.api-panel__link a:hover {
    text-decoration: underline;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
}

.status-dot--active {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.api-endpoint-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow-x: auto;
}

.api-endpoint-bar__label {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.api-endpoint-bar code {
    flex: 1;
    min-width: 0;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.8125rem;
    color: #e2e8f0;
    background: transparent;
    padding: 0;
    word-break: break-all;
}

.api-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.api-copy-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.api-copy-btn:focus-visible {
    outline: 2px solid #86efac;
    outline-offset: 2px;
}

.api-copy-btn svg {
    width: 16px;
    height: 16px;
}

.api-copy-btn__icon-check {
    display: none;
}

.api-copy-btn.is-copied {
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.35);
    background: rgba(34, 197, 94, 0.12);
}

.api-copy-btn.is-copied .api-copy-btn__icon-copy {
    display: none;
}

.api-copy-btn.is-copied .api-copy-btn__icon-check {
    display: block;
}

.api-op-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.api-op-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 0;
}

.api-op-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.api-op-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
}

.api-op-card__desc {
    margin: 8px 24px 0;
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.5;
}

.api-op-card .api-endpoint-bar {
    margin: 16px 24px 0;
    border-radius: 8px;
}

.api-op-card .api-code-panel {
    margin: 16px 24px 24px;
    border-radius: 8px;
}

.api-code-panel {
    border: 1px solid #1e293b;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
}

.api-code-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.api-example {
    margin: 0;
    padding: 16px;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: auto;
    font-size: 0.8125rem;
    line-height: 1.7;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

.api-example code {
    color: #e2e8f0;
    background: transparent;
    padding: 0;
    font-size: inherit;
    white-space: pre-wrap;
    word-break: break-word;
}

.api-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.api-quick-card {
    display: block;
    padding: 24px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.api-quick-card:hover {
    border-color: rgba(134, 239, 172, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.api-quick-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.api-quick-card__icon--key {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.api-quick-card__icon--key::before { content: "KEY"; }

.api-quick-card__icon--docs {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.api-quick-card__icon--docs::before { content: "API"; }

.api-quick-card__icon--resources {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.api-quick-card__icon--resources::before { content: "DB"; }

.api-quick-card__icon--guide {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.api-quick-card__icon--guide::before { content: "DOC"; }

.api-quick-card--button {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.api-quick-card--button:hover {
    border-color: rgba(134, 239, 172, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.sidebar-link--button {
    width: 100%;
    border: none;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.docs-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.docs-modal.is-open {
    display: flex;
}

.docs-modal[hidden] {
    display: none !important;
}

body.docs-modal-open {
    overflow: hidden;
}

.docs-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
}

.docs-modal__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1100px, 100%);
    height: min(88vh, 900px);
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.docs-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f172a;
}

.docs-modal__head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
}

.docs-modal__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.docs-modal__external {
    color: #86efac;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
}

.docs-modal__external:hover {
    text-decoration: underline;
}

.docs-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.docs-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.docs-modal__frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

.api-quick-card h4 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
}

.api-quick-card p {
    margin: 0;
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.5;
}

.api-table-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.api-resources-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.api-resources-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.api-resources-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
    color: #e2e8f0;
}

.api-resources-table tr:last-child td {
    border-bottom: none;
}

.api-resources-table tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.api-resource-name {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8125rem;
}

.api-resources-table__url code {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    word-break: break-all;
}

.api-resources-table__action {
    text-align: right;
    white-space: nowrap;
}

.api-resources-table__action a {
    color: #86efac;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.8125rem;
}

.api-resources-table__action a:hover {
    text-decoration: underline;
}

.api-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.api-status-grid div {
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.api-status-grid code {
    display: block;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
}

.api-status-grid span {
    font-size: 0.8rem;
    color: #94a3b8;
}

.http-method {
    display: inline-block;
    min-width: 52px;
    text-align: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

.http-get { background: #dbeafe; color: #1d4ed8; }
.http-post { background: #dcfce7; color: #15803d; }
.http-put, .http-patch { background: #fef3c7; color: #b45309; }
.http-delete { background: #fee2e2; color: #b91c1c; }

.btn-secondary {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.btn-secondary:hover {
    background: #334155;
}

.api-key-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.api-key-actions form {
    margin: 0;
}

.api-endpoints-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.api-doc a:not(.api-quick-card):not(.api-resources-table__action a) {
    color: #86efac;
    font-weight: 500;
}

.migration-stat {
    font-weight: 600;
    color: #e2e8f0;
}

.migration-stat--applied {
    color: #86efac;
}

.migration-stat--pending {
    color: #fbbf24;
}

.migration-log {
    margin-top: 20px;
}

.migration-log h4 {
    margin: 0 0 10px;
    font-size: 0.875rem;
    color: #94a3b8;
}

.migration-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.migration-badge--applied {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.migration-badge--pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.migration-table td:last-child {
    color: #94a3b8;
    font-size: 0.8125rem;
}

.migration-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.5);
}

.migration-pagination__info {
    margin: 0;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.migration-pagination__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.migration-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.migration-pagination__btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.migration-pagination__btn.is-active {
    background: rgba(22, 163, 74, 0.2);
    border-color: rgba(134, 239, 172, 0.35);
    color: #86efac;
}

.api-usage-panel {
    margin-top: 24px;
}

.api-usage-range {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.api-usage-range__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.api-usage-range__btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.api-usage-range__btn.is-active {
    background: rgba(22, 163, 74, 0.2);
    border-color: rgba(134, 239, 172, 0.35);
    color: #86efac;
}

.api-usage-notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: #fde68a;
    font-size: 0.875rem;
}

.api-usage-notice a {
    color: #86efac;
    font-weight: 600;
    text-decoration: none;
}

.api-usage-notice a:hover {
    text-decoration: underline;
}

.api-usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.api-usage-stat {
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.api-usage-stat__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 6px;
}

.api-usage-stat__value {
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #f8fafc;
}

.api-usage-stat__value--success {
    color: #86efac;
}

.api-usage-stat__value--error {
    color: #fca5a5;
}

.api-usage-stat__hint {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: #64748b;
}

.api-usage-chart-wrap {
    position: relative;
    min-height: 280px;
    margin-top: 8px;
    padding-top: 8px;
}

.api-usage-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    text-align: center;
    color: #94a3b8;
}

.api-usage-empty p {
    margin: 0;
}

.api-usage-empty__hint {
    margin-top: 6px !important;
    font-size: 0.8125rem;
    color: #64748b;
}

@media (max-width: 900px) {
    .dashboard-shell {
        position: relative;
    }

    .sidebar-toggle {
        display: flex;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 101;
    }

    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        z-index: 100;
        box-shadow: var(--ej-shadow);
    }

    .dashboard-shell.sidebar-collapsed .dashboard-sidebar {
        margin-left: -260px;
    }

    .docs-modal {
        padding: 12px;
    }

    .docs-modal__panel {
        height: min(92vh, 900px);
    }

    .docs-modal__external {
        display: none;
    }
}
