.medfiles-workspace{display:grid;gap:24px}
.medfiles-hero{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.7fr);gap:24px;padding:32px;border-radius:28px;background:linear-gradient(135deg,#312e81 0%,#4f46e5 55%,#6d5dfc 100%);color:#fff;box-shadow:0 22px 60px rgba(49,46,129,.22)}
.medfiles-hero h1{margin:8px 0 10px;font-size:clamp(2.1rem,4vw,3.8rem);letter-spacing:-.04em}
.medfiles-hero p{max-width:700px;margin:0;color:rgba(255,255,255,.82);font-size:1.05rem;line-height:1.65}
.medfiles-hero-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:24px}
.medfiles-hero-meter{align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:22px;border:1px solid rgba(255,255,255,.18);border-radius:22px;background:rgba(255,255,255,.1);backdrop-filter:blur(10px)}
.medfiles-hero-meter>span{font-size:.76rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.68)}
.medfiles-hero-meter strong{margin:10px 0 13px;font-size:1.25rem}
.medfiles-hero-meter small{margin-top:10px;color:rgba(255,255,255,.68);line-height:1.4}
.storage-track{height:9px;border-radius:999px;background:rgba(255,255,255,.18);overflow:hidden}
.storage-track i{display:block;height:100%;border-radius:inherit;background:#8ff0c3;min-width:4px}
.medfiles-toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.medfiles-action-card{border:1px solid #e7e7f3;border-radius:22px;background:#fff;box-shadow:0 12px 32px rgba(35,31,86,.06);overflow:hidden}
.medfiles-action-card summary{list-style:none;display:flex;align-items:center;gap:13px;padding:18px 20px;cursor:pointer}
.medfiles-action-card summary::-webkit-details-marker{display:none}
.medfiles-action-card summary>span:nth-child(2){display:grid;gap:3px}
.medfiles-action-card summary strong{font-size:.98rem;color:#27243f}
.medfiles-action-card summary small{font-size:.8rem;color:#77748b}
.medfiles-action-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:#f0efff;color:#4f46e5;font-size:1.4rem;font-weight:800}
.medfiles-create-form,.medfiles-upload-form,.medfiles-folder-form{display:grid;gap:12px;padding:0 20px 20px}
.medfiles-create-form label,.medfiles-folder-form label,.file-actions-menu label{display:grid;gap:6px;font-size:.78rem;font-weight:800;color:#5f5b75}
.medfiles-create-form input,.medfiles-create-form select,.medfiles-folder-form input,.file-actions-menu input,.file-actions-menu select{width:100%;min-height:42px;border:1px solid #dcdbea;border-radius:12px;padding:9px 11px;background:#fff;color:#25223c}
.file-drop{display:grid;place-items:center;text-align:center;gap:7px;padding:22px;border:1px dashed #aaa5dd;border-radius:16px;background:#faf9ff;cursor:pointer;color:#4f46e5}
.file-drop input{max-width:100%}
.file-drop span{font-weight:800}
.file-drop small{color:#77748b}
.medfiles-browser{padding:24px;border:1px solid #e8e7f2;border-radius:26px;background:#fff;box-shadow:0 14px 40px rgba(34,30,78,.05)}
.medfiles-browser-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:20px}
.medfiles-browser-head h2{margin:7px 0 0;font-size:1.55rem;color:#26233d}
.medfiles-breadcrumbs{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:.83rem}
.medfiles-breadcrumbs a{color:#5b52db;text-decoration:none;font-weight:750}
.medfiles-breadcrumbs span{color:#a19db2}
.medfiles-folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;margin-bottom:20px}
.medfiles-folder{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:15px;border:1px solid #e7e6f0;border-radius:17px;text-decoration:none;color:#2d2942;background:#fcfcff;transition:.18s ease}
.medfiles-folder:hover{transform:translateY(-2px);border-color:#b8b3ef;box-shadow:0 12px 24px rgba(67,57,170,.09)}
.folder-symbol{font-size:1.6rem;color:#7c71f2}
.medfiles-folder>span:nth-child(2){display:grid;gap:3px}
.medfiles-folder small{color:#858194}
.medfiles-table-wrap{overflow:visible}
.medfiles-table{width:100%;border-collapse:collapse}
.medfiles-table th{padding:11px 12px;border-bottom:1px solid #ecebf3;text-align:left;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:#898597}
.medfiles-table td{padding:13px 12px;border-bottom:1px solid #f0eff5;color:#4c4860;font-size:.9rem;vertical-align:middle}
.medfiles-table tbody tr:last-child td{border-bottom:0}
.medfiles-file-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:#27243c}
.medfiles-file-link>span:last-child{display:grid;gap:3px}
.medfiles-file-link small{font-size:.76rem;color:#8b8799}
.file-type-icon{display:grid;place-items:center;flex:0 0 auto;width:44px;height:44px;border-radius:13px;font-size:.65rem;font-weight:900;letter-spacing:.04em}
.file-docx{background:#e8f0ff;color:#2467c9}
.file-xlsx{background:#e7f8ef;color:#167c4f}
.file-pptx{background:#fff0e8;color:#c45320}
.file-pdf{background:#ffecee;color:#b62539}
.file-actions{position:relative}
.file-actions>summary{list-style:none;display:grid;place-items:center;width:38px;height:34px;border-radius:10px;background:#f5f4fa;cursor:pointer;font-weight:900;color:#5f5a75}
.file-actions>summary::-webkit-details-marker{display:none}
.file-actions-menu{position:absolute;right:0;top:42px;z-index:30;display:grid;gap:7px;width:260px;padding:12px;border:1px solid #e2e0ed;border-radius:15px;background:#fff;box-shadow:0 18px 50px rgba(28,24,68,.18)}
.file-actions-menu>a,.file-actions-menu>details>summary,.file-actions-menu button{display:block;width:100%;padding:9px 10px;border:0;border-radius:10px;background:transparent;text-align:left;text-decoration:none;color:#3f3a56;font:inherit;cursor:pointer}
.file-actions-menu>a:hover,.file-actions-menu>details>summary:hover,.file-actions-menu button:hover{background:#f5f3ff}
.file-actions-menu details{border-top:1px solid #efedf5;padding-top:6px}
.file-actions-menu details>summary{list-style:none;font-weight:700;cursor:pointer}
.file-actions-menu details>form{display:grid;gap:8px;padding:8px 3px}
.file-actions-menu details button{background:#4f46e5;color:#fff;text-align:center;font-weight:800}
.file-actions-menu .danger-link{color:#b4233a}
.medfiles-empty{display:grid;justify-items:center;text-align:center;padding:58px 20px}
.medfiles-empty>span{display:grid;place-items:center;width:70px;height:70px;border-radius:22px;background:#efedff;color:#4f46e5;font-weight:950;font-size:1.2rem}
.medfiles-empty h3{margin:15px 0 6px;color:#29253f}
.medfiles-empty p{margin:0 0 18px;color:#7e7a8d}
.medfiles-recents{display:grid;gap:12px}
.section-header.compact{margin:0}
.recent-file-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.recent-file-card{display:flex;align-items:center;gap:12px;padding:15px;border:1px solid #e7e6f0;border-radius:18px;background:#fff;text-decoration:none;color:#2b2741}
.recent-file-card>span:last-child{display:grid;gap:4px;min-width:0}
.recent-file-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.recent-file-card small{color:#8b8799}
.medfiles-academic-flow{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px;border-radius:24px;background:#f3f1ff;border:1px solid #dfdbff}
.medfiles-academic-flow h2{margin:7px 0;color:#302b58}
.medfiles-academic-flow p{max-width:780px;margin:0;color:#67617b;line-height:1.6}
.medfiles-academic-flow>a{flex:0 0 auto;padding:12px 16px;border-radius:13px;background:#4f46e5;color:#fff;text-decoration:none;font-weight:850}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.medfiles-editor-body{margin:0;min-height:100vh;background:#11132a;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow:hidden}
.medfiles-editor-bar{height:60px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;padding:0 16px;background:#191b35;color:#fff;border-bottom:1px solid rgba(255,255,255,.09)}
.editor-back,.editor-actions a{color:#fff;text-decoration:none;font-weight:800}
.editor-back{display:flex;gap:7px;align-items:center}
.editor-file-meta{display:flex;align-items:center;gap:10px;min-width:0}
.editor-file-meta .file-type-icon{width:36px;height:36px;border-radius:10px}
.editor-file-meta>span:last-child{display:grid;gap:2px;min-width:0}
.editor-file-meta strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.editor-file-meta small{font-size:.72rem;color:#b7b9ce}
.editor-actions{display:flex;align-items:center;gap:8px}
.editor-actions a{padding:8px 11px;border-radius:10px;background:rgba(255,255,255,.1);font-size:.84rem}
.medfiles-editor-shell{height:calc(100vh - 60px);position:relative;background:#f5f5f8}
#onlyoffice-editor{width:100%;height:100%}
.editor-fallback{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;text-align:center;padding:30px;background:#f7f7fb;color:#29263d}
.editor-fallback[hidden]{display:none}
.editor-fallback a{padding:11px 15px;border-radius:10px;background:#4f46e5;color:#fff;text-decoration:none;font-weight:800}

@media (max-width:980px){
  .medfiles-hero{grid-template-columns:1fr}
  .medfiles-toolbar{grid-template-columns:1fr}
  .medfiles-table th:nth-child(2),.medfiles-table td:nth-child(2),.medfiles-table th:nth-child(4),.medfiles-table td:nth-child(4){display:none}
}
@media (max-width:700px){
  .medfiles-hero,.medfiles-browser{padding:20px;border-radius:20px}
  .medfiles-browser-head,.medfiles-academic-flow{align-items:flex-start;flex-direction:column}
  .medfiles-table th:nth-child(3),.medfiles-table td:nth-child(3){display:none}
  .file-actions-menu{position:fixed;left:16px;right:16px;bottom:82px;top:auto;width:auto}
  .medfiles-editor-bar{grid-template-columns:auto 1fr;padding:0 10px}
  .editor-actions{display:none}
  .editor-back span{display:none}
}
