* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f2f5f9;
  color: #162941;
  font:
    14px/1.6 "Malgun Gothic",
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a.btn {
  border: 0;
  background: #176ad1;
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover,
a.btn:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.secondary,
a.secondary {
  background: white;
  color: #33516d;
  border: 1px solid #d6e1ed;
}
.danger {
  background: #fff1f1 !important;
  color: #ae3737 !important;
  border: 1px solid #f0cece !important;
}
a {
  color: #176ad1;
  text-decoration: none;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cad8e6;
  background: white;
  color: #18304d;
  border-radius: 7px;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #9cc7fc;
  outline-offset: 1px;
}
input[type="checkbox"] {
  width: auto;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 14px 0 6px;
}
small,
.muted {
  color: #71849c;
}
.small {
  font-size: 12px;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.8px;
  margin: 0 0 5px;
}
h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
h3 {
  font-size: 15px;
  margin: 0;
}
p {
  margin: 8px 0 16px;
}
.top {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: #fff;
  border-bottom: 1px solid #dde6ef;
  gap: 20px;
}
.brand {
  width: 220px;
  max-height: 50px;
  object-fit: contain;
}
.account {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}
.account button {
  padding: 7px 12px;
}
.layout {
  display: flex;
  min-height: calc(100vh - 78px);
}
.sidebar {
  width: 205px;
  flex-shrink: 0;
  padding: 28px 16px;
  background: white;
  border-right: 1px solid #e0e7ef;
}
.nav button {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 7px;
  background: transparent;
  color: #657a94;
  padding: 13px;
}
.nav button.active {
  color: #1468c7;
  background: #eaf3ff;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 800;
  color: #3981cf;
  margin-bottom: 10px;
}
.sidebar .hint {
  margin-top: 30px;
}
.main {
  padding: 30px;
  flex: 1;
  min-width: 0;
  max-width: 2200px;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.pagehead p {
  margin: 0;
  font-size: 13px;
  color: #7c8da1;
}
.tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.tools input {
  max-width: 330px;
}
.tools select {
  width: auto;
  max-width: 320px;
}
.grid {
  display: grid;
  gap: 18px;
}
.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card,
.panel {
  background: #fff;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  overflow: hidden;
}
.panel {
  padding: 22px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.metric {
  padding: 18px 22px;
  background: #fff;
  border: 1px solid #e0e7f0;
  border-radius: 10px;
}
.metric strong {
  font-size: 27px;
  display: block;
  margin-top: 5px;
}
.badge {
  font-size: 11px;
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  background: #edf3f9;
  color: #617a94;
  white-space: nowrap;
}
.badge.ok {
  background: #e7f6ee;
  color: #198159;
}
.badge.bad {
  background: #ffecec;
  color: #b04343;
}
.badge.warn {
  background: #fff1da;
  color: #a36a1a;
}
.badge.blue {
  background: #e9f2ff;
  color: #1b68c0;
}
.alert {
  background: #fff7e7;
  border: 1px solid #efd299;
  border-radius: 10px;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.alert strong {
  color: #81501c;
}
.alert p {
  font-size: 12px;
  margin: 4px 0 0;
  color: #936f42;
}
.hint {
  padding: 13px 16px;
  background: #edf4fb;
  color: #66809c;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.8;
}
.empty {
  padding: 70px 25px;
  text-align: center;
  background: white;
  border: 1px dashed #cbd9e7;
  border-radius: 12px;
  color: #7d8fa6;
}
.empty strong {
  display: block;
  font-size: 18px;
  color: #345572;
  margin-bottom: 10px;
}
.empty button {
  margin-top: 15px;
}
.camhead {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.camhead b {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.frame {
  aspect-ratio: 16/9;
  background: #182d47;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #91a9c4;
  font-size: 12px;
  position: relative;
}
.frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.frame.offline img {
  filter: grayscale(1);
}
.camfoot {
  padding: 10px 14px;
  color: #8091a5;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.camfoot button {
  font-size: 11px;
  padding: 6px 9px;
}
.camfoot small {
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-monitor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 20px;
}
.activity {
  padding: 20px;
  align-self: start;
}
.event {
  padding: 17px 0;
  border-bottom: 1px solid #e6edf4;
}
.event p {
  font-size: 12px;
  color: #71869d;
  margin: 7px 0;
}
.event button {
  font-size: 11px;
  padding: 6px 9px;
}
.event small {
  font-size: 10px;
}
.folder {
  padding: 22px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.folder:hover {
  border-color: #2b7ddd;
}
.folder .icon {
  font-size: 28px;
  color: #3b8bdf;
  margin-bottom: 10px;
}
.folder h3 {
  font-size: 16px;
  margin: 8px 0;
}
.folder p {
  font-size: 12px;
  color: #7f90a4;
  margin: 4px 0;
}
.folder footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #edf1f6;
  padding-top: 14px;
  margin-top: 14px;
  font-size: 11px;
  color: #7790aa;
}
.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid #dce5ef;
  margin-bottom: 20px;
}
.tabs button {
  border-radius: 0;
  background: transparent;
  color: #7c8ea4;
  padding: 10px 4px;
}
.tabs button.active {
  color: #136bd2;
  border-bottom: 3px solid #136bd2;
}
.filethumb {
  height: 145px;
  background: #eaf1f8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #688caf;
}
.filethumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #13253e;
}
.filebody {
  padding: 15px;
}
.filebody b {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.filebody small {
  display: block;
  margin: 5px 0 12px;
}
.fileactions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.fileactions button,
.fileactions a {
  font-size: 11px;
  padding: 6px 9px;
}
.drop-hint {
  color: #52657a;
  font-size: 14px;
}
[data-upload-drop] {
  border: 2px dashed #c6d4e3;
  border-radius: 14px;
  padding: 14px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
[data-upload-drop].drag-over {
  border-color: #176aca;
  background: #e9f3ff;
}
@media (hover: none) and (pointer: coarse) {
  .drop-hint {
    display: none;
  }
}
.plus {
  border: 2px dashed #b5cce3;
  background: #f5faff;
  color: #387abb;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  border-radius: 12px;
}
.plus strong {
  font-size: 40px;
  font-weight: 400;
}
.request {
  border-left: 4px solid #e8aa46;
  background: #fff7e8;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
}
.request p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
th {
  background: #f1f6fb;
  color: #72879f;
  font-size: 11px;
  padding: 12px;
}
td {
  padding: 15px 12px;
  border-bottom: 1px solid #e7edf4;
  vertical-align: middle;
}
td small {
  display: block;
}
td button {
  font-size: 11px;
  padding: 6px 10px;
}
.tablewrap {
  overflow: auto;
}
.error {
  color: #b34040;
  background: #fff0f0;
  padding: 11px 14px;
  border-radius: 7px;
  margin-top: 14px;
  font-size: 12px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.formgrid .wide {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check label {
  margin: 0;
}
.tag {
  border: 1px solid #dce5ee;
  border-radius: 7px;
  padding: 8px 12px;
  display: inline-block;
  font-size: 12px;
  color: #6c839c;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #fff;
}
.login-hero {
  background: #10243e;
  padding: 65px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
.login-hero .brand {
  background: #fff;
  padding: 10px 15px;
  width: 265px;
  border-radius: 9px;
  max-height: none;
}
.login-hero h1 {
  font-size: 42px;
  line-height: 1.4;
  margin: 55px 0 22px;
  letter-spacing: -1.8px;
}
.login-hero p {
  color: #9fb9d7;
  font-size: 16px;
}
.login-hero .pillrow {
  display: flex;
  gap: 10px;
  margin-top: 35px;
  flex-wrap: wrap;
}
.login-hero .tag {
  color: #bed6f1;
  border-color: #335270;
}
.login-form {
  padding: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-form > div {
  width: 390px;
  max-width: 100%;
}
.login-form h2 {
  font-size: 29px;
}
.login-form .brand {
  display: none;
}
.full {
  width: 100%;
}
.login-form button {
  margin-top: 24px;
}
.login-form .hint {
  margin-top: 22px;
}
dialog {
  border: 0;
  border-radius: 16px;
  padding: 28px;
  width: 620px;
  max-width: calc(100vw - 28px);
  max-height: 92vh;
  box-shadow: 0 30px 100px #0d25464d;
  color: #162941;
}
dialog::backdrop {
  background: #10243e88;
}
dialog.wide {
  width: 1050px;
}
.modalhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}
.close {
  background: #edf2f8;
  color: #637d97;
  padding: 6px 11px;
}
.modalvideo {
  width: 100%;
  max-height: 70vh;
  background: #14263d;
  border-radius: 9px;
}
.progress {
  height: 6px;
  background: #e4edf8;
  border-radius: 9px;
  overflow: hidden;
  margin: 8px 0;
}
.progress progress {
  width: 100%;
  height: 6px;
  border: 0;
  display: block;
}
.uploaditem {
  border-bottom: 1px solid #e4edf5;
  padding: 13px 0;
}
.uploaditem b {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.uploaditem .badge {
  margin-left: 6px;
}
.uploaditem button {
  font-size: 11px;
  padding: 4px 8px;
}
.video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #14263d;
  border-radius: 9px;
}
.emptyvideo {
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  background: #14263d;
  color: #829ebf;
  border-radius: 9px;
}
.selected td {
  background: #ecf4fe;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #142c49;
  color: white;
  border-radius: 10px;
  padding: 13px 23px;
  max-width: 90vw;
  z-index: 1000;
  box-shadow: 0 8px 30px #15284130;
  display: none;
}
.loading {
  padding: 80px;
  text-align: center;
}
.pagination {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.smallgrid .camhead {
  padding: 7px;
}
.smallgrid .camhead b {
  font-size: 10px;
}
.smallgrid .badge {
  font-size: 9px;
  padding: 2px 4px;
}
.smallgrid .camfoot {
  padding: 5px;
  font-size: 9px;
  display: block;
}
.smallgrid .camfoot small {
  max-width: 100%;
  display: block;
}
.smallgrid .camfoot button {
  font-size: 9px;
  padding: 3px;
}
.caps-note {
  font-size: 11px;
  color: #7489a2;
  margin-top: 10px;
}
.hidden {
  display: none !important;
}
footer.appnote {
  font-size: 11px;
  color: #8b9bb0;
  margin-top: 28px;
}
.previewline {
  padding: 12px;
  border: 1px solid #d9e3ef;
  background: #f5f9fe;
  border-radius: 7px;
  font-size: 13px;
  white-space: pre-line;
}
@media (min-width: 1600px) {
  .monitorgrid {
    max-width: 1300px;
    margin: auto;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 170px;
  }
  .main {
    padding: 22px;
  }
  .admin-monitor {
    grid-template-columns: 1fr;
  }
  .activity {
    max-height: 400px;
    overflow: auto;
  }
  .four {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .login-hero {
    padding: 40px;
  }
  .login-hero h1 {
    font-size: 34px;
  }
}
@media (max-width: 700px) {
  .top {
    height: 65px;
    padding: 0 17px;
  }
  .brand {
    width: 175px;
  }
  .account {
    gap: 7px;
  }
  .account .username {
    display: none;
  }
  .layout {
    display: block;
  }
  .sidebar {
    width: 100%;
    padding: 0;
    border: 0;
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .sidebar .eyebrow,
  .sidebar .hint {
    display: none;
  }
  .nav {
    display: flex;
    overflow: auto;
    padding: 6px 12px;
    border-bottom: 1px solid #dfe7f0;
    gap: 5px;
  }
  .nav button {
    width: auto;
    white-space: nowrap;
    font-size: 12px;
    padding: 10px;
    margin: 0;
  }
  .main {
    padding: 20px 15px;
  }
  .pagehead {
    align-items: flex-start;
    margin-bottom: 18px;
  }
  .pagehead h1 {
    font-size: 23px;
  }
  .pagehead p {
    font-size: 12px;
  }
  .pagehead button {
    font-size: 12px;
    padding: 9px 12px;
  }
  .two,
  .three,
  .four {
    grid-template-columns: 1fr;
  }
  .filegrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics {
    gap: 9px;
  }
  .metric {
    padding: 13px 15px;
  }
  .metric strong {
    font-size: 23px;
  }
  .alert {
    padding: 13px;
    align-items: flex-start;
  }
  .alert button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .alert strong {
    font-size: 12px;
  }
  .alert p {
    font-size: 11px;
  }
  .tools select,
  .tools input {
    max-width: none;
    flex: 1;
    min-width: 130px;
  }
  .monitorgrid {
    grid-template-columns: 1fr !important;
  }
  .smallgrid .camhead b {
    font-size: 13px;
  }
  .smallgrid .badge {
    font-size: 11px;
  }
  .smallgrid .camfoot {
    display: flex;
    padding: 10px;
  }
  .camhead {
    padding: 12px;
  }
  .login {
    display: block;
  }
  .login-hero {
    display: none;
  }
  .login-form {
    padding: 45px 24px;
    min-height: 100vh;
  }
  .login-form .brand {
    display: block;
    margin-bottom: 45px;
    width: 220px;
  }
  .login-form h2 {
    font-size: 26px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .formgrid .wide {
    grid-column: auto;
  }
  dialog {
    padding: 22px;
  }
  .filethumb {
    height: 115px;
  }
  .filebody {
    padding: 12px;
  }
  .plus {
    min-height: 200px;
  }
  .panel {
    padding: 17px;
  }
  .row {
    flex-wrap: wrap;
  }
  .admin-monitor {
    gap: 18px;
  }
  footer.appnote {
    font-size: 10px;
  }
  .grid {
    gap: 13px;
  }
}
