
/* 导航栏样式 */
/* .navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
} */

.navbar-brand img {
    margin-right: 10px;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

/* .nav-link:hover {
    color: var(--primary-color) !important;
} */

/* 按钮样式 */
.btn {
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004494;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* 表单样式 */
.form-control {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,86,179,.25);
}

/* 页脚样式 */
.footer {
    background-color: var(--light-color);
    padding: 40px 0;
    margin-top: 60px;
}

.footer h5 {
    color: var(--dark-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.footer li a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color);
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--secondary-color);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .col-md-4 {
        margin-bottom: 30px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* 自定义滚动条 */
::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 页面加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 提示框样式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 4px;
    padding: 8px 12px;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modal-header {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background-color: #f8f9fa;
}

/* 改进的模态框动画 */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.2s ease;
    transform: scale(0.95);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* 取消确认模态框特定样式 */
#cancelModal .card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

#cancelModal .alert-warning {
    background-color: #fff8e6;
    border-color: #ffeeba;
    color: #856404;
    border-radius: 8px;
}

/* 图片样式 */
.img-thumbnail {
    border-radius: 10px;
    padding: 0.5rem;
}

/* 表格样式 */
.table {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
}

/* 分页样式 */
.pagination .page-link {
    color: var(--primary-color);
    border: none;
    margin: 0 3px;
    border-radius: 5px;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 表格响应式优化 */
@media (max-width: 768px) {
    .booking-card {
        transition: all 0.3s ease;
    }
    
    .booking-card:active {
        transform: scale(0.98);
    }
    
    .booking-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .status-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
        border-radius: 50rem;
    }
    
    .btn-action {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .btn-action:active {
        transform: scale(0.95);
    }
}

/* 改进的按钮样式 */
.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.2);
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}

/* 移动设备上的模态框增强 */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 0.75rem;
    }
    
    .modal-footer .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* 确保模态框按钮可点击 */
    .modal-footer form {
        margin: 0;
        padding: 0;
        display: inline-block;
        width: auto;
    }
    
    .modal-footer .btn {
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 修复模态框动画 */
.modal.fade {
    transition: opacity 0.15s linear;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -25px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* 取消预订按钮样式 */
.btn-cancel-booking {
    transition: all 0.2s ease;
}

.btn-cancel-booking:hover {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

.btn-cancel-booking.active {
    background-color: #dc3545 !important;
    color: white !important;
    transform: scale(0.97);
}

/* 卡片点击样式 */
.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

/* 简易对话框样式优化 */
#simpleConfirmDialog {
    z-index: 2000;
}

#simpleConfirmDialog .dialog-container {
    width: 420px;
    max-width: 95%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: none;
    transition: all 0.3s ease;
}

#simpleConfirmDialog .dialog-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #dc3545 100%);
    color: white;
    padding: 1.25rem;
    position: relative;
}

#simpleConfirmDialog .dialog-header h5 {
    font-weight: 600;
    margin-bottom: 0;
    color: white;
}

#simpleConfirmDialog .dialog-header i {
    color: white;
    font-size: 1.2rem;
}

#simpleConfirmDialog .dialog-body {
    padding: 1.5rem;
}

#simpleConfirmDialog .dialog-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

#simpleConfirmDialog .booking-info-card {
    background-color: rgba(0, 0, 0, 0.03);
    border: none;
    border-radius: 12px;
}

#simpleConfirmDialog .booking-info-card .card-body {
    padding: 1rem;
}

#simpleConfirmDialog .info-label {
    color: #6c757d;
    font-size: 0.9rem;
}

#simpleConfirmDialog .info-value {
    font-weight: 600;
    color: #2d3748;
}

#simpleConfirmDialog .alert-warning {
    border: none;
    background-color: rgba(255, 193, 7, 0.15);
    color: #856404;
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

#simpleConfirmDialog .btn {
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#simpleConfirmDialog .btn-secondary {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #f0f0f0;
}

#simpleConfirmDialog .btn-secondary:hover {
    background-color: #e9ecef;
    color: #495057;
    border-color: #e2e6ea;
}

#simpleConfirmDialog .btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #dc3545 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

#simpleConfirmDialog .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.4);
}

/* 对话框动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translate(-50%, 10%);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

#simpleConfirmDialog:not(.d-none) {
    animation: fadeIn 0.3s ease forwards;
}

#simpleConfirmDialog .dialog-container {
    animation: slideUp 0.3s ease forwards;
}

@media (max-width: 576px) {
    #simpleConfirmDialog .dialog-header {
        padding: 1rem;
    }
    
    #simpleConfirmDialog .dialog-body {
        padding: 1.25rem;
    }
    
    #simpleConfirmDialog .dialog-footer {
        padding: 0.75rem 1.25rem;
    }
    
    #simpleConfirmDialog .btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* 预订号样式优化 */
.booking-table .order-number {
    font-family: 'Consolas', monospace;
    font-size: 0.95rem;
    color: #0056b3;
    font-weight: 600;
    border-left: 3px solid #0056b3;
    padding-left: 8px;
    text-shadow: 0 0 1px rgba(0, 86, 179, 0.1);
    transition: all 0.2s ease;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

/* 日文环境下预订号列的特殊处理 */
html[lang="ja"] .booking-table td:nth-child(2) {
    padding-left: 12px;
    padding-right: 5px;
}

html[lang="ja"] .booking-table .order-number {
    max-width: 185px;
    font-size: 0.9rem;
}

/* 日文环境下优化显示 */
html[lang="ja"] .table {
    table-layout: fixed;
    width: 100%;
}

/* 日文环境下预订类型列宽调整 */
html[lang="ja"] .booking-table th:first-child {
    width: 14%;
    min-width: 125px;
}

/* 日文环境下的过滤按钮优化 */
html[lang="ja"] .filter-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

/* 表格行悬停效果 */
.booking-table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}

/* 状态标签样式增强 - 更改进行中状态颜色为紫色 */
.status-badge.bg-purple {
    background-color: #8c43ff !important;
    color: #fff;
}

/* 紫色文本样式 */
.text-purple {
    color: #8c43ff !important;
}

/* 紫色状态标签 */
.bg-purple {
    background-color: #8c43ff !important;
    color: white !important;
}

/* 表格中预订号单元格的样式优化 */
.booking-table td:nth-child(2) {
    padding-left: 15px;
}

/* Chat widget */
.chat-panel{position:fixed;right:20px;bottom:90px;width:320px;background:#fff;border:1px solid #eee;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.1);z-index:1050;display:none}
.chat-header{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid #f1f1f1;font-weight:600}
.chat-close{border:none;background:transparent;font-size:20px;line-height:1}
.chat-body{padding:10px}
.chat-thread{height:280px;overflow:auto;border:1px solid #f5f5f5;border-radius:8px;padding:8px;margin-bottom:8px;background:#fafafa;display:flex;flex-direction:column;gap:6px}
.msg{display:block;max-width:85%;padding:8px 12px;margin:4px 0;border-radius:14px;font-size:14px;line-height:1.4}
.msg .msg-body{white-space:pre-wrap;}
.msg .msg-meta{display:block;color:#999;font-size:12px;margin-top:4px}
.msg-operator{align-self:flex-start;background:#f1f3f5;color:#2c3e50;border-top-left-radius:6px;border-top-right-radius:14px;border-bottom-right-radius:14px;border-bottom-left-radius:14px}
.msg-visitor{align-self:flex-end;background:#e7f0ff;color:#1f3b7a;border-top-right-radius:6px;border-top-left-radius:14px;border-bottom-left-radius:14px;border-bottom-right-radius:14px}
.msg-system{align-self:center;background:#ffffff;color:#6c757d;border:1px dashed #e5e7eb}
.msg-visitor .msg-meta{text-align:right}
.msg-operator .msg-meta{text-align:left}
.msg-visitor{background:#e7f0ff;align-self:flex-end}
.msg-operator,.msg-system{background:#f1f1f1}

/* 预订号样式优化 */
.order-number, .order-number-mobile {
    font-family: 'Consolas', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #0056b3;
    display: inline-block;
}

.order-number-mobile {
    font-size: 0.9rem;
    display: block;
    max-width: fit-content;
}

/* 分页全局样式优化 */
.pagination {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.pagination .page-item {
    margin: 0 3px;
}

.pagination .page-link {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #495057;
    font-weight: 500;
    border: 1px solid #dee2e6;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
    color: #0056b3;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.pagination .page-item.active .page-link {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 86, 179, 0.3);
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    pointer-events: none;
}

.pagination-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 576px) {
    .pagination .page-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 修复返回顶部按钮的焦点样式问题 */
.float-btn:focus,
.float-btn:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    text-decoration: none !important;
}

/* 顶部按钮触摸反馈效果优化 */
.float-btn.back-to-top:active {
    background-color: var(--primary-color);
    color: white;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    outline: none !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
}

/* 表格样式优化 - 支持多语言（包括日文）*/
.booking-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.booking-table th {
    font-weight: 600;
    background-color: #f8f9fa;
    color: #495057;
    padding: 0.75rem;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 优化列宽，适应日文显示 */
.booking-table th:first-child {
    width: 14%;
    min-width: 130px;
}

.booking-table th:nth-child(2) {
    width: 20%;
    min-width: 190px;
}

.booking-table th:nth-child(3) {
    width: 22%;
    min-width: 180px;
}

.booking-table th:nth-child(4) {
    width: 15%;
    min-width: 150px;
}

.booking-table th:nth-child(5) {
    width: 12%;
    min-width: 120px;
}

.booking-table th:last-child {
    width: 17%;
    min-width: 170px;
}

.booking-table td {
    vertical-align: middle;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    min-height: 70px;
    height: auto;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 预订类型单元格处理 */
.booking-table td:nth-child(1) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* 按钮样式调整，确保多语言文字适配 */
.btn-action {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    min-width: 100px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.85rem;
}

/* 日文按钮文字调整 */
html[lang="ja"] .btn-action {
    min-width: 120px;
    font-size: 0.8rem;
    letter-spacing: -0.02em;
}

/* 表格单元格内容溢出处理 */
.booking-table td {
    vertical-align: middle;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    min-height: 70px;
    height: auto;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 日文环境下表格行高调整 */
html[lang="ja"] .booking-table td {
    line-height: 1.6;
}

/* 改进的多语言支持 - 状态标签 */
.status-badge {
    min-width: 100px !important;
    max-width: 100%;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 日文状态标签特殊处理 */
html[lang="ja"] .status-badge {
    min-width: 120px !important;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
}

/* 移动视图优化多语言支持 */
@media (max-width: 768px) {
    .booking-card-header {
        flex-wrap: wrap;
    }
    
    .booking-card-header .status-badge {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .booking-card-header small {
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
    }
    
    .booking-card-body .info-label {
        width: 40%;
    }
    
    .booking-card-body .col-7 {
        width: 60%;
    }

    /* 按钮在移动视图中的优化 */
    .btn-sm {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-size: 0.85rem;
    }
    
    /* 日文环境下移动视图优化 */
    html[lang="ja"] .booking-card-body .info-label {
        width: 45%;
        font-size: 0.9rem;
    }
    
    html[lang="ja"] .booking-card-body .col-7 {
        width: 55%;
    }
    
    html[lang="ja"] .order-number-mobile {
        font-size: 0.85rem;
        max-width: 100%;
    }
}

/* 极小屏幕优化 */
@media (max-width: 360px) {
    html[lang="ja"] .booking-card-body .info-label,
    html[lang="ja"] .booking-card-body .col-7 {
        width: 100%;
    }
    
    html[lang="ja"] .booking-card-body .info-label {
        margin-bottom: 0.2rem;
    }
}

/* 预订号样式 */
.booking-table tr:hover .order-number {
    color: #003d80;
    border-left-color: #003d80;
}

/* 状态标签样式增强 - 更改进行中状态颜色为紫色 */
.status-badge.bg-purple {
    background-color: #8c43ff !important;
    color: #fff;
}

/* 紫色文本样式 */
.text-purple {
    color: #8c43ff !important;
}

/* 紫色状态标签 */
.bg-purple {
    background-color: #8c43ff !important;
    color: white !important;
}

/* 表格中预订号单元格的样式优化 */
.booking-table td:nth-child(2) {
    padding-left: 15px;
}

/* 聊天菜单样式 */
.chat-menu {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  margin: 10px;
}

.menu-header {
  text-align: center;
  margin-bottom: 20px;
}

.menu-header h4 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-weight: 600;
}

.menu-desc {
  color: #6c757d;
  font-size: 0.9rem;
  margin: 0;
}

.menu-items {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.menu-item {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.menu-item:hover {
  border-color: #b57a21;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.menu-item-title {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.menu-item-desc {
  color: #6c757d;
  font-size: 0.85rem;
  line-height: 1.4;
}

.menu-footer {
  border-top: 1px solid #dee2e6;
  padding-top: 15px;
}

.transfer-human {
  background: linear-gradient(135deg, #b57a21, #d4af37);
  color: white;
  border-color: #b57a21;
}

.transfer-human .menu-item-title {
  color: white;
}

.transfer-human:hover {
  background: linear-gradient(135deg, #9d6b1c, #b8941f);
  border-color: #9d6b1c;
}

/* 返回头部箭头样式 */
.back-to-top:hover {
    transform: translateY(-5px);
    background-color: #ff932b;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  }

  .back-to-top .top-line {
    width: 40%;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    margin-bottom: 3px;
    transition: all 0.3s ease;
  }

  .back-to-top:hover .top-line {
    width: 60%;
  }

  .back-to-top i {
    font-size: 1.2rem;
    line-height: 1;
  }

/* 移动端菜单样式 */
@media (max-width: 768px) {
  .chat-menu {
    padding: 15px;
    margin: 5px;
  }
  
  .menu-item {
    padding: 12px;
  }
  
  .menu-item-title {
    font-size: 0.9rem;
  }
  
  .menu-item-desc {
    font-size: 0.8rem;
  }
}