:root {
    --bg: #f8f9fa;
    --panel: #ffffff;
    --panel-2: #f1f3f4;
    --line: #dadce0;
    --text: #202124;
    --muted: #5f6368;
    --blue: #1a73e8;
    --blue-soft: #d2e3fc;
    --danger: #d93025;
    --danger-soft: #fce8e6;
    --success-soft: #e6f4ea;
    --shadow: 0 1px 2px rgba(60,64,67,.15), 0 1px 3px 1px rgba(60,64,67,.1);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

body {
    overflow-x: hidden;
}

.drive-app-shell {
    min-height: 100vh;
    background: var(--bg);
}

.flash {
    padding: 14px 16px;
    border-radius: 12px;
    margin: 12px;
    box-shadow: var(--shadow);
}

.flash-floating {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1000;
    min-width: 280px;
    max-width: 420px;
}

.flash.success {
    background: var(--success-soft);
    color: #137333;
}

.flash.error {
    background: var(--danger-soft);
    color: #a50e0e;
}

.flash.info {
    background: #e8f0fe;
    color: #174ea6;
}

.drive-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #f8f9fa;
    border-right: 1px solid #eceff1;
    padding: 18px 12px;
}

.sidebar-top {
    padding: 8px 6px 20px;
}

.new-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 14px 18px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    font-weight: 600;
}

.new-btn .plus {
    font-size: 28px;
    line-height: 1;
    font-weight: 400;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 999px;
    color: var(--text);
    font-size: 15px;
}

.side-link.active {
    background: #c2e7ff;
    font-weight: 600;
}

.side-link:hover {
    background: #e9eef6;
}

.side-icon {
    width: 22px;
    text-align: center;
}

.storage-box {
    margin: 22px 10px 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.storage-progress {
    height: 8px;
    background: #e0e3e7;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.storage-progress-bar {
    height: 100%;
    background: var(--blue);
    border-radius: 999px;
}

.storage-text {
    color: var(--muted);
    font-size: 14px;
}

.drive-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    background: #f8f9fa;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-triangle {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #34a853 0%, #34a853 35%, #4285f4 35%, #4285f4 70%, #fbbc05 70%, #fbbc05 100%);
    clip-path: polygon(50% 0%, 100% 90%, 0% 90%);
    border-radius: 4px;
}

.logo-text {
    font-size: 34px;
    font-weight: 500;
    color: #5f6368;
}

.topbar-search {
    min-width: 0;
}

.search-form input {
    width: 100%;
    border: none;
    outline: none;
    background: #e9eef6;
    border-radius: 999px;
    height: 58px;
    padding: 0 24px;
    font-size: 18px;
    color: var(--text);
}

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

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1a73e8;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.logout-link {
    color: var(--muted);
    font-size: 14px;
}

.drive-content {
    padding: 8px 24px 28px;
}

.drive-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.drive-title {
    margin: 0;
    font-size: 42px;
    font-weight: 500;
}

.breadcrumbs {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--blue);
}

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

.view-btn {
    width: 48px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-size: 18px;
}

.view-btn.active {
    background: #d2e3fc;
    border-color: #a8c7fa;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.filter-pill {
    padding: 11px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: #3c4043;
    font-size: 15px;
}

.upload-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.upload-card {
    background: #f8f9fa;
    border: 1px solid #eceff1;
    border-radius: 18px;
    padding: 18px;
}

.upload-card h3 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 600;
}

.upload-card form {
    display: grid;
    gap: 12px;
}

input[type="text"],
input[type="file"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
}

.g-btn {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.g-btn.primary {
    background: var(--blue);
    color: #fff;
}

.g-btn.subtle {
    background: #eef3fd;
    color: #174ea6;
}

.g-btn.danger {
    background: #fce8e6;
    color: #a50e0e;
}

.helper-text {
    color: var(--muted);
    font-size: 13px;
    margin-top: 10px;
    line-height: 1.45;
}

.section-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    margin: 24px 0 12px;
}

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

.drive-item {
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(60,64,67,.08);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.drive-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: #d0d7de;
}

.folder-item {
    background: #f1f3f4;
}

.drive-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.item-menu {
    color: #5f6368;
    font-size: 22px;
    line-height: 1;
}

.item-icon {
    width: 28px;
    height: 22px;
    border-radius: 5px;
    position: relative;
    flex: 0 0 auto;
}

.item-icon.folder {
    background: #5f6368;
}

.item-icon.folder::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 2px;
    width: 12px;
    height: 6px;
    border-radius: 4px 4px 0 0;
    background: #5f6368;
}

.item-icon.pdf { background: #ea4335; }
.item-icon.doc { background: #4285f4; }
.item-icon.xls { background: #34a853; }
.item-icon.ppt { background: #ff6d01; }
.item-icon.zip { background: #fbbc05; }
.item-icon.image { background: #a142f4; }
.item-icon.video { background: #00acc1; }
.item-icon.audio { background: #c5221f; }
.item-icon.code { background: #5f6368; }
.item-icon.file { background: #9aa0a6; }

.drive-item-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drive-item-meta {
    color: var(--muted);
    font-size: 13px;
}

.item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.item-actions form {
    margin: 0;
}

.empty-state {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 48px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 46px;
    margin-bottom: 10px;
}

.container,
.navbar,
.brand,
.nav-links,
.card,
.hero,
.hero-grid,
.grid-3,
.table,
.actions,
.header-row,
.progress-wrap,
.progress-bar,
.btn,
.badge {
    all: unset;
}

@media (max-width: 1300px) {
    .drive-grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}

@media (max-width: 1024px) {
    .drive-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

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

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

    .drive-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 640px) {
    .drive-content,
    .topbar {
        padding-left: 14px;
        padding-right: 14px;
    }

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

    .drive-title {
        font-size: 30px;
    }

    .search-form input {
        height: 50px;
        font-size: 16px;
    }
}
.file-preview-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.preview-page {
    padding: 24px;
}

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

.preview-title {
    margin: 0;
    font-size: 30px;
    font-weight: 500;
}

.preview-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.preview-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    min-height: 70vh;
    padding: 20px;
}

.preview-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.preview-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
}

.preview-frame {
    width: 100%;
    height: 75vh;
    border: none;
    border-radius: 12px;
    background: #f8f9fa;
}

.preview-video {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    background: #000;
}

.preview-audio {
    width: min(700px, 100%);
}

.preview-text {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
    background: #f8f9fa;
    border: 1px solid #eceff1;
    border-radius: 14px;
    padding: 18px;
    min-height: 60vh;
    overflow: auto;
}

.preview-empty {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.preview-empty-icon {
    font-size: 54px;
}
.side-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 999px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}

.side-link.active {
    background: #c2e7ff;
    font-weight: 700;
}

.create-menu-wrap {
    position: relative;
}

.create-menu {
    position: absolute;
    top: 92px;
    left: 22px;
    width: 290px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
    padding: 10px;
    display: none;
    z-index: 1600;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.create-menu.is-open {
    display: block;
    animation: menuIn .14s ease;
}

.create-menu-item {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    transition: .15s ease;
}

.create-menu-item:hover {
    background: #f1f5f9;
}

.create-menu-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef3fd;
    font-size: 18px;
    flex: 0 0 auto;
}

.action-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.action-modal.is-open {
    display: flex;
}

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

.action-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100vw - 24px));
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    animation: modalIn .18s ease;
}

.action-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #f8fafc;
    color: #64748b;
    font-size: 28px;
    cursor: pointer;
}

.action-modal-close:hover {
    background: #eef2f7;
    color: #0f172a;
}

.action-panel {
    display: none;
}

.action-panel.active {
    display: block;
}

.action-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
    padding-right: 40px;
}

.action-panel-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #eef4ff 0%, #e7f0ff 100%);
    font-size: 24px;
    flex: 0 0 auto;
}

.action-panel-head h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.action-panel-head p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

.action-form {
    display: grid;
    gap: 14px;
}

.action-form input[type="text"],
.action-form input[type="file"] {
    width: 100%;
    min-height: 58px;
    padding: 14px 16px;
    border: 1px solid #dbe1e8;
    border-radius: 16px;
    background: #fff;
    font-size: 16px;
    color: #111827;
    outline: none;
}

.action-form input[type="text"]:focus,
.action-form input[type="file"]:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.10);
}

.action-form .g-btn.primary {
    min-height: 52px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
}

.action-helper {
    margin: 14px 2px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

@keyframes menuIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.upload-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.upload-modal.is-open {
    display: flex;
}

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

.upload-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1320px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    animation: uploadModalIn .18s ease;
}

.upload-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 6px;
}

.upload-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #202124;
}

.upload-modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(218, 220, 224, 0.9);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #5f6368;
    font-size: 26px;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 18px rgba(60, 64, 67, 0.16);
}

.upload-panel {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(218, 220, 224, 0.95);
    border-radius: 30px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(60, 64, 67, 0.18);
    margin-bottom: 0;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 18px;
}

.upload-card {
    background: linear-gradient(180deg, #fbfcff 0%, #f7f9fc 100%);
    border: 1px solid #e4e7eb;
    border-radius: 24px;
    padding: 24px;
    min-height: 280px;
}

.upload-card h3 {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 700;
    color: #202124;
}

.upload-card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.upload-card input[type="text"],
.upload-card input[type="file"] {
    width: 100%;
    min-height: 60px;
    padding: 14px 16px;
    border: 1px solid #d8dde3;
    border-radius: 18px;
    background: #fff;
    font-size: 16px;
}

.upload-card .g-btn.primary {
    width: 100%;
    min-height: 54px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
}

body.modal-open {
    overflow: hidden;
}

@keyframes uploadModalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1100px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }

    .upload-modal {
        padding: 18px;
    }

    .upload-modal-dialog {
        width: min(920px, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
    }

    .upload-panel {
        padding: 16px;
        border-radius: 24px;
    }
}
.context-menu {
    position: fixed;
    z-index: 4000;
    display: none;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    padding: 8px;
}

.context-menu.is-open {
    display: block;
}

.context-menu-item {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.context-menu-item:hover {
    background: #f3f6fb;
}

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.share-modal.is-open {
    display: flex;
}

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

.share-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    padding: 26px;
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.share-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.share-modal-close {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #f8fafc;
    color: #64748b;
    font-size: 28px;
    cursor: pointer;
}

.share-form {
    display: grid;
    gap: 14px;
}

.share-target-box {
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #dbe7ff;
}

.share-target-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.share-target-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.share-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.share-form input[type="email"],
.share-form textarea {
    width: 100%;
    border: 1px solid #dbe1e8;
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
    font-size: 16px;
    color: #111827;
    outline: none;
}

.share-form input[type="email"]:focus,
.share-form textarea:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.10);
}

.share-form textarea {
    resize: vertical;
    min-height: 120px;
}

.item-menu-btn {
    border: none;
    background: transparent;
    color: #5f6368;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.item-menu-btn:hover {
    background: #eef2f7;
    color: #111827;
}
.file-preview-inline {
    display: inline-flex;
    align-items: center;
}
.context-menu {
    position: fixed;
    z-index: 4000;
    display: none;
    min-width: 210px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    padding: 8px;
}

.context-menu.is-open {
    display: block;
}

.context-menu-item {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.context-menu-item:hover {
    background: #f3f6fb;
}

.context-menu-item.danger {
    color: #b42318;
}

.context-menu-item.danger:hover {
    background: #fef3f2;
}

.context-menu-item.disabled,
.context-menu-item:disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

.file-preview-inline {
    display: inline-flex;
    align-items: center;
}

.item-menu-btn {
    border: none;
    background: transparent;
    color: #5f6368;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.item-menu-btn:hover {
    background: #eef2f7;
    color: #111827;
}

.manage-share-list {
    display: grid;
    gap: 14px;
    max-width: 900px;
}

.manage-share-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.manage-share-main {
    min-width: 0;
}

.manage-share-email {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.manage-share-meta {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.manage-share-message {
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}
.file-view-page {
    min-height: 100vh;
    background: #f8f9fb;
    padding: 18px 22px 24px;
}

.file-view-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 16px 18px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.file-view-head-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.file-back-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eef2f7;
    display: grid;
    place-items: center;
    font-size: 22px;
    color: #111827;
    text-decoration: none;
    flex: 0 0 auto;
}

.file-view-meta-wrap {
    min-width: 0;
}

.file-view-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-view-subtitle {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

.file-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.file-zoom-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-right: 8px;
    margin-right: 4px;
    border-right: 1px solid #e5e7eb;
}

.toolbar-btn {
    border: none;
    background: #fff;
    color: #111827;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.toolbar-btn:hover {
    background: #f8fafc;
}

.toolbar-btn.primary {
    background: #1a73e8;
    color: #fff;
}

.toolbar-btn.primary:hover {
    background: #1666cf;
}

.toolbar-btn.danger {
    background: #fef2f2;
    color: #b42318;
}

.toolbar-btn.danger:hover {
    background: #fde8e8;
}

.file-view-body {
    min-height: calc(100vh - 120px);
}

.file-view-stage {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 24px;
    min-height: 78vh;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    overflow: auto;
}

.zoom-stage {
    min-height: 70vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: auto;
    padding: 24px;
}

.zoom-target {
    transition: transform .12s ease;
}

.open-file-image {
    max-width: 100%;
    max-height: none;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.open-file-frame {
    width: 1000px;
    height: 78vh;
    border: none;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
}

.open-file-center {
    min-height: 72vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.open-file-video {
    width: min(1100px, 100%);
    max-height: 78vh;
    border-radius: 18px;
    background: #000;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.open-file-audio {
    width: min(820px, 100%);
}

.open-file-text {
    margin: 0;
    min-width: 900px;
    min-height: 70vh;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, Monaco, monospace;
    font-size: 15px;
    line-height: 1.7;
    color: #111827;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.open-file-empty {
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.open-file-empty-icon {
    font-size: 56px;
}

.action-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.action-modal.is-open {
    display: flex;
}

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

.action-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    padding: 26px;
}

.action-modal-dialog.small {
    width: min(520px, calc(100vw - 24px));
}

.action-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.action-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.action-modal-close {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #f8fafc;
    color: #64748b;
    font-size: 28px;
    cursor: pointer;
}

.action-form {
    display: grid;
    gap: 14px;
}

.action-form input[type="text"],
.action-form input[type="email"],
.action-form textarea {
    width: 100%;
    border: 1px solid #dbe1e8;
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
    font-size: 16px;
    color: #111827;
    outline: none;
}

.action-form input[type="text"]:focus,
.action-form input[type="email"]:focus,
.action-form textarea:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.10);
}

.delete-confirm-box {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .file-view-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .file-toolbar {
        justify-content: flex-start;
    }

    .file-zoom-group {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
    }

    .open-file-frame,
    .open-file-text {
        min-width: 100%;
        width: 100%;
    }

    .zoom-stage {
        padding: 8px;
    }

    .file-view-stage {
        padding: 14px;
    }
}