* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(180deg, #f6f8fb 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 24px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 48px;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

h1 {
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 36px;
    text-align: center;
    letter-spacing: -0.02em;
}

h2 {
    color: #2d2d2d;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    background: #fafbfc;
    color: #1a1a1a;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    background: #ffffff;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #0ea5e9;
    color: white;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: #22c55e;
    color: white;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.35);
}

.btn-danger {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.35);
}

.btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: translateY(-2px);
}

.btn-small {
    padding: 10px 18px;
    font-size: 13px;
    border-radius: 10px;
}

.order-info {
    background: #f8fafc;
    padding: 28px;
    border-radius: 18px;
    margin-bottom: 28px;
    border: 1px solid #f1f5f9;
}

.order-info p {
    margin: 12px 0;
    color: #4b5563;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.order-info strong {
    color: #1f2937;
    font-weight: 600;
    min-width: 90px;
}

.logistics-timeline {
    position: relative;
    padding-left: 32px;
}

.logistics-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.timeline-item:nth-child(1) { animation-delay: 0.08s; }
.timeline-item:nth-child(2) { animation-delay: 0.16s; }
.timeline-item:nth-child(3) { animation-delay: 0.24s; }
.timeline-item:nth-child(4) { animation-delay: 0.32s; }
.timeline-item:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -25px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.active .timeline-dot {
    background: #0ea5e9;
    box-shadow: 0 0 0 2px #0ea5e9, 0 0 0 8px rgba(14, 165, 233, 0.12);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px #0ea5e9, 0 0 0 8px rgba(14, 165, 233, 0.12);
    }
    50% {
        box-shadow: 0 0 0 2px #0ea5e9, 0 0 0 16px rgba(14, 165, 233, 0.06);
    }
}

.timeline-content {
    background: white;
}

.timeline-content h4 {
    color: #4b5563;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
}

.timeline-item.active h4 {
    color: #0369a1;
    font-weight: 600;
}

.timeline-content p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.timeline-content .time {
    color: #9ca3af;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 18px 24px;
    border-radius: 14px;
    text-align: center;
    font-weight: 500;
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.table-container {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid #f1f5f9;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

th, td {
    padding: 16px 18px;
    text-align: left;
}

th {
    background: #f8fafc;
    color: #4b5563;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

td {
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-size: 14px;
}

tr:hover {
    background: #fafbfc;
}

tr:last-child td {
    border-bottom: none;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 36px;
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1a1a1a;
}

.close-btn {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 22px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: rotate(90deg);
}

.logistics-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 14px;
    border: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.2s ease-out;
}

.logistics-item:hover {
    border-color: #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.logistics-item-content {
    flex: 1;
}

.logistics-item-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.logistics-item-actions .btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f3f4f6;
}

.header h1 {
    margin: 0;
    text-align: left;
    font-size: 24px;
}

.logout-link {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    font-size: 14px;
}

.logout-link:hover {
    color: #0284c7;
}

.actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: #9ca3af;
}

.empty-state svg {
    width: 88px;
    height: 88px;
    margin-bottom: 24px;
    opacity: 0.35;
}

.empty-state p {
    font-size: 15px;
    color: #6b7280;
}

.quantity-badge {
    display: inline-block;
    background: #0ea5e9;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
}

.tracking-number {
    display: inline-block;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
}
