:root {
  --blue:#145bf4;
  --blue-dark:#0b45d4;
  --ink:#172944;
  --muted:#72819a;
  --line:#dfe7f2;
  --shell:#f6f8fc;
  --white:#fff;
  --navy:#11254a;
  --shadow:0 20px 60px #193d751a;
  font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  background:var(--shell);
  color:var(--ink);
  font-size:14px;
  -webkit-font-smoothing:antialiased
}

button,input,textarea,select {
  font:inherit
}

button {
  cursor:pointer
}

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

[hidden] {
  display:none!important
}

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

h1,h2,h3 {
  letter-spacing:-.045em
}

input,textarea,select {
  border:1px solid #d3deea;
  background:white;
  border-radius:6px;
  color:#172944;
  padding:13px 14px;
  outline:none;
  width:100%;
  max-width:100%
}

input:focus,select:focus,textarea:focus {
  border-color:var(--blue);
  box-shadow:0 0 0 3px #145bf416
}

textarea {
  resize:vertical;
  min-height:80px
}

label {
  display:block;
  font-size:12px;
  font-weight:720;
  color:#394b66;
  margin-bottom:16px
}

label input,label textarea,label select {
  margin-top:8px;
  font-size:13px;
  font-weight:400
}

label small {
  display:block;
  font-size:10px;
  font-weight:400;
  color:#8796ac;
  margin-top:6px
}

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:13px 19px;
  min-height:43px;
  font-size:12px;
  font-weight:740;
  border-radius:5px;
  border:1px solid transparent;
  white-space:nowrap;
  transition:background .2s,transform .2s
}

.btn:hover {
  transform:translateY(-1px)
}

.btn-primary {
  background:var(--blue);
  color:white
}

.btn-primary:hover {
  background:var(--blue-dark)
}

.btn-soft {
  background:#fff;
  border-color:#d8e3f3;
  color:#40536d
}

.btn-soft:hover {
  background:#edf4ff
}

.btn:disabled {
  opacity:.5;
  cursor:wait
}

.full {
  width:100%
}

.form-message {
  min-height:16px;
  color:#b12d3a;
  font-size:12px;
  line-height:1.5;
  margin:6px 0
}

.form-message.success {
  color:#14754a
}

/* Authentication screen */
.login-view {
  min-height:100vh;
  display:grid;
  grid-template-columns:1fr 1fr
}

.login-left {
  background:linear-gradient(135deg,#122e67,#083b99 68%,#1c6af9);
  color:white;
  padding:49px min(7.3vw,116px) 39px;
  display:flex;
  flex-direction:column;
  position:relative;
  overflow:hidden
}

.login-left>* {
  position:relative;
  z-index:2
}

.brand {
  display:inline-flex;
  align-items:center;
  gap:11px;
  font-size:23px;
  font-weight:850;
  letter-spacing:-.075em
}

.brand span>span {
  color:#84c5ff
}

.brand-icon {
  height:37px;
  width:37px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#256efc;
  color:white;
  font-weight:900;
  font-size:25px;
  letter-spacing:-.12em
}

.brand-light {
  color:white
}

.login-art-copy {
  margin:auto 0
}

.login-kicker {
  letter-spacing:.21em;
  font-size:10px;
  color:#a8c5ff;
  font-weight:780
}

.login-art-copy h1 {
  font-size:clamp(50px,5.5vw,93px);
  line-height:1.02;
  letter-spacing:-.077em;
  margin:23px 0 28px
}

.login-art-copy h1 em {
  font-style:normal;
  color:#85bbff
}

.login-art-copy p {
  max-width:360px;
  color:#bed2f4;
  font-size:14px;
  line-height:1.85
}

.login-bottom {
  display:flex;
  justify-content:space-between;
  gap:15px;
  font-size:10px;
  font-weight:700;
  letter-spacing:.11em;
  color:#a2c1ed
}

.login-grid-art {
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(#ffffff0c 1px,transparent 1px),linear-gradient(90deg,#ffffff0c 1px,transparent 1px);
  background-size:64px 64px;
  mask-image:linear-gradient(90deg,transparent,#000)
}

.login-orbit {
  position:absolute;
  z-index:1;
  right:-140px;
  top:26%;
  height:440px;
  width:440px;
  border:1px solid #ffffff30;
  border-radius:50%;
  box-shadow:0 0 0 60px #ffffff08,0 0 0 120px #ffffff06
}

.login-right {
  display:grid;
  place-items:center;
  background:#f7faff;
  padding:38px
}

.login-form-wrapper {
  width:min(420px,100%)
}

.welcome-tag {
  font-size:10px;
  color:var(--blue);
  font-weight:780;
  letter-spacing:.15em;
  display:flex;
  align-items:center;
  gap:10px
}

.status-dot,.online-dot {
  display:inline-block;
  background:#21bb87;
  width:7px;
  height:7px;
  border-radius:50%;
  box-shadow:0 0 0 3px #21bb871a
}

.login-form-wrapper h2 {
  font-size:46px;
  margin:22px 0 15px;
  letter-spacing:-.07em
}

.login-form-wrapper>p {
  font-size:14px;
  line-height:1.8;
  color:var(--muted);
  margin-bottom:34px
}

.password-field {
  position:relative
}

.password-field input {
  padding-right:50px
}

.password-field button {
  position:absolute;
  right:9px;
  top:12px;
  background:none;
  border:0;
  font-size:19px;
  color:var(--muted)
}

.login-form-wrapper .btn {
  min-height:51px;
  margin-top:5px
}

.login-help {
  margin-top:29px;
  font-size:11px;
  color:#9babbe
}

.login-help a {
  color:var(--blue);
  margin-left:5px
}

/* Workspace */
.workspace {
  min-height:100vh;
  display:grid;
  grid-template-columns:250px minmax(0,1fr)
}

.sidebar {
  background:var(--navy);
  color:white;
  min-height:100vh;
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  padding:32px 20px 22px;
  z-index:10
}

.sidebar .brand {
  margin:0 8px 52px
}

.sidebar-eyebrow {
  font-size:10px;
  letter-spacing:.16em;
  color:#6f90c2;
  margin:0 13px 15px
}

.side-nav {
  display:flex;
  flex-direction:column;
  gap:6px
}

.side-item {
  border:0;
  background:transparent;
  color:#a5bbdb;
  width:100%;
  padding:16px 15px;
  text-align:left;
  font-size:12px;
  font-weight:680;
  display:flex;
  align-items:center;
  gap:14px;
  border-radius:5px
}

.side-item:hover {
  background:#ffffff0c;
  color:white
}

.side-item.active {
  background:#2665e7;
  color:white
}

.side-icon {
  font-size:18px;
  width:20px;
  text-align:center
}

.sidebar-foot {
  margin-top:auto;
  border-top:1px solid #2e4770;
  padding:20px 9px 0;
  display:flex;
  flex-direction:column;
  gap:22px
}

.sidebar-foot a,.sidebar-foot button {
  display:flex;
  justify-content:space-between;
  background:none;
  border:0;
  color:#b8c9e4;
  font-size:12px;
  padding:0
}

.sidebar-foot a:hover,.sidebar-foot button:hover {
  color:white
}

.sidebar-foot p {
  font-size:10px;
  color:#718db5;
  margin:18px 0 0
}

.admin-main {
  min-width:0
}

.admin-top {
  height:75px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--line);
  padding:0 45px;
  background:#fff
}

.admin-top>span {
  color:#96a6b9;
  font-size:10px;
  font-weight:760;
  letter-spacing:.09em;
  display:flex;
  align-items:center;
  gap:9px
}

.admin-top>div {
  display:flex;
  align-items:center;
  gap:13px
}

.top-account {
  font-size:10px;
  color:#8192ab;
  font-weight:740;
  letter-spacing:.12em
}

.top-avatar {
  display:grid;
  place-items:center;
  height:34px;
  width:34px;
  border-radius:8px;
  background:#e5efff;
  color:var(--blue);
  font-weight:850;
  font-size:12px
}

.admin-inner {
  max-width:1460px;
  padding:46px 45px 75px;
  margin:0 auto
}

.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:25px;
  margin-bottom:34px
}

.eyebrow {
  color:var(--blue);
  font-weight:840;
  font-size:10px;
  letter-spacing:.16em
}

.page-heading h1 {
  font-size:38px;
  margin:13px 0 10px;
  font-weight:780
}

.page-heading p:last-child {
  color:var(--muted);
  font-size:13px;
  margin:0
}

.stat-row {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  margin-bottom:28px
}

.stat {
  background:#fff;
  border:1px solid var(--line);
  border-radius:7px;
  padding:25px 27px;
  display:flex;
  flex-direction:column;
  min-height:153px
}

.stat>span {
  font-size:10px;
  color:#8192aa;
  letter-spacing:.12em;
  font-weight:780
}

.stat strong {
  font-size:40px;
  letter-spacing:-.06em;
  margin:14px 0 3px;
  font-weight:750;
  line-height:1
}

.stat small {
  font-size:11px;
  color:#9aa7b9
}

.table-panel,.settings-panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px
}

.table-toolbar {
  padding:25px 27px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center
}

.table-toolbar h2 {
  font-size:21px;
  margin-bottom:8px
}

.table-toolbar p {
  font-size:12px;
  color:#8998ab;
  margin:0
}

.toolbar-right {
  display:flex;
  gap:9px;
  align-items:center
}

.toolbar-right input {
  width:190px;
  min-height:43px;
  font-size:12px
}

.table-wrap {
  overflow-x:auto
}

table {
  border-collapse:collapse;
  width:100%;
  font-size:12px;
  text-align:left
}

thead th {
  background:#fbfcff;
  border-bottom:1px solid var(--line);
  color:#9ba8b9;
  font-size:10px;
  font-weight:780;
  letter-spacing:.09em;
  padding:18px 22px;
  white-space:nowrap
}

tbody td {
  padding:19px 22px;
  border-bottom:1px solid #edf0f6;
  vertical-align:middle
}

tbody tr:last-child td {
  border-bottom:0
}

.project-cell {
  display:flex;
  gap:12px;
  align-items:center;
  min-width:220px
}

.project-thumb {
  width:64px;
  height:49px;
  object-fit:cover;
  border:1px solid #e2ebf6;
  background:#eaf1ff;
  border-radius:4px
}

.project-thumb-fallback {
  width:64px;
  height:49px;
  display:grid;
  place-items:center;
  background:#eaf1ff;
  color:#3878dc;
  font-weight:850;
  font-size:22px;
  border-radius:4px
}

.project-cell strong {
  display:block;
  font-size:12px;
  color:var(--ink);
  margin-bottom:5px
}

.project-cell small {
  color:#8f9fb3;
  font-size:10px
}

.pill {
  display:inline-block;
  padding:6px 9px;
  border-radius:3px;
  font-size:10px;
  font-weight:750
}

.pill.blue {
  background:#eaf1ff;
  color:#2f69d9
}

.pill.grey {
  background:#f0f4f9;
  color:#67809d
}

.pill.green {
  background:#e6f9f2;
  color:#18885f
}

.pill.gold {
  background:#fff6e3;
  color:#a77928
}

.pill.violet {
  background:#f2ebff;
  color:#7756ac
}

.row-actions {
  display:flex;
  gap:8px;
  white-space:nowrap;
  align-items:center
}

.row-actions button {
  border:1px solid #e0e7f2;
  background:#fff;
  color:#4f627c;
  padding:8px 10px;
  border-radius:4px;
  font-size:11px;
  font-weight:650
}

.row-actions button:hover {
  background:#eaf1ff;
  color:var(--blue)
}

.row-actions .delete:hover {
  background:#ffeaed;
  color:#b72b40
}

.table-empty {
  text-align:center;
  padding:70px 15px;
  color:#8697af
}

.table-empty span {
  display:block;
  font-size:53px;
  color:#9dc2fb
}

.table-empty h3 {
  font-size:23px;
  color:var(--ink);
  margin:12px 0
}

.table-empty p {
  font-size:12px
}

.settings-panel {
  padding:36px;
  max-width:820px
}

.settings-panel .panel-caption {
  font-size:10px;
  letter-spacing:.15em;
  color:var(--blue);
  font-weight:750
}

.settings-panel h2 {
  font-size:30px;
  margin:14px 0 8px
}

.settings-panel>p:not(.panel-caption) {
  color:var(--muted);
  font-size:13px;
  line-height:1.8
}

.settings-form {
  margin-top:31px
}

.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px
}

/* Dialogs */
.modal {
  position:fixed;
  inset:0;
  border:0;
  border-radius:10px;
  padding:0;
  width:min(790px,calc(100% - 32px));
  max-height:min(92vh,960px);
  background:white;
  box-shadow:var(--shadow);
  color:var(--ink)
}

.modal::backdrop {
  background:#102347a8;
  backdrop-filter:blur(3px)
}

.modal>form {
  display:flex;
  flex-direction:column;
  max-height:92vh
}

.modal-header {
  display:flex;
  align-items:start;
  justify-content:space-between;
  gap:20px;
  padding:30px 36px 24px;
  border-bottom:1px solid var(--line)
}

.modal-header h2 {
  font-size:28px;
  margin:8px 0 0
}

.modal-header .eyebrow {
  margin:0
}

.icon-close {
  height:36px;
  width:36px;
  border:0;
  background:#edf2f9;
  color:#576d89;
  border-radius:100%;
  font-size:23px
}

.modal-scroll {
  overflow:auto;
  padding:27px 36px 22px;
  flex:1
}

.modal-scroll .form-grid {
  gap:16px
}

.modal-scroll label {
  margin-bottom:18px
}

.private-fields {
  padding:20px;
  background:#f2f7ff;
  border:1px solid #dceaff;
  border-radius:7px;
  margin:16px 0
}

.private-fields>p {
  font-size:12px;
  line-height:1.7;
  color:#71849f
}

.private-fields strong {
  color:#1d3b70;
  font-size:13px
}

.check-row {
  display:flex;
  gap:25px;
  margin:13px 0 21px
}

.check-label {
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:650
}

.check-label input {
  width:16px;
  height:16px;
  margin:0;
  accent-color:var(--blue)
}

.callout {
  display:flex;
  align-items:start;
  gap:13px;
  background:#f3f7ff;
  border-left:3px solid var(--blue);
  padding:13px 15px
}

.callout span {
  color:var(--blue);
  font-size:18px
}

.callout p {
  font-size:11px;
  line-height:1.7;
  color:#73859e;
  margin:0
}

.modal-actions {
  border-top:1px solid var(--line);
  padding:21px 36px;
  display:flex;
  justify-content:flex-end;
  gap:11px
}

.files-modal {
  width:min(730px,calc(100% - 32px))
}

.files-modal .modal-scroll {
  max-height:65vh
}

.files-info {
  background:#f3f7fd;
  border:1px solid #e0eafa;
  padding:16px;
  margin-bottom:22px;
  font-size:12px;
  color:#435e82;
  line-height:1.6;
  overflow-wrap:anywhere
}

.upload-section {
  border-bottom:1px solid var(--line);
  padding:9px 0 21px;
  margin-bottom:19px
}

.upload-section h3 {
  font-size:17px;
  margin:0 0 6px
}

.upload-section p {
  font-size:12px;
  line-height:1.7;
  color:#7c8ca3
}

.upload-form {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:11px
}

.upload-form input[type=file] {
  width:min(330px,100%);
  max-width:100%;
  font-size:11px
}

.upload-form input[type=text] {
  width:200px;
  font-size:11px
}

.link-button {
  border:0;
  background:none;
  color:var(--blue);
  font-size:12px;
  font-weight:720;
  padding:14px 0 0
}

.danger-text {
  color:#b3434c
}

.link-modal {
  width:min(560px,calc(100% - 32px))
}

.link-description {
  font-size:13px;
  line-height:1.8;
  color:#74859c
}

.backup-link {
  margin-top:20px;
  border-top:1px solid var(--line);
  padding-top:22px
}

.backup-link>span {
  font-size:11px;
  color:#8c9bb0
}

.backup-link input {
  margin-top:8px
}

.toast {
  position:fixed;
  right:24px;
  bottom:24px;
  background:#16366a;
  color:#fff;
  padding:14px 20px;
  max-width:min(420px,calc(100% - 24px));
  box-shadow:var(--shadow);
  z-index:100;
  font-size:12px;
  line-height:1.5
}

@media(max-width:1150px) {
  .workspace {
    grid-template-columns:220px minmax(0,1fr)
  }

  .admin-top {
    padding-inline:28px
  }

  .admin-inner {
    padding:35px 28px
  }

  .sidebar {
    padding-inline:13px
  }

  .row-actions {
    flex-wrap:wrap
  }

}

@media(max-width:830px) {
  .login-view {
    grid-template-columns:1fr
  }

  .login-left {
    min-height:240px;
    padding:27px
  }

  .login-art-copy {
    margin:28px 0 14px
  }

  .login-art-copy h1 {
    font-size:42px;
    margin:10px 0
  }

  .login-art-copy p {
    display:none
  }

  .login-bottom {
    display:none
  }

  .login-right {
    padding:50px 27px
  }

  .workspace {
    display:block
  }

  .sidebar {
    position:static;
    width:100%;
    height:auto;
    min-height:0;
    padding:16px
  }

  .sidebar .brand {
    margin:0 0 14px
  }

  .sidebar-eyebrow {
    display:none
  }

  .side-nav {
    flex-direction:row;
    overflow-x:auto
  }

  .side-item {
    white-space:nowrap;
    padding:12px
  }

  .sidebar-foot {
    display:none
  }

  .admin-top {
    height:57px
  }

  .admin-inner {
    padding:25px 16px
  }

  .stat-row {
    gap:10px
  }

  .stat {
    padding:17px
  }

  .page-heading {
    align-items:flex-start
  }

  .page-heading h1 {
    font-size:30px
  }

  .table-toolbar {
    padding:17px;
    flex-direction:column;
    align-items:stretch
  }

  .table-toolbar .toolbar-right {
    width:100%
  }

  .toolbar-right input {
    flex:1
  }

  .modal-header,.modal-scroll,.modal-actions {
    padding-inline:20px
  }

}

@media(max-width:560px) {
  .login-form-wrapper h2 {
    font-size:36px
  }

  .page-heading {
    flex-direction:column
  }

  .page-heading .btn {
    width:100%
  }

  .stat-row {
    grid-template-columns:1fr 1fr
  }

  .stat:nth-child(3) {
    grid-column:span 2
  }

  .form-grid {
    grid-template-columns:1fr
  }

  .modal-scroll .form-grid {
    grid-template-columns:1fr;
    gap:0
  }

  .modal-header {
    padding-block:21px
  }

  .modal-scroll {
    padding-block:18px
  }

  .check-row {
    flex-direction:column;
    gap:10px
  }

  .modal-actions {
    padding-block:16px
  }

  thead th,tbody td {
    padding:13px
  }

  table {
    min-width:690px
  }

}
