/* ── Startup Dashboard ───────────────────────────────────────────────── */

.sd-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    transition: opacity 0.25s ease;
}

.sd-overlay.visible {
    display: block;
    opacity: 1;
}

.sd-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal.sd-panel {
    position: fixed;
    z-index: 2001;
    background: var(--modal-background-color, #111824);
    border: 1px solid rgba(255, 255, 255, 0.07);
    /* border-radius: 8px; */
    width: 1080px;
    height: 713px;
    max-width: 96vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    /* overflow: hidden; */
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    font-family: 'input_mono_medium', monospace;
    color: var(--text-color, #a8bcbc);
    transition: opacity 0.35s ease, filter 0.35s ease;
}

/* ── Top bar ─────────────────────────────────────────────────────────── */

.sd-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sd-user {
    min-width: 95px;
    border: 1px solid var(--modal-primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
    border-radius: 20px;
}


.sd-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color, #a8bcbc);
    flex-shrink: 0;
    overflow: hidden;
}

.sd-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sd-username {
    text-transform: capitalize;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-color, #a8bcbc);
    letter-spacing: 0.02em;
    padding-right: 10px;
}

.sd-version {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    gap: 2px;
}

.sd-version-header {
    display: flex;
    align-items: center;
    gap: 12px;
    /* opacity: 0.8; */
}

.sd-logo {
    width: 27px;
    height: 27px;
    
}

.sd-version-label {
    font-size: 11px;
    /* color: rgba(168, 188, 188, 0.55); */
    margin: 0;
    letter-spacing: 0.02em;
}

.sd-changelog-link {
    font-size: 10px;
    color: hsl(from var(--modal-primary-color) h s calc(l + 30));
    text-decoration: none;
    /* opacity: 0.8; */
    transition: opacity 0.15s;
    letter-spacing: 0.02em;
}

.sd-changelog-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.sd-close {
    position: absolute;
    top: -18px;
    right: -18px;
    background: var(--modal-background-color);
    border: 1px solid hsl(from var(--modal-primary-color) h s calc(l + 20));
    color: hsl(from var(--text-color) h s calc(l - 10));
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0.7;
}

.sd-close:hover {
    background:  hsl(from var(--modal-background-color) h s calc(l + 10));
    /* border: 1px solid hsl(from var(--modal-primary-color) h s calc(l + 20)); */
    color: hsl(from var(--text-color) h s calc(l + 10));
     opacity: 1;
}

/* ── Body ────────────────────────────────────────────────────────────── */

.sd-body {
    display: flex;
    gap: 0;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ── Left column ─────────────────────────────────────────────────────── */

.sd-left {
    width: 200px;
    flex-shrink: 0;
    padding: 20px;
    /* border-right: 1px solid rgba(255, 255, 255, 0.06); */
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.sd-section-label {
    margin: 0 0 8px 0;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(168, 188, 188, 0.45);
}

.sd-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sd-action-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    background: none;
    border: none;
    border-radius: 5px;
    color: var(--text-color, #a8bcbc);
    font-family: 'input_mono_medium', monospace;
    font-size: 11.5px;
    padding: 6px 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.01em;
    transition: all 0.15s;
}

.sd-action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sd-action-btn:hover .sd-action-icon{
    scale: 1.25;
    color: var(--accent-color);
}


.sd-action-icon {
    display: flex;
    align-items: center;
    /* opacity: 0.65; */
    flex-shrink: 0;
    transition: all 0.15s;
}

.sd-btn-label {
    margin-top: 5px;
    transition: all 0.25s;
}

.sd-action-btn:hover .sd-btn-label {

    padding-left: 3px;
}

/* ── Recent ──────────────────────────────────────────────────────────── */

.sd-recent-section {
    gap: 0;
    min-height: 331px;
}

.sd-recent-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.sd-recent-header .sd-section-label {
    margin: 0;
}

.sd-view-all {
    background: none;
    border: none;
    font-size: 10px;
    color:  hsl(from var(--modal-primary-color) h s calc(l + 20));
    cursor: pointer;
    padding: 0;
    font-family: 'input_mono_medium', monospace;
    /* opacity: 0.9; */
    transition: opacity 0.15s;
    letter-spacing: 0.02em;
    text-decoration: none;
    width: 82px;
}

.sd-view-all:hover {
    opacity: 0.8;
    /* text-decoration: underline; */
}

.sd-recent-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sd-recent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    border-radius: 5px;
    color: var(--text-color, #a8bcbc);
    font-family: 'input_mono_medium', monospace;
    font-size: 11px;
    padding: 5px 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.sd-recent-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sd-recent-icon {
    display: flex;
    align-items: center;
    opacity: 0.45;
    flex-shrink: 0;
}

.sd-recent-name {
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.sd-recent-empty {
    margin: 4px 8px;
    font-size: 11px;
    color: rgba(168, 188, 188, 0.3);
    font-style: italic;
}

/* ── Right column ────────────────────────────────────────────────────── */

.sd-right {
    flex: 1;
    padding: 20px 20px 0px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    min-width: 0;
}

/* ── Layout toggle (reuses ProjectListView classes) ─────────────────── */

.sd-layout-toggle {
    display: none;
    align-self: flex-end;
    margin-bottom: 6px;
}

/* ── Thumbnail container (hosts ProjectListView.projectsContainer) ───── */

.sd-thumbnail-container {
    padding: 3px 2px;
    height: 505px;
    /* flex: 1; */
    /* min-height: 0; */
    overflow-y: hidden;
    overflow-x: hidden;
    position: relative;
}

/* Gradient fade-out overlay at bottom */
.sd-thumbnail-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 104px;
    background: linear-gradient(to bottom, transparent 0%, var(--modal-background-color, #111824) 75%);
    pointer-events: none;
    z-index: 1;
}

/* Constrain the embedded masonry/list grid inside the dashboard */
.sd-thumbnail-container .projects-container {
    max-height: 100%;
    padding: 0;
    margin: 0;
}

.sd-thumbnail-container .masonry-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(188px, 2fr));
    gap: 14px;
    align-items: start;
}

.sd-thumbnail-container .list-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Tighten card chrome inside the dashboard */
.sd-thumbnail-container .project-card-wrapper {
    transition: opacity 0.3s ease;
}

.sd-thumbnail-container .project-info,
.sd-thumbnail-container .project-actions {
    padding: 4px 6px;
    font-size: 10px;
}

.sd-thumbnail-container .project-name {
    font-size: 10px;
    margin: 0;
}

.sd-thumbnail-container .list-project-card {
    padding: 5px 8px;
}

.sd-thumbnail-container .list-project-name {
    font-size: 11px;
}

/* ── Explore button ──────────────────────────────────────────────────── */

.sd-explore-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* border-radius: 5px; */
    color: var(--text-color, #a8bcbc);
    font-family: 'input_mono_medium', monospace;
    /* font-size: 11px; */
    padding: 15px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    margin-top: 8px;
}

.sd-explore-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    scale: 0.99;
}

/* Toggle at bottom of right section */
.sd-toggle-bottom {
    margin-top: 12px;
    padding-top: 12px;
    /* border-top: 1px solid rgba(255, 255, 255, 0.05); */
}

.sd-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.sd-toggle {
    width: 30px;
    height: 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    position: relative;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.sd-toggle.sd-toggle-on {
    background: var(--modal-primary-color, #1e787b);
    /* border-color: var(--modal-primary-color, #1e787b); */
}

.sd-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: left 0.2s, background 0.2s;
}

.sd-toggle.sd-toggle-on .sd-toggle-knob {
    left: 16px;
    background: var(--accent-color);
}

.sd-toggle-label {
    font-size: 11px;
    color: rgba(168, 188, 188, 0.6);
    font-family: 'input_mono_medium', monospace;
    letter-spacing: 0.02em;
}
