/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    min-height: 100vh;
}

/* ==================== 图标样式 ==================== */
i {
    display: inline-block;
    font-style: normal;
}

/* 字体图标大小 */
.fa-lg { font-size: 1.25em; }
.fa-2x { font-size: 2em; }
.fa-3x { font-size: 3em; }

/* ==================== 登录页面 ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo i {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.logo h1 {
    font-size: 24px;
    color: var(--gray-800);
    font-weight: 600;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 16px;
    color: var(--gray-400);
    font-size: 18px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 16px;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-group input::placeholder {
    color: var(--gray-400);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-primary i {
    font-size: 18px;
}

.btn-large {
    padding: 16px 24px;
    font-size: 18px;
    margin-top: 20px;
}

.error-message {
    color: var(--danger-color);
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.error-message i {
    font-size: 16px;
}

/* 切换登录/注册 */
.switch-mode {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--gray-500);
}

.switch-mode a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.switch-mode a:hover {
    text-decoration: underline;
}

/* ==================== 语言选择器 - 登录前浮动按钮 ==================== */
.lang-selector-float {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
}

.lang-float-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.25s ease;
}

.lang-float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.lang-float-btn .lang-flag-lg {
    font-size: 22px;
    line-height: 1;
}

.lang-float-btn i {
    font-size: 10px;
    color: var(--gray-500);
    transition: transform 0.25s ease;
}

.lang-float-btn i.rotate {
    transform: rotate(180deg);
}

/* 登录前语言下拉菜单 */
.lang-menu-float {
    position: absolute;
    top: 55px;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    overflow: hidden;
    z-index: 100000;
    border: 1px solid var(--gray-200);
    animation: langMenuSlide 0.2s ease;
}

@keyframes langMenuSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-menu-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-menu-header i {
    font-size: 14px;
}

.lang-menu-float .lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.lang-menu-float .lang-item:last-child {
    border-bottom: none;
}

.lang-menu-float .lang-item:hover {
    background: var(--gray-50);
}

.lang-menu-float .lang-item.active {
    background: var(--primary-color);
    color: var(--white);
}

.lang-menu-float .lang-item .flag {
    font-size: 18px;
}

.lang-menu-float .lang-item .name {
    flex: 1;
}

.lang-menu-float .lang-item i {
    font-size: 12px;
}

/* ==================== 语言选择器 - 登录后顶部导航 ==================== */
.lang-dropdown-header {
    position: relative;
}

.lang-header-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lang-header-btn:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.lang-header-btn .lang-flag-sm {
    font-size: 18px;
    line-height: 1;
}

.lang-header-btn i {
    font-size: 10px;
    color: var(--gray-500);
    transition: transform 0.2s ease;
}

.lang-header-btn i.rotate {
    transform: rotate(180deg);
}

/* 登录后语言下拉菜单 */
.lang-menu-header-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    overflow: hidden;
    z-index: 1000;
    border: 1px solid var(--gray-200);
    animation: langMenuSlide 0.2s ease;
}

.lang-menu-header-title {
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-menu-header-title i {
    font-size: 12px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--gray-50);
}

.lang-option.active {
    background: var(--primary-color);
    color: var(--white);
}

.lang-option .flag {
    font-size: 16px;
}

.lang-option .name {
    flex: 1;
}

.lang-option .check-icon {
    font-size: 11px;
}

/* ==================== RTL 支持 (阿拉伯语) ==================== */
.rtl {
    direction: rtl;
}

.rtl .login-container {
    text-align: right;
}

.rtl .input-group i {
    left: auto;
    right: 16px;
}

.rtl .input-group input {
    padding: 14px 48px 14px 16px;
}

.rtl .app-header {
    flex-direction: row-reverse;
}

.rtl .header-left {
    flex-direction: row-reverse;
}

.rtl .header-right {
    flex-direction: row-reverse;
}

.rtl .page-header {
    flex-direction: row-reverse;
}

.rtl .institution-card,
.rtl .dentist-card {
    flex-direction: row-reverse;
}

.rtl .inst-info,
.rtl .dentist-info {
    text-align: right;
}

.rtl .inst-address,
.rtl .inst-phone,
.rtl .dentist-title,
.rtl .dentist-specialty {
    flex-direction: row-reverse;
}

.rtl .apt-header {
    flex-direction: row-reverse;
}

.rtl .apt-info-row {
    flex-direction: row-reverse;
}

.rtl .menu-item {
    flex-direction: row-reverse;
}

.rtl .menu-item i:last-child {
    transform: rotate(180deg);
}

.rtl .section-title {
    flex-direction: row-reverse;
}

.rtl .search-bar i {
    left: auto;
    right: 16px;
}

.rtl .search-bar input {
    padding: 14px 48px 14px 16px;
}

.rtl .form-group label {
    flex-direction: row-reverse;
}

.rtl .date-scroll {
    flex-direction: row-reverse;
}

.rtl .filter-tabs {
    flex-direction: row-reverse;
}

.rtl .lang-selector-float {
    right: auto;
    left: 20px;
}

.rtl .lang-menu-float {
    right: auto;
    left: 0;
}

.rtl .lang-menu-header-dropdown {
    right: auto;
    left: 0;
}

/* ==================== 主应用布局 ==================== */
.main-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px;
}

/* ==================== 顶部导航 ==================== */
.app-header {
    background: var(--white);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary-color);
}

.app-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.icon-btn:hover {
    background: var(--gray-200);
}

.icon-btn i {
    font-size: 18px;
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger-color);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ==================== 页面内容 ==================== */
.page-content {
    flex: 1;
    padding: 16px;
}

.page {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.back-btn i {
    font-size: 16px;
}

/* ==================== 搜索栏 ==================== */
.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 18px;
}

.search-bar input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--white);
    font-size: 16px;
    box-shadow: var(--shadow);
}

.search-bar input::placeholder {
    color: var(--gray-400);
}

/* ==================== 标题 ==================== */
.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary-color);
    font-size: 18px;
}

.section {
    margin-bottom: 24px;
}

/* ==================== 机构卡片 ==================== */
.institution-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.institution-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.institution-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.inst-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inst-image i {
    font-size: 28px;
    color: var(--white);
}

.inst-info {
    flex: 1;
    min-width: 0;
}

.inst-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.inst-address, .inst-phone {
    font-size: 13px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.inst-address i, .inst-phone i {
    font-size: 12px;
    color: var(--gray-400);
}

.inst-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.inst-rating i {
    font-size: 14px;
    color: var(--gray-300);
}

.inst-rating i.filled {
    color: #fbbf24;
}

.inst-rating span {
    font-size: 13px;
    color: var(--gray-500);
    margin-left: 4px;
}

.arrow-icon {
    color: var(--gray-400);
    font-size: 16px;
}

/* ==================== 医生卡片 ==================== */
.dentist-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dentist-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.dentist-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dentist-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dentist-avatar i {
    font-size: 28px;
    color: var(--white);
}

.dentist-info {
    flex: 1;
}

.dentist-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.dentist-title, .dentist-specialty {
    font-size: 13px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.dentist-title i, .dentist-specialty i {
    font-size: 12px;
    color: var(--primary-color);
}

.dentist-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 6px 0;
}

.dentist-rating i {
    font-size: 12px;
    color: var(--gray-300);
}

.dentist-rating i.filled {
    color: #fbbf24;
}

.dentist-rating span {
    font-size: 12px;
    color: var(--gray-500);
    margin-left: 4px;
}

.consult-price {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.consult-price i {
    font-size: 12px;
}

/* 医生擅长领域和简介 */
.dentist-specialties-detail {
    font-size: 12px;
    color: #059669;
    background: #ecfdf5;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
    border-left: 3px solid #10b981;
}

.dentist-specialties-detail i {
    font-size: 12px;
    color: #10b981;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ==================== 医生详细信息（预约页面） ==================== */
.dentist-detail-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.dentist-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #bae6fd;
}

.dentist-detail-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dentist-detail-avatar i {
    font-size: 32px;
    color: white;
}

.dentist-detail-basic h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.dentist-detail-title {
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.dentist-detail-title i {
    color: var(--primary-color);
}

.dentist-detail-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dentist-detail-rating i {
    font-size: 14px;
    color: #e5e7eb;
}

.dentist-detail-rating i.filled {
    color: #fbbf24;
}

.dentist-detail-rating span {
    font-size: 13px;
    color: #6b7280;
    margin-left: 4px;
}

.dentist-detail-item {
    margin-bottom: 14px;
}

.dentist-detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.detail-label i {
    color: var(--primary-color);
    font-size: 14px;
}

.detail-content {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    padding: 10px 14px;
    border-radius: 8px;
    background: white;
}

.detail-content.specialties {
    color: #065f46;
    background: #ecfdf5;
    border-left: 4px solid #10b981;
}

.detail-content.introduction {
    color: #374151;
    background: #f9fafb;
    border-left: 4px solid #9ca3af;
    text-align: justify;
}

.detail-content.price {
    color: #0369a1;
    background: #e0f2fe;
    border-left: 4px solid #0ea5e9;
    font-weight: 600;
    font-size: 16px;
}

.dentist-specialties-detail strong {
    color: #047857;
    font-weight: 600;
}

.dentist-introduction {
    font-size: 12px;
    color: #4b5563;
    background: #f9fafb;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
    border-left: 3px solid #9ca3af;
}

.dentist-introduction i {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ==================== 日期选择 ==================== */
.date-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px;
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
}

.date-scroll::-webkit-scrollbar {
    display: none;
}

.date-item {
    min-width: 64px;
    padding: 10px 8px;
    background: var(--white);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.date-item.active {
    background: var(--primary-color);
    color: var(--white);
}

.date-item .day-name {
    display: block;
    font-size: 11px;
    margin-bottom: 2px;
    opacity: 0.8;
}

.date-item .day-number {
    display: block;
    font-size: 17px;
    font-weight: 600;
}

/* ==================== 时间选择 ==================== */
.time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.time-slot {
    padding: 12px;
    background: var(--gray-200);
    border-radius: var(--radius);
    text-align: center;
    font-size: 14px;
    cursor: not-allowed;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.time-slot.available {
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.time-slot.available:hover {
    border-color: var(--primary-color);
}

.time-slot.selected {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-dark);
}

.time-slot i {
    font-size: 12px;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.profile-edit {
    animation: fadeIn 0.3s ease;
}

.empty-state.small {
    padding: 30px 20px;
}

.empty-state.small i {
    font-size: 40px;
}

.apt-info-row.price {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==================== 筛选标签 ==================== */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding: 4px;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tabs button {
    padding: 8px 16px;
    border: none;
    background: var(--white);
    color: var(--gray-600);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: var(--shadow);
}

.filter-tabs button i {
    font-size: 14px;
}

.filter-tabs button.active {
    background: var(--primary-color);
    color: var(--white);
}

/* ==================== 预约卡片 ==================== */
.appointment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.appointment-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
}

.apt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.apt-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.apt-status i {
    font-size: 12px;
}

.apt-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.apt-status.confirmed {
    background: #dbeafe;
    color: #1e40af;
}

.apt-status.in-treatment {
    background: #e0e7ff;
    color: #3730a3;
}

.apt-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.apt-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.apt-date {
    font-size: 13px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

.apt-date i {
    font-size: 12px;
}

.apt-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apt-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-600);
}

.apt-info-row i {
    width: 16px;
    color: var(--gray-400);
    font-size: 14px;
}

.apt-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.btn-cancel {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--danger-color);
    background: var(--white);
    color: var(--danger-color);
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--danger-color);
    color: var(--white);
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 15px;
}

/* ==================== 个人中心 ==================== */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    margin: -16px -16px 20px -16px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.profile-avatar i {
    font-size: 48px;
    color: var(--white);
}

.profile-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-header p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.menu-list {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--gray-100);
}

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

.menu-item:hover {
    background: var(--gray-50);
}

.menu-item i:first-child {
    width: 24px;
    color: var(--primary-color);
    font-size: 18px;
    margin-right: 12px;
}

.menu-item span {
    flex: 1;
    font-size: 15px;
    color: var(--gray-700);
}

.menu-item i:last-child {
    color: var(--gray-400);
    font-size: 14px;
}

.menu-item.logout i:first-child {
    color: var(--danger-color);
}

/* ==================== 底部导航 ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.bottom-nav button {
    flex: 1;
    background: none;
    border: none;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.2s;
}

.bottom-nav button i {
    font-size: 22px;
}

.bottom-nav button span {
    font-size: 12px;
}

.bottom-nav button.active {
    color: var(--primary-color);
}

.bottom-nav button.active i {
    transform: translateY(-2px);
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.toast.success {
    background: #d1fae5;
    color: #065f46;
}

.toast.error {
    background: #fee2e2;
    color: #991b1b;
}

.toast.warning {
    background: #fef3c7;
    color: #92400e;
}

.toast i {
    font-size: 18px;
}

/* ==================== 响应式优化 ==================== */
@media (max-width: 380px) {
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .institution-card,
    .dentist-card {
        padding: 12px;
    }
    
    .inst-image,
    .dentist-avatar {
        width: 50px;
        height: 50px;
    }
    
    .inst-image i,
    .dentist-avatar i {
        font-size: 22px;
    }
}

/* 安全区域适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .main-app {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
    
    .bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* ==================== 确认弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 380px;
    max-height: 85vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h3 i {
    font-size: 18px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(85vh - 140px);
}

.confirm-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.confirm-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.confirm-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.confirm-label i {
    color: var(--primary-color);
    font-size: 12px;
}

.confirm-value {
    font-size: 15px;
    color: var(--gray-800);
    font-weight: 500;
    padding-left: 18px;
}

.confirm-value.text-muted {
    color: var(--gray-600);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
}

.confirm-notice {
    margin-top: 16px;
    padding: 12px;
    background: #eff6ff;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--primary-color);
}

.confirm-notice i {
    margin-top: 2px;
    font-size: 14px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 12px;
}

.modal-footer button {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary {
    background: var(--gray-100);
    border: none;
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.modal-footer .btn-primary {
    margin-top: 0;
}

/* RTL 适配 */
.rtl .confirm-value {
    padding-left: 0;
    padding-right: 18px;
}

.rtl .modal-footer {
    flex-direction: row-reverse;
}

/* ==================== 预约详情弹窗 ==================== */
.detail-modal {
    max-width: 400px;
}

.detail-modal .modal-header {
    padding: 20px;
}

.detail-modal .modal-header.pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.detail-modal .modal-header.confirmed {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.detail-modal .modal-header.in-treatment {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.detail-modal .modal-header.completed {
    background: linear-gradient(135deg, #10b981, #059669);
}

.detail-modal .modal-header.cancelled {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.detail-modal .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.detail-modal .modal-body {
    padding: 0;
}

.detail-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.detail-section:last-child {
    border-bottom: none;
}

.order-section {
    text-align: center;
    background: var(--gray-50);
    padding: 20px;
}

.order-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: monospace;
    letter-spacing: 1px;
}

.order-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.detail-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--gray-200);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.total-row {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--gray-200);
    border-bottom: none;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-600);
}

.detail-label i {
    color: var(--primary-color);
    font-size: 14px;
    width: 16px;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
    text-align: right;
}

.detail-value.price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.detail-value.text-success {
    color: var(--secondary-color);
}

.detail-value.text-warning {
    color: var(--warning-color);
}

.detail-remarks {
    background: var(--gray-50);
    padding: 12px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.6;
}

.detail-meta {
    padding: 16px 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-item i {
    font-size: 12px;
}

/* 预约卡片查看详情提示 */
.apt-view-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    margin-top: 12px;
    border-top: 1px dashed var(--gray-200);
    font-size: 13px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.apt-view-detail:hover {
    color: var(--primary-dark);
}

.apt-view-detail i {
    font-size: 11px;
}

.appointment-card {
    cursor: pointer;
    transition: all 0.2s;
}

.appointment-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* RTL 适配 */
.rtl .detail-row {
    flex-direction: row-reverse;
}

.rtl .detail-value {
    text-align: left;
}

.rtl .detail-label {
    flex-direction: row-reverse;
}

.rtl .meta-item {
    flex-direction: row-reverse;
}

.rtl .apt-view-detail {
    flex-direction: row-reverse;
}

.rtl .apt-view-detail i {
    transform: rotate(180deg);
}


/* ==================== 特殊服务需求样式 ==================== */

/* 复选框组 */
.special-services .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkbox-item .check-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--gray-500);
    font-size: 18px;
    transition: all 0.2s ease;
}

.checkbox-item .check-text {
    flex: 1;
    font-size: 15px;
    color: var(--gray-700);
    font-weight: 500;
}

/* 选中状态 */
.checkbox-item input[type="checkbox"]:checked + .check-icon {
    background: var(--primary-color);
    color: var(--white);
}

.checkbox-item input[type="checkbox"]:checked ~ .check-text {
    color: var(--primary-color);
}

.checkbox-item:has(input[type="checkbox"]:checked) {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

/* 车接送选中 */
.checkbox-item input[type="checkbox"]:checked + .check-icon:has(.fa-car) {
    background: #f59e0b;
}

/* 翻译选中 */
.checkbox-item input[type="checkbox"]:checked + .check-icon:has(.fa-language) {
    background: #10b981;
}

/* 确认弹窗中的标签 */
.special-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.tag-transport {
    background: #fef3c7;
    color: #92400e;
}

.tag-translate {
    background: #d1fae5;
    color: #065f46;
}

/* 预约列表中的小标签 */
.mini-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    margin-right: 6px;
}

.mini-tag:has(.fa-car) {
    background: #fef3c7;
    color: #92400e;
}

.mini-tag:has(.fa-language) {
    background: #d1fae5;
    color: #065f46;
}

.special-tags-detail {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}

/* 预约卡片中的特殊标签行 */
.apt-info-row.special-tags {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--gray-200);
}

/* RTL 适配 */
.rtl .checkbox-item {
    flex-direction: row-reverse;
}

.rtl .special-tags-detail {
    flex-direction: row-reverse;
}

.rtl .mini-tag {
    margin-right: 0;
    margin-left: 6px;
}


/* ==================== 详情页特殊服务展示样式 ==================== */

.special-services-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}

.special-services-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: 10px;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.service-item:hover {
    transform: translateX(4px);
}

.service-transport {
    border-left: 4px solid #f59e0b;
}

.service-transport .service-icon {
    background: #fef3c7;
    color: #92400e;
}

.service-translate {
    border-left: 4px solid #10b981;
}

.service-translate .service-icon {
    background: #d1fae5;
    color: #065f46;
}

.service-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.service-info {
    flex: 1;
    min-width: 0;
}

.service-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.service-desc {
    font-size: 13px;
    color: var(--gray-500);
}

.service-status {
    font-size: 20px;
    color: #10b981;
}

.no-services {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    color: var(--gray-500);
    font-size: 14px;
}

.no-services i {
    color: var(--gray-400);
}

/* 预约列表中的特殊服务标签 */
.apt-info-row.special-tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.mini-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
}

.mini-tag .fa-car {
    background: #fef3c7;
    color: #92400e;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mini-tag .fa-language {
    background: #d1fae5;
    color: #065f46;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 确认弹窗中的特殊服务标签 */
.special-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.tag-transport {
    background: #fef3c7;
    color: #92400e;
}

.tag-translate {
    background: #d1fae5;
    color: #065f46;
}

/* RTL 适配 */
.rtl .service-item:hover {
    transform: translateX(-4px);
}

.rtl .service-transport,
.rtl .service-translate {
    border-left: none;
    border-right: 4px solid;
}

.rtl .service-transport {
    border-right-color: #f59e0b;
}

.rtl .service-translate {
    border-right-color: #10b981;
}


/* ==================== 服务详细信息输入样式 ==================== */

.service-details {
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.service-details:has(.service-details-header i.fa-car) {
    border-color: #f59e0b;
}

.service-details:has(.service-details-header i.fa-language) {
    border-color: #10b981;
}

.service-details-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-700);
}

.service-details-header i {
    font-size: 18px;
}

.service-details-body {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-details-body .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.service-details-body label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}

.service-details-body input,
.service-details-body select {
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.service-details-body input:focus,
.service-details-body select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 确认弹窗中的服务详情 */
.confirm-service-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.confirm-service-item:last-child {
    margin-bottom: 0;
}

.confirm-service-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.confirm-service-detail {
    font-size: 13px;
    color: var(--gray-600);
    padding-left: 26px;
}

.confirm-service-detail > div {
    margin-bottom: 4px;
}

.confirm-service-detail i {
    width: 16px;
    margin-right: 6px;
    color: var(--gray-400);
}

/* 详情页中的服务详情文字 */
.service-detail-text {
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 4px;
}

.service-detail-text i {
    width: 16px;
    margin-right: 6px;
    color: var(--gray-400);
}


/* ==================== 帮助文字样式 ==================== */

.help-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--gray-500);
    font-style: italic;
}

/* 服务联系信息头部样式 */
.service-details-header i.fa-address-book {
    font-size: 18px;
}

/* 表单行内的图标样式 */
.service-details-body .form-row label i {
    margin-right: 6px;
    font-size: 14px;
}


/* ==================== PWA & 移动端优化样式 ==================== */

/* 安全区域适配 */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    
    .header {
        padding-top: max(15px, env(safe-area-inset-top));
    }
    
    .main-content {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* 离线模式样式 */
body.offline::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warning-color), var(--danger-color));
    z-index: 9999;
    animation: offlinePulse 2s ease-in-out infinite;
}

@keyframes offlinePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

body.offline::after {
    content: '離線模式';
    position: fixed;
    top: 8px;
    right: 8px;
    background: var(--warning-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 9999;
}

/* 触摸反馈优化 */
button, .btn, .card, .nav-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button:active, .btn:active, .card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
}

/* 滑动触摸优化 */
.swipe-container {
    touch-action: pan-y;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.swipe-container::-webkit-scrollbar {
    display: none;
}

/* 防止文本选择（提升触摸体验） */
.no-select {
    -webkit-user-select: none;
    user-select: none;
}

/* 手势滑动手柄 */
.gesture-handle {
    position: absolute;
    width: 40px;
    height: 4px;
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
}

/* 下拉刷新样式 */
.pull-to-refresh {
    position: relative;
    overflow: hidden;
}

.pull-indicator {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: top 0.3s;
}

.pull-indicator.visible {
    top: 20px;
}

.pull-indicator i {
    color: var(--primary-color);
    transition: transform 0.3s;
}

.pull-indicator.loading i {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 底部导航增强 */
.bottom-nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

/* iOS 风格切换动画 */
.page-slide-enter {
    animation: slideInRight 0.3s ease;
}

.page-slide-leave {
    animation: slideOutLeft 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

/* 模态框滑动动画 */
.modal-slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* 骨架屏动画 */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-200) 25%,
        var(--gray-100) 50%,
        var(--gray-200) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast 通知优化 */
.toast {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 安装提示条 */
.install-banner {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    background: var(--primary-color);
    color: white;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
    z-index: 1000;
    animation: slideUpBanner 0.5s ease;
}

@keyframes slideUpBanner {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.install-banner .install-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

.install-banner .close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 10px;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-100: #111827;
        --gray-200: #1f2937;
        --gray-300: #374151;
        --gray-400: #4b5563;
        --gray-500: #6b7280;
        --gray-600: #9ca3af;
        --gray-700: #d1d5db;
        --gray-800: #e5e7eb;
        --gray-900: #f3f4f6;
        --white: #1f2937;
    }
    
    body {
        background-color: var(--gray-100);
        color: var(--gray-800);
    }
    
    .bottom-nav {
        background: rgba(31, 41, 55, 0.95);
        border-top-color: rgba(255,255,255,0.1);
    }
    
    .card {
        background: var(--gray-200);
        border-color: var(--gray-300);
    }
}

/* 小屏幕适配 */
@media (max-width: 360px) {
    .bottom-nav button span {
        font-size: 10px;
    }
    
    .bottom-nav button i {
        font-size: 18px;
    }
}

/* 横屏提示 */
@media (orientation: landscape) and (max-height: 500px) {
    .orientation-lock::before {
        content: '請使用直屏模式以獲得最佳體驗';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.9);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        font-size: 18px;
        text-align: center;
        padding: 20px;
    }
}

/* ==================== 第三方一键登录 ==================== */
.social-login {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-400);
    font-size: 13px;
    margin-bottom: 4px;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.btn-social {
    width: 100%;
    padding: 13px 24px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-700);
}

.btn-social i {
    font-size: 18px;
}

.btn-social:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-social:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-apple {
    background: var(--gray-900);
    border-color: var(--gray-900);
    color: var(--white);
}

.btn-apple:hover:not(:disabled) {
    background: #000000;
}

.btn-google {
    background: var(--white);
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.social-badge {
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-400);
    margin-left: 4px;
}

/* ==================== AI 导诊 ==================== */
/* 首页入口卡片 */
.ai-entry-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ai-entry-card:active {
    transform: scale(0.98);
}

.ai-entry-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.ai-entry-info {
    flex: 1;
    min-width: 0;
}

.ai-entry-title {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-entry-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    margin-top: 4px;
}

.ai-entry-arrow {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

/* 消息列表 */
.ai-page {
    padding-bottom: 70px;
}

.ai-messages {
    display: flex;
    flex-direction: column;
}

.ai-msg-row {
    display: flex;
    padding: 8px 0;
    align-items: flex-start;
}

.ai-msg-row.user {
    justify-content: flex-end;
}

.ai-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-inline-end: 8px;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.ai-bubble {
    max-width: 82%;
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.6;
}

.ai-bubble.assistant {
    background: var(--white);
    color: var(--gray-800);
    border-start-start-radius: 4px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.ai-bubble.user {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-start-end-radius: 4px;
    box-shadow: var(--shadow-md);
}

.ai-bubble.error-bubble {
    border-color: #fecaca;
    background: #fef2f2;
    color: var(--danger-color);
}

.ai-msg-text {
    white-space: pre-wrap;
    word-break: break-word;
}

/* 思考中动画 */
.ai-thinking {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: aiBounce 1.2s infinite;
}

.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

.ai-thinking-text {
    margin-inline-start: 6px;
    font-size: 12px;
    color: var(--gray-400);
}

/* 就诊方向标签 */
.ai-section-label {
    font-size: 12px;
    color: var(--gray-500);
    margin: 10px 0 6px;
}

.ai-specialties .ai-tag {
    display: inline-block;
    font-size: 12px;
    color: var(--primary-dark);
    background: #eff6ff;
    border-radius: 999px;
    padding: 3px 10px;
    margin: 0 6px 6px 0;
    margin-inline-end: 6px;
    font-weight: 500;
}

/* 推荐医生卡片 */
.ai-dentist-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.ai-dentist-card:active {
    transform: scale(0.98);
}

.ai-dentist-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.ai-dentist-info {
    flex: 1;
    min-width: 0;
}

.ai-dentist-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ai-dentist-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.ai-dentist-title {
    font-size: 11px;
    color: var(--primary-dark);
    background: var(--white);
    border-radius: 999px;
    padding: 1px 8px;
}

.ai-dentist-inst {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 3px;
}

.ai-dentist-reason {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 3px;
    line-height: 1.4;
}

.ai-dentist-meta {
    margin-top: 4px;
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--gray-400);
}

.ai-dentist-arrow {
    color: var(--gray-400);
    font-size: 14px;
    flex-shrink: 0;
}

/* 回答来源标识 */
.ai-source-tag {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    border-radius: 999px;
    padding: 2px 10px;
}

.ai-source-ai {
    color: var(--primary-dark);
    background: #eff6ff;
}

.ai-source-fallback {
    color: var(--gray-500);
    background: var(--gray-100);
}

/* 免责声明 */
.ai-disclaimer {
    margin-top: 8px;
    font-size: 11px;
    color: #b45309;
    line-height: 1.5;
}

/* 常见症状快捷 chips */
.ai-quick-symptoms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 4px 42px;
}

[dir="rtl"] .ai-quick-symptoms,
.rtl .ai-quick-symptoms {
    padding: 4px 42px 4px 0;
}

.ai-chip {
    font-size: 13px;
    color: var(--primary-dark);
    background: var(--white);
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.ai-chip:active {
    background: #eff6ff;
    transform: scale(0.96);
}

/* 底部输入栏（位于底部导航之上） */
.ai-input-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--gray-200);
    z-index: 99;
}

.ai-msg-input {
    flex: 1;
    background: var(--gray-100);
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    color: var(--gray-800);
}

.ai-msg-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -1px;
}

.ai-send-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.ai-send-btn:disabled {
    opacity: 0.5;
    box-shadow: none;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .ai-bubble {
        max-width: 88%;
    }
}
