:root {
  /* iOS Color Palette */
  --ios-primary: #007AFF;
  --ios-primary-light: #0A84FF;
  --ios-success: #34C759;
  --ios-warning: #FF9500;
  --ios-danger: #FF3B30;
  --ios-gray: #8E8E93;
  --ios-bg: #F2F4F8;
  --ios-surface: rgba(255, 255, 255, 0.7);
  --ios-border: rgba(0, 0, 0, 0.05);

  /* Shapes & Shadows */
  --ios-radius: 16px;
  --ios-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  --ios-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.08);

  /* Fonts */
  --ios-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--ios-font-family), fangsong;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Element Plus Overrides Variables */
  --el-font-family: var(--ios-font-family);
  --el-color-primary: var(--ios-primary);
  --el-color-danger: var(--ios-danger);
  --el-border-radius-base: 8px;
  --el-border-radius-small: 6px;
  --el-border-radius-round: 20px;
  --el-bg-color-page: var(--ios-bg);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--ios-bg);
  color: #1d1d1f;
  font-family: var(--ios-font-family), fangsong;
  font-size: 14px;
  line-height: 1.5;
}

/* Glassmorphism Utilities */
.glass {
  background: var(--ios-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Card Styling */
.el-card, .ios-card {
  border: none !important;
  border-radius: var(--ios-radius) !important;
  background: white;
  transition: all 0.3s ease;
  /*box-shadow: none !important;*/
}


.el-card__header {
  border-bottom: 1px solid var(--ios-border) !important;
  padding: 10px 24px !important;
  font-weight: 600;
  font-size: 16px;
}

/* Button Styling */
.el-button {
  border-radius: 10px !important; /* Pill shape */
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

/* Remove focus outline from buttons globally to prevent residual border after dialog close */
.el-button:focus, .el-button:focus-visible {
  outline: none !important;
  box-shadow: none !important; /* Also remove box-shadow which sometimes looks like a border */
}

.el-button.is-link:not(.el-button--danger):hover {
  color: var(--ios-primary-light);
}

.el-button.is-link.el-button--danger:hover {
  color: var(--ios-danger);
}


.el-button--primary {
  --el-button-hover-bg-color: var(--ios-primary-light);
  --el-button-hover-border-color: var(--ios-primary-light);
  --el-button-active-bg-color: var(--ios-primary-light);
  --el-button-active-border-color: var(--ios-primary-light);
}

.el-button:not(.is-circle):not(.is-text):not(.is-link) {
  height: 36px !important;
  padding: 0 20px !important;
}


/* Input Styling */
.el-input__wrapper {
  height: 36px !important;
  border-radius: 10px !important;
  padding: 0 12px !important;
  background-color: rgba(255,255,255,0.8) !important;
  transition: all 0.2s ease;
}

.el-input__wrapper.is-focus {
  background-color: white !important;
}

/* Table Styling */
.el-table {
  --el-table-border-color: var(--ios-border);
  --el-table-header-bg-color: transparent;
  background-color: transparent !important;
  border-radius: var(--ios-radius);
  overflow: hidden;
}

.el-table th.el-table__cell {
  background-color: none !important;
  color: #1d1d1f;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--ios-border) !important;
  padding: 12px 0 !important;
}

.el-table td.el-table__cell {
  border-bottom: 1px solid var(--ios-border) !important;
}

.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
  background-color: rgba(0, 122, 255, 0.03) !important;
}

.el-tag {
  border-radius: 10px !important;
  padding: 0 10px !important;
  height: 24px !important;
  line-height: 22px !important;
  font-weight: 600 !important;
  border: 1px solid transparent !important;
}

.el-tag--primary {
  background-color: rgba(0, 122, 255, 0.12) !important;
  border-color: rgba(0, 122, 255, 0.18) !important;
  color: var(--ios-primary) !important;
}

.el-tag--success {
  background-color: rgba(52, 199, 89, 0.14) !important;
  border-color: rgba(52, 199, 89, 0.22) !important;
  color: var(--ios-success) !important;
}

.el-tag--warning {
  background-color: rgba(255, 149, 0, 0.14) !important;
  border-color: rgba(255, 149, 0, 0.22) !important;
  color: var(--ios-warning) !important;
}

.el-tag--danger {
  background-color: rgba(255, 59, 48, 0.14) !important;
  border-color: rgba(255, 59, 48, 0.22) !important;
  color: var(--ios-danger) !important;
}

.el-tag--info {
  background-color: rgba(142, 142, 147, 0.14) !important;
  border-color: rgba(142, 142, 147, 0.22) !important;
  color: var(--ios-gray) !important;
}

.el-checkbox__inner {
  width: 15px;
  height: 15px;
  border-radius: 4px;
}



/* Dialog Styling */
.el-dialog {
  border-radius: 20px !important;
  overflow: hidden;
}

.el-dialog__header {
  margin-right: 0 !important;
  padding: 20px 24px !important;
}

/* Dropdown (User menu) */
.ios-dropdown {
  min-width: 220px;
  padding: 10px !important;
}

.ios-dropdown-popper {
  margin-top: 8px !important;
}

.ios-dropdown-popper.el-popper {
  border-radius: 18px !important;
  border: 1px solid var(--ios-border) !important;
  box-shadow: var(--ios-shadow) !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: transparent !important;
}

.ios-dropdown-popper .el-popper__content {
  border-radius: 18px !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.98) !important;
}

.ios-dropdown-popper .el-popper__arrow {
  display: none !important;
}

.ios-dropdown .el-dropdown-menu__item {
  height: 44px;
  line-height: 44px;
  border-radius: 14px;
  margin: 2px 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1d1d1f;
}

.ios-dropdown .el-dropdown-menu__item:not(.is-disabled):hover {
  background-color: rgba(0, 0, 0, 0.04) !important;
}

.ios-dropdown .el-dropdown-menu__item.is-disabled {
  cursor: default;
  color: inherit;
  opacity: 1;
}

.ios-dropdown .el-dropdown-menu__item.is-divided {
  margin-top: 10px;
}

.ios-dropdown .el-dropdown-menu__item.is-divided::before {
  height: 1px;
  background-color: var(--ios-border);
  left: 10px;
  right: 10px;
  top: -6px;
}

.ios-dropdown .ios-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 4px 2px;
}

.ios-dropdown .ios-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ios-dropdown .ios-user-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ios-dropdown .ios-user-email {
  font-size: 12px;
  color: #8E8E93;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ios-dropdown .ios-logout-item {
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: white;
}

.ios-dropdown .ios-logout-item:hover {
  background-color: rgba(0, 0, 0, 0.02) !important;
}

.ios-dropdown .el-icon {
  font-size: 16px;
}

/* Scrollbar Hiding (Global) */
::-webkit-scrollbar {
  display: none;
}
html, body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* MessageBox Styling */
.el-message-box {
  border-radius: var(--ios-radius) !important;
  border: none !important;
  box-shadow: var(--ios-shadow-hover) !important;
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0 !important;
  width: 400px !important;
  max-width: 90vw;
}

.el-message-box__header {
  padding: 20px 24px 10px !important;
}

.el-message-box__title {
  font-weight: 600;
  font-size: 18px !important;
}

.el-message-box__headerbtn {
  top: 20px !important;
  right: 20px !important;
}

.el-message-box__content {
  padding: 10px 24px 20px !important;
  font-size: 15px !important;
  color: #1d1d1f;
}

.el-message-box__btns {
  padding: 0 24px 24px !important;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.el-message-box__btns .el-button {
  margin-left: 0 !important;
  min-width: 80px;
}
