:root {
    --color-header-background: #038C96;
    --color-background: #d6c3c9;
    --color-text: #111111;
    --color-primary: #0077cc;
    --color-secondary: #e0e0e0;
    --color-accent: #ffbc42;
    --color-border: #cccccc;

    --color-success-text: #ffffff;
    --color-success-background: #1dbc25;
    --color-success-border: #227217;

    --color-warning-text: #663c00;
    --color-warning-background: #fff4e5;
    --color-warning-border: #ffbc42;

    --color-error-text: #ffffff;
    --color-error-background: #ac4444;
    --color-error-border: #9a0000;

    /* WCAG focus indicator: visible outline for keyboard users */
    --focus-ring: 2px solid var(--color-primary);
    --focus-offset: 2px;
  }

  /* Skip link: visible only when focused (keyboard nav) */
  .skip-link {
    position: absolute;
    top: -3rem;
    left: 0.5rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--color-header-background);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: top 0.2s ease;
  }
  .skip-link:focus {
    top: 0.5rem;
    outline: 2px solid #fff;
    outline-offset: 2px;
  }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

  /* Keyboard focus (WCAG 2.4.7): visible focus ring */
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
  }
  .main-nav a:focus-visible {
    outline-color: #fff;
  }

/* Wrapper that holds the entire site content */
.page-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Main content pushes footer to bottom */
.container {
    flex: 1;
    padding: clamp(0.75rem, 3vw, 1.5rem);
    margin-top: 0.5rem;
    box-sizing: border-box;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.site-header {
    background-color: var(--color-header-background); 
    padding: 1rem 2rem; 
    color: var(--color-text); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
}

.flash {
    transition: opacity 0.5s ease, margin 0.5s ease, height 0.5s ease, padding 0.5s ease;
    height: auto;
    overflow: hidden;
}

.flash.success {
    background-color: var(--color-success-background);
    color: var(--color-success-text);
    border-left: 5px solid var(--color-success-border);
    border-radius: 6px;
    padding: 1rem;
    margin: 0 clamp(1rem, 5vw, 5rem) 1rem;
    position: relative;
}

.flash.warning {
    background-color: var(--color-warning-background);
    color: var(--color-warning-text);
    border-left: 5px solid var(--color-warning-border);
    border-radius: 6px;
    padding: 1rem;
    margin: 0 clamp(1rem, 5vw, 5rem) 1rem;
    position: relative;
}

.flash.error {
    background-color: var(--color-error-background);
    color: var(--color-error-text);
    border-left: 5px solid var(--color-error-border);
    border-radius: 6px;
    padding: 1rem;
    margin: 0 clamp(1rem, 5vw, 5rem) 1rem;
    position: relative;
}

.flash .close-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: inherit;
}

.error-box {
    text-align: center;
}

.site-title a {
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    letter-spacing: -0.5px;
    transition: opacity 0.2s ease;
}

.site-title a:hover {
    opacity: 0.9;
}

.site-logo {
    max-height: 2.5rem;
    vertical-align: middle;
}

.theme-toggle {
    margin-right: 1rem;
}

.theme-toggle .theme-btn {
    display: inline-flex;
    align-items: center;
    opacity: 0.5;
    text-decoration: none;
    padding: 0 0.2rem;
    font-size: 1.1rem;
}

.theme-toggle .theme-btn:hover,
.theme-toggle .theme-btn.active {
    opacity: 1;
}

.theme-toggle .theme-btn::after {
    display: none;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav .nav-logout-wrap {
    margin-left: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
  }
  .main-nav .nav-logout-wrap a {
    margin-left: 0;
  }
  .main-nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.2s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.main-nav a:hover {
    color: white;
}

.main-nav a.active {
    color: white;
    font-weight: 600;
}

.main-nav a.active::after {
    width: 100%;
    background-color: var(--color-accent);
}

.page-container {
    max-width: 960px;
    margin: auto;
    padding: 2rem;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-x: visible;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* Index / profile: expandable rows — primary columns only in .file-row-primary */
.file-list-expandable .file-row.file-header,
.file-list-expandable .file-row.file-row-primary {
    display: grid;
    gap: clamp(0.35rem, 1.5vw, 0.75rem);
    align-items: center;
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    word-break: break-word;
    min-width: min(100%, 560px);
    grid-template-columns: minmax(2rem, 2.5rem) 1fr 2.5fr minmax(4.5rem, 1fr);
}

.file-list-expandable .file-row.file-header {
    border-bottom: 1px solid var(--color-border, #ddd);
}

.file-list-expandable .file-row.file-row-primary {
    border-bottom: none;
}

.file-list-expandable.file-list-has-download .file-row.file-header,
.file-list-expandable.file-list-has-download .file-row.file-row-primary {
    grid-template-columns: minmax(2rem, 2.5rem) 1fr 2.5fr minmax(4.5rem, 1fr) minmax(6rem, 1.1fr);
    min-width: min(100%, 640px);
}

.file-list-expandable > .file-row-expandable:nth-child(even) .file-row-primary {
    background: var(--color-file-row-alt, rgba(0, 0, 0, 0.04));
}

.file-header > div {
    white-space: nowrap;
}

.file-row-dashboard.file-header > div,
.file-row-file-management.file-header > div {
    white-space: nowrap;
}

/* Index / profile expandable: right-align size column */
.file-list-expandable .file-row-primary > div:nth-child(4),
.file-list-expandable .file-row.file-header > div:nth-child(4) {
    text-align: right;
}

/* Dashboard “Your files” primary row: size column */
.file-row-dashboard-primary.file-header:has(#selectAll) > div:nth-child(5),
.file-row-expandable .file-row-dashboard-primary > div:nth-child(5) {
    text-align: right;
}

/* 5-column file-row-dashboard (Shared with you, Trash, etc.) */
.file-row-dashboard.file-header:not(:has(#selectAll)) > div:nth-child(4),
.file-row-dashboard.file-header:not(:has(#selectAll)) > div:nth-child(5),
.file-list > .file-row-dashboard:not(.file-header) > div:nth-child(4),
.file-list > .file-row-dashboard:not(.file-header) > div:nth-child(5) {
    text-align: right;
}

/* Admin file management primary: size & status */
.file-row-file-management-primary.file-header > div:nth-child(5),
.file-row-file-management-primary.file-header > div:nth-child(6),
.file-row-expandable .file-row-file-management-primary > div:nth-child(5),
.file-row-expandable .file-row-file-management-primary > div:nth-child(6) {
    text-align: right;
}

/* Shared-with-you primary: size */
.file-row-dashboard-shared.file-header > div:nth-child(3),
.file-row-expandable .file-row-dashboard-shared > div:nth-child(3) {
    text-align: right;
}

.utc-datetime,
.datetime-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.datetime-time {
    font-size: 0.9em;
    opacity: 0.9;
}

.file-row-details .utc-datetime,
.file-row-details .datetime-wrap {
    min-width: 0;
}

/* Default dashboard grid (Trash, storage partitions, etc.) */
.file-row-dashboard {
    grid-template-columns: 0.4fr minmax(4rem, 0.9fr) minmax(11rem, 2.5fr) minmax(8rem, 1.5fr) minmax(4rem, 0.8fr) minmax(2.5rem, 0.6fr) minmax(10rem, 1.25fr) minmax(10rem, 1.25fr) minmax(6rem, 1.2fr);
    display: grid;
    gap: clamp(0.35rem, 1.5vw, 0.5rem);
    align-items: center;
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    word-break: break-word;
    min-width: min(100%, 960px);
}
.file-row-dashboard.file-header {
    border-bottom: 1px solid var(--color-border, #ddd);
}

/* Dashboard “Your files”: primary row (toggle + checkbox + thumb + name + size + actions) */
.file-row-dashboard.file-row-dashboard-primary {
    grid-template-columns: minmax(2rem, 2.5rem) 0.4fr minmax(4rem, 0.9fr) minmax(11rem, 2.5fr) minmax(4rem, 0.8fr) minmax(6rem, 1.2fr);
    min-width: min(100%, 720px);
}

/* Shared with you: primary (toggle + filename + size + actions) */
.file-row-dashboard.file-row-dashboard-primary.file-row-dashboard-shared {
    grid-template-columns: minmax(2rem, 2.5rem) minmax(11rem, 2fr) minmax(4rem, 0.8fr) minmax(6rem, 1.2fr);
    min-width: min(100%, 560px);
}

.file-list > .file-row-expandable:nth-child(even) .file-row-dashboard-primary {
    background: var(--color-file-row-alt, rgba(0, 0, 0, 0.04));
}

.file-list > .file-row-expandable .file-row-dashboard-primary {
    border-bottom: none;
}

/* Shared with you list: alternate data rows */
.file-list > .file-row-expandable:nth-child(even) .file-row-dashboard-shared {
    background: var(--color-file-row-alt, rgba(0, 0, 0, 0.04));
}

/* Non-expandable dashboard rows (Trash, storage partitions, etc.) */
.file-list > .file-row-dashboard:not(.file-header):nth-child(even) {
    background: var(--color-file-row-alt, rgba(0, 0, 0, 0.04));
}

.file-row-checksums {
    padding: 0.5rem 0 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--color-border, #ddd);
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    background: transparent;
}
.file-row-details .file-row-checksums {
    padding: 0.5rem 0 0;
    margin-top: 0.75rem;
    border-top: 1px solid var(--color-border, #ddd);
    border-bottom: none;
}
.file-row-checksums .checksum-none {
    color: var(--color-border);
}

/* Expandable row UI */
.file-row-expandable {
    border-bottom: 1px solid var(--color-border, #ddd);
}

.file-row-expandable .file-row-file-management-primary {
    border-bottom: none;
}

.file-row-toggle-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.file-row-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 4px;
    background: var(--color-secondary, #e8e8e8);
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.file-row-toggle:hover {
    background: var(--color-background, #fff);
}

.file-row-toggle:focus-visible {
    outline: var(--focus-ring, 2px solid var(--color-primary));
    outline-offset: 2px;
}

.file-row-toggle-icon {
    display: inline-block;
    line-height: 1;
    transition: transform 0.2s ease;
}

.file-row-expandable.is-expanded .file-row-toggle-icon {
    transform: rotate(90deg);
}

.file-row-details {
    padding: 0 clamp(0.5rem, 1.5vw, 0.75rem) 0.75rem;
    padding-left: calc(clamp(0.5rem, 1.5vw, 0.75rem) + 2rem);
    background: rgba(0, 0, 0, 0.02);
}

.file-row-details[hidden] {
    display: none !important;
}

.file-row-details-inner {
    max-width: 100%;
}

.file-details-grid {
    display: grid;
    grid-template-columns: minmax(5rem, auto) 1fr;
    gap: 0.35rem 1rem;
    margin: 0;
    padding: 0.65rem 0 0;
    font-size: clamp(0.8rem, 1.5vw, 0.92rem);
    align-items: baseline;
}

.file-details-grid dt {
    margin: 0;
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.85;
}

.file-details-grid dd {
    margin: 0;
    min-width: 0;
}

@media (max-width: 520px) {
    .file-details-grid {
        grid-template-columns: 1fr;
    }
    .file-details-grid dt {
        margin-top: 0.35rem;
    }
    .file-details-grid dt:first-child {
        margin-top: 0;
    }
}
.file-list {
    min-width: min(100%, 960px);
}

@media (max-width: 640px) {
    .file-list-expandable .file-row.file-header,
    .file-list-expandable .file-row.file-row-primary {
        min-width: 480px;
    }
    .file-list-expandable.file-list-has-download .file-row.file-header,
    .file-list-expandable.file-list-has-download .file-row.file-row-primary {
        min-width: 540px;
    }
    .file-row-dashboard-primary {
        min-width: 560px;
    }
}

.file-row-user-management {
    grid-template-columns: 1.5fr 1.5fr 3fr 1fr 1fr 1.5fr 1fr;
    display: grid;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #ddd;
    font-size: 0.95rem;
    word-break: break-word;
}

.file-row-file-management {
    display: grid;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border, #ddd);
    font-size: 0.95rem;
    word-break: break-word;
    min-width: 0;
}

/* Admin File Management: primary columns (expand for type, downloads, dates) */
.file-row-file-management.file-row-file-management-primary {
    grid-template-columns:
        minmax(2rem, 2.35rem)
        minmax(0, 1.1fr)
        minmax(2.75rem, 3.75rem)
        minmax(0, 1.75fr)
        minmax(4.25rem, 0.65fr)
        minmax(5.25rem, 0.55fr)
        minmax(5.5rem, 0.75fr)
        minmax(10.25rem, 1.2fr);
    align-items: center;
}

/* Admin file table: grid children participate in minmax(0) shrink + ellipsis */
.file-list-admin .file-row-file-management-primary > div {
    min-width: 0;
}

.file-list-admin .file-row-toggle-cell {
    min-width: 2rem;
}

.file-list-admin .file-row-file-management-primary > div:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-list-admin .file-preview-cell {
    min-width: 2.75rem;
    max-width: 3.75rem;
}

.file-list-admin .file-preview-cell .thumbnail-small {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.file-list-admin .file-name-cell {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.file-list-admin .file-name-cell > .file-icon {
    flex-shrink: 0;
}

.file-list-admin .file-name-cell > span[title] {
    flex: 1 1 auto;
    min-width: 0;
}

.file-list-admin .file-mgmt-reports-cell {
    font-size: 0.85rem;
    line-height: 1.35;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    align-content: flex-start;
}

.file-list-admin .file-mgmt-report-pill {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
}

.file-list-admin .file-mgmt-report-pill .badge {
    font-size: 0.72rem;
    padding: 0.12rem 0.35rem;
    font-weight: 600;
}

.file-row-file-management .utc-datetime,
.file-row-file-management .datetime-wrap {
    white-space: nowrap;
}

.file-name-cell {
    min-width: 0;
}

.file-name-cell span {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.file-preview-cell {
    text-align: center;
}

/* Admin File Management layout */
.admin-file-management {
    min-width: 0;
    max-width: 100%;
}

.admin-file-management .page-title {
    text-align: left;
    margin-bottom: 0;
}

.file-mgmt-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.file-mgmt-summary {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
}

.file-mgmt-stat {
    color: var(--color-text);
}

.file-mgmt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.file-mgmt-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-mgmt-filter .file-mgmt-filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 0.25rem;
}

.file-mgmt-summary .file-mgmt-filter-label {
    font-size: 0.85rem;
    opacity: 0.85;
}

.file-mgmt-purge-form {
    display: inline-block;
    margin-left: auto;
}

.file-mgmt-empty {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--color-secondary);
    border-radius: 8px;
    border: 1px dashed var(--color-border);
}

/* Reports & moderation (admin) — uses .file-row-file-management base padding, gap, border, font-size */
.admin-reports {
    min-width: 0;
    max-width: 100%;
}

.admin-reports-toolbar {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.admin-reports-pagination {
    margin-top: 1rem;
    gap: 0.35rem;
}

.admin-reports-filter-banner {
    margin-bottom: 0.75rem;
}

.admin-reports .file-list-admin.file-list-reports {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

/* Reports table: toggle + primary columns; details in expandable panel */
.file-row-file-management.file-row-reports.file-row-reports-primary {
    grid-template-columns:
        minmax(2rem, 2.35rem)
        minmax(10.5rem, 1.2fr)
        minmax(5rem, 0.75fr)
        minmax(0, 1.15fr)
        minmax(4.25rem, 0.55fr)
        minmax(7.25rem, 0.7fr);
    width: 100%;
    min-width: min(100%, 48rem);
    max-width: 100%;
    box-sizing: border-box;
    align-items: center;
}

.file-list-reports .file-row-expandable .file-row-reports-primary {
    border-bottom: none;
}

.file-list-reports > .file-row-expandable:nth-child(even) .file-row-reports-primary {
    background: var(--color-file-row-alt, rgba(0, 0, 0, 0.04));
}

.file-list-reports .file-row-reports-primary > div {
    min-width: 0;
}

.file-list-reports .file-row-reports-time {
    white-space: nowrap;
}

.file-list-reports .file-row-reports-file {
    text-align: right;
}

.file-list-reports .file-header.file-row-reports-primary .file-row-reports-file {
    text-align: right;
}

.file-list-reports .file-row-reports-status {
    text-align: center;
    white-space: nowrap;
}

.file-list-reports .file-row-reports-status .badge {
    white-space: nowrap;
}

.file-list-reports .file-row-reports-reporter {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list-reports .file-row-details-reports {
    padding-left: calc(clamp(0.5rem, 1.5vw, 0.75rem) + 2rem);
    padding-right: clamp(0.5rem, 1.5vw, 0.75rem);
}

.admin-reports-details-inner {
    max-width: 100%;
}

.admin-reports-detail-meta {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
}

.admin-reports-detail-label {
    font-weight: 600;
    opacity: 0.85;
    margin-right: 0.35rem;
}

.admin-reports-details-dl.file-details-grid {
    grid-template-columns: minmax(6rem, auto) minmax(0, 1fr);
    padding-top: 0;
}

.admin-reports-details-text {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
}

.admin-reports-moderation-dd {
    min-width: 0;
}

.admin-reports-closed-review {
    font-size: 0.92rem;
    line-height: 1.45;
}

.admin-reports-closed-line {
    margin: 0 0 0.35rem;
}

.admin-reports-moderation-form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-reports-review-note {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    resize: vertical;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--color-border, #ccc);
    border-radius: 4px;
    font: inherit;
    background: var(--color-background, #fff);
    color: var(--color-text);
}

.admin-reports-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.file-list-admin .file-header > div {
    white-space: nowrap;
}

.file-list.file-list-admin {
    min-width: 0;
    max-width: 100%;
}

.file-list-admin {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.5rem;
    box-sizing: border-box;
}

.file-list-admin .file-row-file-management {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Prevent ultra-narrow columns from collapsing the layout; scroll horizontally if needed */
.file-list-admin .file-row-file-management-primary {
    min-width: min(100%, 52rem);
}
.file-list-admin > .file-row-expandable:nth-child(even) .file-row-file-management-primary {
    background: var(--color-file-row-alt, rgba(0, 0, 0, 0.04));
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-row-file-management .file-actions {
    flex-shrink: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.file-list-admin .file-row-file-management .file-actions .btn-small {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.file-row-file-management > div:last-child {
    padding-right: 0.25rem;
    min-width: 0;
}

/* Actions dropdown (Your Files) – overlay on top, no table scroll */
.file-actions-dropdown {
    position: relative;
    display: inline-block;
    overflow: visible;
}
.file-row-dashboard .file-actions,
.file-row-expandable .file-row-dashboard .file-actions {
    overflow: visible;
}
.file-actions-dropdown summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.file-actions-dropdown summary::-webkit-details-marker { display: none; }
.file-actions-dropdown summary .dropdown-arrow {
    font-size: 0.7em;
    opacity: 0.8;
}
.file-actions-dropdown .dropdown-menu {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0.25rem;
    min-width: 10rem;
    background: var(--color-box-background, #fff);
    border: 1px solid var(--color-border, #ddd);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 0.35rem 0;
    overflow: hidden;
}
.file-actions-dropdown .dropdown-item,
.file-actions-dropdown .dropdown-item-form {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    color: var(--color-text, #111);
    text-decoration: none;
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.file-actions-dropdown .dropdown-item-form {
    margin: 0;
    padding: 0;
}
.file-actions-dropdown .dropdown-item-form .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    text-align: left;
    box-sizing: border-box;
}
.file-actions-dropdown .dropdown-menu > .dropdown-item:first-child,
.file-actions-dropdown .dropdown-menu > .dropdown-item-form:first-child .dropdown-item {
    border-radius: 4px 4px 0 0;
}
.file-actions-dropdown .dropdown-menu > .dropdown-item:last-child,
.file-actions-dropdown .dropdown-menu > .dropdown-item-form:last-child .dropdown-item {
    border-radius: 0 0 4px 4px;
}
.file-actions-dropdown .dropdown-item:hover,
.file-actions-dropdown .dropdown-item-form .dropdown-item:hover {
    background: rgba(0,0,0,0.06);
}
.file-actions-dropdown .dropdown-item-danger {
    color: var(--color-error-background, #ac4444);
}
.file-actions-dropdown .dropdown-item-danger:hover {
    background: rgba(172, 68, 68, 0.1);
}
.file-actions-dropdown .dropdown-item-muted {
    color: var(--color-text);
    opacity: 0.8;
    cursor: default;
    font-size: 0.875rem;
}
.file-actions-dropdown .dropdown-item-muted:hover {
    background: transparent;
}

/* Bulk actions bar */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.bulk-actions-bar .bulk-label {
    font-weight: 600;
    font-size: 0.9rem;
}
.bulk-actions-bar .bulk-select {
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    border: 1px solid var(--color-border, #ccc);
    font-size: 0.9rem;
    min-width: 12rem;
}

/* Checksum row: label + copy on one line, hash below when clicked */
.file-row-checksums {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    align-items: flex-start;
}
.file-row-checksums .checksum-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.file-row-checksums .checksum-line {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.file-row-checksums .hash-label {
    background-color: var(--color-header-background);
    color: #fff;
    border: none;
    padding: 0.35rem 0.6rem;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.file-row-checksums .hash-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 140, 150, 0.35);
}
.file-row-checksums .hash-value {
    display: none;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    background: rgba(0,0,0,0.06);
    border-radius: 4px;
    word-break: break-all;
    max-width: 72ch;
    margin-left: 0;
}
.file-row-checksums .hash-value.visible {
    display: block;
}

.file-header {
    font-weight: bold;
    background-color: #f5f5f5;
}

.file-row > div {
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.icon {
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}

.file-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 0.3rem;
}

.file-icon .icon,
.file-icon-svg {
    width: 1.2em;
    height: 1.2em;
}

.file-icon-img {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
}

.theme-toggle .icon {
    width: 1.1rem;
    height: 1.1rem;
}

.upload-hero-icon .icon {
    width: 1em;
    height: 1em;
}

.drop-zone-icon .icon {
    width: 1em;
    height: 1em;
}

.flash .close-btn .icon {
    width: 1rem;
    height: 1rem;
}

.flash .close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon .icon {
    width: 1em;
    height: 1em;
}

.btn-copy .icon {
    width: 1em;
    height: 1em;
}

.page-title .icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.2em;
}

.success .icon,
.stats-alert .icon,
.flash.warning .icon {
    vertical-align: -0.25em;
    margin-right: 0.25em;
}

.onetimelink-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 1rem 0;
}

.onetimelink-input {
    flex: 1;
    padding: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.qr-image {
    display: block;
    margin: 0.5rem 0;
}

.btn-copy {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    font-size: 0.9rem;
    color: var(--color-text, #111);
}
.btn-copy .icon {
    fill: currentColor;
}

.thumbnail-small {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: auto;
    object-fit: contain;
}

.page-section {
    max-width: min(1200px, 92vw);
    width: 100%;
    margin: 0 auto;
    padding: 1rem clamp(1rem, 4vw, 2rem);
    background: var(--color-box-background, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

.tos-block {
    padding: 1rem;
    margin: 1rem 0;
    background: var(--color-secondary);
    border-radius: 6px;
    border-left: 4px solid var(--color-primary);
}

.tos-text {
    margin-bottom: 0.75rem;
    max-height: 150px;
    overflow-y: auto;
}

.tos-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-banner {
    padding: 1rem;
    margin: 1rem 0;
    background: var(--color-secondary);
    border-radius: 6px;
    border-left: 4px solid var(--color-primary);
}

.page-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.page-description {
    margin: 0 0 1.25rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.5;
    color: var(--color-text);
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .page-title {
        text-align: left;
    }
    .page-description {
        text-align: left;
        margin-left: 0;
    }
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 3rem;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 0.3rem;
    display: block;
}

.form-group input,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--color-border, #ccc);
    border-radius: 4px;
    background-color: #fff;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 5rem;
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
    align-items: center;
}

.form-grid h4 {
    grid-column: 1 / -1;
    margin-top: 2rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
}

/* Admin Settings - Card layout */
.admin-settings .page-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-card {
    background: var(--color-secondary);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}

.settings-card-title {
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(0,0,0,0.04);
    border-bottom: 1px solid var(--color-border);
}

.settings-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

  /* Profile statistics grid */
  .profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem 1.5rem;
  }
  .profile-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  .profile-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-header-background);
  }
  .profile-stat-label {
    font-size: 0.85rem;
    color: var(--color-text);
    opacity: 0.9;
  }
  .profile-stats-subtitle {
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
  }
  .profile-stats-list {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
  }
  .profile-stats-list:last-of-type {
    margin-bottom: 0;
  }
  .profile-stats-list li {
    margin-bottom: 0.35rem;
  }

  .profile-public-username {
    margin: -0.5rem 0 1rem;
    font-size: 1rem;
    opacity: 0.85;
  }

  .profile-public-head {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }
  .profile-public-avatar {
    flex-shrink: 0;
  }
  .profile-public-avatar .profile-avatar-img,
  .profile-avatar-preview .profile-avatar-img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--color-border, #ccc);
  }
  .profile-avatar-preview {
    margin-bottom: 0.75rem;
  }
  .profile-public-bio {
    line-height: 1.5;
    color: var(--color-text);
    white-space: pre-wrap;
  }
  .profile-avatar-group .form-group {
    margin-bottom: 0.75rem;
  }
  .profile-avatar-group .form-group.settings-row-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    white-space: nowrap;
  }

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1rem;
    align-items: center;
}

.settings-row label {
    font-weight: 500;
    font-size: 0.95rem;
}

.settings-row input,
.settings-row select,
.settings-row textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.settings-row-checkbox {
    grid-template-columns: 1fr;
}

.settings-row-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-row-split {
    grid-template-columns: minmax(140px, 1fr) minmax(120px, 1.2fr);
}

.settings-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.settings-hint {
    margin: -0.5rem 0 0;
    font-size: 0.85rem;
    opacity: 0.85;
}

.settings-unit {
    font-weight: normal;
    opacity: 0.8;
}

.settings-input-with-unit {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.settings-input-with-unit input {
    flex: 1;
    min-width: 0;
}

.settings-input-with-unit select {
    flex-shrink: 0;
    min-width: 5rem;
}

.settings-hint-server {
    margin-top: 0.25rem;
}

.settings-hint-server code {
    font-size: 0.9em;
}

.settings-form-actions {
    padding-top: 0.5rem;
}

@media (max-width: 640px) {
    .settings-row,
    .settings-row-split {
        grid-template-columns: 1fr;
    }
}

.btn {
    padding: 0.7rem;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--color-header-background);
    color: #fff;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 140, 150, 0.35);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: var(--color-header-background);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 140, 150, 0.35);
}
a.btn-small {
    display: inline-block;
}
.file-list .btn-small,
.file-row .btn-small,
.file-row-dashboard .btn-small {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-danger {
    background-color: var(--color-error);
    color: white;
}

.btn-danger:hover {
    background-color: #a30000;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 600;
}
.badge-pending {
    background: var(--color-warning, #e6a800);
    color: #1a1a1a;
}
.badge-ok {
    background: var(--color-success, #0d7d0d);
    color: white;
}
.badge-warning {
    background: #b8860b;
    color: #1a1a1a;
}

/* Upload page */
.upload-page .page-title {
    margin-bottom: 0.25rem;
}

.upload-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.upload-hero-icon {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.upload-subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    color: var(--color-text);
    opacity: 0.85;
    margin: 0;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
}

.drop-zone {
    border: 2px dashed var(--color-primary, #038C96);
    padding: clamp(2rem, 8vw, 4rem) clamp(1.5rem, 4vw, 3rem);
    text-align: center;
    cursor: pointer;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(3, 140, 150, 0.04) 0%, rgba(3, 140, 150, 0.08) 100%);
    color: var(--color-text);
    transition: all 0.25s ease;
}

.drop-zone:hover {
    border-color: var(--color-accent, #ffbc42);
    background: linear-gradient(135deg, rgba(255, 188, 66, 0.06) 0%, rgba(255, 188, 66, 0.12) 100%);
}

.drop-zone.dragover {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(3, 140, 150, 0.12) 0%, rgba(3, 140, 150, 0.18) 100%);
    transform: scale(1.01);
}

.drop-zone-icon {
    display: block;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.drop-zone-text {
    display: block;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.drop-zone-hint {
    display: block;
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 0.35rem;
}

.upload-meta {
    margin: -0.5rem 0 0;
}

.upload-meta small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.upload-accepted-types {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    background: var(--color-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.upload-accepted-types-summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.upload-accepted-types-summary::-webkit-details-marker {
    display: none;
}

.upload-accepted-types-summary::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform 0.2s ease;
}

.upload-accepted-types[open] .upload-accepted-types-summary::before {
    transform: rotate(90deg);
}

.upload-accepted-types-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.upload-accepted-types-intro {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.upload-accepted-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.upload-accepted-types-category {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.upload-accepted-types-category strong {
    font-size: 0.85rem;
    color: var(--color-text);
}

.upload-accepted-types-exts {
    font-size: 0.8rem;
    font-family: var(--font-mono, ui-monospace, monospace);
    opacity: 0.9;
    word-break: break-word;
}

.upload-accepted-types-note {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.85;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: 0;
}

.upload-preview .preview-item {
    margin-bottom: 0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.upload-preview .preview-item img {
    height: 48px;
    width: auto;
    border-radius: 4px;
    object-fit: cover;
}

.upload-result {
    display: none;
}

.upload-result:not(:empty) {
    display: block;
}

.upload-options-block {
    padding: 1.25rem;
    background: var(--color-secondary);
    border-radius: 10px;
    border: 1px solid var(--color-border);
}

.upload-options-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.upload-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.upload-option label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.upload-option select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.95rem;
}

.upload-option-checkbox small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    opacity: 0.85;
    font-weight: normal;
}

/* Reusable progress bar (upload, admin updater, etc.) */
.progress-bar-block {
    padding: 1rem;
    background: rgba(3, 140, 150, 0.08);
    border-radius: 8px;
}

.progress-bar-block progress {
    width: 100%;
    height: 8px;
    border-radius: 4px;
}

.progress-bar-block progress:indeterminate {
    animation: progress-indeterminate 1.2s ease-in-out infinite;
}

@keyframes progress-indeterminate {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.progress-bar-block .progress-bar-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Legacy upload page (uses progress-bar-block via include; keep for #progressText) */
.upload-progress {
    padding: 1rem;
    background: rgba(3, 140, 150, 0.08);
    border-radius: 8px;
}

.upload-progress progress {
    width: 100%;
    height: 8px;
    border-radius: 4px;
}

.upload-progress #progressText,
.upload-progress .progress-bar-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.upload-submit-wrap {
    text-align: center;
}

.btn-upload-submit {
    padding: 0.85rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
}


.preview-list {
    margin-top: 1rem;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--color-secondary, #f9f9f9);
    border-radius: 4px;
    border: 1px solid var(--border-color, #ccc);
}

.preview-thumbnail {
    height: 100px;
    border-radius: 4px;
    object-fit: cover;
}

.admin-layout {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.admin-sidebar {
    min-width: 200px;
    flex-shrink: 0;
}

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

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: var(--color-text);
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background-color: var(--color-secondary);
    color: var(--color-header-background);
}

.admin-content {
    flex: 1;
    min-width: 0;
}

/* Stats overview */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--color-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--color-border);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-header-background);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text);
    margin-top: 0.3rem;
}

.stat-subtitle {
    margin: 2rem 0 1rem;
    font-size: 1.1rem;
}

.stat-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.stat-table {
    width: 100%;
    border-collapse: collapse;
}

.stat-table th,
.stat-table td {
    padding: 0.6rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.stat-table th {
    background: var(--color-secondary);
    font-weight: 600;
}

.stats-alert {
    padding: 1rem;
    background: var(--color-warning-background);
    border-left: 4px solid var(--color-warning-border);
    border-radius: 4px;
    margin: 1.5rem 0;
}

.stats-alert a {
    margin-left: 0.5rem;
}

.changelog-box,
.share-list {
    list-style: none;
    padding: 0;
}
.share-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Markdown output from basic_markdown() (release notes & changelog) */
.release-notes {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.release-notes h1,
.release-notes h2,
.release-notes h3,
.release-notes h4 {
    margin: 1.1rem 0 0.4rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

.release-notes h1:first-child,
.release-notes h2:first-child,
.release-notes h3:first-child,
.release-notes h4:first-child {
    margin-top: 0;
}

.release-notes h1 {
    font-size: 1.35rem;
}

.release-notes h2 {
    font-size: 1.2rem;
}

.release-notes h3 {
    font-size: 1.08rem;
}

.release-notes h4 {
    font-size: 1rem;
}

.release-notes p {
    margin: 0.5rem 0;
}

.release-notes p:first-child {
    margin-top: 0;
}

.release-notes p:last-child {
    margin-bottom: 0;
}

.release-notes ul,
.release-notes ol {
    margin: 0.5rem 0;
    padding-left: 1.35rem;
}

.release-notes li {
    margin: 0.25rem 0;
}

.release-notes pre {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9em;
}

.release-notes code {
    font-size: 0.9em;
    padding: 0.12em 0.35em;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
}

.release-notes pre code {
    padding: 0;
    background: none;
}

.release-notes hr {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid var(--color-border);
}

.release-notes-box {
    background-color: #222;
    color: #eee;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-family: monospace;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow-x: auto;
    max-width: 100%;
}


/* FOOTER */
footer {
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    background-color: var(--color-header-background); 
    border-top: 1px solid var(--color-border, #ddd);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.5);
}
