/* 福娣云办公 - 苹果风格全局样式 */

:root {
  --apple-bg: #f5f5f7;
  --apple-white: #ffffff;
  --apple-text: #1d1d1f;
  --apple-text-secondary: #86868b;
  --apple-text-tertiary: #6e6e73;
  --apple-border: #d2d2d7;
  --apple-divider: #e5e5ea;
  --apple-blue: #007aff;
  --apple-green: #34c759;
  --apple-orange: #ff9500;
  --apple-red: #ff3b30;
  --apple-purple: #af52de;
  --apple-gray: #8e8e93;
  --apple-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --apple-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --apple-radius: 12px;
  --apple-radius-sm: 8px;
  --apple-radius-lg: 16px;
  --apple-transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'PingFang SC', 'Helvetica Neue', sans-serif;
  background-color: var(--apple-bg);
  color: var(--apple-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 苹果风格导航栏 */
.apple-navbar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.apple-navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.apple-navbar-brand {
  display: flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.apple-navbar-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.apple-navbar-logo svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.apple-navbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--apple-text);
  letter-spacing: -0.02em;
}

.apple-navbar-welcome {
  font-size: 14px;
  color: var(--apple-text-secondary);
  margin-left: 24px;
}

.apple-navbar-menu {
  display: flex;
  align-items: center;
  height: 100%;
}

.apple-navbar-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.apple-navbar-link {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 100%;
  color: var(--apple-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: var(--apple-transition);
}

.apple-navbar-link:hover {
  color: var(--apple-blue);
}

.apple-navbar-item.active .apple-navbar-link {
  color: var(--apple-blue);
  font-weight: 500;
}

.apple-navbar-arrow {
  font-size: 10px;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.apple-navbar-dropdown:hover .apple-navbar-arrow {
  transform: rotate(180deg);
}

.apple-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--apple-white);
  min-width: 160px;
  border-radius: var(--apple-radius);
  box-shadow: var(--apple-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--apple-transition);
  padding: 8px 0;
  border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.apple-navbar-dropdown:hover .apple-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.apple-dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--apple-text);
  text-decoration: none;
  font-size: 14px;
  transition: var(--apple-transition);
}

.apple-dropdown-item:hover {
  background: var(--apple-bg);
}

.apple-dropdown-item i {
  width: 20px;
  margin-right: 10px;
  color: var(--apple-text-secondary);
  font-size: 15px;
}

.apple-dropdown-divider {
  height: 0.5px;
  background: var(--apple-divider);
  margin: 8px 0;
}

/* 用户区域 */
.apple-navbar-user {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.apple-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: white;
  margin-right: 8px;
}

.apple-user-name {
  font-size: 14px;
  color: var(--apple-text);
  font-weight: 500;
}

/* 卡片样式 */
.apple-card {
  background: var(--apple-white);
  border-radius: var(--apple-radius-lg);
  box-shadow: var(--apple-shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.apple-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.apple-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--apple-text);
  letter-spacing: -0.02em;
}

/* 按钮样式 */
.apple-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--apple-radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--apple-transition);
  border: none;
  text-decoration: none;
}

.apple-btn-primary {
  background: var(--apple-blue);
  color: white;
}

.apple-btn-primary:hover {
  background: #0066d6;
}

.apple-btn-secondary {
  background: var(--apple-bg);
  color: var(--apple-text);
}

.apple-btn-secondary:hover {
  background: #e8e8ed;
}

.apple-btn-danger {
  background: var(--apple-red);
  color: white;
}

.apple-btn-danger:hover {
  background: #d63029;
}

.apple-btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.apple-btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* 输入框样式 */
.apple-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-sm);
  font-size: 15px;
  color: var(--apple-text);
  background: var(--apple-white);
  transition: var(--apple-transition);
}

.apple-input:focus {
  outline: none;
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.apple-input::placeholder {
  color: var(--apple-text-secondary);
}

.apple-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-sm);
  font-size: 15px;
  color: var(--apple-text);
  background: var(--apple-white);
  cursor: pointer;
  transition: var(--apple-transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386868b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.apple-select:focus {
  outline: none;
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 开关样式 */
.apple-toggle {
  position: relative;
  width: 51px;
  height: 31px;
  cursor: pointer;
}

.apple-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.apple-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #e9e9eb;
  border-radius: 31px;
  transition: var(--apple-transition);
}

.apple-toggle-slider:before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: var(--apple-transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.apple-toggle input:checked + .apple-toggle-slider {
  background: var(--apple-green);
}

.apple-toggle input:checked + .apple-toggle-slider:before {
  transform: translateX(20px);
}

/* 标签样式 */
.apple-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.apple-tag-blue {
  background: rgba(0, 122, 255, 0.1);
  color: var(--apple-blue);
}

.apple-tag-green {
  background: rgba(52, 199, 89, 0.1);
  color: var(--apple-green);
}

.apple-tag-orange {
  background: rgba(255, 149, 0, 0.1);
  color: var(--apple-orange);
}

.apple-tag-red {
  background: rgba(255, 59, 48, 0.1);
  color: var(--apple-red);
}

.apple-tag-gray {
  background: rgba(142, 142, 147, 0.1);
  color: var(--apple-gray);
}

/* 列表样式 */
.apple-list {
  background: var(--apple-white);
  border-radius: var(--apple-radius);
  overflow: hidden;
}

.apple-list-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--apple-divider);
  transition: var(--apple-transition);
}

.apple-list-item:last-child {
  border-bottom: none;
}

.apple-list-item:hover {
  background: var(--apple-bg);
}

.apple-list-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 18px;
}

.apple-list-item-content {
  flex: 1;
}

.apple-list-item-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--apple-text);
}

.apple-list-item-desc {
  font-size: 13px;
  color: var(--apple-text-secondary);
  margin-top: 2px;
}

.apple-list-item-action {
  color: var(--apple-text-secondary);
}

/* 分区标题 */
.apple-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  padding-left: 16px;
}

/* 空状态 */
.apple-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--apple-text-secondary);
}

.apple-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.apple-empty-text {
  font-size: 15px;
}

/* 加载状态 */
.apple-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--apple-text-secondary);
}

.apple-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--apple-border);
  border-top-color: var(--apple-blue);
  border-radius: 50%;
  animation: apple-spin 0.8s linear infinite;
  margin-right: 12px;
}

@keyframes apple-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 图标样式（替代emoji） */
.apple-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 16px;
}

.apple-icon-blue {
  background: rgba(0, 122, 255, 0.1);
  color: var(--apple-blue);
}

.apple-icon-green {
  background: rgba(52, 199, 89, 0.1);
  color: var(--apple-green);
}

.apple-icon-orange {
  background: rgba(255, 149, 0, 0.1);
  color: var(--apple-orange);
}

.apple-icon-red {
  background: rgba(255, 59, 48, 0.1);
  color: var(--apple-red);
}

.apple-icon-purple {
  background: rgba(175, 82, 222, 0.1);
  color: var(--apple-purple);
}

.apple-icon-gray {
  background: rgba(142, 142, 147, 0.1);
  color: var(--apple-gray);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .apple-navbar-container {
    padding: 0 16px;
  }
  
  .apple-navbar-title {
    display: none;
  }
  
  .apple-card {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: var(--apple-radius);
  }
  
  .apple-btn {
    padding: 12px 20px;
  }
}

/* 移动端菜单 */
.apple-mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  color: var(--apple-text);
}

@media (max-width: 768px) {
  .apple-mobile-menu-btn {
    display: flex;
  }
  
  .apple-navbar-menu {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    height: auto;
    padding: 16px 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--apple-transition);
  }
  
  .apple-navbar.menu-open .apple-navbar-menu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .apple-navbar-item {
    width: 100%;
    height: auto;
  }
  
  .apple-navbar-link {
    padding: 14px 20px;
    justify-content: flex-start;
  }
  
  .apple-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 20px;
  }
  
  .apple-dropdown-item {
    padding: 12px 20px;
    color: var(--apple-text-secondary);
  }
  
  .apple-navbar-user {
    display: none;
  }
}
