/* 增强样式文件 - 修复界面错位和布局问题 */

/* 修复模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 69, 19, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 245, 235, 0.95) 100%);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 
        0 20px 40px rgba(139, 69, 19, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    border: 1px solid rgba(205, 133, 63, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.close {
    color: #CD853F;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: #8B4513;
    transform: scale(1.1);
}

/* 修复表单布局 */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* 修复按钮布局 */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(205, 133, 63, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, #DEB887 0%, #D2691E 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #D2691E 0%, #DEB887 100%);
    transform: translateY(-2px);
}

/* 修复表格响应式问题 */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.1);
}

.data-table {
    min-width: 100%;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    min-width: 120px;
    text-align: left;
    vertical-align: middle;
}

.data-table .action-buttons {
    min-width: 150px;
}

/* 修复侧边栏在小屏幕上的问题 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
        width: 100%;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        padding: 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 修复消息提示样式 */
.message {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 2000;
    min-width: 250px;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

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

/* 修复加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 200px;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(205, 133, 63, 0.3);
    border-top: 2px solid #CD853F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 修复筛选器布局 */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filters .form-control {
    min-width: 150px;
    flex: 0 0 auto;
}

.filters .btn {
    flex: 0 0 auto;
}

/* 修复预约状态标签 */
.appointment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* 状态样式已移至 elderly-friendly.css 统一管理 */

/* 门店管理现代化样式 */
.store-search-box {
    background: linear-gradient(135deg, rgba(250, 247, 242, 0.8) 0%, rgba(245, 241, 234, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(210, 105, 30, 0.15);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(210, 105, 30, 0.1);
    position: relative;
    overflow: hidden;
}

.store-search-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D2691E 0%, #7CB342 50%, #FF8A65 100%);
}

.store-search-box .search-input-group {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.store-search-box .search-label {
    font-weight: 600;
    color: #5D4E37;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
    display: block;
}

.store-search-box input {
    flex: 1;
    min-width: 300px;
}

.store-search-box .btn {
    min-width: 120px;
}

/* 现代化门店卡片布局 - 居中显示，一排三个 */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1200px) {
    .store-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .store-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
        max-width: 100%;
    }
    
    .store-search-box .search-input-group {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .store-search-box input {
        min-width: auto;
        width: 100%;
    }
    
    .store-search-box .btn {
        min-width: auto;
        width: 100%;
    }
}

.store-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(210, 105, 30, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 
        0 8px 32px rgba(210, 105, 30, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
}

.store-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(210, 105, 30, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: rgba(210, 105, 30, 0.3);
}

.store-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #D2691E 0%, #9CCC65 50%, #FF8A65 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.store-card:hover::before {
    transform: scaleX(1);
}

.store-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(156, 204, 101, 0.03) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.store-card:hover::after {
    opacity: 1;
}

.store-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(210, 105, 30, 0.1);
}

.store-header h3 {
    background: linear-gradient(135deg, #D2691E 0%, #7CB342 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

/* 门店名称样式 */
.store-name {
    background: linear-gradient(135deg, #D2691E 0%, #7CB342 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

/* 门店状态徽章现代化 */
.store-status {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.store-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    pointer-events: none;
}

.store-status.active,
.store-status-badge.active {
    background: linear-gradient(135deg, #7CB342, #9CCC65);
    color: white;
}

.store-status.maintenance,
.store-status-badge.maintenance {
    background: linear-gradient(135deg, #FF8A65, #FF7043);
    color: white;
}

.store-status.closed,
.store-status-badge.closed {
    background: linear-gradient(135deg, #FF7043, #D2691E);
    color: white;
}

.store-info {
    flex: 1;
    margin-bottom: 1.5rem;
}

.store-info p {
    margin: 0.75rem 0;
    color: #5D4E37;
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(210, 105, 30, 0.05);
    transition: all 0.3s ease;
}

.store-info p:hover {
    background: linear-gradient(90deg, rgba(210, 105, 30, 0.03) 0%, transparent 100%);
    padding-left: 0.5rem;
    border-radius: 8px;
}

.store-info strong {
    color: #D2691E;
    font-weight: 600;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.store-info p::before {
    content: '•';
    color: #9CCC65;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 0.25rem;
    transition: transform 0.3s ease;
}

.store-info p:hover::before {
    transform: scale(1.2);
    color: #7CB342;
}

/* 门店信息项现代化 */
.info-item {
    margin: 0.75rem 0;
    color: #5D4E37;
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(210, 105, 30, 0.05);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: linear-gradient(90deg, rgba(210, 105, 30, 0.03) 0%, transparent 100%);
    padding-left: 0.5rem;
    border-radius: 8px;
}

.info-label {
    color: #D2691E;
    font-weight: 600;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.info-value {
    flex: 1;
    color: #2C2C2C;
    font-weight: 500;
}

.store-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(210, 105, 30, 0.1);
}

.store-actions .btn {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.store-actions .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.store-actions .btn:hover::before {
    width: 300px;
    height: 300px;
}

.store-actions .btn-primary {
    background: linear-gradient(135deg, #D2691E 0%, #F4A460 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(210, 105, 30, 0.3);
}

.store-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(210, 105, 30, 0.4);
}

.store-actions .btn-secondary,
.store-actions .btn-info {
    background: linear-gradient(135deg, #29B6F6 0%, #42A5F5 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(41, 182, 246, 0.3);
}

.store-actions .btn-secondary:hover,
.store-actions .btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(41, 182, 246, 0.4);
}

.store-actions .btn-warning {
    background: linear-gradient(135deg, #FFA726 0%, #FFB74D 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

.store-actions .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 167, 38, 0.4);
}

.store-actions .btn-delete,
.store-actions .btn-danger {
    background: linear-gradient(135deg, #EF5350 0%, #E57373 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 83, 80, 0.3);
}

.store-actions .btn-delete:hover,
.store-actions .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 83, 80, 0.4);
}

/* 三列布局时的特殊调整 */
@media (min-width: 1024px) {
    .store-actions {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .store-actions .btn {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(250, 247, 242, 0.8) 0%, rgba(245, 241, 234, 0.9) 100%);
    border-radius: 20px;
    border: 1px solid rgba(210, 105, 30, 0.15);
    box-shadow: 0 8px 32px rgba(210, 105, 30, 0.1);
    backdrop-filter: blur(20px);
    margin: 2rem 0;
}

.empty-state h3 {
    background: linear-gradient(135deg, #D2691E 0%, #7CB342 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #8B7355;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* 防止内容溢出 */
* {
    box-sizing: border-box;
}

.container,
.admin-content,
.content-section {
    max-width: 100%;
    overflow-x: hidden;
} 