:root {
  --primary: #0f766e;
  --secondary: #0b1220;
  --accent: #d4af37;
  --primary-fg: #ffffff;
  --body-fg: #13202f;
  --body-bg: #edf2f7;
  --body-quiet-color: #68758a;
  --body-loud-color: #09111f;
  --breadcrumbs-bg: #172034;
  --breadcrumbs-fg: #dbe8ff;
  --link-fg: #0f766e;
  --link-hover-color: #0b5f59;
  --hairline-color: rgba(15, 23, 42, 0.1);
  --border-color: rgba(15, 23, 42, 0.12);
  --darkened-bg: #e3e9f2;
  --selected-bg: #e8f7f4;
  --selected-row: #f3fbf9;
  --button-fg: #ffffff;
  --button-bg: #0f766e;
  --button-hover-bg: #0b5f59;
  --default-button-bg: #0b1220;
  --default-button-hover-bg: #172034;
  --delete-button-bg: #b42318;
  --delete-button-hover-bg: #901a12;
  --close-button-bg: #5d697a;
  --close-button-hover-bg: #465163;
  --font-family-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-family-monospace: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html {
  background:
    radial-gradient(circle at 18% 0%, rgba(15, 118, 110, 0.18), transparent 32rem),
    linear-gradient(135deg, #e9eff6 0%, #f7fafc 42%, #e6edf5 100%);
}

body.kcool-admin {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 88% 12%, rgba(212, 175, 55, 0.14), transparent 22rem);
  color: var(--body-fg);
  font-family: var(--font-family-primary);
  letter-spacing: 0;
}

body.kcool-admin a:link,
body.kcool-admin a:visited {
  color: #0f766e;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

body.kcool-admin a:hover {
  color: #0b5f59;
}

#header {
  min-height: 72px;
  padding: 0 28px;
  background:
    linear-gradient(135deg, rgba(11, 18, 32, 0.96), rgba(19, 31, 53, 0.97)),
    linear-gradient(90deg, rgba(15, 118, 110, 0.24), rgba(212, 175, 55, 0.16));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(11, 18, 32, 0.18);
}

#branding {
  min-width: 260px;
}

.kcool-admin-brand-link,
.kcool-admin-brand-link:link,
.kcool-admin-brand-link:visited {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  text-decoration: none;
}

.kcool-admin-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: linear-gradient(135deg, #f7d774, #0f766e);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
  color: #07111f;
  font-size: 20px;
  font-weight: 900;
}

.kcool-admin-brand strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.15;
}

.kcool-admin-brand small {
  display: block;
  margin-top: 4px;
  color: rgba(219, 232, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

#user-tools {
  color: rgba(219, 232, 255, 0.78);
  font-size: 12px;
  letter-spacing: 0;
}

#user-tools a,
#user-tools a:link,
#user-tools a:visited {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
}

#user-tools a:hover {
  border-color: rgba(212, 175, 55, 0.62);
  background: rgba(255, 255, 255, 0.08);
}

.kcool-admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.kcool-admin-nav a,
.kcool-admin-nav a:link,
.kcool-admin-nav a:visited {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #e9f5ff;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.kcool-admin-nav a:hover {
  border-color: rgba(212, 175, 55, 0.58);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

div.breadcrumbs {
  padding: 13px 28px;
  background: rgba(23, 32, 52, 0.94);
  color: rgba(219, 232, 255, 0.76);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

div.breadcrumbs a,
div.breadcrumbs a:link,
div.breadcrumbs a:visited {
  color: #ffffff;
  font-weight: 760;
}

#container {
  min-width: 0;
}

#content {
  max-width: 1500px;
  padding: 28px;
}

#content-main {
  min-width: 0;
}

h1 {
  margin: 0 0 18px;
  color: #09111f;
  font-size: 26px;
  font-weight: 860;
  letter-spacing: 0;
}

h2,
.module caption,
.inline-group h2 {
  font-weight: 820;
  letter-spacing: 0;
}

.module,
.inline-group,
#content-related,
.paginator,
#toolbar,
#changelist-filter,
.submit-row,
form .aligned,
.results {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.module {
  overflow: hidden;
  margin-bottom: 18px;
}

.module h2,
.module caption,
.inline-group h2 {
  padding: 13px 16px;
  background: linear-gradient(135deg, #0b1220, #172034);
  color: #ffffff;
}

.module caption a,
.module caption a:link,
.module caption a:visited {
  color: #ffffff;
  font-weight: 820;
}

.dashboard #content {
  width: auto;
}

.dashboard #content-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.app-list .app-label {
  color: #09111f;
  font-weight: 840;
}

.dashboard .module table th,
.dashboard .module table td {
  padding: 13px 16px;
}

.dashboard .module table tr {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.dashboard .module table tr:last-child {
  border-bottom: 0;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

thead th,
tfoot td {
  background: #f6f8fb;
  color: #344156;
  font-size: 12px;
  font-weight: 820;
}

td,
th {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  vertical-align: middle;
}

tr:nth-child(even) {
  background: rgba(246, 248, 251, 0.58);
}

tbody tr:hover {
  background: #eefaf7;
}

#changelist {
  display: grid;
  gap: 16px;
}

#changelist #toolbar {
  margin: 0;
  padding: 14px;
}

#toolbar form input[type="text"] {
  width: min(440px, 70vw);
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #09111f;
}

#toolbar form input[type="text"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
  outline: none;
}

#changelist .actions {
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

#changelist .results {
  overflow: auto;
}

#changelist table {
  width: 100%;
}

#changelist table thead th {
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

#changelist-filter {
  top: 88px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

#changelist-filter h2 {
  padding: 13px 16px;
  background: linear-gradient(135deg, #0b1220, #172034);
  color: #ffffff;
  font-size: 13px;
  font-weight: 820;
}

#changelist-filter h3 {
  margin: 16px 16px 8px;
  color: #667085;
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

#changelist-filter li a {
  display: block;
  margin: 2px 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #344156;
}

#changelist-filter li.selected a {
  background: #e8f7f4;
  color: #0b5f59;
  font-weight: 820;
}

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

.object-tools a,
.object-tools a:link,
.object-tools a:visited {
  border-radius: 8px;
  background: #0b1220;
  color: #ffffff;
  font-weight: 760;
}

.object-tools a:focus,
.object-tools a:hover {
  background: #172034;
}

.object-tools a.addlink {
  background: #0f766e;
}

.object-tools a.addlink:hover {
  background: #0b5f59;
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
a.button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 780;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.2);
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.submit-row input:hover,
a.button:hover {
  background: #0b5f59;
}

.button.default,
input[type="submit"].default,
.submit-row input.default {
  background: #0b1220;
  box-shadow: 0 10px 24px rgba(11, 18, 32, 0.22);
}

.button.default:hover,
input[type="submit"].default:hover,
.submit-row input.default:hover {
  background: #172034;
}

.deletelink,
.deletelink:link,
.deletelink:visited {
  border-radius: 8px;
  background: #b42318;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
}

form .aligned {
  padding: 8px 0;
  overflow: hidden;
}

.aligned label {
  color: #344156;
  font-weight: 760;
}

input,
textarea,
select,
.vTextField {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #09111f;
}

input,
select {
  min-height: 34px;
}

textarea {
  line-height: 1.5;
}

.help,
p.help,
form p.help,
div.help,
form div.help,
div.help li {
  color: #68758a;
  font-size: 12px;
}

.messagelist {
  padding: 0;
}

ul.messagelist li {
  margin: 0 0 12px;
  border-radius: 8px;
  background-position: 14px 13px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.09);
}

#content-related {
  padding: 0;
  overflow: hidden;
}

#content-related .module {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.paginator {
  padding: 12px 14px;
}

.login #container {
  width: min(460px, calc(100vw - 32px));
  margin: 8vh auto 0;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 80px rgba(11, 18, 32, 0.18);
  backdrop-filter: blur(18px);
}

.login #header {
  min-height: auto;
  padding: 28px 28px 22px;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}

.login #content {
  max-width: none;
  padding: 28px;
}

.login .form-row {
  padding: 0 0 14px;
}

.login .form-row label {
  display: block;
  margin-bottom: 7px;
  color: #344156;
  font-weight: 760;
}

.login .form-row #id_username,
.login .form-row #id_password {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
}

.login .submit-row {
  padding: 10px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.login .submit-row input {
  width: 100%;
  min-height: 42px;
}

.login .password-reset-link {
  text-align: center;
}

.login .errornote,
.login .messagelist li {
  border-radius: 8px;
}

@media (max-width: 1024px) {
  #header {
    align-items: flex-start;
    min-height: auto;
    padding: 18px;
  }

  #branding {
    min-width: 0;
  }

  .kcool-admin-nav {
    width: 100%;
    justify-content: flex-start;
    margin-top: 14px;
  }

  #user-tools {
    width: 100%;
    margin-top: 12px;
    text-align: left;
  }

  #content {
    padding: 18px;
  }
}

@media (max-width: 767px) {
  #content {
    padding: 14px;
  }

  .kcool-admin-nav a,
  .kcool-admin-nav a:link,
  .kcool-admin-nav a:visited {
    flex: 1 1 auto;
    text-align: center;
  }

  .submit-row {
    display: grid;
  }

  .login #container {
    margin-top: 16px;
  }
}
