:root {
    --primary-color: #1677FF;
    --success-color: #00B578;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-placeholder: #999999;
    --border-color: #EEEEEE;
    --bg-color: #F5F7FA;
    --white: #FFFFFF;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

#app {
    max-width: 480px; /* 移动端宽度限制 */
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 80px; /* 为底部固定按钮预留空间 */
}

/* 页面头部 */
.page-header {
    background-color: var(--white);
    padding: 20px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hospital-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.page-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 通用卡片 */
.card {
    background: var(--white);
    margin: 16px;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    position: relative;
}

.info-item label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.info-item span {
    color: var(--text-secondary);
    font-size: 14px;
}

.status-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 在院状态 - 绿色 */
.status-badge.status-in-hospital {
    color: var(--success-color);
    background: rgba(0, 181, 120, 0.1);
}

/* 预出院状态 - 橙色 */
.status-badge.status-pre-discharge {
    color: #FF8F1F;
    background: rgba(255, 143, 31, 0.1);
}

/* 出院状态 - 灰色 */
.status-badge.status-discharged {
    color: #999999;
    background: rgba(153, 153, 153, 0.1);
}


/* 表单区域 */
.form-group {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.form-group:last-child {
    border-bottom: none;
}

.form-label {
    width: 70px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.form-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-primary);
    background: transparent;
    padding: 0;
    width: 100%;
}

.form-input::placeholder {
    color: var(--text-placeholder);
}

.form-value {
    flex: 1;
    font-size: 15px;
    color: var(--text-primary);
}

/* 快递信息区域 */
.express-section {
    margin-top: 10px;
}

.express-label {
    font-size: 14px;
    color: var(--text-secondary); /* 稍淡一点 */
    margin-bottom: 8px;
    font-weight: 500;
}

.express-no-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    background: #FAFAFA;
    padding: 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.copy-btn {
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 8px;
}

/* 底部按钮 */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    max-width: 480px;
    margin: 0 auto;
    z-index: 10;
}

.submit-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 22px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background-color: var(--bg-color); /* 初始禁用状态 */
    color: var(--text-placeholder);
}

.submit-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(22, 119, 255, 0.3);
}

.submit-btn.disabled {
    background-color: #CCCCCC;
    color: #FFFFFF;
    cursor: not-allowed;
}


/* 地址选择器弹窗 */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.picker-container {
    background: var(--white);
    border-radius: 16px 16px 0 0;
    height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.picker-title {
    font-weight: 600;
    font-size: 16px;
}

.close-icon {
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.picker-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.picker-tab {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    position: relative;
    cursor: pointer;
}

/* 在每个 tab 右侧添加箭头分隔符,最后一个除外 */
.picker-tab:not(:last-child)::before {
    content: '>';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #CCCCCC;
    font-size: 14px;
    font-weight: normal;
}

.picker-tab.active {
    color: var(--primary-color);
    font-weight: 500;
}

.picker-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--primary-color);
}

.picker-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}

.picker-item {
    padding: 14px 0;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.picker-item.selected {
    color: var(--primary-color);
}

.picker-icon-check::after {
    content: '✓';
    font-weight: bold;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--white);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
