/* ============================================================
   SPA PAGES: Records, History, Settings (tema HAMIM)
   ============================================================ */
.spa-page {
  display: none;
  min-height: calc(100vh - 72px);
  background: var(--hamim-bg, #f8f8f8);
}
.spa-page.active {
  display: block;
}
.spa-page .container {
  padding-top: 40px;
  padding-bottom: 60px;
}
.spa-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--hamim-dark, #414344);
  margin-bottom: 4px;
}
.spa-subtitle {
  color: var(--hamim-gray, #999999);
  font-size: 14px;
  margin-bottom: 28px;
}
.spa-card {
  background: #fff;
  border: 1px solid var(--hamim-border, #dddddd);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}
.spa-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.spa-card-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(226, 97, 0, 0.12);
  color: var(--hamim-orange, #e26100);
}
.spa-card-body {
  flex: 1;
  min-width: 0;
}
.spa-card-body h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--hamim-dark, #414344);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spa-card-body .meta {
  font-size: 13px;
  color: var(--hamim-gray, #999999);
  margin-top: 4px;
}
.spa-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-outline-hamim {
  border: 1px solid var(--hamim-orange, #e26100);
  color: var(--hamim-orange, #e26100);
  border-radius: 8px;
  font-weight: 600;
  background: transparent;
  padding: 7px 14px;
}
.btn-outline-hamim:hover {
  background: rgba(226, 97, 0, 0.08);
  color: #c75400;
}
.btn-hamim-soft {
  background: rgba(226, 97, 0, 0.12);
  color: var(--hamim-orange, #e26100);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  padding: 7px 14px;
}
.btn-hamim-soft:hover {
  background: rgba(226, 97, 0, 0.2);
}
.rec-thumb {
  width: 128px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #414344, #1e1f20);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  position: relative;
  overflow: hidden;
}
.rec-thumb .rec-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
}
.rec-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--hamim-gray, #999999);
}
.rec-empty i {
  font-size: 56px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}
.settings-section {
  background: #fff;
  border: 1px solid var(--hamim-border, #dddddd);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.settings-section h5 {
  font-weight: 800;
  color: var(--hamim-dark, #414344);
  font-size: 16px;
  margin-bottom: 4px;
}
.settings-section .desc {
  color: var(--hamim-gray, #999999);
  font-size: 13px;
  margin-bottom: 18px;
}
.settings-preview {
  width: 160px;
  height: 120px;
  border-radius: 12px;
  background: #000;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}
.settings-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.settings-preview .cam-off {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  background: #333;
}
.btn-danger-hamim {
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  padding: 11px 20px;
}
.btn-danger-hamim:hover {
  background: #c82333;
  color: #fff;
}
.form-check-label {
  font-size: 14px;
  color: #414344;
}
.settings-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e26100, #ff8f3d);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.empty-list {
  text-align: center;
  padding: 50px 20px;
  color: var(--hamim-gray, #999999);
}
.empty-list i {
  font-size: 46px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}
.profile-menu-wrap {
  position: relative;
}
.profile-menu-wrap .profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 4px 8px;
  border-radius: 40px;
}
.profile-menu-wrap .profile-trigger:hover {
  background: #f1f1f1;
}
.profile-img {
  width: 38px;
  height: 38px;
  object-fit: cover;
}
.profile-name {
  font-weight: 700;
  color: var(--hamim-dark, #414344);
  font-size: 14px;
  line-height: 1.1;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-email {
  font-size: 12px;
  color: var(--hamim-gray, #999999);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-chevron {
  color: var(--hamim-gray, #999999);
  font-size: 12px;
  transition: transform 0.2s;
}
.profile-chevron.open {
  transform: rotate(180deg);
}
.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--hamim-border, #dddddd);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  min-width: 230px;
  padding: 8px;
  display: none;
  z-index: 1080;
}
.profile-dropdown.open {
  display: block;
}
.profile-dropdown .pd-header {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 6px;
}
.profile-dropdown .pd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hamim-dark, #414344);
  text-align: left;
}
.profile-dropdown .pd-item:hover {
  background: #f5f5f5;
}
.profile-dropdown .pd-item.logout {
  color: #dc3545;
}
