/* Somnus - custom styles on top of Mifty (light theme) */

:root {
    --somnus-primary: #6d4aff;
    --somnus-primary-2: #4f46e5;
}

/* brand ------------------------------------------------------------------ */
.somnus-logo-sm {
    height: 26px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
}

.somnus-logo-lg {
    height: 28px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.brand {
    padding: 0 14px;
}

.avatar-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--somnus-primary), var(--somnus-primary-2));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* dropzone --------------------------------------------------------------- */
.dropzone {
    border: 2px dashed #d5d9e4;
    border-radius: 12px;
    padding: 42px 24px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    background: #fbfbfe;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--somnus-primary);
    background: #f4f1ff;
}

/* code blocks ------------------------------------------------------------ */
.code-block {
    background: #141824;
    color: #dfe3ef;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    overflow-x: auto;
    margin-bottom: 0;
}

.code-block code {
    color: inherit;
    background: transparent;
    white-space: pre;
}

/* progress bars ---------------------------------------------------------- */
.progress {
    background-color: #eef0f6;
}

.progress-bar {
    background: linear-gradient(90deg, var(--somnus-primary), var(--somnus-primary-2));
}

/* tables ----------------------------------------------------------------- */
.table > :not(caption) > * > * {
    vertical-align: middle;
}

.file-name-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.token-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

/* auth pages ------------------------------------------------------------- */
.auth-header-box {
    background: #1c1f2b !important;
}

/* plan cards ------------------------------------------------------------- */
.card.border-primary {
    box-shadow: 0 0 0 1px rgba(109, 74, 255, 0.35);
}

/* upload progress --------------------------------------------------------- */
#upload-bar {
    transition: width 0.35s ease;
}

/* share page -------------------------------------------------------------- */
.share-page {
    min-height: calc(100vh - 61px);
    background: #f4f5fa;
    padding: 24px 16px;
}

/* share card inside the site chrome (public navbar / app sidebar) */
.share-wrap {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

.page-content .share-wrap {
    margin: 2.5rem auto;
}

.share-card {
    max-width: 460px;
    width: 100%;
    border: none;
    border-radius: 16px;
}

.share-icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    background: rgba(109, 74, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-icon i {
    font-size: 34px;
    color: var(--somnus-primary);
}

[data-bs-theme="dark"] .share-page {
    background: #14161f;
}

[data-bs-theme="dark"] .share-icon {
    background: rgba(109, 74, 255, 0.18);
}

/* collapsed sidebar: icon-only, drop the storage widget so nothing overflows */
body[data-sidebar-size="collapsed"] .storage-widget,
body[data-sidebar-size="collapsed"] .storage-label {
    display: none;
}

/* collapsed: center the cloud icon in the narrow rail */
body[data-sidebar-size="collapsed"] .startbar:not(:hover) .brand .logo {
    justify-content: center;
}

/* dark theme ------------------------------------------------------------- */
/* the logo has dark lettering - flip it to white so it stays readable */
[data-bs-theme="dark"] .brand img,
[data-bs-theme="dark"] .navbar-brand img {
    filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] .dropzone {
    background: #191c26;
    border-color: #2d3242;
}

[data-bs-theme="dark"] .dropzone:hover,
[data-bs-theme="dark"] .dropzone.dragover {
    background: #20242f;
    border-color: var(--somnus-primary);
}

[data-bs-theme="dark"] .progress {
    background-color: #232734;
}

[data-bs-theme="dark"] .code-block {
    background: #0e111a;
}

/* misc ------------------------------------------------------------------- */
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fs-22 { font-size: 22px; }

.thumb-md,
.rounded-circle.bg-primary-subtle,
.rounded-circle.bg-success-subtle,
.rounded-circle.bg-info-subtle,
.rounded-circle.bg-warning-subtle {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #7c8298;
    font-weight: 600;
}

.hero-title {
    background: linear-gradient(120deg, var(--somnus-primary), var(--somnus-primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
