/* ============================================================
   宝隆印染 H5 微应用 - 适老化 UI 样式
   ============================================================ */

:root {
    --green: #22C55E;
    --red: #EF4444;
    --blue: #3B82F6;
    --gray-dark: #374151;
    --gray-light: #9CA3AF;
    --bg: #F9FAFB;
    --white: #FFFFFF;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

body {
    font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--gray-dark);
    font-size: 18px;
    line-height: 1.6;
    min-height: 100vh;
    padding: 16px;
    padding-bottom: 100px;
}

/* -- Layout -- */

.page { max-width: 500px; margin: 0 auto; }
.hidden { display: none !important; }

.header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 20px;
}
.header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-dark);
}
.header .subtitle {
    font-size: 16px;
    color: var(--gray-light);
    margin-top: 4px;
}

/* -- Status Bar -- */

.status-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    z-index: 100;
    transition: all 0.3s;
}
.status-success { background: var(--green); color: white; }
.status-error   { background: var(--red);   color: white; }
.status-info    { background: var(--blue);  color: white; }

/* -- Buttons -- */

.btn {
    display: block;
    width: 100%;
    min-height: 80px;
    border: none;
    border-radius: var(--radius);
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    margin: 12px 0;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}
.btn:active { transform: scale(0.97); }

.btn-primary   { background: var(--blue);  color: white; }
.btn-success   { background: var(--green); color: white; }
.btn-danger    { background: var(--red);   color: white; }
.btn-secondary { background: #E5E7EB;     color: var(--gray-dark); }

/* -- Cards / Info Panels -- */

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin: 16px 0;
    box-shadow: var(--shadow);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 18px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--gray-light); flex-shrink: 0; }
.info-value { font-weight: 600; text-align: right; word-break: break-all; }

/* -- Machine Info Badge -- */

.machine-badge {
    background: #ECFDF5;
    border: 2px solid var(--green);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    margin: 16px 0;
}
.machine-badge .label { font-size: 14px; color: var(--gray-light); }
.machine-badge .value { font-size: 26px; font-weight: 700; color: #166534; }

/* -- Input Fields -- */

.field-group {
    margin: 16px 0;
}
.field-group label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-dark);
}
.field-group input,
.field-group textarea {
    width: 100%;
    padding: 16px;
    font-size: 24px;
    border: 2px solid #D1D5DB;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-dark);
    outline: none;
    transition: border-color 0.2s;
}
.field-group input:focus,
.field-group textarea:focus {
    border-color: var(--blue);
}
.field-group input[type="number"] {
    -moz-appearance: textfield;
    inputmode: numeric;
}
.field-group textarea {
    font-size: 18px;
    min-height: 80px;
    resize: vertical;
}

.inline-scan-btn {
    display: inline-block;
    padding: 12px 20px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

/* -- Block Page -- */

.block-icon {
    text-align: center;
    font-size: 64px;
    margin: 20px 0;
}
.block-message {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--red);
    margin: 16px 0;
}
.block-detail {
    text-align: center;
    font-size: 16px;
    color: var(--gray-light);
    margin-bottom: 20px;
}

/* -- Complete Page -- */

.complete-icon {
    text-align: center;
    font-size: 72px;
    margin: 30px 0;
}
.complete-text {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--green);
}

/* -- Loading -- */

.loading-spinner {
    text-align: center;
    padding: 60px 0;
    font-size: 20px;
    color: var(--gray-light);
}
