/* common.css */

:root {
    --sidebar-width: 220px; /* 桌面端宽度 */
    --header-height: 60px;
	--footer-height: 35px;
    --container-padding: 30px;
    --chart-height: 400px;
    --edit-section-height: 320px;
}

footer {
    position: relative;
    z-index: 100;
    height: 35px;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}
/* 新增全局布局样式 */
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* 新增Toast样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px 50px;
    border-radius: 12px;
    z-index: 9999;
    color: white;
    display: none;
    min-width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
	animation: toastFadeIn 0.3s ease;
}

.toast.corner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 加载指示器调整 */
.toast.success { background: #4CAF50; }
.toast.error { background: #f44336; }

@keyframes toastFadeIn {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
    }
}

.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    margin-top: 12px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    transition: width 2s linear;
}

@keyframes toastSlide {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 移除旧提示样式 */
#loadingOverlay { display: none !important; }

/* 确认对话框样式 */
#confirmDialog {
  background: white !important;
  color: #333;
  min-width: 400px;  /* 增大最小宽度 */
  padding: 30px 40px; /* 增加内边距 */
  border-radius: 12px; /* 增大圆角 */
  font-size: 16px; /* 增大字体 */
}

.btn-confirm {
  background: #4CAF50 !important;
  color: white !important;
  padding: 8px 20px !important;
}

.btn-cancel {
  background: #f44336 !important;
  color: white !important;
  padding: 8px 20px !important;
}

.confirm-buttons {
  margin-top: 30px;
  display: flex;
  gap: 20px; /* 增大按钮间距 */
  justify-content: center;
}

.btn-confirm, .btn-cancel {
  padding: 12px 30px !important; /* 增大按钮尺寸 */
  font-size: 15px; /* 按钮文字放大 */
  border-radius: 6px; /* 按钮圆角 */
}

/* 按钮悬停效果增强 */
.btn-confirm:hover {
    background: #45a049 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.btn-cancel:hover {
    background: #da190b !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#confirmDialog {
    animation: dialogSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#confirmMessage {
  line-height: 1.6; /* 增加行高 */
  font-size: 16px; /* 信息文字放大 */
}

@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 60px; /* 移动端宽度 */
        --container-padding: 15px;
        --chart-height: 300px;
        --edit-section-height: 280px;
    }
	
	.sidebar .user-info {
        display: none !important;
    }
    
    .side-nav li a span {
        display: none;
    }
    
    .side-nav li a i {
        margin-right: 0;
        font-size: 1.5rem;
    }

    main {
        margin-left: var(--sidebar-width);
		margin-top: var(--header-height);
        padding: 15px;
		min-width: 1590px;
    }
}