/* ===== 导游信息管理系统 - 主样式表 ===== */

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --success: #34a853;
    --success-light: #e6f4ea;
    --warning: #fbbc04;
    --danger: #ea4335;
    --info: #4285f4;
    --sidebar-width: 240px;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #3b82f6;
    --topnav-height: 58px;
    --border-radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: all 0.25s ease;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ===== 登录页 ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 50%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 10;
}
.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 30px;
    box-shadow: 0 8px 20px rgba(26,115,232,0.4);
}
.login-logo h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.login-bg-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
}
.deco {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.deco-1 { width: 400px; height: 400px; top: -100px; right: -100px; }
.deco-2 { width: 300px; height: 300px; bottom: -80px; left: -80px; }
.deco-3 { width: 200px; height: 200px; top: 50%; left: 50%; transform: translate(-50%,-50%); }

/* ===== 主布局 ===== */
.main-wrapper {
    display: flex;
    min-height: calc(100vh - var(--topnav-height));
    padding-top: var(--topnav-height);
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }
.sidebar-inner { padding: 16px 0 20px; }
.sidebar-nav { padding: 0; }
.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #475569;
    padding: 16px 20px 6px;
}
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--sidebar-text);
    border-radius: 0;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 400;
    border-left: 3px solid transparent;
}
.sidebar-nav .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}
.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: white;
    border-left-color: rgba(59,130,246,0.5);
}
.sidebar-nav .nav-link.active {
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
    border-left-color: var(--sidebar-active);
    font-weight: 500;
}

/* 遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

/* ===== 主内容 ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: calc(100vh - var(--topnav-height));
}
.content-inner {
    padding: 24px;
    max-width: 1400px;
}

/* ===== 页面标题 ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.page-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* ===== 统计卡片 ===== */
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid transparent;
}
.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-card-blue { border-left-color: var(--primary); }
.stat-card-green { border-left-color: var(--success); }
.stat-card-orange { border-left-color: #f59e0b; }
.stat-card-purple { border-left-color: #8b5cf6; }
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-card-blue .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card-green .stat-icon { background: var(--success-light); color: var(--success); }
.stat-card-orange .stat-icon { background: #fef3c7; color: #f59e0b; }
.stat-card-purple .stat-icon { background: #ede9fe; color: #8b5cf6; }
.stat-number { font-size: 26px; font-weight: 700; color: #1e293b; line-height: 1; }
.stat-label { font-size: 12px; color: #64748b; margin-top: 4px; }

/* ===== 欢迎横幅 ===== */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--border-radius);
    padding: 20px 24px;
    color: white;
}
.welcome-banner h4 { color: white; }
.welcome-banner .text-muted { color: rgba(255,255,255,0.75) !important; }

/* ===== 信息卡片（景点/餐厅）===== */
.info-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}
.info-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.info-card-img {
    height: 160px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}
.info-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.info-card:hover .info-card-img img { transform: scale(1.05); }
.info-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}
.restaurant-placeholder {
    background: linear-gradient(135deg, #f0fdf4, #e8f5e9);
    color: #a7d7a9;
}
.info-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--primary);
    color: white;
}
.info-card-badge.badge-green { background: var(--success); }
.info-card-body { padding: 14px 16px 16px; }
.info-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.info-card-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}
.info-card-meta i { margin-top: 2px; flex-shrink: 0; }
.info-card-desc {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.info-card-footer { border-top: 1px solid #f1f5f9; padding-top: 10px; }

/* ===== 分类标签 ===== */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.category-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    transition: var(--transition);
    background: white;
}
.category-tag:hover { border-color: var(--primary); color: var(--primary); }
.category-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 500;
}

/* ===== 详情页信息列表 ===== */
.info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}
.info-list li:last-child { border-bottom: none; }
.info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}
.info-label {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 2px;
}
.info-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

/* ===== 菜品标签 ===== */
.dish-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dish-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.dish-tags-large { display: flex; flex-wrap: wrap; gap: 8px; }
.dish-tag-large {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #fde68a;
}

/* ===== 表单样式 ===== */
.form-section {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fafbfd;
}
.form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.form-label.required::after {
    content: " *";
    color: var(--danger);
}
.form-control, .form-select {
    border-radius: 8px;
    border-color: #e2e8f0;
    font-size: 14px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

/* ===== 上传区域 ===== */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fafbfd;
}
.upload-area:hover, .upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}
.image-preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.preview-item {
    width: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    position: relative;
    flex-shrink: 0;
}
.preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}
.preview-name {
    font-size: 10px;
    color: #64748b;
    padding: 3px 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #f8fafc;
}
.preview-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(234,67,53,0.9);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    padding: 0;
}

/* ===== 详情图片区 ===== */
.detail-gallery { position: relative; }

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* ===== 回到顶部 ===== */
.back-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    padding: 0;
}
.back-top.show { display: flex; }

/* ===== 表格 ===== */
.table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    white-space: nowrap;
}
.table td { vertical-align: middle; }

/* ===== 用户头像 ===== */
.user-avatar-sm { line-height: 1; }
.user-avatar-lg { line-height: 1; }

/* ===== Bootstrap覆盖 ===== */
.btn { border-radius: 8px; font-size: 13px; font-weight: 500; }
.btn-lg { font-size: 15px; padding: 12px 20px; }
.card { border: none; border-radius: var(--border-radius); }
.card-header {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    padding: 14px 16px;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}
.navbar { height: var(--topnav-height); }
.badge { font-size: 11px; font-weight: 500; padding: 4px 8px; border-radius: 6px; }
.alert { border-radius: 10px; font-size: 14px; }
.modal-content { border-radius: 16px; border: none; }
.modal-header { border-bottom-color: #f1f5f9; }
.modal-footer { border-top-color: #f1f5f9; }
.dropdown-menu { border-radius: 10px; border-color: #e2e8f0; box-shadow: var(--shadow-lg); }
.dropdown-item { font-size: 14px; border-radius: 6px; margin: 1px 4px; padding: 8px 12px; }
.pagination .page-link { border-radius: 8px; margin: 0 2px; font-size: 13px; border-color: #e2e8f0; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ===== 表单选择器 Bootstrap 覆盖 ===== */
.input-group-text { border-radius: 8px 0 0 8px !important; background: #f8fafc; border-color: #e2e8f0; }
.input-group .form-control { border-left: 0; }
.input-group .btn { border-radius: 0 8px 8px 0 !important; }
