/* 公共样式文件 - common.css */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体大小和背景 */
html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 设置移动端适配 */
@media only screen and (min-width: 375px) {
    html {
        font-size: 17px;
    }
}

@media only screen and (min-width: 414px) {
    html {
        font-size: 18px;
    }
}

/* 主容器 */
.warehouse-inside {
    max-width: 375px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* 设置页头样式 */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    padding-top: 20px;
    position: relative;
}

.header h1 {
    color: white;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    flex: 1;
    text-align: center;
}

/* Logo样式 */
.logo-button {
    position: absolute;
    left: 0;
    z-index: 10;
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.logo-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* 卡片容器 */
.card-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

/* 功能卡片样式 */
.function-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.function-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.function-card:active {
    transform: translateY(0);
}

.card-icon {
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    font-size: 28px;
    font-weight: 500;
}

/* 图标颜色样式 */
.icon-orange { 
    color: #fa8c16; 
    background: linear-gradient(135deg, #fff7e6 0%, #fff2d3 100%);
}
.icon-blue { 
    color: #1890ff; 
    background: linear-gradient(135deg, #e6f7ff 0%, #d3f1ff 100%);
}
.icon-green { 
    color: #52c41a; 
    background: linear-gradient(135deg, #f6ffed 0%, #edf9d7 100%);
}
.icon-purple { 
    color: #722ed1; 
    background: linear-gradient(135deg, #f9f0ff 0%, #f4e8ff 100%);
}
.icon-red { 
    color: #f5222d; 
    background: linear-gradient(135deg, #fff2f0 0%, #ffebe6 100%);
}
.icon-cyan { 
    color: #13c2c2; 
    background: linear-gradient(135deg, #e6fffb 0%, #d3f5f0 100%);
}
.icon-gold { 
    color: #faad14; 
    background: linear-gradient(135deg, #fffbe6 0%, #fff7d3 100%);
}
.icon-lime { 
    color: #a0d911; 
    background: linear-gradient(135deg, #fcffe6 0%, #f9ffd3 100%);
}
.icon-magenta { 
    color: #eb2f96; 
    background: linear-gradient(135deg, #fff0f6 0%, #ffe6ed 100%);
}
.icon-volcano { 
    color: #fa541c; 
    background: linear-gradient(135deg, #fff2e8 0%, #ffe7d1 100%);
}
.icon-geekblue { 
    color: #2f54eb; 
    background: linear-gradient(135deg, #f0f5ff 0%, #e6edff 100%);
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
}

/* 底部导航样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 375px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 12px;
    min-width: 60px;
}

.nav-item:hover {
    color: #1890ff;
    background: rgba(24, 144, 255, 0.1);
}

.nav-item.active {
    color: #1890ff;
    background: rgba(24, 144, 255, 0.15);
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 12px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 320px) {
    .warehouse-inside {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .function-card {
        padding: 20px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 通用按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.btn-primary {
    background: #1890ff;
    color: white;
}

.btn-primary:hover {
    background: #40a9ff;
    transform: translateY(-1px);
}

/* 卡片操作按钮样式 */
.card-action {
    flex-shrink: 0;
}

.action-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    border: none;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

/* 已填写状态样式 */
.action-btn.current {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.action-btn.current:hover {
    transform: none;
    box-shadow: none;
}

.action-btn.current::before {
    display: none;
}

/* 响应式优化 */
@media (max-width: 480px) {
    .action-btn {
        padding: 6px 14px;
        font-size: 13px;
        min-width: 70px;
    }
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e6e6e6;
}

/* 通用表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 通用消息提示样式 */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.message-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.message-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #f5222d;
}

.message-warning {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #faad14;
}

.message-info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}