:root {
  --ink: #07142f;
  --muted: #52637f;
  --line: #dce5f3;
  --soft: #f4f8fd;
  --panel: #ffffff;
  --blue: #315cf6;
  --violet: #6952f5;
  --green: #00a868;
  --orange: #f68a20;
  --pink: #e93673;
  --red: #e33b4f;
  --shadow: 0 18px 45px rgba(34, 51, 84, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #edf4fb;
}

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

button {
  cursor: pointer;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(340px, 1fr) minmax(440px, 1fr);
  background:
    radial-gradient(circle at 100% 0, rgba(49, 92, 246, 0.16) 0 16%, transparent 17%),
    radial-gradient(circle at 100% 100%, rgba(49, 92, 246, 0.13) 0 18%, transparent 19%),
    #f7fbff;
}

.login-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 72px);
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 20, 47, 0.45), rgba(10, 56, 153, 0.28)),
    linear-gradient(135deg, #07142f 0%, #0c2d72 58%, #144fb4 100%);
}

.login-art::before {
  content: "";
  position: absolute;
  inset: -12% -18% auto auto;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.login-art::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58%;
  height: 45%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.08));
  clip-path: polygon(32% 12%, 100% 0, 100% 100%, 0 100%);
}

.login-art-inner {
  position: relative;
  z-index: 1;
  min-height: min(760px, 86vh);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-mark {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset -8px -10px 18px rgba(7, 20, 47, 0.12);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-fallback {
  color: #ffcb47;
  border: 2px solid #ffcb47;
  background: #081d47;
  box-shadow: inset 0 0 0 5px rgba(255, 203, 71, 0.12);
}

.brand-fallback span {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
}

.login-art h1 {
  max-width: 520px;
  margin: 52px 0 18px;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: 0;
}

.login-art h1 span {
  color: #4aa0ff;
}

.login-art p {
  max-width: 520px;
  color: #d6e3ff;
  line-height: 1.65;
  font-size: 19px;
}

.login-art i {
  width: 56px;
  height: 3px;
  margin: clamp(48px, 9vw, 110px) 0 34px;
  border-radius: 999px;
  background: #4a8cff;
  display: block;
}

.login-art em {
  font: 400 28px "Segoe Script", "Bradley Hand ITC", cursive;
  color: #9ec4ff;
  transform: rotate(-7deg);
  transform-origin: left center;
}

.login-card {
  align-self: center;
  justify-self: center;
  width: min(580px, calc(100% - 44px));
  padding: clamp(34px, 5vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 28px 70px rgba(37, 68, 123, 0.13);
  text-align: center;
}

.login-card h2 {
  margin: 16px 0 10px;
  font-size: 30px;
}

.login-card-logo {
  display: flex;
  justify-content: center;
}

.login-card-logo .brand-mark {
  width: 82px;
  height: 82px;
}

.login-field {
  text-align: left;
  margin-top: 28px;
}

.input-icon {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid #d5dfef;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
}

.input-icon strong {
  font-size: 19px;
  color: #0d234f;
}

.input-icon input {
  min-height: 54px;
  border: 0;
  padding: 0;
}

.input-icon button {
  border: 0;
  background: transparent;
  color: #627394;
  font-size: 19px;
}

.login-submit {
  width: 100%;
  min-height: 58px;
  margin-top: 12px;
  justify-content: center;
  font-size: 18px;
}

.authorized-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
  color: #6d7d99;
}

.authorized-line span {
  height: 1px;
  background: #d8e1ee;
}

.field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}

.field span {
  font-size: 13px;
  font-weight: 700;
  color: #213350;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 92, 246, 0.12);
}

.location-field {
  position: relative;
}

.location-suggestions {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 31, 56, 0.16);
}

.location-suggestions button {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.location-suggestions button:hover {
  background: #f4f7ff;
}

.location-suggestions span {
  color: var(--muted);
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.btn.primary {
  border-color: var(--blue);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.btn.danger {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.btn.ghost {
  background: transparent;
}

.icon-btn {
  width: 34px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cbd8ea;
  border-radius: 8px;
  color: #0d234f;
  background: #fff;
  box-shadow: 0 6px 12px rgba(34, 51, 84, 0.06);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: #80a7ef;
  background: #f4f8ff;
}

.icon-btn.danger {
  color: #fff;
  border-color: #ef3b4f;
  background: #ef3b4f;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.error {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 292px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  color: #fff;
  background: radial-gradient(circle at 50% 4%, rgba(255, 255, 255, 0.12), transparent 24%), #08182f;
}

.logo-block {
  display: grid;
  justify-items: center;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.logo-block .brand-mark {
  width: 96px;
  height: 96px;
}

.logo-block strong {
  margin-top: 8px;
  font-size: 18px;
}

.logo-block small {
  color: #c6d4ec;
}

.nav {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #eef5ff;
  background: transparent;
  text-align: left;
}

.nav button.active {
  background: linear-gradient(135deg, #4c57e8, #7458f6);
  box-shadow: 0 10px 24px rgba(77, 87, 232, 0.35);
}

.nav .badge {
  margin-left: auto;
}

.sidebar-footer {
  margin-top: auto;
  padding: 22px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d6e4f9;
  line-height: 1.6;
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
}

.hamburger {
  border: 0;
  background: transparent;
  font-size: 24px;
}

.search {
  position: relative;
  max-width: 420px;
  margin-left: auto;
  flex: 1;
}

.search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px 0 40px;
  background: #f3f7fc;
}

.search::before {
  position: absolute;
  left: 13px;
  top: 10px;
  content: "⌕";
  color: var(--muted);
  font-size: 20px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.avatar {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #315cf6, #173776);
  font-weight: 900;
  vertical-align: middle;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar.mini {
  width: 26px;
  height: 26px;
  font-size: 12px;
  margin-right: 7px;
}

.photo-editor {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}

.photo-editor .avatar {
  width: 68px;
  height: 68px;
  font-size: 24px;
}

.poster-editor {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.poster-editor .field {
  margin: 0;
}

.poster-editor small {
  color: var(--muted);
}

.content {
  padding: 24px;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-head h1 {
  margin: 0;
  font-size: 28px;
}

.page-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #314460;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.stat {
  display: flex;
  gap: 16px;
  min-height: 112px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(28, 48, 84, 0.06);
}

.stat:nth-child(1) { background: linear-gradient(135deg, #f0edff, #fff); }
.stat:nth-child(2) { background: linear-gradient(135deg, #e7f9ef, #fff); }
.stat:nth-child(3) { background: linear-gradient(135deg, #eaf4ff, #fff); }
.stat:nth-child(4) { background: linear-gradient(135deg, #fff1df, #fff); }
.stat:nth-child(5) { background: linear-gradient(135deg, #ffe4ef, #fff); }

.stat-icon {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  place-items: center;
  border-radius: 50%;
  font-size: 24px;
  background: rgba(49, 92, 246, 0.14);
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 25px;
}

.stat small {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-weight: 700;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr 0.95fr;
  gap: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(28, 48, 84, 0.07);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}

.panel h2 {
  margin: 0;
  font-size: 18px;
}

.panel p {
  margin: 3px 0 0;
  color: var(--muted);
}

.chart-row {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  padding: 8px 16px 20px;
}

.donut {
  position: relative;
  width: 190px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#315cf6 0 32%, #cc43e9 32% 50%, #ff4d78 50% 62%, #ffb24a 62% 74%, #23bf92 74% 86%, #66c2e9 86% 92%, #8a7cf6 92% 100%);
}

.donut::after {
  position: absolute;
  inset: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  content: attr(data-label);
  white-space: pre;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.legend,
.bar-list {
  display: grid;
  gap: 10px;
}

.legend-row,
.bar-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 3px;
}

.bars {
  display: flex;
  align-items: end;
  gap: 16px;
  height: 210px;
  padding: 16px 22px 24px;
  border-top: 1px solid #edf2f8;
}

.bar {
  display: grid;
  align-items: end;
  justify-items: center;
  flex: 1;
  height: 100%;
  color: #263b5b;
  font-size: 12px;
}

.bar i {
  display: block;
  width: 100%;
  min-height: 8px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #8d7cf6, #4d55ea);
}

.bar span {
  margin-top: 7px;
}

.bar-row {
  grid-template-columns: 80px 1fr 42px;
  padding: 0 16px;
}

.bar-track {
  height: 13px;
  border-radius: 8px;
  background: #e9eff7;
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #715cf1, #68bce9);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #0b1c37;
  background: #f5f8fc;
  font-size: 12px;
}

tr:hover td {
  background: #f9fbff;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 10px;
  background: #e9eff7;
  color: #263b5b;
  font-size: 12px;
  font-weight: 800;
}

.badge.active,
.badge.approved {
  color: #008452;
  background: #cef5e2;
}

.badge.pending {
  color: #d46b00;
  background: #ffe7c4;
}

.badge.rejected,
.badge.inactive,
.badge.deleted {
  color: #d7193f;
  background: #ffd6df;
}

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.filters input,
.filters select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
  padding: 0 16px 16px;
}

.import-panel {
  margin-bottom: 14px;
}

.import-box {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 14px;
  padding: 0 16px 16px;
}

.import-dropzone {
  min-height: 150px;
}

.import-preview {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.import-summary {
  display: grid;
  gap: 8px;
}

.mini-table {
  max-height: 210px;
  overflow: auto;
}

.mini-table table {
  font-size: 12px;
}

.form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-actions {
  flex-wrap: nowrap;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.quick {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #eef6ff, #fff);
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.detail-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.detail-box h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.kv {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
  font-size: 13px;
}

.kv span:nth-child(odd) {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: 360px;
  border-radius: 8px;
  padding: 14px 16px;
  color: #fff;
  background: #07142f;
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 20, 47, 0.55);
}

.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal .panel-head {
  border-bottom: 1px solid var(--line);
}

.empty {
  padding: 26px 16px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .login-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }
  .login-art {
    min-height: auto;
    padding: 28px;
  }
  .login-art-inner {
    min-height: 360px;
  }
  .login-art h1 {
    margin-top: 28px;
    font-size: 38px;
  }
  .login-art p {
    font-size: 16px;
  }
  .login-art i {
    margin: 34px 0 22px;
  }
  .login-art em {
    font-size: 22px;
  }
  .login-card {
    width: min(100% - 28px, 540px);
    margin: 24px 0;
    padding: 28px 20px;
  }
  .sidebar {
    position: static;
    height: auto;
  }
  .sidebar-footer {
    display: none;
  }
  .topbar {
    flex-wrap: wrap;
    padding: 10px 14px;
  }
  .search,
  .user-chip {
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
    border-left: 0;
    padding-left: 0;
  }
  .content {
    padding: 14px;
  }
  .page-head {
    align-items: start;
    flex-direction: column;
  }
  .stats-grid,
  .filters,
  .form-grid,
  .import-box,
  .poster-editor,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .chart-row {
    grid-template-columns: 1fr;
  }
  .donut {
    margin: auto;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
}

/* Premium dashboard refresh */
body {
  background: #eef5fb;
}

.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  background:
    radial-gradient(circle at 84% 0%, rgba(49, 92, 246, 0.08), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
}

.sidebar {
  padding: 18px 14px;
  background:
    radial-gradient(circle at 50% 73%, rgba(40, 88, 178, 0.38), transparent 18%),
    linear-gradient(180deg, #071932 0%, #061326 100%);
  box-shadow: 12px 0 34px rgba(7, 20, 47, 0.16);
}

.logo-block {
  padding-bottom: 22px;
}

.logo-block .brand-mark {
  width: 92px;
  height: 92px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.logo-block strong {
  font-size: 17px;
  text-align: center;
}

.logo-block small {
  text-align: center;
  font-size: 12px;
}

.nav {
  gap: 8px;
}

.nav button {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 750;
}

.nav button span:first-child {
  width: 20px;
  text-align: center;
}

.nav button.active {
  background: linear-gradient(135deg, #2368ff, #1651f0);
  box-shadow: 0 12px 28px rgba(35, 104, 255, 0.34);
}

.sidebar-footer {
  min-height: 150px;
  display: flex;
  align-items: end;
  padding: 20px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(7, 19, 38, 0.18), rgba(7, 19, 38, 0.82)),
    radial-gradient(circle at 52% 28%, rgba(255, 176, 74, 0.35), transparent 16%),
    rgba(255, 255, 255, 0.06);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(17, 35, 70, 0.08);
}

.hamburger {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #0d2350;
}

.hamburger:hover {
  background: #eef4ff;
}

.search {
  max-width: 620px;
  margin-left: 0;
}

.search input {
  height: 40px;
  background: #f3f7fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.top-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.btn.success {
  color: #fff;
  border-color: #078a58;
  background: linear-gradient(135deg, #08a867, #047146);
}

.btn.success.dark {
  border-color: #066142;
  background: linear-gradient(135deg, #08744d, #06452f);
}

.notification-anchor {
  position: relative;
  z-index: 60;
}

.bell {
  position: relative;
  width: 46px;
  height: 44px;
  border: 1px solid rgba(129, 166, 220, 0.38);
  border-radius: 14px;
  color: #f5b301;
  background: linear-gradient(145deg, #fff8dc, #ffe49b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 26px rgba(9, 27, 68, 0.2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bell:hover,
.bell[aria-expanded="true"] {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(82, 148, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(49, 92, 246, 0.13), 0 14px 28px rgba(9, 27, 68, 0.28);
}

.bell.has-unread::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  border: 1px solid rgba(239, 68, 68, 0.55);
  animation: notify-pulse 2.4s ease-out infinite;
}

.bell-icon {
  width: 30px;
  height: 30px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(180, 83, 9, 0.25));
}

.bell-icon-body {
  fill: #ffc107;
  stroke: #d97706;
  stroke-width: 2.3;
  stroke-linejoin: round;
}

.bell-icon-clapper,
.bell-icon-loop {
  fill: none;
  stroke: #9a4d00;
  stroke-width: 2.8;
  stroke-linecap: round;
}

.bell-shape {
  position: relative;
  width: 21px;
  height: 23px;
  border: 2px solid #eef6ff;
  border-radius: 11px 11px 8px 8px;
  border-top-width: 3px;
}

.bell-shape::before {
  content: "";
  position: absolute;
  left: 6px;
  top: -7px;
  width: 7px;
  height: 6px;
  border: 2px solid #eef6ff;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.bell-shape::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: -7px;
  width: 7px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: #eef6ff;
}

.bell b {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ef3b25, #b91c1c);
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(185, 28, 28, 0.26);
  font-size: 12px;
  line-height: 18px;
  font-weight: 800;
}

@keyframes notify-pulse {
  0% { opacity: 0.7; transform: scale(0.96); }
  70% { opacity: 0; transform: scale(1.16); }
  100% { opacity: 0; transform: scale(1.16); }
}

.news-ticker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(90deg, #e33b4f, #f68a20);
  overflow: hidden;
}

.news-ticker strong {
  white-space: nowrap;
}

.news-ticker div {
  overflow: hidden;
}

.news-ticker span {
  display: inline-block;
  min-width: 100%;
  white-space: nowrap;
  animation: ticker-scroll 22s linear infinite;
}

@keyframes ticker-scroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

.notification-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(210, 222, 241, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(9, 27, 68, 0.2);
  overflow: hidden;
  animation: popover-in 0.16s ease-out;
}

.notification-head,
.notification-row,
.notification-all {
  width: 100%;
}

.notification-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 10px;
}

.notification-head h2 {
  margin: 0;
  font-size: 18px;
}

.notification-list {
  display: grid;
}

.notification-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border: 0;
  border-top: 1px solid #e8eef7;
  background: transparent;
  text-align: left;
}

.notification-row:hover {
  background: #f5f9ff;
}

.notification-row.unread {
  background: #f0f7ff;
}

.notification-row p {
  margin: 3px 0 0;
  color: #395070;
  font-size: 13px;
}

.notification-row time {
  color: #48618a;
  font-size: 12px;
  white-space: nowrap;
}

.notification-row i {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #315cf6;
  transform: translateY(-50%);
}

.notification-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1662df;
  background: #eaf3ff;
}

.notification-all {
  min-height: 42px;
  border: 0;
  border-top: 1px solid #dce5f3;
  color: #0f5fff;
  background: #f8fbff;
  font-weight: 750;
}

.toolbar-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
  flex-wrap: wrap;
}

.toolbar-tabs button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 13px;
  color: var(--blue);
  background: #fff;
  font-weight: 850;
}

.toolbar-tabs button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), #6a4ff7);
}

.notification-center-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.notification-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.notification-card.unread {
  border-color: rgba(49, 92, 246, 0.35);
  background: #f5f9ff;
}

.notification-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.notification-card p {
  margin: 0 0 5px;
  color: var(--text);
}

.notification-card small {
  color: var(--muted);
  font-weight: 750;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.master-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.settings-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 0 16px 12px;
}

.settings-tools input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.file-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.import-preview.compact {
  padding: 0 16px 12px;
}

.table-limit-note {
  padding: 0 16px 16px;
  margin: 0;
}

.master-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.45fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}

.new-master-row {
  border-color: #3861ff;
  background: #eef4ff;
  box-shadow: 0 10px 24px rgba(49, 92, 246, 0.12);
}

[data-master-location-row] {
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) minmax(100px, 0.7fr) auto;
}

.master-row label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.master-row input,
.master-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.team-panel {
  margin-bottom: 14px;
}

.team-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 14px;
}

.team-toolbar .segments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  font-size: 12px;
  font-weight: 850;
  color: #253858;
}

.status-dot i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.15);
}

.status-online i {
  background: #13b981;
  box-shadow: 0 0 0 4px rgba(19, 185, 129, 0.16);
}

.status-idle i {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.status-offline i {
  background: #ef334e;
  box-shadow: 0 0 0 4px rgba(239, 51, 78, 0.16);
}

.team-search {
  width: min(340px, 100%);
  min-height: 38px;
  border: 1px solid #d5dfef;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.danger-row {
  background: #fff1f2;
}

.add-team-panel[hidden] {
  display: none;
}

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.user-chip {
  min-width: 172px;
  border-left: 1px solid var(--line);
}

.content {
  padding: 18px 26px 22px;
}

.page-head {
  align-items: center;
  margin-bottom: 16px;
}

.page-head h1 {
  font-size: 27px;
  line-height: 1.15;
}

.date-pill {
  font-weight: 650;
}

.stats-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.stat {
  align-items: center;
  min-height: 100px;
  padding: 16px 18px;
  overflow: hidden;
}

.stat-icon {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}

.stat strong {
  font-size: 26px;
  line-height: 1.05;
}

.stat small {
  color: #0b9a60;
  font-size: 12px;
}

.stat.tone-blue .stat-icon { color: #1651f0; background: #dce8ff; }
.stat.tone-green .stat-icon { color: #07975f; background: #d9f8ea; }
.stat.tone-pink .stat-icon { color: #d91b63; background: #ffe0ee; }
.stat.tone-orange .stat-icon { color: #df6c00; background: #ffe8ce; }

.dashboard-trio {
  display: grid;
  grid-template-columns: 1.08fr 1.32fr 0.98fr;
  gap: 14px;
  align-items: stretch;
}

.stack-panels {
  display: grid;
  gap: 14px;
}

.panel {
  border-color: #dbe6f5;
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(28, 48, 84, 0.08);
}

.panel-head {
  min-height: 52px;
  padding: 14px 16px 10px;
}

.panel h2 {
  font-size: 17px;
}

.link-btn {
  border: 0;
  color: #0d55ff;
  background: transparent;
  font-weight: 800;
}

.activity-list,
.reminder-list,
.task-list,
.live-list {
  display: grid;
  gap: 0;
  padding: 0 14px 14px;
}

.activity-item,
.reminder-item,
.task-item,
.live-item {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  border-top: 1px solid #e4ecf7;
}

.activity-item {
  grid-template-columns: 48px 1fr auto;
}

.activity-item strong,
.reminder-item strong,
.live-item strong {
  display: block;
}

.activity-item span,
.activity-item small,
.reminder-item small,
.live-item small,
.task-item time,
.live-item time {
  color: #36517b;
  font-size: 12px;
}

.activity-item time {
  color: #234c9f;
  font-size: 12px;
}

.company-avatar {
  width: 42px;
  height: 42px;
  font-size: 17px;
  background: radial-gradient(circle at 35% 30%, #273c68, #020915);
}

.reminder-item {
  grid-template-columns: 58px 1fr auto;
}

.reminder-item b {
  display: grid;
  place-items: center;
  height: 50px;
  border-radius: 8px;
  color: #f02d4e;
  background: #ffe1e7;
  line-height: 1;
}

.reminder-item b span {
  font-size: 10px;
}

.reminder-item:nth-child(2) b {
  color: #cf6500;
  background: #fff0d4;
}

.reminder-item:nth-child(3) b {
  color: #075bf2;
  background: #dbeaff;
}

.reminder-item em {
  border-radius: 8px;
  padding: 8px 10px;
  color: #f02d4e;
  background: #ffe1e7;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.task-item {
  grid-template-columns: 18px 1fr auto auto;
  min-height: 40px;
  font-size: 14px;
}

.task-item b,
.mini-pill,
.segment {
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
}

.positive { color: #008452; background: #d8f8e8; }
.warn { color: #d46b00; background: #ffeacb; }
.danger-soft { color: #d7193f; background: #ffdce5; }

.live-item {
  grid-template-columns: 46px minmax(100px, 1fr) auto auto;
}

.client-hub,
.dashboard-bottom {
  margin-top: 14px;
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.75fr) minmax(320px, 0.75fr);
  gap: 14px;
}

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

.segment {
  border: 1px solid transparent;
  background: #eef4ff;
  color: #1d4fe8;
}

.segment.active {
  color: #fff;
  background: linear-gradient(135deg, #315cf6, #5d55f3);
}

.filters {
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr));
  align-items: center;
}

th,
td {
  padding: 11px 14px;
}

tbody tr:nth-child(even) td {
  background: rgba(248, 251, 255, 0.62);
}

.actions .btn {
  min-height: 34px;
  padding: 7px 10px;
}

.poster-thumb {
  display: inline-block;
  width: 56px;
  height: 36px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 65% 35%, rgba(255, 178, 74, 0.85), transparent 12%),
    linear-gradient(135deg, #081832, #315cf6 55%, #ff4d78);
}

.poster-thumb.large {
  width: 110px;
  height: 74px;
}

.poster-img {
  width: 56px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.poster-preview {
  width: 120px;
  height: 82px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.event-hero {
  width: 100%;
  max-height: 280px;
  border-radius: 8px;
  object-fit: cover;
}

.task-item input {
  accent-color: var(--blue);
}

.upload-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  border: 1.5px dashed #9db4d6;
  border-radius: 8px;
  background: #f7fbff;
  color: #294263;
  text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.upload-dropzone.dragging {
  border-color: var(--blue);
  background: #eef4ff;
  transform: translateY(-1px);
}

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

.upload-dropzone strong,
.upload-dropzone span {
  display: block;
}

.task-upload-preview {
  width: 94px;
  height: 64px;
  margin: 0 auto 8px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.task-photo {
  width: 46px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.task-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1320px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .dashboard-trio,
  .dashboard-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 30;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .topbar {
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .search {
    order: 5;
    flex: 1 0 100%;
    max-width: none;
  }

  .top-actions {
    order: 4;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .top-actions .btn {
    flex: 0 0 auto;
  }

  .user-chip {
    min-width: 0;
    margin-left: auto;
    padding-left: 10px;
  }

  .content {
    padding: 16px 12px;
  }
}

@media (max-width: 720px) {
  .notification-popover {
    position: fixed;
    top: 74px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .notification-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .notification-row time {
    grid-column: 2;
  }

  .team-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .team-search {
    width: 100%;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-head h1 {
    font-size: 24px;
  }

  .stats-grid,
  .filters,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .activity-item,
  .reminder-item,
  .task-item,
  .live-item {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 12px 0;
  }

  .activity-item .avatar,
  .live-item .avatar {
    grid-row: auto;
  }

  .stat {
    min-height: 88px;
  }

  .stat strong {
    font-size: 24px;
  }

  .user-chip div {
    display: none;
  }

  .bell {
    border-left: 0;
  }
}
