* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #edf2f7;
    color: #1e293b;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 32px;
    background: linear-gradient(135deg, #0f172a 0%, #0f3d91 100%);
    color: #ffffff;
}

.brand {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 700;
}

.tagline {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.78);
    max-width: 560px;
}

.userbox {
    display: flex;
    gap: 14px;
    align-items: center;
    text-align: right;
}

.userbox span {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

.ghost-link {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.main-nav,
.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.main-nav {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 11px 15px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    font-weight: 600;
}

.main-nav a.active {
    background: #dbeafe;
    color: #1d4ed8;
}

.page-shell {
    padding: 24px 0 40px;
}

.auth-shell {
    min-height: calc(100vh - 110px);
    display: grid;
    place-items: center;
}

.auth-card,
.card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.auth-card {
    width: min(460px, 100%);
    padding: 32px;
}

.auth-card h1,
.card h2 {
    margin-top: 0;
}

.stack {
    display: grid;
    gap: 14px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 1rem;
}

.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 1rem;
    font-family: inherit;
    background: #ffffff;
}

.field textarea {
    min-height: 110px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.btn.secondary {
    background: #0f172a;
}

.full {
    width: 100%;
}

.pill {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 700;
}

.muted-pill {
    background: #e2e8f0;
    color: #334155;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.demo-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
}

.demo-box span,
.hero-meta span {
    display: block;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    margin-bottom: 20px;
}

.hero h1 {
    margin: 10px 0 10px;
    font-size: 2rem;
}

.hero p {
    margin: 0;
    color: #475569;
    max-width: 780px;
}

.compact {
    padding: 20px;
}

.stats-grid,
.detail-grid,
.project-grid,
.admin-grid,
.file-overview {
    display: grid;
    gap: 20px;
}

.stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 20px;
}

.detail-grid {
    grid-template-columns: 360px minmax(0, 1fr);
    margin-bottom: 20px;
}

.project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
}

.file-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
}

.library-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 20px;
    align-items: start;
}

.library-clean-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) 320px;
    gap: 20px;
    align-items: start;
}

.workspace-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.workspace-sidebar {
    position: sticky;
    top: 20px;
    display: grid;
    gap: 16px;
}

.workspace-brand,
.workspace-side-card {
    padding: 22px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.workspace-brand h1 {
    margin: 12px 0 8px;
    font-size: 1.55rem;
}

.workspace-brand p,
.workspace-side-card p {
    margin: 0;
    color: #64748b;
}

.workspace-nav {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.workspace-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #334155;
    font-weight: 600;
}

.workspace-nav a:hover {
    background: #f8fafc;
}

.workspace-nav a.active {
    background: #dbeafe;
    color: #1d4ed8;
}

.workspace-kpi {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.workspace-kpi:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.workspace-kpi strong {
    font-size: 1.2rem;
    color: #0f172a;
}

.workspace-kpi span {
    color: #64748b;
    font-size: 0.92rem;
}

.workspace-main {
    min-width: 0;
}

.admin-hero {
    margin-bottom: 20px;
    border: 1px solid #dbe7f5;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.admin-hero h1 {
    margin: 12px 0 8px;
    font-size: 2rem;
}

.admin-hero p {
    margin: 0;
    color: #64748b;
    max-width: 760px;
}

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

.admin-summary-card h2 {
    margin-bottom: 10px;
}

.admin-summary-card p {
    margin-top: 0;
    margin-bottom: 18px;
    color: #64748b;
}

.muted-card {
    background: linear-gradient(180deg, #ffffff, #fafafa);
    border: 1px dashed #cbd5e1;
}

.admin-form-card {
    margin-top: 20px;
}

.admin-list .library-item {
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.9fr) auto;
}

.stat-card,
.file-stat,
.project-card,
.card {
    padding: 24px;
}

.big-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
    color: #0f172a;
}

.big-number.smaller {
    font-size: 1.4rem;
}

.project-top,
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-top {
    justify-content: space-between;
    align-items: center;
}

.project-card h2 {
    margin: 14px 0 10px;
}

.project-card p {
    margin-top: 0;
    color: #475569;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading p {
    margin: 6px 0 0;
    color: #64748b;
}

.library-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-field,
.filter-field {
    margin: 0;
}

.filter-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-chip.active {
    background: #dbeafe;
    color: #1d4ed8;
}

.file-stat {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe7f5;
}

.file-stat strong {
    display: block;
    margin: 8px 0 10px;
    font-size: 2rem;
    color: #0f172a;
}

.file-stat p {
    margin: 0;
    color: #64748b;
}

.file-stat-label {
    display: inline-block;
    color: #2563eb;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.library-main {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #e2e8f0;
}

.library-clean-main {
    border: 1px solid #e2e8f0;
}

.library-side {
    display: grid;
    gap: 16px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.library-clean-side {
    display: grid;
    gap: 16px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.side-block {
    padding: 24px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.side-tip {
    padding: 22px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.side-tip h3 {
    margin: 12px 0 8px;
}

.side-tip p {
    margin: 0;
    color: #64748b;
}

.simple-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: #475569;
}

.breadcrumb-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 18px;
}

.breadcrumb-link {
    color: #475569;
    font-weight: 600;
}

.breadcrumb-link.active {
    color: #1d4ed8;
}

.breadcrumb-sep {
    color: #94a3b8;
}

.current-folder-bar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin-bottom: 22px;
}

.current-folder-bar h3 {
    margin: 8px 0 6px;
    font-size: 1.5rem;
}

.current-folder-bar p {
    margin: 0;
    color: #64748b;
}

.current-folder-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.current-folder-meta span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.library-topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.library-topbar h2 {
    margin: 8px 0 6px;
    font-size: 1.55rem;
}

.library-topbar p {
    margin: 0;
    color: #64748b;
}

.library-topbar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid #dbe7f5;
    background: linear-gradient(180deg, #ffffff, #eff5ff);
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.toolbar-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 38px rgba(15, 23, 42, 0.12);
}

.toolbar-action.accent {
    background: linear-gradient(180deg, #3867f6, #254edb);
    border-color: #1d4ed8;
    color: #ffffff;
}

.toolbar-action-icon,
.icon-action svg,
.folder-icon svg,
.modal-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.folder-icon svg {
    width: 30px;
    height: 30px;
}

.toolbar-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.library-searchbar {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 220px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.library-search-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-card {
    margin-bottom: 20px;
    border: 1px solid #dbe7f5;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.action-card h3 {
    margin-top: 0;
}

.action-card p {
    margin-top: 0;
    color: #64748b;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 28px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(10px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 640px);
    max-height: calc(100vh - 56px);
    overflow: auto;
    border-radius: 28px;
    box-shadow: 0 34px 80px rgba(15, 23, 42, 0.28);
}

.modal-card-wide {
    width: min(100%, 980px);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: start;
    margin-bottom: 18px;
}

.modal-head h3 {
    margin: 8px 0 6px;
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid #dbe7f5;
    background: #ffffff;
    color: #0f172a;
    flex: 0 0 auto;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
    text-decoration: none;
}

.content-block + .content-block {
    margin-top: 24px;
}

.content-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.content-block-header h3 {
    margin: 0;
}

.content-block-header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 700;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.folder-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 18px;
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.folder-icon {
    display: grid;
    place-items: center;
    min-height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, #bfdbfe, #dbeafe);
    color: #1d4ed8;
}

.folder-body p {
    margin: 8px 0 10px;
    color: #64748b;
    word-break: break-word;
}

.folder-name {
    display: inline-block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.folder-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.9rem;
}

.preview-card {
    margin-bottom: 20px;
    border: 1px solid #dbe7f5;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.preview-header h3 {
    margin: 8px 0 0;
}

.preview-surface {
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    overflow: hidden;
    background: #f8fafc;
}

.frame-preview iframe {
    width: 100%;
    min-height: 680px;
    border: 0;
    background: #ffffff;
}

.image-preview {
    display: grid;
    place-items: center;
    padding: 18px;
    background: #eef4ff;
}

.image-preview img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
}

.preview-text {
    margin: 0;
    padding: 18px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, Monaco, monospace;
    color: #334155;
}

.dropzone {
    position: relative;
    padding: 22px;
    border: 2px dashed #93c5fd;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.dropzone.drag-over {
    background: #eff6ff;
    border-color: #2563eb;
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone-copy {
    display: grid;
    gap: 8px;
    place-items: center;
    text-align: center;
    color: #475569;
}

.dropzone-copy strong {
    color: #0f172a;
}

.mini-actions {
    position: relative;
}

.mini-actions summary {
    list-style: none;
}

.mini-actions summary::-webkit-details-marker {
    display: none;
}

.mini-actions[open] {
    z-index: 5;
}

.mini-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(360px, calc(100vw - 32px));
    padding: 16px;
    border: 1px solid rgba(219, 231, 245, 0.95);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 255, 0.98));
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(16px);
}

.mini-form {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.library-list {
    display: grid;
    gap: 12px;
}

.library-item {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.8fr) auto;
    gap: 14px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
}

.library-item-main {
    display: flex;
    gap: 14px;
    align-items: start;
    min-width: 0;
}

.library-item-meta {
    display: grid;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    padding-top: 2px;
}

.library-item-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
}

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

.notes-list {
    display: grid;
    gap: 16px;
}

.note-item {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.note-item h3 {
    margin: 12px 0 10px;
}

.note-item p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.compact-list {
    margin-top: 14px;
}

.slim-note strong {
    display: block;
    margin-top: 10px;
}

.muted-text {
    color: #64748b;
    font-size: 0.92rem;
}

.top-gap {
    margin-top: 18px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.catalog-card {
    border: 1px solid #dbe7f5;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.catalog-card h3 {
    margin: 12px 0 10px;
}

.catalog-card p {
    margin: 0 0 14px;
    color: #64748b;
}

.catalog-card strong {
    color: #0f172a;
    font-size: 1.1rem;
}

.check-row {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #334155;
    font-weight: 600;
}

.check-row input {
    width: 18px;
    height: 18px;
}

.project-meta {
    margin: 18px 0;
    color: #64748b;
    font-size: 0.95rem;
}

.status {
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-planning {
    background: #fef3c7;
    color: #92400e;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-on_hold {
    background: #fee2e2;
    color: #991b1b;
}

.status-closed {
    background: #e2e8f0;
    color: #334155;
}

.table-wrap {
    overflow-x: auto;
}

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

.modern-table tbody tr:hover {
    background: #f8fbff;
}

.library-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
}

.library-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 1;
    color: #475569;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.file-name-block strong,
.file-name-block span {
    display: block;
}

.file-name-block strong {
    color: #0f172a;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.file-name-block span {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.file-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
}

.data-list {
    display: grid;
    gap: 14px;
}

.data-list div {
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.data-list strong,
.data-list span {
    display: block;
}

.data-list span {
    margin-top: 4px;
    color: #475569;
}

.empty-state {
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.text-link {
    color: #1d4ed8;
    font-weight: 600;
}

.inline-form {
    display: inline;
}

.inline-form + .inline-form {
    margin-left: 10px;
}

.danger-link {
    background: none;
    border: 0;
    padding: 0;
    color: #b91c1c;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.inline-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.entry-tools {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    border: 1px solid #dbe7f5;
    background: linear-gradient(180deg, #ffffff, #eef4ff);
    color: #1d4ed8;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.icon-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.12);
}

.icon-action.danger {
    color: #b91c1c;
    background: linear-gradient(180deg, #ffffff, #fff1f2);
    border-color: #fecdd3;
}

.danger-btn {
    background: #b91c1c;
    color: #ffffff;
}

.danger-btn:hover {
    background: #991b1b;
}

.bulk-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.select-mark {
    display: inline-flex;
    align-items: center;
    padding-top: 6px;
}

.select-mark input {
    width: 16px;
    height: 16px;
}

.as-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.single-form-wrap {
    max-width: 760px;
}

.upload-help {
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    border: 1px dashed #cbd5e1;
}

.upload-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98)),
        linear-gradient(135deg, #dbeafe, #eff6ff);
    border: 1px solid #dbe7f5;
}

.sticky-panel {
    position: sticky;
    top: 20px;
}

.upload-header h2 {
    margin: 12px 0 8px;
}

.upload-header p {
    margin: 0 0 18px;
    color: #64748b;
}

.upload-dropzone {
    padding: 18px;
    border: 1px dashed #93c5fd;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
}

.upload-dropzone label {
    margin-bottom: 10px;
}

.upload-dropzone span {
    display: block;
    margin-top: 10px;
    color: #64748b;
    font-size: 0.92rem;
}

@media (max-width: 920px) {
    .topbar {
        padding: 22px 20px;
        display: grid;
    }

    .userbox {
        text-align: left;
        justify-content: flex-start;
    }

    .main-nav,
    .page-shell {
        width: min(100% - 24px, 1120px);
    }

    .hero,
    .stats-grid,
    .detail-grid,
    .project-grid,
    .admin-grid,
    .file-overview,
    .library-shell,
    .library-clean-shell,
    .workspace-shell,
    .admin-summary-grid,
    .catalog-grid,
    .folder-grid {
        grid-template-columns: 1fr;
    }

    .library-toolbar {
        grid-template-columns: 1fr;
    }

    .library-searchbar,
    .preview-header {
        grid-template-columns: 1fr;
        display: grid;
    }

    .bulk-actions,
    .modal-head {
        grid-template-columns: 1fr;
        display: grid;
    }

    .sticky-panel {
        position: static;
    }

    .current-folder-bar,
    .library-item,
    .library-topbar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .library-item-actions,
    .library-topbar-actions {
        justify-content: flex-start;
    }

    .modal-shell {
        padding: 16px;
    }

    .modal-card,
    .modal-card-wide {
        width: 100%;
        max-height: calc(100vh - 32px);
    }

    .mini-panel {
        left: 0;
        right: auto;
        width: min(100vw - 48px, 360px);
    }

    .workspace-sidebar {
        position: static;
    }
}
