:root {
  --ink: #061126;
  --navy: #081a3d;
  --paper: #f7fbff;
  --muted: #6d7890;
  --blue: #2d67ff;
  --cyan: #50d7ff;
  --lime: #61f2c2;
  --red: #ff5c5c;
  --line: rgba(6, 17, 38, .1);
  --shadow: 0 24px 80px rgba(3, 10, 25, .28);
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 12% 8%, rgba(45, 103, 255, .34), transparent 28rem),
    radial-gradient(circle at 82% 12%, rgba(97, 242, 194, .2), transparent 31rem),
    linear-gradient(180deg, #081c42 0%, #061126 58%, #07172d 100%);
  font-family: var(--sans);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(180deg, #000, transparent 82%);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  color: #081a3d;
  outline: none;
  padding: 12px 13px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

a {
  color: inherit;
  text-decoration: none;
}

.login-wrap {
  display: grid;
  min-height: 100vh;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  place-items: center;
}

.login-card,
.panel,
.total-card,
.totals-grid article {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  color: #07183a;
  box-shadow: var(--shadow);
}

.login-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 620px);
  padding: clamp(26px, 6vw, 48px);
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(241, 248, 255, .91));
}

.login-card::before,
.total-card::before,
.client-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--lime));
}

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

.brand-mark img {
  width: 132px;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(80, 215, 255, .22));
}

.brand-mark span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: rgba(247, 251, 255, .72);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-card .brand-mark span {
  border-color: rgba(45, 103, 255, .18);
  color: rgba(8, 26, 61, .72);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--cyan);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-card .eyebrow {
  margin-top: 38px;
  color: var(--blue);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

.login-card h1,
.hero h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: .92;
}

.lead,
.hero p {
  color: rgba(247, 251, 255, .72);
  line-height: 1.65;
}

.login-card .lead {
  color: #66748a;
  font-size: 1.05rem;
}

.login-form,
.account-form,
.upload-box {
  display: grid;
  gap: 14px;
}

.login-form {
  margin-top: 28px;
}

label {
  display: grid;
  gap: 7px;
  color: #42516a;
  font-size: .9rem;
  font-weight: 850;
}

.check-label {
  display: flex;
  gap: 10px;
  align-items: center;
  align-self: end;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 103, 255, .14);
  border-radius: 8px;
  background: #eef6ff;
  color: #163466;
}

.login-form button,
.account-form button,
.upload-box button {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--blue), #204cc7);
  color: white;
  font-weight: 950;
  box-shadow: 0 16px 38px rgba(45, 103, 255, .28);
}

.notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 850;
}

.notice.error {
  border: 1px solid rgba(183, 43, 43, .2);
  background: #fff1f1;
  color: #a22323;
}

.notice.ok {
  border: 1px solid rgba(20, 117, 72, .22);
  background: #effcf7;
  color: #147548;
}

.preview-ribbon {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(97, 242, 194, .34);
  border-radius: 12px;
  background: rgba(97, 242, 194, .12);
  color: white;
}

.preview-ribbon strong {
  flex: 0 0 auto;
  font-size: .9rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.preview-ribbon span {
  color: rgba(247, 251, 255, .78);
  font-weight: 750;
}

.preview-ribbon a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: #07183a;
  font-weight: 950;
}

.dashboard {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 30px;
}

.topbar nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost,
.mini-action,
.drive-root,
.folder-state a,
.file-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: white;
  font-weight: 900;
}

.ghost.active {
  background: rgba(97, 242, 194, .16);
  border-color: rgba(97, 242, 194, .42);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: stretch;
  padding: 26px 0 24px;
}

.hero p {
  max-width: 690px;
  margin-bottom: 0;
  font-size: 1.06rem;
}

.total-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  min-height: 230px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(80, 215, 255, .38), transparent 13rem),
    linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(233, 243, 255, .92));
}

.total-card span,
.totals-grid span {
  color: #66748a;
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.total-card strong {
  margin-top: 10px;
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: .86;
}

.total-card small {
  margin-top: 12px;
  color: #66748a;
  font-weight: 750;
}

.totals-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 18px;
}

.totals-grid article {
  padding: 18px;
}

.totals-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.72rem;
  line-height: 1;
}

.workspace {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.client-preview-mode .workspace,
.client-preview-mode .content-grid {
  grid-template-columns: 1fr;
}

.dashboard.client-preview-mode {
  width: min(1080px, calc(100% - 32px));
}

.panel {
  padding: 22px;
}

.panel-head {
  margin-bottom: 20px;
}

.panel-head h2 {
  margin-bottom: 0;
  font-size: 1.75rem;
}

.split {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.mini-action,
.drive-root,
.folder-state a,
.file-row a {
  min-height: 36px;
  border-color: rgba(45, 103, 255, .16);
  background: #eef6ff;
  color: #163466;
  font-size: .84rem;
}

.side-actions {
  display: grid;
  gap: 8px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-action.active {
  border-color: rgba(6, 17, 38, .2);
  background: #07183a;
  color: #ffffff;
}

.client-list {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 10px;
}

.client-pill {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: #07183a;
}

.client-pill.active {
  border-color: rgba(45, 103, 255, .34);
  background: #eef6ff;
}

.client-pill span {
  font-weight: 950;
}

.client-pill b {
  flex: 0 0 auto;
  color: #66748a;
  font-size: .82rem;
}

.drive-root {
  margin-top: 10px;
}

.main-panel,
.content-grid {
  display: grid;
  gap: 18px;
}

.client-hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  background:
    radial-gradient(circle at top right, rgba(97, 242, 194, .2), transparent 13rem),
    linear-gradient(145deg, #ffffff, #f2f8ff);
}

.client-hero-card h2 {
  margin-bottom: 6px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: .96;
}

.client-hero-card p {
  margin-bottom: 0;
  color: #66748a;
  font-weight: 800;
}

.folder-state {
  display: grid;
  gap: 10px;
  justify-items: end;
  flex: 0 0 auto;
}

.folder-state span {
  padding: 9px 12px;
  border-radius: 999px;
  background: #eaf8f2;
  color: #147548;
  font-size: .82rem;
  font-weight: 950;
}

.content-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
}

.account-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-form .full {
  grid-column: 1 / -1;
}

.upload-box {
  min-height: 100%;
  align-content: start;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 220px;
  padding: 26px;
  place-items: center;
  text-align: center;
  border: 1.5px dashed rgba(45, 103, 255, .36);
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(80, 215, 255, .18), transparent 13rem),
    linear-gradient(180deg, #f8fcff, #eef6ff);
  color: #07183a;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.dropzone:hover,
.dropzone.dragging {
  transform: translateY(-1px);
  border-color: rgba(45, 103, 255, .78);
  background:
    radial-gradient(circle at top, rgba(97, 242, 194, .22), transparent 13rem),
    linear-gradient(180deg, #ffffff, #edf7ff);
  box-shadow: 0 18px 44px rgba(45, 103, 255, .14);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone .drop-icon {
  display: inline-grid;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 14px;
  background: #07183a;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.dropzone strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 950;
}

.dropzone small {
  display: block;
  margin-top: 6px;
  color: #66748a;
  font-weight: 750;
}

.selected-files {
  padding: 12px 13px;
  border: 1px solid rgba(45, 103, 255, .14);
  border-radius: 10px;
  background: #fbfdff;
  color: #42516a;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.45;
}

.upload-box small,
.empty,
.side-note {
  color: #66748a;
  line-height: 1.5;
}

.side-note {
  margin: 8px 0 0;
  font-size: .9rem;
  font-weight: 750;
}

.delete-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.delete-form button {
  width: 100%;
  background: #fff1f1;
  color: #a22323;
  font-weight: 950;
  box-shadow: none;
}

.files-panel {
  margin-top: 0;
}

.collaborators-panel {
  display: grid;
  gap: 20px;
}

.collaborators-panel-main {
  gap: 24px;
}

.collaborator-manager {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}

.collaborator-directory {
  display: grid;
  gap: 10px;
}

.collaborator-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  color: #07183a;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.collaborator-row:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 103, 255, .32);
  background: #f4f9ff;
}

.collaborator-row.active {
  border-color: rgba(45, 103, 255, .42);
  background: linear-gradient(135deg, #eef6ff, #f8fcff);
  box-shadow: 0 12px 34px rgba(45, 103, 255, .12);
}

.collaborator-row strong,
.collaborator-row small {
  display: block;
}

.collaborator-row strong {
  font-size: 1rem;
  font-weight: 950;
}

.collaborator-row small {
  overflow: hidden;
  margin-top: 4px;
  color: #66748a;
  font-size: .83rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collaborator-row b {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf8f2;
  color: #147548;
  font-size: .78rem;
  font-weight: 950;
}

.collaborator-editor {
  display: grid;
  gap: 10px;
}

.count-chip {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  background: #eef6ff;
  color: #163466;
  font-size: .82rem;
  font-weight: 950;
}

.collaborator-create {
  padding: 16px;
  border: 1px solid rgba(45, 103, 255, .14);
  border-radius: 12px;
  background:
    radial-gradient(circle at top right, rgba(80, 215, 255, .18), transparent 16rem),
    #f4f9ff;
}

.access-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.access-fieldset legend {
  padding: 0 7px;
  color: #42516a;
  font-size: .86rem;
  font-weight: 950;
}

.access-fieldset label {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 32px;
  color: #07183a;
}

.collaborator-list {
  display: grid;
  gap: 12px;
}

.collaborator-list-main {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.collaborator-shell {
  display: grid;
  gap: 10px;
  align-content: start;
}

.collaborator-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 251, 255, .98));
}

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

.collaborator-title strong {
  color: #07183a;
  font-size: 1.15rem;
}

.collaborator-title span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf8f2;
  color: #147548;
  font-size: .78rem;
  font-weight: 950;
}

.collaborator-actions button {
  width: 100%;
  min-height: 40px;
  background: #07183a;
  color: white;
  font-weight: 950;
}

.collaborator-delete {
  margin-top: -6px;
  padding-top: 0;
  border-top: 0;
}

.file-list {
  display: grid;
  gap: 10px;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.file-row strong,
.file-row span {
  display: block;
}

.file-row strong {
  color: #07183a;
}

.file-row span {
  margin-top: 4px;
  color: #66748a;
  font-size: .88rem;
  font-weight: 750;
}

.file-row em {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-style: normal;
  font-weight: 950;
}

.file-row em.ok {
  background: #eaf8f2;
  color: #147548;
}

.file-row em.waiting {
  background: #fff6e8;
  color: #a5680b;
}

.file-delete-form {
  margin: 0;
}

.file-delete-form button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(183, 43, 43, .16);
  border-radius: 8px;
  background: #fff1f1;
  color: #a22323;
  font-size: .84rem;
  font-weight: 950;
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .client-list {
    position: static;
  }

  .totals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collaborator-manager {
    grid-template-columns: 1fr;
  }

  .collaborator-list-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .dashboard,
  .login-wrap {
    width: min(100% - 20px, 1240px);
  }

  .topbar,
  .topbar nav,
  .split,
  .client-hero-card,
  .account-form,
  .access-fieldset,
  .file-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .folder-state {
    justify-items: start;
  }

	  .totals-grid {
	    grid-template-columns: 1fr;
	  }

  .panel-actions {
    display: grid;
    width: 100%;
  }

  .side-actions {
    width: 100%;
  }

  .panel-actions .mini-action,
  .side-actions .mini-action {
    width: 100%;
  }
}
