* {
    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: #f5f7fa;
    min-height: 100vh;
    padding: 60px 20px 20px 20px;
    color: #333;
    margin: 0;
}
.container {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* CSP-friendly utility: toggle visibility without inline styles */
.hidden {
    display: none !important;
}

.main-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 30px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 顶部标题与操作按钮布局 */
.header-bar {
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-bottom-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-top: 10px;
}

.header-left, .header-right {
    flex-basis: 50px; /* Fixed width for icons */
    display: flex;
    align-items: center;
}
.header-left {
    justify-content: flex-start;
}
.header-center {
    flex-grow: 1;
    text-align: center;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between elements in header-right */
    justify-content: flex-end;
}

.simple-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.simple-header .main-title {
    margin: 0;
    font-size: 1.8rem;
}

.action-btn-outline {
    background: transparent;
    border: 1px solid white;
    color: white !important;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.action-btn-outline:hover {
    background: rgba(255,255,255,0.1);
}
.header-icon {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}
.main-title {
    font-size: 1.8rem;
    color: white;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.action-btn {
    padding: 10px 14px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.action-btn.secondary {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}
.action-btn:hover { opacity: 0.92; }
.action-btn:active { opacity: 0.85; }

/* 登录/注册页样式 */
.auth-wrapper {
    padding: 30px 20px;
}
.auth-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 0 20px;
    position: relative;
}

/* 让登录页头部的“返回首页”按钮在卡片内靠右侧对齐 */
.auth-header .action-btn {
    position: absolute;
    right: 20px;
}
.auth-title {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 700;
}
.auth-tabs {
    display: flex;
    gap: 8px;
    margin: 10px 0 20px 0;
}
.tab-btn {
    padding: 8px 12px;
    background: #e9ecef;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}
.tab-btn.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}
.auth-form {
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid #4facfe;
}
.auth-form h3 { margin-bottom: 10px; }
.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.form-row label {
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 600;
}
.form-row input {
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    flex-grow: 1; /* Allow input to take available space */
    padding-right: 30px; /* Make space for the clear button */
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%; /* Ensure it takes full width */
}

.clear-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #ccc;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.2s ease-in-out;
    z-index: 2; /* Ensure it's above the input */
}

.clear-button.visible {
    opacity: 1;
}

/* Adjust input padding when clear button is visible */
.input-container input:not(:placeholder-shown) + .clear-button {
    opacity: 1;
}

/* Adjust for mobile */
@media (max-width: 480px) {
    .form-row input {
        padding: 10px 10px; /* Adjust padding for smaller screens */
        padding-right: 30px; /* Keep space for clear button */
    }

    .clear-button {
        right: 8px; /* Adjust position for smaller screens */
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}
/* 注册密码不匹配提示与输入错误样式 */
.form-row input.invalid {
    border-color: #dc3545;
}
.error-hint {
    color: #dc3545;
    font-size: 0.85rem;
}
.action-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}
/* 使下拉选择与输入框外观一致 */
.form-row select {
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
}
/* 创建运单占位块样式（从 create.html 移出以满足 CSP） */
.placeholder { padding: 24px; background: #f8f9fa; border-radius: 12px; }
.placeholder h3 { margin: 0 0 12px; }
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    justify-content: space-between;
}
.text-link {
    color: #4facfe;
    cursor: pointer;
}

@media (max-width: 480px) {
    .auth-title { font-size: 1.5rem; }
    .form-row input { font-size: 0.9rem; }
}

/* 响应式表单栅格：使多个字段同一行显示 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px 16px;
    margin-bottom: 12px;
}
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item-row {
    flex-direction: row;
    align-items: center;
}
.form-item label { font-size: 0.95rem; color: #2c3e50; font-weight: 600; white-space: nowrap; }
.form-item input,
.form-item select,
.form-item textarea { padding: 10px 12px; border: 1px solid #e9ecef; border-radius: 8px; font-size: 0.95rem; background: #fff; width: 100%; }

.address-pasteboard .form-item-label {
    flex-basis: 100px; /* Adjust as needed */
}

.address-pasteboard .input-container {
    flex-grow: 1;
}

.greet-text {
    align-self: center;
    font-size: 0.95rem;
    color: #2c3e50;
    padding: 8px 10px;
}

/* 跨列工具 */
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-all { grid-column: 1 / -1; }

/* 轻量表格样式（申报商品） */
table { width: 100%; border-collapse: collapse; background: #fff; }
thead th { text-align: left; font-weight: 600; color: #2c3e50; padding: 8px; background: #eef3f8; }
tbody td { padding: 8px; border-top: 1px solid #eef3f8; }
tbody td input, tbody td select { width: 100%; }

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.search-section {
    padding: 40px;
    text-align: center;
}

.search-section h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 600;
}

.input-group {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column; /* Stack items by default */
    align-items: center;
    gap: 15px;
}

.search-inputs-wrapper {
    display: flex;
    flex-direction: column; /* Stack inputs by default */
    flex-grow: 1;
    gap: 10px;
    width: 100%; /* Take full width */
}

/* Adjust for larger screens */
@media (min-width: 768px) {
    .search-inputs-wrapper {
        flex-direction: row; /* Side-by-side for larger screens */
    }
    .form-grid.grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-grid.grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .form-grid.grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Adjust for mobile */
@media (max-width: 480px) {
    .search-section .input-container input {
        padding: 12px 14px !important;
        padding-right: 30px !important; /* Keep space for clear button */
    }

    .search-section .clear-button {
        right: 8px !important; /* Adjust position for smaller screens */
        width: 18px !important;
        height: 18px !important;
        font-size: 0.7rem !important;
    }

    .input-group {
        flex-direction: column; /* Stack items on mobile */
        gap: 10px;
    }

    .input-group #searchBtn {
        width: 100%; /* Full width button on mobile */
        margin-top: 10px; /* Space above button */
    }
}

.search-section .input-container input {
    flex-grow: 1;
    padding: 16px 20px;
    border: 1px solid #e9ecef; /* Added border */
    border-radius: 8px; /* Added border-radius */
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff; /* Added background */
    padding-right: 40px; /* Increased padding for clear button */
}

.search-section .input-container input:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
    outline: none;
}

.search-section .clear-button {
    position: absolute;
    right: 10px; /* Adjust position */
    top: 50%;
    transform: translateY(-50%);
    background: #ccc;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px; /* Slightly larger */
    height: 24px; /* Slightly larger */
    font-size: 0.9rem; /* Adjusted font size */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 2;
}

.search-section .clear-button.visible {
    opacity: 1;
}

/* Adjust input padding when clear button is visible */
.search-section .input-container input:not(:placeholder-shown) + .clear-button {
    opacity: 1;
}

/* Style for the search button */
.input-group #searchBtn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 100px; /* Ensure a decent width */
}

.input-group #searchBtn:hover {
    opacity: 0.9;
}

.input-group #searchBtn:active {
    opacity: 0.8;
}

.result-section {
    padding: 40px;
    background: white;
    text-align: center;
}

.order-info {
    margin-bottom: 40px;
}

.order-info h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.order-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    gap: 16px;
}

#trackingGrid {
    margin: auto;
}

.timeline-content {
    position: relative;
    text-align: center;
}

.order-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 300px;
}

.status-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    justify-content: flex-end;
}

.order-label, .status-label {
    font-weight: 600;
    color: #2c3e50;
}

.order-value {
    font-weight: 600;
    color: #2c3e50;
}

.status-value {
    font-weight: 600;
    color: #2c3e50;
}

.status-value.delivered {
    color: #27ae60;
}

.express-info {
    margin-bottom: 10px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #4facfe;
}

.express-item {
    margin: 5px 0;
}

.logistics-company-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: green;
}

.order-details {
    font-size: 1rem;
    color: #34495e;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.details, .tracking {
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4facfe;
}

.timeline h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.timeline-content {
    position: relative;
}

.timeline-item {
    display: flex;
    margin-bottom: 24px;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 24px;
    width: 2px;
    height: calc(100% + 24px);
    background: #e9ecef;
}

.timeline-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e9ecef;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timeline-dot.active {
    background: orange;
    box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.2);
}

.timestamp-text {
    font-size: 0.85rem;
    color: #2196f3; /* Blue color */
    font-weight: 600;
    margin-right: 5px;
}

.timeline-content-item {
    flex: 1;
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    text-align: left;
}

.timeline-time {
    color: #4facfe;
    font-weight: bold;
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.timeline-text {
    color: #555;
    line-height: 1.6;
    font-weight: normal;
}

.latest-badge {
    display: inline-block;
    background: #27ae60;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin-right: 8px;
    vertical-align: middle;
    line-height: 1;
}

.time-ago {
    background: #007bff;
    color: white;
    font-size: 0.8rem;
    margin-left: 8px;
    margin-right: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.error-section {
    text-align: center;
    padding: 60px 40px;
    background: white;
    color: #e74c3c;
}

.error-section p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.error-section p:first-child {
    font-weight: 600;
    font-size: 1.3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container {
        margin: 0;
        border-radius: 12px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .header-bar {
        padding: 8px 12px 0 12px;
    }
    .actions {
        width: 100%;
        justify-content: flex-end;
    }

    .header-row {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 30px 20px;
    }
    
    #orderNumber {
        padding: 14px 90px 14px 16px;
        font-size: 1rem;
    }
    
    #searchBtn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .result-section {
        padding: 30px 20px;
    }
    
    .timeline-item {
        margin-bottom: 20px;
    }
    
    .timeline-content-item {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 8px;
    }
    .main-title {
        font-size: 1.8rem;
    }
    .actions {
        gap: 8px;
    }
    .action-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .card-actions {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .header {
        padding: 25px 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .search-section {
        padding: 20px 15px;
    }
    
    .input-group {
        max-width: 100%;
    }
    
    .input-wrapper {
        flex-direction: row;
        gap: 8px;
    }
    
    .input-wrapper input {
            flex: 1;
            padding: 12px 14px !important;
            border: none !important;
            border-bottom: 2px solid #e9ecef !important;
            border-radius: 0 !important;
            background: transparent !important;
        }
        
        .input-wrapper input:focus {
            border-bottom-color: #4facfe !important;
            box-shadow: none !important;
        }
    
    .input-wrapper button {
        position: static !important;
        transform: none !important;
        width: 72px !important;
        min-width: 72px !important;
        padding: 12px 8px !important;
        font-size: 0.85rem !important;
    }
    
    #orderNumber {
        font-size: 1rem;
    }
    
    .result-section {
        padding: 20px 15px;
    }
    
    .order-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .order-section, .status-section {
        width: 100%;
        min-width: auto;
        justify-content: flex-start;
    }
    
    .status-section {
        justify-content: flex-start;
    }
    
    .timeline-content-item {
        padding: 10px 14px;
    }
}





#excelImportPanel {
    border-left: none;
}

.import-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.import-group-box {
    display: flex;
    align-items: center;
    border: 1px solid #fff;
    padding: 5px 10px;
    border-radius: 8px;
    gap: 10px;
}

.import-group-label {
    font-size: 0.9rem;
    color: white;
    font-weight: 500;
}

.action-btn.secondary-action-btn {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #333;
}

.tracking-number-list {
    display: block;
    list-style: none;
    padding: 0;
    margin: 0 auto; /* Center the block element */
    max-width: 600px; /* Limit width for better readability */
}

.order-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 15px;
    text-align: left; /* Override parent text-align: center */
    width: 100%; /* Make each card take full width */
}

.date-badge {
    width: 60px;
    flex-shrink: 0;
    background-color: #2196f3; /* Dark blue */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.date-badge .month {
    font-size: 0.8rem;
    font-weight: 500;
    color: #bbdefb; /* Lighter blue */
    text-transform: uppercase;
}

.date-badge .day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.card-content {
    flex-grow: 1;
    padding: 15px;
}

.order-number-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-number-row strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-actions .action-btn.small {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 5px;
    background: none;
    border: 1px solid #2196f3; /* Blue border */
    color: #2196f3;
    box-shadow: none;
    white-space: nowrap;
}

.card-actions .action-btn.small:hover {
    background-color: #e3f2fd; /* Light blue hover */
}

.order-details-row {
    display: flex;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.detail-label {
    color: #9e9e9e; /* Faint gray */
    margin-right: 5px;
    flex-shrink: 0;
}

.detail-value {
    color: #333; /* Black text */
}

.product-list-card {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions-container {
    position: relative;
}

.suggestions-list {
    position: absolute;
    width: 100%;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 99;
    background-color: white;
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
}
.suggestions-list {
    position: absolute;
    width: 100%;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 99;
    background-color: white;
    list-style: none;
    padding: 0;
    margin: 0;
}
.suggestion-item {
    padding: 10px;
    cursor: pointer;
}
.suggestion-item:hover {
    background-color: #f0f0f0;
}

.pagination-controls {
    display: flex; /* Use flexbox for alignment */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    margin-top: 20px; /* Space above */
    margin-bottom: 20px; /* Space below */
    gap: 10px; /* Space between elements */
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.pagination-controls button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: #87CEFA !important; /* blue background to make it obvious */
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.pagination-controls button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-controls button:not(:disabled):hover {
    background-color: #e9ecef;
}

.pagination-controls span {
    font-size: 0.9rem;
    color: #555;
    margin: 0 5px;
}

/* Loading Indicator Styles */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-align: center;
    color: white;
}

#loading .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (min-width: 768px) {
    .form-grid.grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-grid.grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .form-grid.grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 10px;
  position: relative;
}

.modal-close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
}

.modal-close:hover,
.modal-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#addressList .address-item {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

#addressList .address-item:hover {
  background-color: #f0f0f0;
}