@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --bg: #f6f7fb;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --accent: #f2c14e;
    --accent-strong: #f08a24;
    --text: #1c1f2a;
    --muted: #6b7280;
    --border: #e4e7ee;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    --danger: #e45252;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Sora', sans-serif;
    background: radial-gradient(circle at top, #ffffff 0%, #f6f7fb 55%, #eef1f7 100%);
    color: var(--text);
    min-height: 100vh;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #1b1f2a;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-tag {
    font-size: 0.95rem;
    color: var(--muted);
}

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

.nav-user {
    color: var(--muted);
    font-size: 0.9rem;
}

.main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card h1,
.card h2,
.card h3 {
    margin: 0 0 12px;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.9rem;
    color: var(--muted);
}

label {
    display: block;
    margin: 12px 0 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

input,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    font-family: inherit;
}

input[type="file"] {
    padding: 10px;
}

.button {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #1b1f2a;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button.ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.button.danger {
    background: var(--danger);
    color: #fff;
}

.alert {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.alert.error {
    background: rgba(228, 82, 82, 0.12);
    color: #b4232a;
}

.alert.success {
    background: rgba(35, 161, 107, 0.12);
    color: #1c7b53;
}

.alert.info {
    background: rgba(79, 109, 235, 0.12);
    color: #2b4fd0;
}

.folder-list,
.file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.folder {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 14px;
    background: #f8f9fe;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
}

.folder-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(242, 193, 78, 0.25);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #a5671f;
}

.folder-name {
    font-weight: 600;
}

.folder-meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #f8f9fe;
}

.file-name {
    font-weight: 600;
}

.file-meta {
    color: var(--muted);
    font-size: 0.85rem;
}

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

.file-actions.block {
    margin-top: 16px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.auth {
    display: grid;
    place-items: center;
}

.share-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #f8f9fe;
    margin-bottom: 18px;
}

.share-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #a5671f;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.callout {
    margin-top: 18px;
    padding: 14px;
    border-radius: 14px;
    border: 1px dashed rgba(31, 41, 55, 0.2);
    background: rgba(242, 193, 78, 0.12);
    color: #7a4a16;
}

.footer {
    margin-top: 36px;
    color: var(--muted);
    font-size: 0.85rem;
}

.preview {
    margin-top: 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: #fff;
}

.preview img,
.preview video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    background: #f3f4f8;
}

.preview.placeholder {
    padding: 24px;
    text-align: center;
}

.toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0;
}

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

.inline-form input,
.inline-form select {
    width: auto;
    min-width: 200px;
}

.dir-library {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    background: #fbfcff;
}

.dir-tree {
    list-style: none;
    padding-left: 18px;
    margin: 0;
}

.dir-node {
    margin: 8px 0;
}

.dir-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dir-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
}

.dir-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(242, 193, 78, 0.25);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.dir-count {
    color: var(--muted);
    font-size: 0.85rem;
}

.file-explorer-shell {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    height: 72vh;
}

.file-explorer-shell .fe_fileexplorer_wrap {
    height: 100%;
    min-height: 720px;
}

.file-explorer-shell .fe_fileexplorer_inner_wrap,
.file-explorer-shell .fe_fileexplorer_body_wrap_outer,
.file-explorer-shell .fe_fileexplorer_body_wrap {
    height: 100%;
}


@media (max-width: 720px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav {
        width: 100%;
        justify-content: space-between;
    }
    .file {
        flex-direction: column;
        align-items: flex-start;
    }
    .inline-form input,
    .inline-form select {
        width: 100%;
    }
}
