:root {
  --sm-bg: #f5f5f5;
  --sm-panel: #ffffff;
  --sm-line: #e8e8e8;
  --sm-text: #333;
  --sm-muted: #6b625c;
  --sm-accent: #f56e13;
  --sm-primary: linear-gradient(120deg, #e9654e, #f1b56c);
  --sm-info: linear-gradient(120deg, #0f9bb8, #89cdd6);
  --sm-indigo: linear-gradient(120deg, #6743a0, #9b4bb5);
  --sm-sidebar-width: 260px;
  --sm-header-height: 63px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

html {
  scrollbar-gutter: stable;
}

body {
  background: var(--sm-bg);
  color: var(--sm-text);
  font-family: "Noto Sans KR", "Notokr", "Malgun Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select {
  font: inherit;
}

#app,
.sm-shell {
  height: 100%;
}

.sm-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  width: var(--sm-sidebar-width);
  height: 100vh;
  overflow: auto;
  background: #fff;
  box-shadow: 4px 4px 10px rgb(76 72 65 / 20%);
}

.sm-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/resources/img/common/sidebar.png") center / cover;
  pointer-events: none;
}

.sm-sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0.93;
  pointer-events: none;
}

.sm-logo,
.sm-nav {
  position: relative;
  z-index: 1;
}

.sm-logo {
  display: flex;
  align-items: center;
  margin: 0 10px;
  padding: 15px 0;
}

.sm-logo::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: 0;
  left: 15px;
  height: 1px;
  background-color: hsla(0, 0%, 71%, 0.3);
}

.sm-logo img {
  width: 80%;
  max-height: 80px;
}

.sm-menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #ff6700;
  font-size: 1.1rem;
  cursor: pointer;
}

.sm-nav {
  padding: 0 0 30px;
}

.sm-nav a,
.sm-nav button.sm-nav-parent {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 10px 15px 0;
  border: 0;
  background: transparent;
  color: #777;
  font-weight: 500;
  padding: 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  line-height: 30px;
  text-align: left;
}

.sm-nav > a:first-child {
  margin-top: 0;
}

.sm-nav i {
  width: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 24px;
  color: #a9afbb;
}

.sm-nav a:hover,
.sm-nav button.sm-nav-parent:hover {
  background: #eee4ff;
  color: #242937;
}

.sm-nav a.is-active {
  background: #f56e13;
  color: #fff;
}

.sm-nav a.is-active i {
  color: #fff;
}

.sm-caret {
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}

.sm-nav-group.is-open .sm-caret {
  transform: rotate(180deg);
}

.sm-nav-children {
  display: none;
  padding: 0 0 6px;
}

.sm-nav-group.is-open .sm-nav-children {
  display: block;
}

.sm-nav-children a {
  font-size: 14px;
  padding: 10px;
}

.sm-sub-item {
  position: relative;
  margin-left: 25px;
  opacity: 0.85;
}

.sm-sub-item::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(131, 132, 138, 0.89);
  transform: translateY(-50%);
}

.sm-nav-children a.is-active .sm-sub-item::before {
  background: #fff;
}

.sm-main {
  margin-left: var(--sm-sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sm-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--sm-header-height);
  padding: 0 20px;
  background: #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}

.sm-search {
  position: relative;
}

.sm-search input {
  width: clamp(150px, 530px, 30vw);
  height: 34px;
  border: 0;
  border-radius: 0.25rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  color: #ff6700;
  font-size: 15px;
}

.sm-search input::placeholder {
  color: #8899a0;
  font-size: 13px;
}

.sm-search i {
  position: absolute;
  top: 8px;
  right: 15px;
  color: #8899a0;
  font-size: 16px;
  pointer-events: none;
}

.sm-search-result {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 1px 2px 5px #dadada;
  z-index: 6;
}

.sm-search-result.is-open {
  display: block;
}

.sm-search-result a,
.sm-search-result .empty {
  display: block;
  padding: 10px 15px;
  color: #5e5e5e;
  font-size: 14px;
}

.sm-search-result a:hover {
  background: linear-gradient(90deg, #ffdec8 0%, #cdf9ff 95%);
  font-weight: 700;
}

.sm-header-user {
  position: relative;
  flex: none;
}

.sm-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e8e8e8;
  background: #f5f5f5;
  color: #666;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.sm-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 260px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  z-index: 6;
}

.sm-menu.is-open {
  display: block;
}

.sm-menu-user {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
}

.sm-menu-user img {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 6px;
  object-fit: cover;
}

.sm-badge {
  display: inline-block;
  background: #e8e8e8;
  color: #333;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.sm-menu-user p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.sm-menu-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-top: 1px solid #eee;
  background: transparent;
  padding: 12px 14px;
  cursor: pointer;
  color: #333;
  text-align: left;
}

.sm-menu-logout:hover {
  background: rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.sm-content {
  padding: 15px;
  flex: 1;
  min-height: 0;
}

.sm-card {
  background: var(--sm-panel);
  border-radius: 6px;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.14);
  margin: 30px 0 20px;
}

.sm-card.fill {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--sm-header-height) - 50px);
  margin-top: 30px;
}

.sm-card-head {
  margin: -20px 15px 0;
  padding: 15px;
  border-radius: 3px;
  color: #fff;
}

.sm-card-head.primary {
  background: var(--sm-primary);
  box-shadow: 0 4px 20px 0 rgb(0 0 0 / 14%), 0 7px 10px -5px rgb(236 137 91 / 40%);
}

.sm-card-head.info {
  background: var(--sm-info);
}

.sm-card-head.indigo {
  background: var(--sm-indigo);
  box-shadow: 0 4px 20px 0 rgb(0 0 0 / 14%), 0 7px 10px -5px rgb(128 76 175 / 40%);
}

.sm-card-head h2,
.sm-card-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
}

.sm-card-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  opacity: 0.95;
  font-weight: 400;
}

.sm-card-head .sm-filters {
  margin-top: 10px;
  margin-bottom: 10px;
}

.sm-card-head .sm-filters .sm-pill {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 13px;
  gap: 6px;
}

.sm-card-head .sm-filters .sm-pill input[type="radio"] {
  margin: 0;
}

.sm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 15px 8px;
}

.sm-toolbar.left {
  justify-content: flex-start;
}

.sm-toolbar:empty {
  display: none;
}

.sm-member-search {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(380px, 100%);
  color: #60564f;
  font-size: 13px;
  font-weight: 500;
}

.sm-toolbar-member-search {
  align-items: flex-end;
  justify-content: flex-start;
}

:is(.sm-history-page, .sm-member-search-page) .sm-toolbar-member-search {
  justify-content: flex-end;
}

:is(.sm-history-page, .sm-member-search-page) .sm-member-search {
  width: min(480px, 100%);
  text-align: left;
  gap: 6px;
}

:is(.sm-history-page, .sm-member-search-page) .sm-member-search-title small,
:is(.sm-history-page, .sm-member-search-page) .sm-member-search-help {
  color: #827a74;
  font-size: 12px;
  line-height: 18px;
  font-weight: 400;
}

:is(.sm-history-page, .sm-member-search-page) .sm-toolbar-member-search .sm-btn {
  margin-bottom: 24px;
}

.sm-member-search input {
  width: 100%;
  height: 38px;
  padding: 6px 10px;
  border: 1px solid #ded9d5;
  border-radius: 6px;
  background: #fff;
  color: var(--sm-text);
  font-size: 14px;
}

.sm-member-search input:focus-visible {
  outline: 2px solid #c55008;
  outline-offset: 2px;
}

.sm-search-hint {
  margin: 0 16px 12px;
  color: #60564f;
  font-size: 13px;
  line-height: 1.6;
}

.sm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 0;
  border-radius: 30px;
  padding: 8px 14px;
  cursor: pointer;
  color: #fff;
  background: #6b6460;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.sm-btn i {
  margin-right: 0;
}

.sm-btn-sm {
  min-height: 32px;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 13px;
}

.sm-btn:focus-visible,
.sm-icon-btn:focus-visible {
  outline: 2px solid #c55008;
  outline-offset: 3px;
}

.sm-btn:hover:not(:disabled) {
  filter: brightness(0.95);
}

.sm-btn.primary {
  background: #c55008;
}

.sm-btn.indigo {
  background: #7e44ea;
}

.sm-btn.indigo:hover {
  background: #642dca;
}

.sm-btn.danger {
  background: #c93240;
}

.sm-btn.excel {
  background: #14865e;
}

.sm-btn.warn {
  background: #985f07;
}

.sm-btn:disabled {
  background: #e9e5e2;
  color: #8b827c;
  cursor: default;
}

.sm-view-switch {
  display: inline-flex;
  gap: 5px;
  margin-left: auto;
}

.sm-view-switch button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--sm-line);
  border-radius: 5px;
  background: var(--sm-panel);
  color: var(--sm-text);
  cursor: pointer;
}

.sm-view-switch button i {
  margin-right: 6px;
}

.sm-view-switch button[aria-pressed="true"] {
  border-color: #c55008;
  background: #fff3e5;
  color: #8e3906;
}

.sm-view-switch button:hover {
  background: #fff8f0;
}

.sm-view-switch button:focus-visible {
  outline: 2px solid #c55008;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .sm-view-switch { margin-left: 0; }
}

.sm-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sm-filters input[type="date"],
.sm-filters select.sm-site-select {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 4px;
  padding: 6px 10px;
  height: 38px;
  font-size: 13px;
}

.sm-filters select.sm-site-select option {
  background: #fff;
  color: #242424;
}

.sm-filters input[type="date"] {
  width: 145px;
  max-width: 100%;
}

.sm-site-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sm-site-filter-label {
  font-size: 13px;
  white-space: nowrap;
}

.sm-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.sm-table-wrap {
  overflow: auto;
  padding: 0 8px 12px;
}

.sm-data-table {
  overflow: visible;
  position: relative;
}

.sm-table-loading {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 8px 14px;
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(65, 45, 30, 0.08);
  color: #60564f;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}

.sm-table-loading[hidden] {
  display: none;
}

.sm-table-scroll {
  overflow-x: auto;
}

.sm-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 8px 14px;
  color: #60564f;
  font-size: 13px;
  line-height: 1.6;
}

.sm-table-toolbar[hidden] {
  display: none;
}

.sm-table-summary {
  flex: 1 1 100px;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
}

.sm-table-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 12px;
  max-width: 100%;
  margin-left: auto;
}

.sm-pagination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px 16px;
  margin-top: 12px;
  padding: 14px 8px 2px;
  border-top: 1px solid var(--sm-line);
  color: #60564f;
  font-size: 13px;
  line-height: 1.6;
}

.sm-pagination[hidden] {
  display: none;
}

.sm-pagination-summary {
  grid-column: 1;
  width: 100%;
  min-width: 0;
}

.sm-pagination-pages {
  grid-column: 2;
  justify-self: center;
  max-width: 100%;
}

.sm-pagination-pages,
.sm-pagination-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.sm-pagination-pages[hidden],
.sm-pagination-quick[hidden] {
  display: none;
}

.sm-pagination-pages button,
.sm-pagination-quick button,
.sm-pagination-size select {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ded9d5;
  border-radius: 6px;
  background: #fff;
  color: #60564f;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.sm-pagination-pages button,
.sm-pagination-quick button {
  cursor: pointer;
}

.sm-pagination-pages button:hover:not(:disabled):not([aria-current]),
.sm-pagination-quick button:hover:not(:disabled) {
  border-color: var(--sm-accent);
  background: #fff7ef;
  color: #c55008;
}

.sm-pagination-pages button[aria-current="page"] {
  border-color: #c55008;
  background: #c55008;
  color: #fff;
  font-weight: 700;
}

.sm-pagination-pages button:disabled,
.sm-pagination-quick button:disabled {
  border-color: #ece9e6;
  background: #f7f6f5;
  color: #a29b95;
  cursor: default;
}

.sm-pagination-pages button.sm-pagination-waiting:disabled,
.sm-pagination-quick button.sm-pagination-waiting:disabled {
  border-color: #ded9d5;
  background: #fff;
  color: #60564f;
}

.sm-pagination-pages button.sm-pagination-waiting[aria-current="page"]:disabled {
  border-color: #c55008;
  background: #c55008;
  color: #fff;
}

.sm-pagination-pages button:focus-visible,
.sm-pagination-quick button:focus-visible,
.sm-pagination-size select:focus-visible {
  outline: 2px solid #c55008;
  outline-offset: 2px;
}

.sm-pagination-size {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.sm-pagination-size select {
  min-width: 76px;
  cursor: pointer;
}

.sm-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  table-layout: fixed;
}

.sm-table th,
.sm-table td {
  height: 48px;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

.sm-table th {
  background: #f8f7f6;
  color: #5e534c;
  font-weight: 700;
  white-space: nowrap;
}

.sm-table td {
  font-weight: 500;
}

.sm-table .sm-cell-center {
  text-align: center;
}

.sm-table .sm-cell-right {
  text-align: right;
}

.sm-table .sm-cell-left {
  text-align: left;
  max-width: 26rem;
  overflow-wrap: anywhere;
}

.sm-table .sm-cell-nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-table .sm-badge {
  margin-bottom: 0;
  vertical-align: middle;
}

.sm-cell-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sm-table tbody tr:hover:not(.sm-row-fail) {
  background: #fffaf5;
}

.sm-empty {
  padding: 40px 16px;
  text-align: center;
  color: #5c5c5c;
  font-weight: 500;
}

.sm-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.35);
}

.sm-dialog {
  width: min(460px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.sm-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #eee;
}

.sm-dialog-head h3 {
  margin: 0;
  font-size: 1rem;
}

.sm-dialog-subtitle {
  margin: 5px 0 0;
  color: var(--sm-muted);
  font-size: 12px;
}

.sm-icon-btn {
  border: 0;
  background: transparent;
  color: #666;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.sm-dialog-body {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.sm-dialog-body .sm-field {
  margin-bottom: 0;
}

.sm-dialog-body .sm-field.is-hidden {
  display: none;
}

.sm-dialog-body .sm-field textarea,
.sm-dialog-body .sm-field input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--sm-line);
  border-radius: 4px;
  padding: 10px;
  background: #fff;
  color: var(--sm-text);
  font: inherit;
}

.sm-dialog-body .sm-field textarea {
  resize: vertical;
}

.sm-dialog-body .sm-field select {
  box-sizing: border-box;
  min-height: 42px;
  border: 1px solid var(--sm-line);
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
  color: var(--sm-text);
  font: inherit;
}

.sm-dialog-body .sm-field small {
  display: block;
  margin-top: 6px;
  color: var(--sm-muted);
}

.sm-dialog-body .sm-field .sm-profile-validation {
  color: #9a5a20;
}

.sm-dialog-body .sm-field .sm-profile-validation[hidden] {
  display: none;
}

.sm-dialog-body .sm-field input[aria-invalid="true"] {
  border-color: #c75b37;
}

.sm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 16px;
}

.sm-status-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sm-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  min-height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.sm-status.is-online {
  color: #0b7a4b;
  background: #e5f7ee;
}

.sm-status.is-offline {
  color: #8a3b12;
  background: #fbe8dc;
}

.sm-status.is-muted {
  color: #666;
  background: #f0f0f0;
}

.sm-table tr.sm-row-loan td:first-child {
  box-shadow: inset 3px 0 0 #f56e13;
}

.sm-table tr.sm-row-return td:first-child {
  box-shadow: inset 3px 0 0 #0f9bb8;
}

.sm-table tr.sm-row-fail {
  background: #fff8f5;
}

.sm-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  min-height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sm-chip.is-loan {
  color: #c2410c;
  background: #fff1e6;
}

.sm-chip.is-return {
  color: #0b7c86;
  background: #e7f6f7;
}

.sm-chip.is-success {
  color: #0b7a4b;
  background: #e5f7ee;
}

.sm-chip.is-fail {
  color: #b42318;
  background: #fde8e6;
}

.sm-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 20px;
}

.sm-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 15px;
}

.sm-stat {
  border-radius: 6px;
  padding: 10px 12px;
  background: #fafafa;
}

.sm-stat .label {
  color: var(--sm-muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.sm-stat h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 500;
}

.sm-pills {
  display: flex;
  gap: 6px;
}

.sm-stat .sm-pill {
  background: #ececec;
  color: #333;
  flex: 1;
  justify-content: center;
  min-height: 34px;
  font-size: 13px;
}

.sm-stat .sm-pill b {
  color: var(--sm-accent);
}

.sm-stat-row > div > h3 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
}

.sm-chart-placeholder,
.sm-feed {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5c5c5c;
  background: #fbfbfb;
}

.sm-distribution {
  max-height: 320px;
  overflow: auto;
  background: #fbfbfb;
}

.sm-distribution table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.sm-distribution th,
.sm-distribution td {
  height: 40px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--sm-line);
  text-align: center;
  vertical-align: middle;
  font-weight: 500;
}

.sm-distribution th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f1ee;
  color: #5e534c;
  font-weight: 700;
}

.sm-distribution th:first-child,
.sm-distribution td:first-child {
  text-align: left;
}

.sm-feed {
  min-height: 420px;
}

.sm-feed-list {
  display: block;
  padding: 8px 15px;
  overflow: auto;
}

.sm-feed-item {
  padding: 11px 0;
  border-bottom: 1px solid #ececec;
}

.sm-feed-item:last-child {
  border-bottom: 0;
}

.sm-feed-item-head,
.sm-feed-item-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sm-feed-item-head {
  color: var(--sm-muted);
  font-size: 13px;
}

.sm-feed-item-body {
  margin-top: 6px;
  font-size: 14px;
}

.sm-feed-item-body b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sm-feed-item-body span {
  color: var(--sm-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  max-width: 45%;
  font-size: 13px;
}

.sm-did-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.sm-did-grid > .sm-card {
  display: flex;
  min-width: 0;
  min-height: 280px;
  flex-direction: column;
}

.sm-did-grid > .sm-card .sm-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--sm-line);
  border-radius: 6px;
  background: #fafbfc;
  color: var(--sm-muted);
}

.sm-did-table-wrap {
  overflow: visible;
  padding: 16px;
}

.sm-did-table-wrap .sm-did-table {
  flex: none;
}

.sm-did-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.sm-did-table:not(.sm-did-banner-table) thead th:first-child {
  width: 68px;
}

.sm-did-table:not(.sm-did-banner-table) thead th:nth-child(2) {
  width: 40%;
}

.sm-did-table:not(.sm-did-banner-table) th,
.sm-did-table:not(.sm-did-banner-table) td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.sm-did-table:not(.sm-did-banner-table) thead th:first-child,
.sm-did-table:not(.sm-did-banner-table) tbody tr[data-did-group-row] td:first-child {
  white-space: nowrap;
  overflow-wrap: normal;
}

.sm-did-table .sm-did-group-row th {
  height: 38px;
  border-bottom: 1px solid #e4dfed;
  padding: 8px 14px;
  background: #f3eff9;
  color: #583a78;
  text-align: left;
  font-size: 14px;
}

.sm-did-group-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sm-did-group-toggle:focus-visible {
  outline: 2px solid #583a78;
  outline-offset: 3px;
}

.sm-did-group-chevron {
  width: 8px;
  height: 8px;
  flex: none;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.sm-did-group-toggle.is-collapsed .sm-did-group-chevron {
  transform: rotate(-45deg);
}

.sm-did-table tbody tr[hidden] {
  display: none;
}

.sm-did-banner-table {
  display: block;
  width: 100%;
  min-width: 0;
}

.sm-did-banner-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sm-did-banner-table tbody {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.sm-did-banner-table tbody tr {
  display: grid;
  grid-template-columns: 24px 64px minmax(0, 1fr) 56px;
  grid-template-areas: "number preview name action" "number preview size action"
    "metadata metadata metadata metadata";
  column-gap: 8px;
  row-gap: 4px;
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid var(--sm-line);
  border-radius: 6px;
}

.sm-did-banner-table td {
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sm-did-file-name {
  display: block;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sm-did-usage-badge {
  display: inline-block;
  max-width: 100%;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}

.sm-did-usage-badge.is-used { background: #ecfdf5; border-color: #a7f3d0; color: #166534; }
.sm-did-usage-badge.is-unknown { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.sm-did-banner-table td:nth-child(1) { grid-area: number; }
.sm-did-banner-table td:nth-child(2) { grid-area: preview; }
.sm-did-banner-table td:nth-child(3) { grid-area: name; }
.sm-did-banner-table td:nth-child(4) { grid-area: size; color: var(--sm-muted); }
.sm-did-banner-table td:nth-child(5) { grid-area: metadata; }
.sm-did-banner-table td:nth-child(6) { grid-area: action; }

.sm-did-banner-table td:nth-child(5) {
  padding-top: 6px;
  color: var(--sm-muted);
  font-size: 12px;
  white-space: nowrap;
}

.sm-did-banner-table td:nth-child(4)::before { content: "크기 "; }
.sm-did-banner-table td:nth-child(5)::before { content: "등록일 "; }

.sm-did-image-button {
  min-height: 30px;
  border: 1px solid #cad5e5;
  border-radius: 4px;
  padding: 4px 11px;
  background: #fff;
  color: #28558d;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.sm-did-image-button:hover {
  border-color: #28558d;
  background: #f2f6fc;
}

.sm-did-image-button:focus-visible {
  outline: 2px solid #28558d;
  outline-offset: 2px;
}

.sm-did-image-backdrop {
  z-index: 30;
}

.sm-did-image-dialog {
  width: min(900px, 100%);
}

.sm-did-image-dialog .sm-dialog-head h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-did-image-dialog .sm-dialog-head {
  gap: 16px;
}

.sm-did-image-frame {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 16px;
  background: #f5f7fa;
  color: var(--sm-muted);
}

.sm-did-image-frame img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
}

.sm-did-image-frame img[hidden],
.sm-did-image-frame [hidden] {
  display: none;
}

.sm-did-table-state {
  padding: 20px 16px !important;
  color: var(--sm-muted);
  text-align: left;
}

.sm-did-state-message strong {
  display: block;
  color: var(--sm-text);
  font-weight: 600;
}

.sm-did-state-message p {
  margin: 6px 0 0;
  font-size: 13px;
}

.sm-did-table-wrap .sm-empty {
  flex: 1;
}

.sm-did-table-wrap .sm-empty[hidden] {
  display: none;
}

.sm-did-preview {
  display: block;
  width: 60px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  background: #f1f3f5;
}

.sm-did-preview-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #4b2e83, #ef7734);
  font-size: 12px;
  font-weight: 700;
}

.sm-did-device-filter {
  display: grid;
  grid-template-columns: auto minmax(240px, 0.7fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.sm-did-school-filter {
  padding: 16px;
}

.sm-did-school-filter .sm-site-filter {
  min-width: 0;
  max-width: 100%;
}

.sm-did-school-filter select.sm-site-select {
  max-width: 100%;
  color: var(--sm-text);
  background: #fff;
  border-color: var(--sm-line);
}

.sm-did-device-filter label {
  font-weight: 600;
  white-space: nowrap;
}

.sm-did-device-filter select {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--sm-line);
  border-radius: 4px;
  background: #fff;
  color: var(--sm-text);
}

.sm-did-device-filter select:focus {
  outline: 2px solid rgb(15 155 184 / 25%);
  border-color: #0f9bb8;
}

.sm-did-device-filter p {
  margin: 0;
  color: var(--sm-muted);
  font-size: 13px;
}

.sm-did-grid .sm-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.sm-card-body {
  padding: 15px;
  flex: 1;
  min-height: 0;
}

.sm-calendar-body {
  padding-top: 0;
}

body[data-sm-page="calendar"] .sm-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body[data-sm-page="calendar"] .sm-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 30px 0 0;
}

body[data-sm-page="calendar"] .sm-toolbar.left {
  padding: 8px 15px 0;
}

body[data-sm-page="calendar"] .sm-calendar-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body[data-sm-page="calendar"] #calendar-status {
  flex: 0 0 auto;
  margin: 0 0 8px;
  color: #666;
  font-size: 13px;
}

body[data-sm-page="calendar"] #calendar {
  flex: 1 1 auto;
  min-height: 0;
}

body[data-sm-page="calendar"] #calendar .fc {
  height: 100%;
}

.fc .fc-scrollgrid-liquid {
  border-radius: 5px;
}

.fc .fc-toolbar-chunk {
  display: flex;
}

.fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 1em;
}

.fc .fc-toolbar-title {
  font-size: 1.5em;
  font-weight: 500;
}

.fc .fc-button-primary {
  background-color: #f1a238;
  border-color: #eabe8b;
}

.fc .fc-button-primary:hover {
  background-color: #cc5700;
  border-color: #cc5700;
}

.fc .fc-button-primary:disabled {
  background-color: #f1a238;
  border-color: #eabe8b;
  opacity: 0.65;
}

.fc .fc-button-primary.fc-button-active,
.fc .fc-button-primary:active,
.fc .fc-button-primary:focus {
  background: #cc5700;
  border-color: #cc5700;
}

.fc .fc-button-primary:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active:focus,
.fc .fc-button-primary:not(:disabled):active:focus {
  box-shadow: 0 0 0 0.2rem rgb(204 87 0 / 29%);
}

.fc .fc-daygrid-day.fc-day-today {
  background-color: #ffebde;
}

th.fc-col-header-cell.fc-day.fc-day-sun,
td.fc-daygrid-day.fc-day.fc-day-sun {
  color: #ff0000;
}

th.fc-col-header-cell.fc-day.fc-day-sat,
td.fc-daygrid-day.fc-day.fc-day-sat {
  color: #0041ff;
}

.sm-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #efe8e2;
}

.sm-login-box {
  width: min(800px, calc(100% - 32px));
  min-height: 420px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 5px 15px 5px #ded6d1;
  position: relative;
}

.sm-login-art {
  background: url("/resources/img/model/back.png") center / cover no-repeat;
  min-height: 320px;
}

.sm-login-form {
  padding: 36px 28px;
}

.sm-login-form h1 {
  margin: 12px 0 8px;
  font-size: 22px;
}

.sm-login-form p {
  color: #a1a1a1;
  margin: 0 0 24px;
  line-height: 1.5;
}

.sm-field {
  margin-bottom: 16px;
}

.sm-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.sm-field input,
.sm-field select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ddd;
  padding: 8px 2px;
  background: transparent;
}

.sm-field input:focus,
.sm-search input:focus {
  outline: none;
  border-color: var(--sm-accent);
}

.sm-company {
  position: absolute;
  left: 14px;
  top: 12px;
  height: 25px;
  filter: brightness(50) invert(0.75);
  cursor: pointer;
}

.sm-error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.sm-error-page img {
  max-width: 280px;
}

.sm-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #3c332e;
  color: #fff;
  padding: 12px 16px;
  border-radius: 6px;
  z-index: 20;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
}

.sm-toast.is-on {
  opacity: 1;
  transform: none;
}

.sm-notice {
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 4px;
  background: #fff7ef;
  color: #9a5a20;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .sm-grid-2,
  .sm-did-grid,
  .sm-login-box {
    grid-template-columns: 1fr;
  }

  .sm-did-device-filter {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sm-did-device-filter p {
    grid-column: 1 / -1;
  }

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

@media (max-width: 600px) {
  .sm-toolbar-member-search .sm-btn {
    margin-left: auto;
  }

  .sm-table-summary {
    flex-basis: 100%;
  }

  .sm-pagination {
    grid-template-columns: 1fr;
  }

  .sm-pagination-summary,
  .sm-pagination-pages {
    grid-column: 1;
  }

  .sm-pagination-pages .sm-pagination-edge {
    display: none;
  }
}

@media (max-width: 991px) {
  .sm-header {
    gap: 8px;
    padding: 0 10px;
  }

  .sm-header .sm-search {
    flex: 1;
    min-width: 0;
  }

  .sm-header .sm-search input {
    width: 100%;
  }

  .sm-header-user {
    max-width: 50%;
  }

  .sm-profile {
    max-width: 100%;
    padding: 8px;
  }

  .sm-profile b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sm-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.is-nav-open .sm-sidebar {
    transform: none;
  }

  .sm-main {
    margin-left: 0;
  }

  .sm-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sm-content {
    padding: 5px;
  }
}

/* Keep every history column within the available viewport width. */
.sm-history-page .sm-table {
  min-width: 0 !important;
  width: 100%;
}

.sm-history-page .sm-table th,
.sm-history-page .sm-table td,
.sm-history-page .sm-table .sm-cell-nowrap {
  white-space: normal;
  overflow-wrap: anywhere;
}
.sm-history-page .sm-table th:nth-child(2),
.sm-history-page .sm-table td:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
