/* ---------------------------------------------------------------
   components.css — komponen UI (tanpa Element Plus)
   ----------------------------------------------- */

.aside-inner { height: 100%; overflow-y: auto; overflow-x: hidden; }

/* input / button */

.field {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--el-border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--el-text-color-primary);
  font-size: 14px;
}
.field::placeholder { color: var(--secondary-text-color); }
.field:focus { border-color: var(--el-color-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--el-border-color);
  background: transparent;
  color: var(--el-text-color-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.btn:hover { border-color: var(--el-color-primary); color: var(--el-color-primary); }
.btn.primary { background: #1890ff; border-color: #1890ff; color: #fff; }
.btn.primary:hover { background: #1064c0; border-color: #1064c0; color: #fff; }
.btn.full { width: 100%; height: 42px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* checkbox */

.cb-wrap { display: inline-flex; align-items: center; cursor: pointer; }
.cb-wrap input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--dark-border);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all .15s;
}
.cb-wrap input[type="checkbox"]:checked {
  background: #1890ff;
  border-color: #1890ff;
}
.cb-wrap input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.cb-wrap input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }

/* star */

.star-wrap span { color: var(--secondary-text-color); transition: color .15s; }
.star-wrap span.starred { color: #f7ba2a; }
.icon-btn span.starred { color: #f7ba2a; }

/* context menu */

.ctx-menu {
  position: fixed;
  z-index: 3000;
  min-width: 190px;
  padding: 6px 0;
  background: var(--el-bg-color);
  border: 1px solid var(--el-border-color-lighter);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--el-text-color-primary);
}
.ctx-item:hover { background: var(--email-hover-background); }
.ctx-item.danger { color: #f56c6c; }

/* toast */

.toasts {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 14px;
  background: #f0f9eb;
  border: 1px solid #e1f3d8;
  color: #529b2e;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}
.toast.error { background: #fef0f0; border-color: #fde2e2; color: #c45656; }

/* dialog */

.dialog-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 3500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.dialog {
  width: 520px;
  max-width: calc(100vw - 32px);
  background: var(--el-bg-color);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dialog-title { font-size: 16px; font-weight: 600; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.seg-label { font-size: 13px; color: var(--secondary-text-color); }
.segmented { display: inline-flex; border: 1px solid var(--el-border-color); border-radius: 6px; overflow: hidden; }
.seg-btn {
  padding: 7px 14px;
  background: transparent;
  border: 0;
  color: var(--el-text-color-primary);
  font-size: 13px;
  cursor: pointer;
}
.seg-btn.active { background: #1890ff; color: #fff; }

/* switch */

.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: var(--dark-border);
  border-radius: 999px;
  cursor: pointer;
  transition: .2s;
}
.switch .slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.switch input:checked + .slider { background: #1890ff; }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* skeleton / empty */

.skeleton-box { padding: 12px 16px; }
.sk-row {
  height: 16px;
  border-radius: 4px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--base-fill) 25%, var(--email-hover-background) 37%, var(--base-fill) 63%);
  background-size: 400% 100%;
  animation: sk 1.4s ease infinite;
}
.sk-row:nth-child(even) { width: 70%; }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }

.empty-inner { text-align: center; color: var(--secondary-text-color); }
.empty-icon { font-size: 42px; margin-bottom: 10px; opacity: .6; }

.avatar-wrap { display: flex; align-items: center; }
