/* ===== Theme overrides ===== */
[data-bs-theme="light"] {
    --bs-body-color: #2a3547;
    --bs-card-spacer-y: 30px;
    --bs-card-spacer-x: 30px;
    --bs-light-primary: rgba(93, 135, 255, 0.1);
}

[data-bs-theme="dark"] {
}

/* ===== Fonts ===== */
html, body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ===== Logo ===== */
.logo {
    font-family: "M PLUS Rounded 1c", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(28px, 5vw, 64px);
    line-height: 1;
    color: var(--bs-body-color);
    display: inline-block;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.logo-code {
    display: inline-block;
    font-weight: 900;
    letter-spacing: -0.10em;
    font-size: 1.05em;
    transform: translateY(-0.02em);
    margin-left: -0.22em;
    color: #5d87ff;
}

.logo-small { font-size: clamp(22px, 2.5vw, 32px) !important; }

/* ===== Radial gradient (login bg) ===== */
.radial-gradient {
    background: var(--bs-light-primary);
}

/* ===== Header ===== */
.ndc-header {
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
}

.ndc-version {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    letter-spacing: 0.04em;
    opacity: 0.6;
    user-select: none;
}

.ndc-theme-toggle {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--bs-body-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.05rem;
    opacity: 0.7;
    transition: opacity 0.15s, background 0.15s;
}

.ndc-theme-toggle:hover {
    opacity: 1;
    background: var(--bs-tertiary-bg);
}

.ndc-avatar-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 50%;
    transition: box-shadow 0.15s;
}

.ndc-avatar-btn:hover {
    box-shadow: 0 0 0 2px var(--bs-border-color);
}

.ndc-avatar-btn::after {
    display: none !important;          /* hide dropdown caret */
}

.ndc-user-dropdown {
    min-width: 260px;
    border-radius: 10px;
}

/* ===== Snippet dashboard ===== */
:root {
    --ndc-header-h: 52px;
}

.body-wrapper {
    min-height: calc(100vh - var(--ndc-header-h));
}

.db-snip {
    --db-radius: 12px;
    --db-gap: 12px;
    min-height: calc(100vh - var(--ndc-header-h) - 2rem);
}

.db-grid {
    display: flex;
    gap: var(--db-gap);
    height: calc(100vh - var(--ndc-header-h) - 2rem);
    align-items: stretch;
}

.db-col--list {
    flex: 0 0 240px;
    min-width: 200px;
    overflow: hidden;
}

.db-col--editor {
    flex: 1 1 auto;
    min-width: 320px;
    overflow: hidden;
}

.db-cardhead {
    padding: 12px 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid var(--bs-border-color);
}

.db-list-wrap {
    overflow-y: auto;
    flex: 1 1 auto;
    max-height: calc(100vh - var(--ndc-header-h) - 6rem);
}

.db-list-wrap .list-group-item {
    cursor: pointer;
    border-left: 0;
    border-right: 0;
    padding: 10px 14px;
    font-size: 0.875rem;
}

/* ===== Editor ===== */
.db-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.db-textarea {
    flex: 1 1 auto;
    width: 100%;
    min-height: 300px;
    overflow: hidden;
}

/* ===== Dropdown icon button ===== */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--bs-border-color);
    background: transparent;
    color: var(--bs-body-color);
}

.btn-icon:hover {
    background: var(--bs-tertiary-bg);
}

.btn-icon.dropdown-toggle::after {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .db-col--list {
        flex-basis: 200px;
        min-width: 180px;
    }
}

@media (max-width: 992px) {
    .db-grid {
        flex-wrap: wrap;
        height: auto;
        min-height: auto;
    }

    .db-col--list {
        flex: 1 1 calc(50% - var(--db-gap));
        min-width: 250px;
        max-height: 300px;
    }

    .db-col--editor {
        order: 10;
        flex: 1 1 100%;
        min-width: 100%;
        min-height: 400px;
    }

    .db-list-wrap {
        max-height: 240px;
    }
}

@media (max-width: 576px) {
    .db-grid {
        flex-direction: column;
    }

    .db-col--list {
        flex: 0 0 auto;
        max-height: 200px;
    }

    .db-col--editor {
        min-height: 350px;
    }
}

/* ===== Dashboard cards ===== */
.db-col.card {
    border-radius: var(--db-radius);
    overflow: hidden;
}

.db-cardhead h6 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color);
}

.db-list-wrap .list-group-item.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

/* ===== Mobile textarea fallback ===== */
.ndc-mobile-editor {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.ndc-mobile-textarea {
    flex: 1 1 auto;
    width: 100%;
    min-height: 300px;
    padding: 12px 40px 12px 12px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: var(--bs-body-color);
}

.ndc-mobile-view {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 40px 12px 12px;
    min-height: 300px;
    cursor: text;
}

.ndc-mobile-pre {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--bs-body-color);
    background: transparent;
    border: none;
}

.ndc-mobile-pre a {
    color: var(--bs-link-color);
    text-decoration: underline;
}

.ndc-mobile-pre--empty {
    color: var(--bs-secondary-color);
    opacity: 0.5;
}

.ndc-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.15s, background 0.15s;
}

.ndc-copy-btn:hover {
    opacity: 1;
    background: var(--bs-tertiary-bg);
}

/* ===== Auth card (login / logout) ===== */
.ndc-auth-card-body {
    padding: 2rem;
}

@media (min-width: 576px) {
    .ndc-auth-card-body {
        padding: 3rem;
    }
}

/* ===== Login provider buttons ===== */
.ndc-btn-provider {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
}

.ndc-btn-provider:hover {
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

/* ===== Utils ===== */
.opacity50 { opacity: 0.5; }
.opacity25 { opacity: 0.25; }

/* ===== Newdaycode story (login bg text) ===== */
.newdaycode-story {
    position: absolute;
    text-align: center;
    width: 100%;
    z-index: 0;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: clamp(1.2rem, 5vw, 4rem);
    font-family: "M PLUS Rounded 1c", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
 