* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 确保移动端有正确的视口设置 */
/* <meta name="viewport" content="width=device-width, initial-scale=1.0"> */

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 500px;
    margin: 80px auto 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 响应式容器调整 */
@media (max-width: 768px) {
    .container {
        margin: 80px 20px 20px;
        padding: 15px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        margin: 80px 10px 10px;
        padding: 12px;
        border-radius: 6px;
    }
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

/* 响应式标题 */
@media (max-width: 480px) {
    h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

button {
    width: 100%;
    padding: 14px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

/* 搜索表单样式 */
form[method="GET"] .form-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 20px;
}

form[method="GET"] .form-group input {
    flex: 1;
    min-width: 200px;
}

/* 发货记录搜索表单移动端优化 */
.dashboard form[method="GET"] .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard form[method="GET"] .form-row .form-group {
    flex: 1;
    min-width: 250px;
    margin-bottom: 0;
}

.dashboard form[method="GET"] .form-row .form-group:last-child {
    min-width: 100%;
    display: flex;
    gap: 10px;
}

.dashboard form[method="GET"] .form-row .form-group:last-child .btn {
    flex: 1;
    min-width: 120px;
}

/* 表单操作区域样式 */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* 响应式表单调整 */
@media (max-width: 480px) {
    .form-group {
        margin-bottom: 15px;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="tel"],
    input[type="email"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        padding: 12px;
        font-size: 15px;
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    
    button {
        padding: 14px;
        font-size: 16px;
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    
    /* 增强移动端触摸区域 */
    .dashboard input,
    .dashboard select,
    .dashboard button,
    .dashboard .btn {
        min-height: 44px;
        font-size: 15px;
    }
    
    /* 日期选择器优化 */
    input[type="date"] {
        cursor: pointer;
        padding-right: 10px;
    }
    
    /* 增强按钮触摸反馈 */
    .btn {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    /* 搜索表单移动端调整 */
    form[method="GET"] .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    form[method="GET"] .form-group input {
        min-width: auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        min-width: auto;
    }
}

/* 底部弹出提示样式 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background-color: #f44336;
}

.toast.success {
    background-color: #4CAF50;
}

/* 旧提示样式 - 用于兼容旧代码 */
.error, .success {
    display: none;
}

.login-link,
.register-link {
    text-align: center;
    margin-top: 20px;
}

a {
    color: #4CAF50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 导航栏样式 */
.navbar {
    background-color: #333;
    color: #fff;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    box-shadow: none;
    max-width: 1200px;
}

.navbar-brand {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: #4CAF50;
}

.navbar-links {
    list-style: none;
    display: flex;
    gap: 15px;
}

.navbar-links li {
    margin: 0;
}

.navbar-links a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 90px;
    text-align: center;
    font-weight: 500;
    border: 1px solid transparent;
}

.navbar-links a:hover, .navbar-links a.active {
    color: #fff;
    background-color: #4CAF50;
    border-color: #4CAF50;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 导航栏切换按钮 */
.navbar-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 响应式导航栏 */
@media (max-width: 992px) {
    .navbar .container {
        padding: 0 15px;
    }
    
    .navbar-links {
        gap: 10px;
    }
    
    .navbar-links a {
        padding: 8px 12px;
        min-width: 80px;
        font-size: 14px;
    }
}

/* 隐藏式导航栏 */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }
    
    .navbar-brand {
        font-size: 20px;
    }
    
    .navbar-toggle {
        display: block;
    }
    
    .navbar-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background-color: #333;
        flex-direction: column;
        gap: 0;
        width: 200px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        border-radius: 0 0 4px 4px;
        overflow: hidden;
        z-index: 1001;
    }
    
    .navbar-links.active {
        display: flex;
    }
    
    .navbar-links li {
        width: 100%;
    }
    
    .navbar-links a {
        display: block;
        padding: 12px 20px;
        font-size: 14px;
        text-align: left;
        min-width: auto;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-links a:last-child {
        border-bottom: none;
    }
    
    .navbar-links a:hover, .navbar-links a.active {
        background-color: #4CAF50;
    }
}

/* 桌面端也使用隐藏式导航栏 */
.navbar-desktop-hide .navbar-toggle {
    display: block;
}

.navbar-desktop-hide .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #333;
    flex-direction: column;
    gap: 0;
    width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    z-index: 1001;
}

.navbar-desktop-hide .navbar-links.active {
    display: flex;
}

.navbar-desktop-hide .navbar-links li {
    width: 100%;
}

.navbar-desktop-hide .navbar-links a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    text-align: left;
    min-width: auto;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-desktop-hide .navbar-links a:last-child {
    border-bottom: none;
}

.navbar-desktop-hide .navbar-links a:hover, .navbar-desktop-hide .navbar-links a.active {
    background-color: #4CAF50;
}

/* 仪表盘样式 */
.dashboard {
    max-width: 1200px;
    margin: 80px auto 30px;
    padding: 25px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.dashboard h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 26px;
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard h3 {
    margin-bottom: 20px;
    color: #555;
    font-size: 20px;
    font-weight: 600;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 8px 16px rgba(240, 147, 251, 0.3);
}

.stat-card:nth-child(2):hover {
    box-shadow: 0 12px 24px rgba(240, 147, 251, 0.4);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 8px 16px rgba(79, 172, 254, 0.3);
}

.stat-card:nth-child(3):hover {
    box-shadow: 0 12px 24px rgba(79, 172, 254, 0.4);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 8px 16px rgba(67, 233, 123, 0.3);
}

.stat-card:nth-child(4):hover {
    box-shadow: 0 12px 24px rgba(67, 233, 123, 0.4);
}

.stat-card h3 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 42px;
    font-weight: bold;
    color: white;
    margin: 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 响应式仪表盘 */
@media (max-width: 992px) {
    .dashboard {
        max-width: 95%;
        padding: 20px;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .stat-value {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .dashboard {
        margin: 80px auto 30px;
        padding: 15px;
    }
    
    .dashboard h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .dashboard h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-value {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .dashboard {
        margin: 80px auto 30px;
        padding: 12px;
    }
    
    .dashboard h2 {
        font-size: 20px;
    }
    
    .dashboard h3 {
        font-size: 16px;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 18px 10px;
    }
    
    .stat-card h3 {
        font-size: 14px;
    }
    
    .stat-value {
        font-size: 28px;
    }
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    background-color: white;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

/* 发货记录表格移动端优化 */
.dashboard .table-container {
    margin-bottom: 20px;
}

.dashboard table {
    font-size: 13px;
}

.dashboard table th,
.dashboard table td {
    padding: 12px 8px;
    white-space: nowrap;
}

table th,
table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    word-break: break-word;
    vertical-align: middle;
    font-size: 14px;
}

table th {
    background-color: #4CAF50;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 100;
}

table tr {
    transition: all 0.3s ease;
    background-color: white;
}

table tr:hover {
    background-color: rgba(76, 175, 80, 0.05);
    transform: translateX(5px);
}

table tr:nth-child(even) {
    background-color: #fafafa;
}

table tr:last-child td {
    border-bottom: none;
}

/* 表格操作列样式 */
table td:last-child {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 5px;
}

table td:last-child .btn {
    flex: 1;
    min-width: 50px;
    padding: 6px 8px;
    font-size: 11px;
    white-space: nowrap;
}

/* 移动端表格优化 */
@media (max-width: 992px) {
    .table-container {
        border-radius: 8px;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    table th,
    table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    table td:last-child .btn {
        min-width: 60px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .table-container {
        border-radius: 6px;
        margin-bottom: 20px;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 500px;
    }
    
    table th,
    table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    table th {
        font-size: 11px;
    }
    
    table td:last-child {
        gap: 3px;
    }
    
    table td:last-child .btn {
        min-width: 55px;
        padding: 5px 6px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .table-container {
        border-radius: 4px;
        margin-bottom: 15px;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #eee;
    }
    
    table {
        min-width: 400px;
    }
    
    table th,
    table td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    table th {
        padding: 10px 6px;
        font-weight: 600;
    }
    
    table td:last-child {
        gap: 2px;
        flex-direction: column;
    }
    
    table td:last-child .btn {
        min-width: auto;
        padding: 6px;
        font-size: 10px;
        margin: 1px 0;
    }
}

/* 按钮组样式 */
.btn-group {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    margin: 0;
    background-color: #4CAF50;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 主要按钮 */
.btn-primary {
    background-color: #2196F3;
}

.btn-primary:hover {
    background-color: #1976D2;
}

/* 危险按钮 */
.btn-danger {
    background-color: #f44336;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

/* 次要按钮 */
.btn-secondary {
    background-color: #9e9e9e;
}

.btn-secondary:hover {
    background-color: #757575;
}

/* 警告按钮 */
.btn-warning {
    background-color: #ff9800;
}

.btn-warning:hover {
    background-color: #f57c00;
}

/* 成功按钮 */
.btn-success {
    background-color: #4CAF50;
}

.btn-success:hover {
    background-color: #45a049;
}

/* 移动端按钮优化 */
@media (max-width: 480px) {
    .btn-group {
        justify-content: center;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 15px;
        min-width: 140px;
        margin: 5px;
    }
}

/* 表单样式 */
.form-container {
    max-width: 600px;
    margin: 80px auto 30px;
    padding: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* 分页样式 */
.pagination {
    text-align: center;
    margin-top: 20px;
    overflow-x: auto;
    padding: 10px 0;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    background-color: #f2f2f2;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #ddd;
    transform: translateY(-1px);
}

.pagination .active {
    background-color: #4CAF50;
    color: white;
}

/* 移动端分页优化 */
@media (max-width: 768px) {
    .pagination {
        margin-top: 15px;
        padding: 8px 0;
    }
    
    .pagination a {
        padding: 10px 14px;
        margin: 0 3px;
        font-size: 14px;
        min-width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .pagination a:first-child,
    .pagination a:last-child {
        min-width: 80px;
    }
}

/* 首页样式 */
header.header {
    text-align: center;
    padding: 60px 20px;
    background-color: #4CAF50;
    color: white;
    margin-bottom: 40px;
}

header.header h1 {
    margin-bottom: 10px;
    color: white;
}

nav.nav {
    text-align: center;
    margin-bottom: 50px;
}

nav.nav .btn {
    margin: 0 10px;
    padding: 12px 24px;
    font-size: 16px;
}

section.features {
    margin-bottom: 60px;
}

section.features h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.feature-item h3 {
    margin-bottom: 15px;
    color: #333;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

section.about {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 40px;
}

section.about h2 {
    margin-bottom: 20px;
    color: #333;
}

section.about p {
    color: #666;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

footer.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    border-top: 1px solid #eee;
}

/* 首页容器样式 */
body > .container {
    max-width: 1200px;
    margin: 80px auto 30px;
    padding: 0 20px;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 0;
}