:root {
  --primary-color: #02343f;
  --primary-light: #0a4a5a;
  --synology-blue: #0086e6;
  --synology-sidebar: #2b3643;
  --synology-sidebar-hover: #3a4758;
  --synology-header: #1e2a36;
  --bg-primary: #fafafa;
  --bg-white: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  --success: #10b981;
  --error: #dc3545;
  --warning: #f59e0b;
  --border-light: #e5e7eb;
  --font-xs: 10px;
  --font-sm: 12px;
  --font-md: 14px;
  --font-lg: 16px;
  --font-xl: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

*::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

body {
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "돋움", dotum, sans-serif;
  font-size: var(--font-md);
  color: var(--text-primary);
  background: var(--bg-primary);
}

button {
  min-height: 32px;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-sm);
  font-weight: 600;
  line-height: 1.25;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: var(--font-sm);
  font-weight: 400;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 7px 10px;
}

input:focus,
textarea:focus,
select:focus,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: #ddd;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 14px;
  min-height: 32px;
  height: auto;
  background: var(--primary-color);
  color: var(--text-white);
  border: none;
  border-radius: 3px;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 14px;
  min-height: 32px;
  height: auto;
  background: #6c757d;
  color: var(--text-white);
  border: none;
  border-radius: 3px;
  font-weight: 600;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 14px;
  min-height: 32px;
  height: auto;
  background: #dc3545;
  color: var(--text-white);
  border: none;
  border-radius: 3px;
  font-weight: 600;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--primary-color);
  color: var(--text-white);
  border-radius: 3px;
  font-size: var(--font-sm);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 10050;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--error);
}

.confirm-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10035;
  align-items: center;
  justify-content: center;
}

.confirm-modal-overlay.show {
  display: flex;
}

.confirm-modal {
  background: var(--bg-white);
  border-radius: 3px;
  width: 360px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.confirm-modal-header {
  padding: 16px 20px 8px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.confirm-modal-body {
  padding: 8px 20px 16px;
  font-size: var(--font-md);
  color: #555;
  line-height: 1.5;
}

.confirm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
}

.confirm-modal-footer button {
  min-height: 32px;
  height: auto;
  padding: 7px 16px;
  border: none;
  border-radius: 3px;
  color: var(--text-white);
  font-weight: 600;
  font-size: var(--font-sm);
}

.confirm-modal-footer .btn-cancel {
  background: #6c757d;
}

.confirm-modal-footer .btn-confirm {
  background: var(--primary-color);
}

.confirm-modal-footer .btn-confirm.delete {
  background: #dc3545;
}

.choice-modal-footer {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.choice-modal-footer .btn-choice {
  min-height: 32px;
  height: auto;
  padding: 7px 16px;
  border: none;
  border-radius: 3px;
  color: var(--text-white);
  font-weight: 600;
  font-size: var(--font-sm);
  cursor: pointer;
}

.choice-modal-footer .btn-choice-primary {
  background: var(--primary-color);
}

.choice-modal-footer .btn-choice-move {
  background: #0d6efd;
}

.choice-modal-footer .btn-choice-cancel {
  background: #6c757d;
}

.input-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10020;
  align-items: center;
  justify-content: center;
}

.input-modal-overlay.show {
  display: flex;
}

.input-modal {
  background: var(--bg-white);
  border-radius: 3px;
  width: 400px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.input-modal-header {
  padding: 16px 20px 8px;
  font-size: 18px;
  font-weight: 600;
}

.input-modal-body {
  padding: 8px 20px;
}

.input-modal-body label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 600;
  color: #444;
  margin-top: 10px;
  margin-bottom: 5px;
  line-height: 1.4;
}

.input-modal-body label:first-child {
  margin-top: 0;
}

.input-modal-body input,
.input-modal-body select,
.input-modal-body textarea {
  width: 100%;
  margin-top: 0;
}

.input-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
}

.input-modal-footer button {
  min-height: 32px;
  height: auto;
  padding: 7px 16px;
  font-weight: 600;
}

.input-modal-body textarea {
  resize: none;
  overflow-y: hidden;
  min-height: 36px;
}

.material-symbols-outlined {
  font-size: 18px;
  vertical-align: middle;
  line-height: 1;
}
