.card-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.ad-color-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.ad-color-controls input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 3px;
  flex-shrink: 0;
}
.ad-color-controls input[type="text"],
.ad-color-controls input[name="color"] {
  min-width: 100px;
  flex: 1;
}
.ad-color-controls button {
  white-space: nowrap;
  flex-shrink: 0;
}
.card-filter input {
  flex: 1;
  min-width: 220px;
}
.card-filter select {
  width: 160px;
}
:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  color: #34485c;
  background: #f5f7fa;
  --teal: #119d89;
  --border: #e4eaf0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #119d8940;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
#login-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-decoration {
  background: linear-gradient(145deg, #132b36, #24564e);
  color: #fff;
  padding: 12vh 14%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.logo-large {
  width: 70px;
  height: 70px;
  background: #2b7061;
  border: 1px solid #ffffff26;
  border-radius: 19px;
  display: grid;
  place-items: center;
  font-size: 40px;
  margin-bottom: 65px;
  position: relative;
}
.logo-large span {
  color: #74dcc1;
  position: absolute;
  right: 15px;
  bottom: 3px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #76b3a1;
  margin-bottom: 17px;
}
.login-decoration h1 {
  font-size: 35px;
  font-weight: 500;
  letter-spacing: 2px;
  margin: 0 0 22px;
  white-space: nowrap;
}
.login-decoration p {
  color: #94b6b0;
  font-size: 13px;
  line-height: 2.2;
}
.login-foot {
  font-size: 10px;
  color: #638f85;
  margin-top: 80px;
}
.login-form-wrap {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form-wrap form {
  width: 330px;
}
.mini-logo {
  display: inline-grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: #139f8b;
  color: #fff;
  font-size: 21px;
  font-weight: 600;
}
.login-form-wrap h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 28px 0 12px;
}
.login-form-wrap p {
  color: #9aa7b4;
  font-size: 11px;
  margin-bottom: 30px;
}
.login-form-wrap small {
  display: block;
  text-align: center;
  font-size: 10px;
  color: #a2aeb9;
  margin-top: 22px;
}
label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #7a8e9e;
  gap: 9px;
  margin-bottom: 20px;
}
#mail-form fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
#mail-form fieldset[hidden] {
  display: none;
}
.mail-guide {
  margin-top: 20px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #dae3e9;
  border-radius: 6px;
  padding: 11px 12px;
  color: #435e70;
  background: #fff;
}
input::placeholder,
textarea::placeholder {
  color: #afb9c3;
}
input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: #5ab6a4;
  box-shadow: 0 0 0 3px #119d8910;
}
textarea {
  resize: vertical;
  line-height: 1.8;
  min-height: 80px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #dce5eb;
  color: #718596;
  border-radius: 6px;
  min-height: 35px;
  padding: 0 15px;
  font-size: 11px;
  white-space: nowrap;
}
.btn:hover {
  border-color: #7db7a9;
  color: #208f79;
}
.btn.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.btn.primary:hover {
  background: #0c8677;
}
.btn.danger {
  color: #bf7280;
  border-color: #eed7db;
}
.btn.full {
  width: 100%;
  height: 41px;
}
.btn.small {
  min-height: 29px;
  padding: 0 10px;
  font-size: 10px;
}
.error {
  color: #b36573;
  background: #fff1f4;
  font-size: 11px;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 15px;
  display: none;
}
.error:not(:empty) {
  display: block;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e9f2f1;
  padding: 33px 25px 40px;
  font-size: 16px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: #789487;
  margin-top: 7px;
  letter-spacing: 2px;
}
#console {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 220px;
  background: #162934;
  color: #8da2af;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  bottom: 0;
}
.nav-caption {
  font-size: 10px;
  color: #5e7a88;
  padding: 0 27px 15px;
  letter-spacing: 2px;
}
nav {
  padding: 0 15px;
}
nav button {
  border: 0;
  background: none;
  border-radius: 6px;
  color: #93a7b3;
  text-align: left;
  padding: 13px 15px;
  width: 100%;
  margin-bottom: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
}
nav button.active {
  background: #204640;
  color: #7ed0b5;
  box-shadow: inset 3px 0 #30ae8a;
}
nav button:hover {
  background: #263f48;
}
nav span {
  margin-left: auto;
  font-size: 10px;
  color: #76ac98;
}
.aside-foot {
  position: absolute;
  bottom: 28px;
  left: 27px;
  font-size: 11px;
  color: #8ba89e;
}
.aside-foot small {
  display: block;
  font-size: 9px;
  margin-top: 10px;
  color: #4d7580;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #32bb95;
  border-radius: 50%;
  margin-right: 7px;
}
.console-main {
  margin-left: 220px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
header {
  height: 70px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  font-size: 11px;
  color: #98a7b4;
}
header b {
  font-weight: 400;
  color: #526d7f;
}
header span {
  padding: 0 13px;
  color: #c1cbd4;
}
.header-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}
.header-actions span {
  padding: 0;
  color: #739181;
}
main {
  padding: 35px 36px;
  flex: 1;
}
footer {
  padding: 16px 36px;
  background: #fff;
  border-top: 1px solid var(--border);
  font-size: 9px;
  letter-spacing: 1px;
  color: #9eacb7;
}
footer span {
  float: right;
  letter-spacing: 0;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 20px;
}
.page-head h1 {
  margin: 0 0 10px;
  font-size: 25px;
  font-weight: 600;
  color: #263e50;
}
.page-head p {
  margin: 0;
  color: #97a7b4;
  font-size: 11px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 26px;
  box-shadow: 0 3px 5px #1d3d4a03;
}
.card h2 {
  font-size: 14px;
  font-weight: 550;
  margin: 0 0 9px;
}
.card > p {
  font-size: 11px;
  line-height: 1.9;
  color: #97a8b5;
  margin-bottom: 25px;
}
.grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  align-items: start;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.full-field {
  grid-column: 1/-1;
}
.hint {
  font-size: 10px;
  color: #a0aeb8;
  line-height: 1.8;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid #ecf1f4;
}
.switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}
.switch-row p {
  font-size: 10px;
  color: #a0acb6;
  line-height: 1.8;
}
.note {
  font-size: 11px;
  line-height: 2;
  color: #739b88;
  background: #eff8f3;
  border: 1px solid #deede4;
  border-radius: 6px;
  padding: 14px 16px;
}
.submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 23px;
  gap: 9px;
}
.preview {
  background: #f4f8f6;
  border: 1px dashed #ccddd3;
  border-radius: 8px;
  padding: 24px;
  margin-top: 20px;
}
.preview strong {
  color: #2c6557;
  font-size: 18px;
  font-weight: 550;
}
.preview p {
  color: #87a297;
  font-size: 11px;
}
.preview .announcement-preview {
  border-top: 1px solid #dfeae5;
  margin-top: 20px;
  padding-top: 15px;
  line-height: 1.8;
  font-size: 11px;
  color: #7b9b8b;
}
.ads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.ad-card {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.ad-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge {
  display: inline-flex;
  padding: 4px 8px;
  background: #f1f5f8;
  color: #8a9dab;
  border-radius: 4px;
  font-size: 10px;
}
.badge.green {
  background: #edf8f1;
  color: #5a9b77;
}
.badge.gray {
  background: #f5f3f3;
  color: #ac969a;
}
.ad-card h3 {
  font-size: 15px;
  font-weight: 550;
  color: #486776;
  margin: 22px 0 10px;
}
.ad-card p {
  font-size: 11px;
  line-height: 1.8;
  color: #98a9b6;
  min-height: 20px;
}
.ad-card img {
  max-width: 100%;
  height: 100px;
  object-fit: contain;
  display: block;
  margin: 10px 0;
  border-radius: 5px;
}
.ad-url {
  font:
    10px Consolas,
    monospace;
  color: #9ab1bd;
  word-break: break-all;
}
.ad-foot {
  border-top: 1px solid #edf1f4;
  margin-top: 20px;
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ad-foot > div {
  display: flex;
  gap: 6px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 22px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  font-size: 11px;
  color: #8ea2b1;
}
.stat strong {
  display: block;
  font-size: 27px;
  color: #466f6b;
  font-weight: 550;
  margin-top: 12px;
}
.table-card {
  padding: 0;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  background: #f8fafb;
  font-size: 10px;
  color: #91a3b1;
  padding: 14px 19px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 19px;
  font-size: 11px;
  color: #7c96a6;
  border-bottom: 1px solid #edf2f5;
}
td strong {
  color: #4b687b;
  font-weight: 500;
}
.empty {
  padding: 70px 30px;
  text-align: center;
  color: #9bb0bb;
}
.empty h3 {
  font-weight: 500;
  color: #73948b;
  font-size: 16px;
}
.empty p {
  font-size: 11px;
  line-height: 1.9;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: #162d4766;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(3px);
  padding: 25px;
}
.modal {
  background: #fff;
  border-radius: 11px;
  width: 640px;
  max-width: 95vw;
  max-height: 94vh;
  overflow: auto;
  box-shadow: 0 10px 90px #152d4155;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  font-size: 16px;
  font-weight: 550;
  margin: 0;
}
.close {
  border: 0;
  background: none;
  font-size: 24px;
  color: #a3afba;
}
.modal-body {
  padding: 24px 26px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #f8fafb;
  padding: 17px 26px;
  border-top: 1px solid var(--border);
}
#toast {
  position: fixed;
  left: calc(50% + 80px);
  bottom: 35px;
  transform: translateX(-50%);
  background: #245447;
  color: #ddf1e6;
  border-radius: 7px;
  padding: 13px 23px;
  font-size: 12px;
  z-index: 100;
  display: none;
  box-shadow: 0 3px 16px #203d4120;
}
#toast.visible {
  display: block;
}
#toast.error-toast {
  background: #85545d;
}
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .ads-grid {
    grid-template-columns: 1fr;
  }
  .login-decoration {
    padding: 70px 12%;
  }
  .login-decoration h1 {
    font-size: 27px;
  }
}
@media (max-width: 700px) {
  #login-screen {
    display: block;
  }
  .login-decoration {
    display: none;
  }
  .login-form-wrap {
    min-height: 100vh;
  }
  aside {
    width: 170px;
  }
  .console-main {
    margin-left: 170px;
  }
  main {
    padding: 25px 18px;
  }
  header {
    padding: 0 18px;
  }
  .brand {
    padding-left: 20px;
    font-size: 14px;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head h1 {
    font-size: 21px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 15px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
