:root {
  color-scheme: light;
  --text: #202124;
  --muted: #5f6368;
  --line: #e0e0e0;
  --hover: #f1f3f4;
  --selected: #c2e7ff;
  --blue: #1a73e8;
  --nav: #c2e7ff;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f8fafd;
}
.card {
  background: #fff;
  padding: 32px 28px;
  border-radius: 28px;
  width: min(420px, calc(100% - 32px));
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px rgba(60, 64, 67, 0.15);
  text-align: center;
}
.brand-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: #1a73e8;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 24px;
}
.card h1 { margin: 0 0 8px; font-size: 22px; font-weight: 500; }
.card p { margin: 0; color: var(--muted); }
.org-list { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.org-list button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 10px 16px;
}
.org-list button:hover { background: var(--hover); }
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); height: 100vh; overflow: hidden; }
main { min-width: 0; height: 100vh; overflow: auto; background: #fff; }
.side {
  background: #fff;
  padding: 12px 0 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.new-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 8px 16px 12px;
  padding: 16px 20px;
  width: fit-content;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  font-size: 14px;
  font-weight: 500;
}
.new-btn svg, .nav svg, .icon-btn svg, .search-wrap svg { width: 24px; height: 24px; flex: none; }
.new-btn:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15); }
.new-menu {
  margin: 0 16px 8px;
  padding: 8px 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.new-menu button, .notice-panel button.notice-item, .folder-pick {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 16px;
  border-radius: 0;
}
.new-menu button:hover, .folder-pick:hover, .sheet.menu button:hover { background: var(--hover); }
.navs { display: flex; flex-direction: column; gap: 2px; }
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  margin-right: 12px;
  padding: 0 12px 0 24px;
  border: 0;
  border-radius: 0 20px 20px 0;
  background: transparent;
  color: #444746;
  font-weight: 500;
  text-align: left;
}
.nav:hover { background: var(--hover); }
.nav.active, .nav.active:hover { background: var(--nav); color: #001d35; }
.quota { margin-top: auto; padding: 16px 24px 8px; color: var(--muted); font-size: 12px; }
.quota-bar { height: 4px; background: #e0e0e0; border-radius: 4px; margin-bottom: 8px; overflow: hidden; }
#quota-fill { display: block; height: 100%; width: 0; background: var(--blue); }
.top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 5;
}
.search-wrap {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 16px;
  background: #e9eef6;
  border-radius: 24px;
}
.search-wrap:focus-within { background: #fff; box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 2px 6px rgba(60, 64, 67, 0.15); }
#search { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; height: 40px; }
.icon-btn, .text-btn {
  border: 0;
  background: transparent;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.text-btn { width: auto; border-radius: 16px; padding: 0 12px; color: var(--blue); font-weight: 500; }
.icon-btn:hover, .text-btn:hover { background: var(--hover); }
.who {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  flex: none;
}
.notice-panel {
  position: absolute;
  top: 64px;
  right: 16px;
  width: min(360px, calc(100vw - 32px));
  max-height: 420px;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  padding: 8px 0 12px;
  z-index: 8;
}
.notice-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 4px 16px; font-weight: 500; }
.notice-item { color: var(--text); }
.notice-item.unread { font-weight: 600; }
.filters, .toolbar, .bulk {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 16px 8px;
  flex-wrap: wrap;
}
.toolbar { justify-content: space-between; padding-top: 4px; }
.filters input, .toolbar select, .row input, .row select, .sheet input, .sheet select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.crumbs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; min-width: 0; }
.crumbs button { border: 0; background: transparent; color: var(--text); padding: 4px; border-radius: 4px; }
.crumbs button:hover { background: var(--hover); }
.crumbs button:last-child { font-weight: 500; }
.bulk {
  margin: 0 16px 8px;
  padding: 8px;
  background: #e8f0fe;
  border-radius: 8px;
}
.bulk button, .sheet button, .job button {
  border: 0;
  background: transparent;
  color: var(--blue);
  border-radius: 4px;
  padding: 6px 10px;
}
.bulk button:hover, .job button:hover { background: rgba(26, 115, 232, 0.08); }
.drop { min-height: 240px; position: relative; }
.drop.over::after {
  content: "Thả file để tải lên thư mục này";
  position: absolute;
  inset: 8px;
  border: 2px dashed var(--blue);
  border-radius: 12px;
  background: rgba(232, 240, 254, 0.92);
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 500;
  z-index: 2;
}
.list-head, .item {
  display: grid;
  grid-template-columns: 40px minmax(160px, 1fr) 150px 140px 96px 36px;
  gap: 8px;
  align-items: center;
  padding: 0 16px;
  min-height: 48px;
}
.list-head { color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); position: sticky; top: 64px; background: #fff; z-index: 2; }
.list-head button { border: 0; background: transparent; text-align: left; color: var(--muted); padding: 0; }
.item { border-bottom: 1px solid #f1f3f4; background: transparent; }
.item:hover { background: #f8f9fa; }
.item.selected { background: var(--selected); }
.file-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-name button.linkish, .item button.linkish {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.glyph { width: 24px; height: 24px; flex: none; }
.star-btn { border: 0; background: transparent; padding: 0; width: 24px; height: 24px; display: grid; place-items: center; }
.star-ico { width: 18px; height: 18px; }
.muted { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); padding: 48px 24px; text-align: center; }
.list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 12px 16px 24px; }
.list.grid .item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  height: 148px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.list.grid .item .col-owner, .list.grid .item .col-date, .list.grid .item .col-size, .list.grid .more { display: none; }
.list.grid .file-name { flex-direction: column; align-items: flex-start; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(32, 33, 36, 0.4);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 20;
}
.sheet {
  background: #fff;
  width: min(640px, 100%);
  max-height: min(80vh, 760px);
  overflow: auto;
  border-radius: 16px;
  padding: 16px 20px 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.sheet.menu { width: min(320px, 100%); padding: 8px; }
.sheet.menu h2 { font-size: 14px; padding: 8px 12px; margin: 0; }
.sheet.menu .row { flex-direction: column; margin: 0; }
.sheet.menu .row button, .sheet.picker .folder-pick {
  width: 100%;
  text-align: left;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
}
.sheet h2 { margin: 8px 0; font-size: 20px; font-weight: 500; }
.preview-frame { width: 100%; min-height: 360px; border: 0; border-radius: 8px; background: #000; }
img.preview-frame { background: transparent; object-fit: contain; max-height: 70vh; }
.row { display: flex; gap: 8px; margin: 8px 0; align-items: center; flex-wrap: wrap; }
.row input, .row select { flex: 1; min-width: 120px; }
.toasts {
  position: fixed;
  left: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}
.toast {
  background: #323232;
  color: #fff;
  border-radius: 4px;
  min-width: 280px;
  max-width: min(440px, calc(100vw - 48px));
  padding: 12px 8px 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.24);
}
.toast span { flex: 1; }
.toast button { border: 0; background: transparent; color: #8ab4f8; font-size: 20px; line-height: 1; padding: 0 8px; }
.toast.error { background: #5c2b29; }
.jobs {
  position: fixed;
  right: 24px;
  bottom: 0;
  width: min(380px, calc(100vw - 32px));
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  z-index: 30;
  overflow: hidden;
}
.jobs-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 12px 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
#jobs-title { flex: 1; }
.jobs-head button { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; color: var(--muted); }
.jobs-head button:hover { background: var(--hover); }
#jobs-body { max-height: 280px; overflow: auto; }
.job { padding: 12px 16px; border-bottom: 1px solid #f1f3f4; }
.job-row { display: flex; align-items: center; gap: 8px; }
.job-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { margin-top: 6px; color: var(--muted); font-size: 12px; }
.job-bar { height: 4px; background: #e8eaed; border-radius: 4px; margin-top: 8px; overflow: hidden; }
.job-bar span { display: block; height: 100%; width: 0; background: var(--blue); }
.job.job-error .job-meta { color: #d93025; }
.job.job-error .job-bar span { background: #d93025; }
@media (max-width: 900px) {
  .list-head, .item { grid-template-columns: 32px minmax(0, 1fr) 36px; }
  .col-owner, .col-date, .col-size, .list-head button:nth-child(n + 3) { display: none; }
  .list-head button[data-sort="name"] { display: block; }
}
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; height: auto; overflow: visible; }
  main { height: auto; overflow: visible; }
  #menu-toggle { display: grid; }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    height: 100vh;
    background: #fff;
    z-index: 15;
    transform: translateX(-105%);
    box-shadow: none;
    transition: transform 0.2s ease;
  }
  .side.open { transform: none; box-shadow: 0 0 24px rgba(0, 0, 0, 0.2); }
  .toasts { left: 12px; right: 12px; bottom: 12px; }
  .jobs { right: 0; width: 100%; }
}
@media (min-width: 801px) {
  #menu-toggle { display: none; }
}
