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

.upload-status-chip{position:fixed;right:24px;bottom:24px;z-index:115;min-width:285px;display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:10px;padding:12px 13px;border:1px solid #dce6e2;border-radius:14px;background:#fff;color:#26342f;box-shadow:0 16px 45px rgba(21,54,45,.18);text-align:left;cursor:pointer}.upload-status-chip>span:first-child{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#e5f3ee;color:#176b5b;font-size:18px}.upload-status-chip strong,.upload-status-chip small{display:block}.upload-status-chip strong{font-size:12px}.upload-status-chip small{max-width:150px;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7f8b86;font-size:9px}.upload-status-chip em{color:#176b5b;font-size:10px;font-style:normal;font-weight:700}.upload-status-chip.done>span:first-child{background:#e5f3e9;color:#247657}.upload-status-chip.failed>span:first-child{background:#fdebea;color:#b5453f}
.upload-task-panel{position:fixed;right:24px;top:88px;z-index:125;width:min(520px,calc(100vw - 32px));max-height:calc(100vh - 112px);display:flex;flex-direction:column;border:1px solid #dce5e2;border-radius:17px;background:#fff;box-shadow:0 22px 65px rgba(20,50,42,.22);overflow:hidden}.upload-task-panel[hidden]{display:none}.upload-task-panel>header{display:flex;align-items:center;justify-content:space-between;padding:15px 17px;border-bottom:1px solid #e9eeec}.upload-task-panel>header>div{display:flex;align-items:center;gap:10px}.upload-task-panel>header>div>span{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#e5f3ee;color:#176b5b;font-size:18px}.upload-task-panel>header strong,.upload-task-panel>header small{display:block}.upload-task-panel>header strong{font-size:14px}.upload-task-panel>header small{max-width:320px;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#84908b;font-size:10px}.upload-panel-close{border:0;background:transparent;color:#6e7a75;font-size:23px;cursor:pointer}.upload-panel-overall{padding:14px 17px;border-bottom:1px solid #edf1ef}.upload-panel-overall>div:first-child{display:flex;align-items:center;justify-content:space-between}.upload-panel-percent{color:#176b5b;font-size:20px}.upload-panel-speed{color:#66736e;font-size:11px}.upload-panel-track{height:7px;margin:9px 0 7px;overflow:hidden;border-radius:999px;background:#e8eeec}.upload-panel-track i{display:block;height:100%;width:0;border-radius:inherit;background:#176b5b;transition:width .2s}.upload-panel-summary{color:#84908b;font-size:9px}.upload-panel-list{max-height:430px;overflow:auto}.upload-panel-item{display:grid;grid-template-columns:34px minmax(0,1fr) 105px;align-items:center;gap:10px;padding:11px 15px;border-bottom:1px solid #edf1ef}.upload-panel-item>span{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#eef4f2;color:#176b5b}.upload-panel-item>div{min-width:0}.upload-panel-item strong,.upload-panel-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-panel-item strong{font-size:11px}.upload-panel-item small{margin-top:3px;color:#8a9490;font-size:8px}.upload-panel-item>div>div{height:4px;margin-top:7px;overflow:hidden;border-radius:999px;background:#e8eeec}.upload-panel-item>div>div i{display:block;height:100%;width:0;background:#176b5b}.upload-panel-item>em{text-align:right;color:#6c7974;font-size:9px;font-style:normal}.upload-panel-item.complete>span{background:#e7f4ec;color:#26795a}.upload-panel-item.failed>span{background:#fdebea;color:#b4443e}.upload-panel-item.failed>div>div i{background:#c44c46}.upload-task-panel>footer{display:flex;align-items:center;justify-content:space-between;padding:11px 15px;background:#f8faf9;color:#7f8b86;font-size:9px}.upload-panel-clear{border:0;background:transparent;color:#176b5b;font-size:10px;cursor:pointer}
@media(max-width:580px){.upload-status-chip{right:16px;bottom:16px;min-width:260px}}
@media(max-width:580px){.upload-task-panel{right:10px;top:78px;width:calc(100vw - 20px);max-height:calc(100vh - 92px)}.upload-panel-item{grid-template-columns:32px minmax(0,1fr)}.upload-panel-item>em{grid-column:2;text-align:left}.upload-task-panel>header small{max-width:210px}}

.direct-upload-form {
  display: none;
}

.upload-progress-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  width: min(390px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid #dfe7e4;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(18, 41, 34, .2);
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: .2s ease;
}

.upload-progress-panel.visible { opacity: 1; transform: translateY(0); }
.upload-progress-head { display: flex; align-items: center; gap: 12px; }
.upload-state-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #e4f2ee; color: var(--accent); font-weight: 850; }
.upload-progress-head > div { flex: 1; min-width: 0; }
.upload-progress-head strong, .upload-progress-head small { display: block; }
.upload-progress-head small { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.upload-percent { color: var(--accent); font-size: 14px; }
.upload-progress-track { height: 7px; margin-top: 15px; overflow: hidden; border-radius: 99px; background: #e9efed; }
.upload-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .15s linear; }
.upload-progress-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.upload-progress-panel.success .upload-state-icon { background: #e4f3ec; color: #247057; }
.upload-progress-panel.failed .upload-state-icon { background: #fdeaea; color: #a33e3e; }
.upload-progress-panel.failed .upload-progress-track i { background: #c84e4e; }

.folder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #f0f5f3;
  color: #315f55;
  border-bottom: 1px solid #dfe9e5;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.folder-row::-webkit-details-marker { display: none; }
.folder-row:hover { background: #e7f0ed; }
.folder-chevron { font-size: 22px; line-height: 1; transition: transform .18s ease; }
.folder-group[open] .folder-chevron { transform: rotate(90deg); }
.folder-symbol { font-size: 13px; }
.folder-group { border-bottom: 1px solid var(--line); }
.folder-group:last-child { border-bottom: 0; }
.folder-group .folder-contents .document-row:last-child { border-bottom: 0; }
.folder-controls { display: flex; align-items: center; gap: 8px; }
.folder-controls > span { color: var(--muted); font-size: 14px; margin-right: 4px; }
.folder-controls button { border: 0; border-radius: 7px; padding: 6px 9px; background: #edf2f1; color: #47615a; font-size: 12px; cursor: pointer; }
.folder-controls button:hover { background: #dfe9e6; }

.folder-row small {
  margin-left: auto;
  color: #74857f;
}

.folder-target-actions { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.folder-target-actions button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: rgba(255,255,255,.72); color: #2e6f61; cursor: pointer; }
.folder-target-actions button:hover { background: #fff; color: #0e705d; box-shadow: 0 2px 8px rgba(20,65,55,.12); }

.dialog-note {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-switch {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.register-card {
  width: min(470px, 100%);
}

.approval-banner {
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid #f0d99c;
  border-radius: 10px;
  background: #fff8e7;
  color: #7c5a13;
  font-size: 13px;
}

.status {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.status.approved { background: #e4f3ec; color: #25705a; }
.status.pending { background: #fff3d5; color: #89651a; }
.status.rejected { background: #fdeaea; color: #a33e3e; }
.review-actions { display: flex; gap: 7px; }
.pending-hint { color: #9a761f; font-size: 12px; white-space: nowrap; }
.inline-favorite { display: inline-flex; margin: 0; }
.favorite-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #9aa5aa; font-size: 22px; line-height: 1; cursor: pointer; }
.favorite-button:hover { background: #fff6d9; color: #d09913; }
.favorite-button.active { color: #e0a51a; }
.folder-row .inline-favorite { margin-left: auto; }
.folder-row .inline-favorite + small { margin-left: 0; }
.favorite-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.favorite-folder-card { display: flex; align-items: center; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.favorite-folder-card > a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.favorite-folder-card > a > div { min-width: 0; }
.favorite-folder-card strong, .favorite-folder-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-folder-card small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.favorite-folder-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #edf5f2; color: var(--accent); }

/* Persistent folder tree and transfer status */
.project-file-actions .button,.project-file-actions .primary{gap:7px}.folder-tree-table>.nested-folder{border-top:0}.nested-folder .nested-folder{margin-left:18px;border-left:1px solid #d7e4df;border-bottom:0}.nested-folder .nested-folder>.folder-row{background:#f6f9f8}.nested-folder .nested-folder .nested-folder>.folder-row{background:#fafbfb}.folder-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.folder-row .favorite-button{margin-left:4px}.empty-folder-note{display:flex;align-items:center;gap:7px;padding:15px 20px;color:#8a9590;font-size:12px}.create-folder-dialog .dialog-head>div{display:flex;align-items:center;gap:11px}.create-folder-dialog .dialog-head h2{margin:0 0 3px}.create-folder-dialog .dialog-head small{color:#89948f;font-size:11px}.folder-dialog-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:#e7f3ef;color:#176b5b;font-size:20px}.create-folder-dialog .primary{gap:7px}
.download-progress-panel{position:fixed;right:24px;bottom:24px;z-index:120;width:min(410px,calc(100vw - 32px));padding:18px;border:1px solid #dfe7e4;border-radius:15px;background:#fff;box-shadow:0 18px 55px rgba(18,41,34,.2);opacity:0;transform:translateY(15px);pointer-events:none;transition:.2s ease}.download-progress-panel.visible{opacity:1;transform:translateY(0)}.download-progress-head{display:flex;align-items:center;gap:11px}.download-progress-head>span{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#e6f3ef;color:#176b5b;font-size:18px}.download-progress-head>div{flex:1;min-width:0}.download-progress-head strong,.download-progress-head small{display:block}.download-progress-head small{margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7d8984;font-size:11px}.download-progress-head>b{color:#176b5b;font-size:13px}.download-progress-track{height:7px;margin-top:14px;overflow:hidden;border-radius:999px;background:#e8eeec}.download-progress-track i{display:block;width:0;height:100%;border-radius:inherit;background:#176b5b;transition:width .15s}.download-progress-stats{display:flex;justify-content:space-between;margin-top:9px;color:#62706a;font-size:10px}.download-progress-panel>p{margin:9px 0 0;color:#85908c;font-size:10px}.download-progress-panel.success .download-progress-head>span{background:#e5f3ea;color:#237856}.download-progress-panel.failed .download-progress-head>span{background:#fdebea;color:#b6443e}.download-progress-panel.failed .download-progress-track i{background:#c34d47}

@media (max-width: 580px) {
  .title-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .title-row .title-actions .primary {
    width: auto;
  }

  .user-review-row .review-actions {
    width: 100%;
    padding-left: 54px;
  }

  .folder-controls > span { display: none; }
  .upload-progress-panel { right: 16px; bottom: 16px; }
  .favorite-grid { grid-template-columns: 1fr; }
  .project-file-actions { grid-template-columns: repeat(3, 1fr); }
  .project-file-actions .button,.project-file-actions .primary{font-size:0;padding:0}.project-file-actions i{font-size:18px}
  .nested-folder .nested-folder{margin-left:9px}
  .download-progress-panel{right:16px;bottom:16px}
}
