
html, body {
    margin: 0;
    padding: 0;
    background: #f6f8fc;
    color: #22303c;
    font: 14px/1.5 Inter, Arial, Helvetica, sans-serif;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page {
    max-width: 1660px;
    margin: 22px auto 32px;
    padding: 0 18px;
}

.topline,
.pathbar,
.tools,
.flash {
    margin-bottom: 14px;
}

.topline {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    border: 1px solid #d7e1ef;
    background: #ffffff;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.toplinks,
.options,
.options-cell,
.nowrap {
    white-space: nowrap;
}

.toplinks a,
.pathbar a,
.mini-links a,
.options a {
    margin-right: 10px;
}

.pathbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #d7e1ef;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.right-note {
    float: right;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.compact-form {
    margin-top: 0;
}

input,
select,
textarea,
button {
    font: inherit;
    color: #1f2937;
    border: 1px solid #cdd8e7;
    background: #ffffff;
    border-radius: 10px;
    box-sizing: border-box;
}

input,
select,
textarea {
    padding: 8px 10px;
}

button {
    padding: 8px 13px;
    cursor: pointer;
    background: #eff6ff;
    border-color: #bfd3fb;
}

button:hover,
.vis-button:hover,
.ghost-button:hover {
    background: #e7f0ff;
    text-decoration: none;
}

.ghost-button {
    padding: 7px 12px;
    background: #f8fbff;
    color: #334155;
}

.flash {
    padding: 10px 12px;
    border: 1px solid #d7e1ef;
    background: #ffffff;
    border-radius: 12px;
}

.flash.error {
    border-color: #f0c9cf;
    background: #fff5f6;
    color: #9f2332;
}

.flash.success {
    border-color: #cce7d6;
    background: #f3fff7;
    color: #21683f;
}

.muted {
    color: #6b7280;
}

.tools {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-dropzone {
    padding: 14px;
    border: 1px solid #d7e1ef;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.upload-dropzone.drag-over,
.drag-over {
    background: #f0f7ff;
    outline: 2px dashed #7aa6f8;
}

.upload-drop-title {
    font-weight: 700;
    font-size: 15px;
}

.upload-drop-sub,
.helper-line {
    margin-top: 4px;
}

.file-table,
.inner-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border: 1px solid #d7e1ef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.file-table th,
.file-table td,
.inner-table th,
.inner-table td {
    padding: 10px 10px;
    border-bottom: 1px solid #e7edf5;
    text-align: left;
    vertical-align: top;
}

.file-table tr:last-child td,
.inner-table tr:last-child td {
    border-bottom: 0;
}

.file-table th,
.inner-table th {
    font-weight: 700;
    background: #f8fbff;
    color: #334155;
}

.folder-row {
    background: #fcfdff;
}

.parent-row {
    background: #f8fbff;
}

.dragging {
    opacity: 0.5;
}

.thumb {
    display: block;
    width: 76px;
    max-width: 76px;
    max-height: 52px;
    object-fit: cover;
    border: 1px solid #d7e1ef;
    border-radius: 8px;
    background: #ffffff;
}

.player {
    width: 126px;
    height: 70px;
    background: #000;
    border-radius: 8px;
}

.audio-player {
    width: 126px;
    height: 30px;
}

.text-preview {
    margin: 0;
    width: 150px;
    max-width: 150px;
    max-height: 58px;
    overflow: auto;
    border: 1px solid #d7e1ef;
    border-radius: 8px;
    padding: 6px;
    background: #f8fbff;
    font: 11px/1.35 Consolas, Monaco, monospace;
    white-space: pre-wrap;
}

.visibility-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.vis-button {
    display: inline-block;
    padding: 3px 9px;
    border: 1px solid #cfdae9;
    border-radius: 999px;
    background: #ffffff;
    color: #4b5563;
    min-width: 58px;
    text-align: center;
}

.vis-button.active {
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.vis-private.active {
    border-color: #94a3b8;
    background: #334155;
    color: #ffffff;
}

.vis-hidden.active {
    border-color: #d6a74e;
    background: #f59e0b;
    color: #ffffff;
}

.vis-public.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.mark-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.protected-pill {
    background: #fff4d8;
    color: #8a6116;
    border: 1px solid #f0ddaa;
}

.upload-pill {
    background: #e7f8ee;
    color: #17603a;
    border: 1px solid #b8e7c8;
}

.mini-links {
    margin-top: 4px;
}

.upload-list {
    margin-top: 10px;
}

.upload-row {
    display: grid;
    grid-template-columns: minmax(160px, 320px) minmax(150px, 240px) minmax(90px, 180px) minmax(180px, 260px);
    gap: 10px;
    align-items: center;
    margin: 6px 0;
}

.upload-row .name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-row .bar {
    position: relative;
    width: 100%;
    height: 10px;
    border: 1px solid #d7e1ef;
    border-radius: 999px;
    background: #eff4fa;
    overflow: hidden;
}

.upload-row .bar i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.upload-row.failed .bar i {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.login-box {
    width: 380px;
    max-width: calc(100% - 24px);
    margin: 46px auto;
    border: 1px solid #d7e1ef;
    padding: 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.narrow-box {
    width: 340px;
}

.login-box h1 {
    margin: 0 0 10px;
    font-size: 22px;
}

.login-box form,
.editor-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(15, 23, 42, 0.36);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}


body.modal-open .bulk-toolbar {
    display: none !important;
}
body.modal-open .actions-dropdown {
    z-index: 1 !important;
}
body.modal-open .table-shell,
body.modal-open .file-table {
    position: relative;
    z-index: 1;
}
.modal.hidden {
    display: none;
}

.modal-box {
    position: relative;
    z-index: 3001;
    width: min(1080px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid #d7e1ef;
    background: #f9fbff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14);
}

.wide-box {
    width: min(1220px, 100%);
}

.editor-head,
.modal-header-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

textarea {
    width: 100%;
    min-height: 68vh;
    resize: vertical;
    font: 12px/1.5 Consolas, Monaco, monospace;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.left-actions {
    justify-content: flex-start;
}

.panel-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-card {
    border: 1px solid #d7e1ef;
    background: #ffffff;
    border-radius: 14px;
    padding: 12px;
}

.section-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.action-link {
    display: inline-flex;
    align-items: center;
    margin: 2px 8px 2px 0;
}

.danger-link {
    color: #c2410c;
}

code {
    font: 12px/1.4 Consolas, Monaco, monospace;
    background: #f4f7fb;
    border: 1px solid #dbe5f1;
    padding: 2px 6px;
    border-radius: 6px;
}

@media (max-width: 1100px) {
    .file-table {
        font-size: 12px;
    }

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

    .grid-two {
        grid-template-columns: 1fr;
    }

    .topline {
        flex-direction: column;
        align-items: flex-start;
    }
}


.crumb-sep {
    color: #94a3b8;
    font-weight: 700;
}

.option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.action-button {
    padding: 6px 10px;
    border: 1px solid #d7e1ef;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.action-button:hover {
    background: #eef4ff;
    border-color: #bfd3fb;
    text-decoration: none;
}

.option-note {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px dashed #d6dce6;
    border-radius: 10px;
    background: #f8fafc;
}


.share-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
    margin-bottom: 16px;
}

.share-card {
    border: 1px solid #d7e1ef;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    padding: 14px;
}

.share-preview-box {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fbff;
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    overflow: hidden;
}

.share-image,
.share-video,
.share-frame {
    width: 100%;
    max-width: 100%;
    border: 0;
}

.share-video,
.share-frame {
    min-height: 440px;
    background: #000;
}

.share-audio {
    width: min(460px, 100%);
}

.share-text {
    width: 100%;
    max-height: 520px;
    overflow: auto;
    margin: 0;
    padding: 14px;
    background: #ffffff;
    font: 12px/1.5 Consolas, Monaco, monospace;
}

.share-empty-preview {
    padding: 24px;
}

.share-meta-grid {
    display: grid;
    gap: 12px;
}

.share-meta-grid > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.share-actions,
.share-folder-tools {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hidden {
    display: none !important;
}

/* refreshed compact admin layout */
.page.admin-page, .page.public-page { max-width: 1760px; }
.compact-table { table-layout: fixed; }
.compact-table .col-name { width: 24%; }
.compact-table .col-date { width: 10%; }
.compact-table .col-size { width: 8%; }
.compact-table .col-preview { width: 10%; }
.compact-table .col-open { width: 8%; }
.compact-table .col-visibility { width: 14%; }
.compact-table .col-limits { width: 14%; }
.compact-table .col-access { width: 8%; }
.compact-table .col-options { width: 10%; }
.compact-table td, .compact-table th { padding: 8px 10px; font-size: 13px; }
.name-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-cell a { font-weight: 600; }
.visitor-table .col-open { width: 10%; }
.visitor-table .col-name { width: 36%; }
.visitor-table .col-date { width: 16%; }
.visitor-table .col-size { width: 12%; }
.visitor-table .col-preview { width: 16%; }
.action-button.secondary-button { padding: 5px 9px; border-radius: 9px; background: #f8fbff; }
.visibility-group { gap: 5px; flex-wrap: nowrap; }
.vis-button { min-width: 60px; padding: 4px 8px; font-size: 12px; font-weight: 700; opacity: .72; }
.vis-button.active { opacity: 1; transform: translateY(-1px); box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 4px 10px rgba(15,23,42,.12); }
.limits-stack { font-size: 12px; line-height: 1.35; }
.limit-state { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-links { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-links a { margin-right: 0; }
.options-cell { white-space: nowrap; overflow: visible; }
.actions-menu { position: relative; display: inline-block; }
.actions-menu > summary {
    list-style: none; cursor: pointer; padding: 6px 10px; border: 1px solid #d7e1ef; border-radius: 10px; background: #fff;
    color: #334155; box-shadow: 0 1px 0 rgba(15,23,42,.02); user-select: none;
}
.actions-menu > summary::-webkit-details-marker { display: none; }
.actions-menu[open] > summary, .actions-menu > summary:hover { background: #eef4ff; border-color: #bfd3fb; }
.actions-popover {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 260px; z-index: 20; background: #fff; border: 1px solid #d7e1ef;
    border-radius: 14px; box-shadow: 0 18px 40px rgba(15,23,42,.12); padding: 10px;
    display: grid; gap: 4px;
}
.actions-popover a, .actions-popover .muted { display: block; padding: 7px 9px; border-radius: 8px; margin: 0; }
.actions-popover a:hover { background: #f5f9ff; text-decoration: none; }
.actions-group-title { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; padding: 4px 6px 2px; }
.modal-card, .modal-box { width: min(1180px, 100%); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid #d7e1ef; background: #f9fbff; border-radius: 18px; padding: 14px; box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14); }
.wide-modal { width: min(1220px, 100%); }
.copy-dialog { display: grid; gap: 14px; }
.copy-dialog-body { display: grid; gap: 12px; }
.copy-dialog-input { width: 100%; padding: 11px 12px; border: 1px solid #c9d6ea; border-radius: 12px; background: #ffffff; color: #0f172a; font: inherit; }
.small-copy-hint { font-size: 12px; }
.public-toolbar { margin: 0 0 14px; display: flex; gap: 8px; }
.file-table td > .thumb, .file-table td > .player, .file-table td > .audio-player, .file-table td > .text-preview { margin: 0; }
@media (max-width: 1500px) {
  .compact-table { table-layout: auto; }
  .visibility-group { flex-wrap: wrap; }
}

/* final polish */
.compact-table td,
.compact-table th {
    vertical-align: middle;
}

.compact-table .col-name { width: 28%; }
.compact-table .col-date { width: 9%; }
.compact-table .col-size { width: 7%; }
.compact-table .col-preview { width: 9%; }
.compact-table .col-open { width: 8%; }
.compact-table .col-visibility { width: 14%; }
.compact-table .col-limits { width: 14%; }
.compact-table .col-access { width: 7%; }
.compact-table .col-options { width: 4%; }

.compact-table td:nth-child(2),
.compact-table td:nth-child(3),
.compact-table td:nth-child(5),
.compact-table td:nth-child(8) {
    white-space: nowrap;
}

.thumb {
    width: 64px;
    max-width: 64px;
    max-height: 44px;
}

.player {
    width: 108px;
    height: 60px;
}

.audio-player {
    width: 112px;
}

.text-preview {
    width: 124px;
    max-width: 124px;
    max-height: 52px;
    font-size: 10px;
}

.actions-menu > summary {
    font-weight: 700;
    min-width: 76px;
    text-align: center;
}

.actions-menu > summary::after {
    content: ' ▾';
    color: #64748b;
}

.actions-popover {
    min-width: 280px;
}

.limits-stack {
    display: grid;
    gap: 2px;
}

.limit-state {
    font-size: 11px;
}

.option-note,
.action-button.secondary-button {
    white-space: nowrap;
}

@media (max-width: 1650px) {
  .compact-table { table-layout: auto; }
}

.inline-helper {
    align-self: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.stat-box {
    border: 1px solid #d7e1ef;
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px;
}

.stat-label {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 4px;
}

.stat-value {
    font-weight: 700;
    font-size: 20px;
    color: #1e293b;
}

.compact-table {
    table-layout: fixed;
}

.compact-table td,
.compact-table th {
    white-space: nowrap;
}

.compact-table .name-cell,
.compact-table .col-name {
    white-space: nowrap;
}

.compact-table .col-options,
.compact-table .options-cell {
    overflow: visible;
}

.compact-table .col-limits {
    width: 18%;
}

.compact-table .col-options {
    width: 6%;
}

.limit-state {
    font-size: 11px;
    white-space: nowrap;
}

.mini-links {
    flex-wrap: nowrap;
}

.actions-menu {
    vertical-align: middle;
}

@media (max-width: 1400px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-table { table-layout: auto; }
  .compact-table td,
  .compact-table th,
  .mini-links { white-space: normal; }
}

/* final v4 layout fixes */
.compact-table.admin-table {
    table-layout: fixed;
}
.compact-table.admin-table .col-name { width: 24%; }
.compact-table.admin-table .col-date { width: 11%; }
.compact-table.admin-table .col-size { width: 9%; }
.compact-table.admin-table .col-preview { width: 8%; }
.compact-table.admin-table .col-open { width: 14%; }
.compact-table.admin-table .col-visibility { width: 12%; }
.compact-table.admin-table .col-limits { width: 14%; }
.compact-table.admin-table .col-access { width: 4%; }
.compact-table.admin-table .col-options { width: 4%; }

.compact-table.admin-table td,
.compact-table.admin-table th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.compact-table.admin-table .meta-edit-cell,
.compact-table.admin-table .shortcut-cell,
.compact-table.admin-table .options-cell,
.compact-table.admin-table .col-options,
.compact-table.admin-table td:nth-child(2),
.compact-table.admin-table td:nth-child(3),
.compact-table.admin-table td:nth-child(5),
.compact-table.admin-table td:nth-child(9) {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.compact-table.admin-table .name-cell a {
    display: inline-block;
    max-width: calc(100% - 84px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.visibility-group {
    display: inline-flex;
    gap: 4px;
    flex-wrap: nowrap;
}

.vis-button {
    min-width: 0;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.1;
}

.vis-button.active {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 0 0 2px rgba(37, 99, 235, 0.14), 0 5px 12px rgba(15,23,42,.12);
}

.limits-stack {
    display: grid;
    gap: 3px;
    font-size: 11px;
    line-height: 1.25;
}

.limit-state {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    overflow: hidden;
}

.mini-links a {
    display: inline-block;
    font-size: 11px;
}

.action-trigger {
    display: inline-block;
    min-width: 84px;
    text-align: center;
    font-weight: 700;
}

.action-sheet {
    width: min(860px, 100%);
    margin: 0 auto;
}

.action-sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.sheet-links {
    display: grid;
    gap: 6px;
}

.sheet-links a,
.sheet-links .muted {
    display: block;
    padding: 8px 10px;
    border: 1px solid #d7e1ef;
    border-radius: 10px;
    background: #fbfdff;
}

.sheet-links a:hover {
    background: #eef4ff;
    text-decoration: none;
}

@media (max-width: 1280px) {
    .compact-table.admin-table {
        table-layout: auto;
    }
    .compact-table.admin-table td,
    .compact-table.admin-table th,
    .mini-links,
    .visibility-group {
        white-space: normal;
    }
    .visibility-group,
    .mini-links {
        flex-wrap: wrap;
    }
    .action-sheet-grid {
        grid-template-columns: 1fr;
    }
}


.upload-public-card { max-width: 920px; }
.public-upload-dropzone { margin-top: 14px; }


.admin-table .col-open { width: 260px; }
.shortcut-cell {
    white-space: normal;
}
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
}
.shortcut-cell .mini-shortcut,
.meta-cell .mini-action,
.meta-chip,
.cell-tools .mini-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d6dbe6;
    background: #f7f9fc;
    color: #2f3a4d;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.2;
    min-width: 0;
}
.shortcut-cell .mini-shortcut {
    width: 100%;
}
.shortcut-cell .mini-shortcut.primary,
.meta-chip {
    background: #eaf2ff;
    border-color: #b9cdf6;
    color: #1f4ea3;
    font-weight: 600;
}
.shortcut-cell .mini-shortcut.wide {
    grid-column: 1 / -1;
}
.shortcut-cell .mini-shortcut.disabled {
    color: #94a0b4;
    background: #f2f4f8;
    border-color: #e1e6ef;
    cursor: default;
}
.meta-edit-cell {
    white-space: normal;
}
.meta-edit-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.meta-chip {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.meta-cell .mini-action.subtle {
    background: #ffffff;
}
.meta-cell .meta-value {
    display: inline-block;
    margin-right: 8px;
}
.cell-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
@media (max-width: 980px) {
    .shortcut-grid {
        grid-template-columns: 1fr;
    }
    .shortcut-cell .mini-shortcut.wide {
        grid-column: auto;
    }
}
.stack-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
}
.stack-label input {
    width: 100%;
}
.compact-editor {
    max-width: 560px;
}


/* v10 fixes */
.shortcut-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.shortcut-cell .mini-shortcut.shortcut-pill {
    width: auto;
    flex: 0 0 auto;
    min-width: 0;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #cfdae9;
    background: #ffffff;
    color: #4b5563;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}
.shortcut-cell .mini-shortcut.shortcut-pill:hover {
    background: #eef4ff;
    border-color: #bfd3fb;
    text-decoration: none;
}
.shortcut-cell .mini-shortcut.shortcut-download {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 0 0 2px rgba(37,99,235,.14), 0 5px 12px rgba(15,23,42,.12);
}
.shortcut-cell .mini-shortcut.shortcut-download:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}
.shortcut-cell .mini-shortcut.wide {
    grid-column: auto;
}
.shortcut-cell .mini-shortcut.disabled {
    display: none;
}
.compact-table.admin-table .shortcut-cell,
.compact-table.admin-table .col-open {
    white-space: normal;
}
.compact-table.admin-table .col-open { width: 17%; }
.compact-table.admin-table .col-visibility { width: 11%; }
.compact-table.admin-table .col-limits { width: 13%; }
.compact-table.admin-table .col-options { width: 5%; }
@media (max-width: 1200px) {
  .shortcut-grid { gap: 5px; }
  .shortcut-cell .mini-shortcut.shortcut-pill { width: 100%; justify-content: center; }
}


/* v11 layout cleanup */
.compact-table.admin-table .col-open { width: 18%; }
.compact-table.admin-table .col-visibility { width: 12%; }
.compact-table.admin-table .col-limits { width: 12%; }
.compact-table.admin-table .col-access { width: 9%; }
.compact-table.admin-table .col-options { width: 6%; }

.compact-table td:nth-child(2),
.compact-table td:nth-child(3),
.compact-table td:nth-child(5) {
    white-space: nowrap;
}

.compact-table td:nth-child(8) {
    white-space: normal;
}

.meta-edit-group {
    display: block;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    text-align: center;
}

.compact-limits {
    gap: 6px;
}

.limit-links-single {
    display: block;
}

.limit-links-single .shortcut-pill {
    display: inline-flex;
    justify-content: center;
    width: 100%;
}

.modal-limit-stack {
    gap: 6px;
}

.vertical-actions {
    gap: 8px;
}

.vertical-actions a {
    text-align: center;
}

@media (max-width: 1450px) {
  .compact-table.admin-table {
    table-layout: auto;
  }
  .compact-table.admin-table .col-open,
  .compact-table.admin-table .col-visibility,
  .compact-table.admin-table .col-limits,
  .compact-table.admin-table .col-access,
  .compact-table.admin-table .col-options {
    width: auto;
  }
}

/* final admin cleanup + bulk actions */
.admin-dashboard {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(420px, 1.2fr) minmax(280px, 0.9fr);
    gap: 14px;
    margin-bottom: 14px;
}
.admin-card {
    border: 1px solid #d7e1ef;
    background: #ffffff;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}
.admin-summary-card,
.admin-folder-card,
.upload-card {
    min-height: 100%;
}
.overview-list {
    display: grid;
    gap: 8px;
}
.overview-list div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e5edf7;
    border-radius: 12px;
    background: #f8fbff;
}
.overview-list strong {
    color: #334155;
}
.folder-create-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px auto;
    gap: 10px;
    align-items: center;
}
.bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #cfe0f6;
    background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
    position: sticky;
    top: 14px;
    z-index: 10;
}
.bulk-toolbar.hidden {
    display: none;
}
.bulk-toolbar-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.bulk-counter {
    font-weight: 700;
    color: #1e293b;
}
.bulk-button-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.bulk-tool-button,
.shortcut-pill,
.action-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #cfdae9;
    background: #ffffff;
    color: #334155;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
}
.bulk-tool-button:hover,
.shortcut-pill:hover,
.action-trigger:hover {
    background: #eef5ff;
    text-decoration: none;
}
.bulk-danger-button,
.danger-shortcut,
.danger-link {
    border-color: #f0c1c8;
    color: #b42318;
    background: #fff7f8;
}
.bulk-clear-link {
    font-weight: 600;
}
.table-shell {
    overflow: auto;
    border-radius: 16px;
}
.table-shell .file-table {
    min-width: 1500px;
    margin: 0;
}
.admin-table .col-select {
    width: 46px;
}
.select-cell {
    width: 46px;
    text-align: center;
    vertical-align: middle;
}
.select-cell input,
.col-select input {
    width: 16px;
    height: 16px;
}
.admin-table .name-cell {
    min-width: 260px;
}
.admin-table .shortcut-cell,
.admin-table .options-cell,
.admin-table td:nth-child(8),
.admin-table td:nth-child(9) {
    vertical-align: middle;
}
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(108px, 1fr));
    gap: 6px;
}
.shortcut-grid .wide {
    grid-column: 1 / -1;
}
.shortcut-cell .shortcut-pill,
.options-cell .action-trigger,
.limit-links-single .shortcut-pill {
    width: 100%;
}
.visibility-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(76px, 1fr));
    gap: 6px;
}
.compact-limits {
    gap: 8px;
}
.limit-state {
    white-space: normal;
    line-height: 1.35;
}
.limit-links-single {
    display: block;
}
.limit-links-single .shortcut-pill {
    display: inline-flex;
}
.options-cell {
    white-space: normal;
}
.meta-chip {
    width: auto;
    justify-content: flex-start;
    max-width: 100%;
}
.modal-card.wide-modal {
    width: min(1180px, calc(100vw - 28px));
}
.checkbox-label {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.checkbox-label input {
    width: 16px;
    height: 16px;
}
.stack-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
@media (max-width: 1280px) {
    .admin-dashboard {
        grid-template-columns: 1fr;
    }
    .folder-create-form {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 900px) {
    .bulk-toolbar {
        position: static;
    }
    .shortcut-grid {
        grid-template-columns: 1fr;
    }
    .visibility-group {
        grid-template-columns: 1fr;
    }
    .table-shell .file-table {
        min-width: 1280px;
    }
}


/* final v14 admin redesign */
.admin-dashboard {
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-areas:
    "summary upload"
    "summary folder";
  align-items: start;
}
.admin-summary-card { grid-area: summary; }
.upload-card { grid-area: upload; }
.admin-folder-card { grid-area: folder; }
.admin-card { min-height: 0; }
.upload-card, .admin-folder-card { min-width: 0; }
.folder-create-form { grid-template-columns: minmax(0,1fr) 150px auto; }
.table-shell { overflow-x: auto; overflow-y: visible; }
.table-shell .file-table.admin-table { min-width: 1260px; }
.admin-table.compact-table { table-layout: fixed; }
.admin-table .col-select { width: 42px; }
.admin-table .col-name { width: 26%; }
.admin-table .col-info { width: 15%; }
.admin-table .col-preview { width: 10%; }
.admin-table .col-open { width: 15%; }
.admin-table .col-visibility { width: 14%; }
.admin-table .col-access { width: 14%; }
.admin-table .col-options { width: 6%; }
.admin-table td, .admin-table th { white-space: normal; overflow: visible; text-overflow: clip; vertical-align: top; }
.admin-table .name-cell { min-width: 0; }
.admin-table .name-cell a { display: inline; max-width: none; }
.info-cell, .shortcut-cell, .options-cell { min-width: 0; }
.info-stack, .access-stack { display: grid; gap: 6px; }
.info-kind { font-size: 12px; color: #64748b; font-weight: 600; }
.meta-chip { width: 100%; justify-content: flex-start; white-space: normal; text-align: left; }
.shortcut-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.shortcut-grid .wide { grid-column: auto; }
.shortcut-cell .shortcut-pill { width: 100%; justify-content: center; }
.admin-visibility-group { display: grid; grid-template-columns: 1fr; gap: 6px; }
.admin-visibility-group .vis-button { width: 100%; min-width: 0; }
.access-line { display: flex; flex-direction: column; gap: 2px; }
.access-label { font-size: 12px; font-weight: 700; color: #64748b; }
.access-button { width: 100%; }
.limit-state { white-space: normal; }
.options-cell .action-trigger { width: 100%; }
.name-cell .mark-pill { margin: 6px 6px 0 0; }
.parent-row td { vertical-align: middle; }
@media (max-width: 1200px) {
  .admin-dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "upload"
      "folder";
  }
  .folder-create-form { grid-template-columns: 1fr; }
  .table-shell .file-table.admin-table { min-width: 1040px; }
}


/* final v15 button width tuning */
.shortcut-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}
.shortcut-grid .wide {
  grid-column: auto;
}
.shortcut-cell .shortcut-pill,
.options-cell .action-trigger,
.limit-links-single .shortcut-pill,
.access-button,
.meta-chip {
  width: auto;
  max-width: 100%;
}
.shortcut-cell .shortcut-pill,
.options-cell .action-trigger,
.limit-links-single .shortcut-pill,
.access-button {
  flex: 0 0 auto;
  justify-content: center;
  padding: 5px 10px;
}
.shortcut-cell,
.options-cell,
.access-stack,
.info-stack {
  align-items: flex-start;
}
.admin-visibility-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}
.admin-visibility-group .vis-button {
  width: auto;
  min-width: 74px;
}
.meta-chip {
  display: inline-flex;
}
@media (max-width: 1200px) {
  .shortcut-grid,
  .admin-visibility-group {
    gap: 5px;
  }
  .shortcut-cell .shortcut-pill,
  .admin-visibility-group .vis-button,
  .options-cell .action-trigger,
  .access-button {
    min-width: 0;
  }
}


/* final v17 admin density + uniform buttons */
.admin-table td,
.admin-table th {
  padding: 8px 10px;
}

.admin-table td {
  vertical-align: middle;
}

.admin-table .name-cell,
.admin-table .info-cell,
.admin-table .shortcut-cell,
.admin-table .options-cell {
  min-width: 0;
}

.info-stack,
.access-stack {
  gap: 4px;
}

.info-kind {
  font-size: 11px;
  line-height: 1.2;
}

.meta-chip,
.shortcut-cell .shortcut-pill,
.admin-visibility-group .vis-button,
.options-cell .action-trigger,
.access-button,
.bulk-tool-button,
.limit-links-single .shortcut-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1.1;
  font-size: 12px;
}

.meta-chip {
  justify-content: flex-start;
  border-radius: 10px;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.shortcut-grid,
.admin-visibility-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.shortcut-cell .shortcut-pill {
  width: auto;
  flex: 0 0 auto;
}

.shortcut-cell .shortcut-pill.shortcut-download,
.options-cell .action-trigger,
.access-button {
  min-width: 108px;
}

.shortcut-cell .shortcut-pill:not(.shortcut-download) {
  min-width: 96px;
}

.admin-visibility-group .vis-button {
  min-width: 82px;
  opacity: 1;
}

.access-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.access-line {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 1 1 100%;
}

.access-label {
  font-size: 11px;
  min-width: 72px;
}

.limit-state {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.2;
}

.options-cell {
  text-align: left;
}

.options-cell .action-trigger {
  width: auto;
}

.name-cell .mark-pill {
  margin-top: 4px;
}

.admin-table .thumb,
.admin-table .player,
.admin-table .audio-player,
.admin-table .text-preview {
  margin: 0;
}

.admin-table .player {
  width: 96px;
  height: 54px;
}

.admin-table .thumb {
  width: 60px;
  max-width: 60px;
  max-height: 40px;
}

.admin-table .text-preview {
  width: 112px;
  max-width: 112px;
  max-height: 46px;
}

@media (max-width: 1400px) {
  .shortcut-cell .shortcut-pill.shortcut-download,
  .options-cell .action-trigger,
  .access-button,
  .shortcut-cell .shortcut-pill:not(.shortcut-download),
  .admin-visibility-group .vis-button {
    min-width: 0;
  }
}

/* final v18 uniform admin action sizing */
:root {
  --admin-pill-width: 106px;
  --admin-pill-height: 30px;
}

.shortcut-grid,
.admin-visibility-group,
.access-stack,
.options-cell {
  align-items: flex-start;
}

.shortcut-cell .shortcut-pill,
.admin-visibility-group .vis-button,
.options-cell .action-trigger,
.access-button {
  width: var(--admin-pill-width);
  min-width: var(--admin-pill-width);
  max-width: var(--admin-pill-width);
  min-height: var(--admin-pill-height);
  padding: 5px 10px;
  box-sizing: border-box;
}

.shortcut-cell .shortcut-pill.shortcut-download,
.shortcut-cell .shortcut-pill:not(.shortcut-download),
.admin-visibility-group .vis-button,
.options-cell .action-trigger,
.access-button {
  min-width: var(--admin-pill-width);
}

.shortcut-grid,
.admin-visibility-group {
  gap: 5px;
}

.limit-state {
  margin-bottom: 2px;
}

@media (max-width: 1400px) {
  .shortcut-cell .shortcut-pill,
  .admin-visibility-group .vis-button,
  .options-cell .action-trigger,
  .access-button {
    width: var(--admin-pill-width);
    min-width: var(--admin-pill-width);
  }
}
