.ffm-drive {
  --ffm-bg: #0e1011;
  --ffm-panel: #151719;
  --ffm-panel-2: #1b1e20;
  --ffm-panel-3: #222628;
  --ffm-mint: #68e0cf;
  --ffm-mint-soft: rgba(104, 224, 207, .12);
  --ffm-white: #f5f5f2;
  --ffm-muted: #a4aaa9;
  --ffm-line: rgba(255, 255, 255, .09);
  min-height: 100vh;
  color: var(--ffm-white);
  background:
    radial-gradient(circle at 70% -20%, rgba(104, 224, 207, .07), transparent 35%),
    var(--ffm-bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.ffm-drive *,
.ffm-drive *::before,
.ffm-drive *::after { box-sizing: border-box; }
.ffm-drive a { color: inherit; text-decoration: none; }
.ffm-drive button,
.ffm-drive input,
.ffm-drive select { font: inherit; }
.ffm-drive [hidden] { display: none !important; }
.ffm-drive .screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ffm-drive-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: minmax(240px, 270px) minmax(300px, 760px) minmax(160px, 1fr);
  gap: 28px;
  align-items: center;
  min-height: 80px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--ffm-line);
  background: rgba(14, 16, 17, .92);
  backdrop-filter: blur(18px);
}

.ffm-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.ffm-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ffm-line);
  border-radius: 13px;
  background: var(--ffm-panel-2);
  font-size: 18px;
  font-style: normal;
  letter-spacing: -5px;
}
.ffm-brand-mark b { color: var(--ffm-white); }
.ffm-brand-mark i { color: var(--ffm-mint); font-style: normal; }
.ffm-brand > span:last-child { display: grid; min-width: 0; }
.ffm-brand strong { overflow: hidden; color: var(--ffm-white); font-size: 15px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.ffm-brand small { color: var(--ffm-muted); font-size: 11px; }

.ffm-global-search {
  display: flex;
  gap: 12px;
  align-items: center;
  width: min(100%, 760px);
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--ffm-line);
  border-radius: 13px;
  background: var(--ffm-panel-2);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.ffm-global-search:focus-within { border-color: rgba(104, 224, 207, .55); box-shadow: 0 0 0 3px rgba(104, 224, 207, .08); }
.ffm-global-search > span { color: var(--ffm-muted); font-size: 28px; line-height: 1; transform: rotate(-20deg); }
.ffm-global-search input {
  width: 100%;
  height: 46px;
  padding: 0;
  color: var(--ffm-white);
  border: 0;
  outline: 0;
  background: transparent;
}
.ffm-global-search input::placeholder { color: #848989; opacity: 1; }
.ffm-global-search input::-webkit-search-cancel-button { filter: invert(1); opacity: .65; }

.ffm-back-site {
  justify-self: end;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--ffm-muted) !important;
  border: 1px solid var(--ffm-line);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 750;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.ffm-back-site:hover { color: var(--ffm-white) !important; border-color: rgba(104, 224, 207, .35); background: var(--ffm-mint-soft); }
.ffm-back-site span { color: var(--ffm-mint); }

.ffm-drive-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: calc(100vh - 80px); }
.ffm-drive-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  align-self: start;
  min-height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
  padding: 24px 18px 20px;
  overflow: auto;
  border-right: 1px solid var(--ffm-line);
  background: rgba(12, 14, 15, .72);
}
body.admin-bar .ffm-drive-topbar { top: 32px; }
body.admin-bar .ffm-drive-sidebar { top: 112px; max-height: calc(100vh - 112px); }
.ffm-new-button {
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 52px;
  margin: 0 0 22px;
  padding: 0 17px;
  color: var(--ffm-white) !important;
  border: 1px solid rgba(104, 224, 207, .26);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(104, 224, 207, .13), rgba(255, 255, 255, .025));
  font-size: 13px;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease;
}
.ffm-new-button:hover { border-color: var(--ffm-mint); transform: translateY(-1px); }
.ffm-new-button b { color: var(--ffm-mint); font-size: 21px; line-height: 1; }
.ffm-folder-admin { margin: -10px 0 17px; border: 1px solid var(--ffm-line); border-radius: 12px; background: rgba(255, 255, 255, .018); }
.ffm-folder-admin summary { display: flex; gap: 9px; align-items: center; min-height: 42px; padding: 7px 12px; color: #cfd3d2; cursor: pointer; font-size: 11px; font-weight: 800; list-style: none; }
.ffm-folder-admin summary::-webkit-details-marker { display: none; }
.ffm-folder-admin summary b { color: var(--ffm-mint); font-size: 17px; }
.ffm-folder-admin[open] summary { color: var(--ffm-white); border-bottom: 1px solid var(--ffm-line); }
.ffm-folder-admin form { display: grid; gap: 10px; padding: 12px; }
.ffm-folder-admin label { display: grid; gap: 4px; margin: 0; }
.ffm-folder-admin label > span { color: #858b89; font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.ffm-folder-admin input,
.ffm-folder-admin select { width: 100%; min-height: 36px; padding: 0 9px; color: var(--ffm-white); border: 1px solid var(--ffm-line); border-radius: 8px; outline: 0; background: var(--ffm-panel-2); font-size: 10px; }
.ffm-folder-admin input:focus,
.ffm-folder-admin select:focus { border-color: rgba(104, 224, 207, .52); }
.ffm-folder-admin button { min-height: 36px; color: #08201c; border: 0; border-radius: 8px; background: var(--ffm-mint); cursor: pointer; font-size: 10px; font-weight: 900; }

.ffm-primary-nav { display: grid; gap: 4px; }
.ffm-primary-nav a,
.ffm-folder-tree a {
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  color: #c8cccb !important;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 680;
  transition: color 160ms ease, background 160ms ease;
}
.ffm-primary-nav a:hover,
.ffm-folder-tree a:hover { color: var(--ffm-white) !important; background: rgba(255, 255, 255, .045); }
.ffm-primary-nav a.is-active,
.ffm-folder-tree a.is-active { color: var(--ffm-white) !important; background: var(--ffm-mint-soft); box-shadow: inset 2px 0 var(--ffm-mint); }
.ffm-primary-nav a > span { display: inline-grid; place-items: center; width: 18px; color: var(--ffm-mint); font-size: 17px; }
.ffm-drive-sidebar h2 {
  margin: 28px 10px 9px;
  color: #777e7c;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.ffm-folder-tree { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ffm-folder-tree .ffm-folder-tree { margin-left: 15px; padding-left: 8px; border-left: 1px solid var(--ffm-line); }
.ffm-folder-tree li { margin: 0; padding: 0; }
.ffm-mini-folder {
  position: relative;
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 13px;
  margin-top: 3px;
  border-radius: 2px;
  background: #777d7b;
}
.ffm-mini-folder::before { position: absolute; bottom: 11px; left: 1px; width: 8px; height: 4px; border-radius: 2px 2px 0 0; background: inherit; content: ""; }
.is-active .ffm-mini-folder { background: var(--ffm-mint); }
.ffm-sidebar-note {
  display: grid;
  grid-template-columns: 28px 1fr;
  margin-top: auto;
  padding: 18px 10px 4px;
  color: var(--ffm-muted);
  border-top: 1px solid var(--ffm-line);
}
.ffm-sidebar-note > span { grid-row: 1 / 3; color: var(--ffm-mint); font-size: 19px; }
.ffm-sidebar-note strong { color: #d5d8d7; font-size: 11px; }
.ffm-sidebar-note small { font-size: 9px; }

.ffm-drive-main { position: relative; min-width: 0; padding: 27px clamp(20px, 3vw, 46px) 50px; }
.ffm-drop-overlay { position: absolute; z-index: 35; inset: 14px; display: grid; place-content: center; gap: 5px; min-height: 260px; opacity: 0; visibility: hidden; color: var(--ffm-white); border: 2px dashed var(--ffm-mint); border-radius: 18px; background: rgba(10, 19, 20, .94); backdrop-filter: blur(12px); text-align: center; pointer-events: none; transition: opacity 150ms ease, visibility 150ms ease; }
.ffm-drop-overlay > span { color: var(--ffm-mint); font-size: 48px; line-height: 1; }
.ffm-drop-overlay strong { font-size: 18px; }
.ffm-drop-overlay small { color: var(--ffm-muted); font-size: 10px; }
.ffm-drive-main.is-dragging .ffm-drop-overlay,
.ffm-drive-main.is-uploading .ffm-drop-overlay { opacity: 1; visibility: visible; }
.ffm-drive-main.is-uploading .ffm-drop-overlay > span { animation: ffm-upload-pulse 900ms ease-in-out infinite alternate; }
@keyframes ffm-upload-pulse { to { opacity: .45; transform: translateY(-4px); } }
.ffm-admin-notice { margin-bottom: 16px; padding: 11px 14px; border: 1px solid var(--ffm-line); border-radius: 10px; font-size: 10px; font-weight: 750; }
.ffm-admin-notice.is-success { color: var(--ffm-mint); border-color: rgba(104, 224, 207, .28); background: rgba(104, 224, 207, .07); }
.ffm-admin-notice.is-error { color: #ffb7b7; border-color: rgba(229, 88, 88, .3); background: rgba(229, 88, 88, .07); }
.ffm-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 22px; color: #7d8381; font-size: 11px; }
.ffm-breadcrumbs a:hover { color: var(--ffm-mint); }
.ffm-breadcrumbs strong { color: #cdd0cf; }
.ffm-breadcrumbs span { color: #505553; }
.ffm-drive-heading { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; margin-top: 13px; }
.ffm-drive-heading h1 { margin: 0; color: var(--ffm-white); font-size: clamp(22px, 2.2vw, 32px); font-weight: 730; letter-spacing: -.035em; line-height: 1.1; }
.ffm-count { min-height: 16px; margin: 7px 0 0; color: #7f8583; font-size: 10px; }
.ffm-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.ffm-add-current,
.ffm-edit-current { min-height: 36px; padding: 0 13px; color: #09221e; border: 1px solid var(--ffm-mint); border-radius: 9px; background: var(--ffm-mint); cursor: pointer; font-size: 10px; font-weight: 900; }
.ffm-add-current:hover { color: var(--ffm-mint); background: transparent; }
.ffm-edit-current { display: grid; place-items: center; width: 37px; padding: 0; color: var(--ffm-white); border-color: var(--ffm-line); background: var(--ffm-panel); font-size: 16px; }
.ffm-edit-current:hover { color: var(--ffm-mint); border-color: var(--ffm-mint); }
.ffm-layout-switch { display: flex; overflow: hidden; border: 1px solid var(--ffm-line); border-radius: 10px; }
.ffm-layout-switch button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 35px;
  padding: 0;
  color: #8f9593;
  border: 0;
  border-right: 1px solid var(--ffm-line);
  background: transparent;
  cursor: pointer;
}
.ffm-layout-switch button:last-child { border-right: 0; }
.ffm-layout-switch button:hover { color: var(--ffm-white); }
.ffm-layout-switch button.is-active { color: #09221e; background: var(--ffm-mint); }

.ffm-filters { display: flex; flex-wrap: wrap; gap: 9px; margin: 24px 0 18px; }
.ffm-filters label { margin: 0; }
.ffm-filters select {
  min-width: 132px;
  min-height: 36px;
  padding: 0 33px 0 12px;
  color: #cbd0ce;
  border: 1px solid var(--ffm-line);
  border-radius: 9px;
  outline: 0;
  background: var(--ffm-panel) linear-gradient(45deg, transparent 50%, #777 50%) calc(100% - 15px) 15px / 5px 5px no-repeat;
  appearance: none;
  font-size: 11px;
}
.ffm-filters select:focus { border-color: rgba(104, 224, 207, .5); }

.ffm-file-list { overflow: hidden; border: 1px solid var(--ffm-line); border-radius: 15px; background: rgba(21, 23, 25, .74); }
.ffm-list-header,
.ffm-file-row {
  display: grid;
  grid-template-columns: minmax(270px, 1.5fr) minmax(175px, .72fr) minmax(160px, .58fr) 105px 68px;
  gap: 16px;
  align-items: center;
}
.ffm-list-header {
  min-height: 44px;
  padding: 0 17px;
  color: #737977;
  border-bottom: 1px solid var(--ffm-line);
  background: rgba(255, 255, 255, .012);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ffm-file-row {
  position: relative;
  min-height: 62px;
  padding: 8px 17px;
  color: #afb4b2;
  border-bottom: 1px solid var(--ffm-line);
  font-size: 10px;
  transition: background 150ms ease;
}
.ffm-file-row:last-child { border-bottom: 0; }
.ffm-file-row:hover { background: rgba(255, 255, 255, .035); }
.ffm-folder-row:hover { background: var(--ffm-mint-soft); }
.ffm-name-cell { display: flex; gap: 13px; align-items: center; min-width: 0; }
.ffm-name-cell > span:last-child { display: grid; min-width: 0; }
.ffm-name-cell strong { overflow: hidden; color: #ebedeb; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.ffm-name-cell small { overflow: hidden; margin-top: 2px; color: #6f7573; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.ffm-folder-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 26px;
  width: 26px;
  height: 18px;
  margin-top: 3px;
  border-radius: 3px;
  background: #8a908e;
}
.ffm-folder-icon::before { position: absolute; bottom: 16px; left: 2px; width: 11px; height: 5px; border-radius: 3px 3px 0 0; background: inherit; content: ""; }
.ffm-folder-row:hover .ffm-folder-icon { background: var(--ffm-mint); }
.ffm-file-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 32px;
  color: #fff;
  border-radius: 4px 4px 6px 4px;
  background: #5e6664;
  box-shadow: inset 0 -9px rgba(0, 0, 0, .09);
  font-size: 7px;
  font-weight: 900;
}
.ffm-file-icon.is-pdf { background: #d95455; }
.ffm-file-icon.is-doc { background: #4c82d6; font-size: 14px; }
.ffm-file-icon.is-ppt { color: #1a1710; background: #e9ae3e; font-size: 14px; }
.ffm-file-icon.is-xls { color: #081711; background: #54c88b; font-size: 14px; }
.ffm-file-icon.is-image { color: #fff; background: #9a65d6; font-size: 7px; }
.ffm-file-icon.is-zip { background: #8b6bd4; }
.ffm-file-icon.is-file { color: #08201c; background: var(--ffm-mint); }
.ffm-owner { display: flex; gap: 8px; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ffm-owner i { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; color: var(--ffm-mint); border: 1px solid rgba(104, 224, 207, .25); border-radius: 50%; background: var(--ffm-panel-3); font-size: 7px; font-style: normal; font-weight: 900; }
.ffm-row-action { display: flex; gap: 2px; align-items: center; justify-content: flex-end; text-align: center; }
.ffm-row-action > a,
.ffm-folder-row .ffm-row-action > a {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #9aa09e;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 700;
}
.ffm-row-action > a:hover { color: #08201c; background: var(--ffm-mint); }
.ffm-folder-row .ffm-row-action > a { color: var(--ffm-mint); }
.ffm-row-action form { display: inline-flex; margin: 0; }
.ffm-row-action form input { display: none; }
.ffm-row-action button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: #8d9391; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 17px; line-height: 1; }
.ffm-row-action button:hover { color: #08201c; background: var(--ffm-mint); }

.ffm-drive[data-layout="grid"] .ffm-file-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 13px;
  overflow: visible;
  border: 0;
  background: transparent;
}
.ffm-drive[data-layout="grid"] .ffm-list-header { display: none; }
.ffm-drive[data-layout="grid"] .ffm-file-row {
  grid-template-columns: minmax(0, 1fr) 68px;
  grid-template-areas: "name action" "owner owner" "date size";
  gap: 12px 9px;
  min-height: 156px;
  padding: 17px;
  border: 1px solid var(--ffm-line);
  border-radius: 14px;
  background: var(--ffm-panel);
}
.ffm-drive[data-layout="grid"] .ffm-file-row:hover { border-color: rgba(104, 224, 207, .32); background: var(--ffm-panel-2); }
.ffm-drive[data-layout="grid"] .ffm-name-cell { grid-area: name; align-self: start; align-items: flex-start; }
.ffm-drive[data-layout="grid"] .ffm-name-cell strong { white-space: normal; }
.ffm-drive[data-layout="grid"] .ffm-owner { grid-area: owner; }
.ffm-drive[data-layout="grid"] .ffm-file-row > span:nth-child(3) { grid-area: date; align-self: end; }
.ffm-drive[data-layout="grid"] .ffm-file-row > span:nth-child(4) { grid-area: size; align-self: end; text-align: right; }
.ffm-drive[data-layout="grid"] .ffm-row-action { grid-area: action; justify-self: end; }

.ffm-drive .ffm-empty,
.ffm-drive .ffm-welcome {
  margin-top: 15px;
  padding: 46px 24px;
  color: var(--ffm-muted);
  border: 1px dashed rgba(104, 224, 207, .24);
  border-radius: 15px;
  background: rgba(104, 224, 207, .025);
  text-align: center;
}
.ffm-drive .ffm-empty h3,
.ffm-drive .ffm-welcome h3 { margin: 0 0 6px; color: var(--ffm-white); font-size: 17px; }
.ffm-drive .ffm-empty p,
.ffm-drive .ffm-welcome p { margin: 0; color: var(--ffm-muted); font-size: 11px; }
.ffm-drive .ffm-welcome a { display: inline-block; margin-top: 14px; color: var(--ffm-mint); font-size: 11px; font-weight: 800; }
.ffm-drive .ffm-welcome button { margin-top: 15px; padding: 9px 14px; color: #08201c; border: 0; border-radius: 8px; background: var(--ffm-mint); cursor: pointer; font-size: 10px; font-weight: 900; }

body.ffm-dialog-open { overflow: hidden; }
.ffm-modal { width: min(560px, calc(100vw - 28px)); max-width: none; max-height: calc(100vh - 40px); padding: 0; overflow: auto; color: var(--ffm-white); border: 1px solid var(--ffm-line); border-radius: 17px; outline: 0; background: transparent; box-shadow: 0 32px 90px rgba(0, 0, 0, .62); }
.ffm-modal::backdrop { background: rgba(3, 6, 8, .78); backdrop-filter: blur(7px); }
.ffm-modal-panel { position: relative; padding: 29px; background: linear-gradient(145deg, #1a1e20, #111517); }
.ffm-modal-close { position: absolute; z-index: 2; top: 13px; right: 13px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #9da3a1; border: 1px solid var(--ffm-line); border-radius: 9px; background: transparent; cursor: pointer; font-size: 20px; }
.ffm-modal-close:hover { color: var(--ffm-white); border-color: var(--ffm-mint); }
.ffm-modal-kicker { color: var(--ffm-mint); font-size: 8px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.ffm-modal h2 { margin: 7px 42px 2px 0; color: var(--ffm-white); font-size: 25px; letter-spacing: -.035em; }
.ffm-modal h2 + p { margin: 0 0 21px; color: var(--ffm-muted); font-size: 10px; }
.ffm-modal form { display: grid; gap: 14px; margin: 0; }
.ffm-modal form > input[type="hidden"] { display: none; }
.ffm-modal form > label:not(.ffm-delete-confirm) { display: grid; gap: 6px; margin: 0; }
.ffm-modal form > label > span { color: #c8cccb; font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.ffm-modal input[type="text"],
.ffm-modal textarea { width: 100%; padding: 10px 12px; color: var(--ffm-white); border: 1px solid var(--ffm-line); border-radius: 9px; outline: 0; background: #0f1315; font-size: 12px; resize: vertical; }
.ffm-modal input[type="text"] { min-height: 42px; }
.ffm-modal input[type="text"]:focus,
.ffm-modal textarea:focus { border-color: rgba(104, 224, 207, .55); box-shadow: 0 0 0 3px rgba(104, 224, 207, .06); }
.ffm-file-picker { padding: 13px; border: 1px dashed rgba(104, 224, 207, .3); border-radius: 10px; background: rgba(104, 224, 207, .03); }
.ffm-file-picker input[type="file"] { width: 100%; color: var(--ffm-muted); font-size: 10px; }
.ffm-file-picker input[type="file"]::file-selector-button { margin-right: 10px; padding: 8px 11px; color: #08201c; border: 0; border-radius: 7px; background: var(--ffm-mint); cursor: pointer; font-size: 9px; font-weight: 900; }
.ffm-file-picker small { color: #747b79; font-size: 8px; }
.ffm-modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 4px; }
.ffm-modal-actions button { min-height: 39px; padding: 0 15px; color: #c2c7c5; border: 1px solid var(--ffm-line); border-radius: 8px; background: transparent; cursor: pointer; font-size: 9px; font-weight: 900; }
.ffm-modal-actions button[type="submit"] { color: #08201c; border-color: var(--ffm-mint); background: var(--ffm-mint); }
.ffm-modal-actions button:hover { border-color: var(--ffm-mint); }
.ffm-danger-zone { margin-top: 25px; padding: 18px; border: 1px solid rgba(218, 74, 74, .28); border-radius: 11px; background: rgba(218, 74, 74, .055); }
.ffm-danger-zone h3 { margin: 0 0 6px; color: #ff9a9a; font-size: 14px; }
.ffm-danger-zone p { margin: 0 0 14px; color: #bdc1c0; font-size: 10px; line-height: 1.5; }
.ffm-danger-zone p strong { color: #ff9a9a; }
.ffm-delete-confirm { display: flex; gap: 9px; align-items: flex-start; margin: 0; color: #d4d7d6; font-size: 9px; line-height: 1.4; }
.ffm-delete-confirm input { flex: 0 0 auto; margin-top: 2px; accent-color: #d95050; }
.ffm-delete-button { min-height: 40px; color: #fff; border: 1px solid #d95050; border-radius: 8px; background: #b83e3e; cursor: pointer; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.ffm-delete-button:hover { background: #d14848; }
.ffm-delete-button:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 1180px) {
  .ffm-drive-topbar { grid-template-columns: 220px minmax(260px, 1fr) auto; gap: 18px; }
  .ffm-drive-body { grid-template-columns: 230px minmax(0, 1fr); }
  .ffm-list-header,
  .ffm-file-row { grid-template-columns: minmax(250px, 1.4fr) minmax(150px, .65fr) 145px 78px 68px; gap: 11px; }
  .ffm-drive[data-layout="grid"] .ffm-file-list { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
}

@media (max-width: 900px) {
  .ffm-drive-topbar { grid-template-columns: minmax(190px, 1fr) auto; }
  .ffm-global-search { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .ffm-back-site { grid-column: 2; grid-row: 1; }
  .ffm-drive-body { grid-template-columns: 210px minmax(0, 1fr); }
  .ffm-list-header,
  .ffm-file-row { grid-template-columns: minmax(220px, 1fr) 135px 70px 68px; }
  .ffm-list-header > span:nth-child(2),
  .ffm-file-row > span:nth-child(2) { display: none; }
  .ffm-drive[data-layout="grid"] .ffm-file-list { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .ffm-drive[data-layout="grid"] .ffm-file-row > span:nth-child(2) { display: flex; }
}

@media (max-width: 700px) {
  .ffm-drive-topbar { position: relative; min-height: 0; padding: 13px 14px; }
  .ffm-brand strong { font-size: 13px; }
  .ffm-brand-mark { flex-basis: 39px; width: 39px; height: 39px; }
  .ffm-back-site { padding: 0 10px; }
  .ffm-back-site span { display: none; }
  .ffm-global-search { min-height: 44px; }
  .ffm-global-search input { height: 42px; }
  .ffm-drive-body { display: block; }
  .ffm-drive-sidebar { position: relative; top: auto; min-height: 0; max-height: none; padding: 14px; border-right: 0; border-bottom: 1px solid var(--ffm-line); }
  .ffm-new-button { min-height: 44px; margin-bottom: 10px; }
  .ffm-primary-nav { grid-template-columns: 1fr 1fr; }
  .ffm-drive-sidebar h2 { margin-top: 18px; }
  .ffm-folder-tree { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ffm-folder-tree .ffm-folder-tree { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ffm-sidebar-note { display: none; }
  .ffm-drive-main { padding: 20px 14px 40px; }
  .ffm-drive-heading { align-items: flex-start; flex-direction: column; }
  .ffm-heading-actions { width: 100%; justify-content: flex-start; }
  .ffm-list-header,
  .ffm-file-row { grid-template-columns: minmax(0, 1fr) 70px 68px; padding-inline: 12px; }
  .ffm-list-header > span:nth-child(3),
  .ffm-file-row > span:nth-child(3) { display: none; }
  .ffm-drive[data-layout="grid"] .ffm-file-row > span:nth-child(3) { display: block; }
}

@media (max-width: 782px) {
  body.admin-bar .ffm-drive-topbar { top: 46px; }
}

@media (max-width: 700px) {
  body.admin-bar .ffm-drive-topbar { top: 0; }
  body.admin-bar .ffm-drive-sidebar { top: auto; max-height: none; }
}

@media (max-width: 480px) {
  .ffm-back-site { font-size: 0; }
  .ffm-back-site::before { color: var(--ffm-mint); font-size: 18px; content: "↗"; }
  .ffm-drive-heading { align-items: flex-start; }
  .ffm-add-current { flex: 1; }
  .ffm-modal-panel { padding: 24px 18px; }
  .ffm-modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ffm-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .ffm-filters select { width: 100%; min-width: 0; }
  .ffm-list-header,
  .ffm-file-row { grid-template-columns: minmax(0, 1fr) 68px; }
  .ffm-list-header > span:nth-child(4),
  .ffm-file-row > span:nth-child(4) { display: none; }
  .ffm-name-cell strong { font-size: 11px; }
  .ffm-drive[data-layout="grid"] .ffm-file-list { grid-template-columns: 1fr; }
  .ffm-drive[data-layout="grid"] .ffm-file-row > span:nth-child(4) { display: block; }
}

/* Interface 2.3 — interação por clique duplo e tipografia uniforme */
.ffm-new-button,
.ffm-folder-admin summary {
  font-size: 12px;
  font-weight: 680;
}
.ffm-file-row[data-ffm-folder-row],
.ffm-file-row[data-download-url]:not([data-download-url=""]) { cursor: pointer; }

/* Interface 2.6 — árvore de pastas responsiva e sem sobreposição */
.ffm-folder-tree li,
.ffm-folder-tree a { min-width: 0; }

@media (max-width: 700px) {
  .ffm-drive-sidebar > h2 {
    margin: 20px 10px 11px;
  }

  .ffm-folder-tree,
  .ffm-folder-tree .ffm-folder-tree {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    width: 100%;
  }

  .ffm-folder-tree li {
    display: block;
    width: 100%;
  }

  .ffm-folder-tree a {
    align-items: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 10px 11px;
    line-height: 1.28;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ffm-drive-sidebar > .ffm-folder-tree > li > a {
    min-height: 48px;
    color: #e3e7e5 !important;
    border: 1px solid rgba(255, 255, 255, .075);
    background: rgba(255, 255, 255, .022);
    font-size: 12px;
    font-weight: 760;
  }

  .ffm-drive-sidebar > .ffm-folder-tree > li > a:hover,
  .ffm-drive-sidebar > .ffm-folder-tree > li > a.is-active {
    border-color: rgba(104, 224, 207, .28);
    background: var(--ffm-mint-soft);
  }

  .ffm-folder-tree .ffm-folder-tree {
    grid-column: auto;
    margin: 5px 0 10px 15px;
    padding-left: 12px;
    border-left: 1px solid rgba(104, 224, 207, .18);
  }

  .ffm-folder-tree .ffm-folder-tree a {
    min-height: 40px;
    padding: 8px 10px;
    color: #bdc4c2 !important;
    font-size: 11.5px;
    background: rgba(255, 255, 255, .012);
  }

  .ffm-mini-folder {
    flex-basis: 18px;
    margin-top: 2px;
  }
}

@media (max-width: 420px) {
  .ffm-drive-sidebar { padding-inline: 12px; }
  .ffm-folder-tree .ffm-folder-tree { margin-left: 11px; padding-left: 10px; }
}

/* Interface 2.8 — navegação de pastas em formato sanfona */
.ffm-folder-tree-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 4px;
  align-items: center;
  min-width: 0;
}
.ffm-folder-tree-row > a { min-width: 0; }
.ffm-folder-node:not(.has-children) > .ffm-folder-tree-row { grid-template-columns: minmax(0, 1fr); }
.ffm-folder-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #8f9694;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.ffm-folder-toggle:hover,
.ffm-folder-toggle:focus-visible {
  color: var(--ffm-mint);
  border-color: rgba(104, 224, 207, .24);
  outline: 0;
  background: rgba(104, 224, 207, .07);
}
.ffm-folder-toggle span {
  font-size: 18px;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform 180ms ease;
}
.ffm-folder-node.is-open > .ffm-folder-tree-row .ffm-folder-toggle span { transform: rotate(0); }

@media (max-width: 700px) {
  .ffm-folder-tree-row { grid-template-columns: minmax(0, 1fr) 38px; gap: 6px; }
  .ffm-folder-toggle { width: 38px; height: 38px; }
}
