#flush-app { all: initial; display: block; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: #1e293b; max-width: 480px; margin: 32px auto; line-height: 1.5; }
#flush-app * { box-sizing: border-box; }
.flush-screen { display: none; animation: fadeIn .3s ease; }
.flush-screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.flush-card { background: #fff; border-radius: 24px; box-shadow: 0 8px 30px rgba(0,0,0,.06); padding: 35px 24px; }
.flush-logo { width: 64px; height: 64px; border-radius: 18px; background: #226699; display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 20px; box-shadow: 0 8px 20px rgba(59,130,246,.35); color: #fff; }
.flush-title { font-size: 22px; font-weight: 800; margin: 0 0 24px; text-align: center; color: #0f172a; }
.flush-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.flush-back-btn { background: #f1f5f9; border: none; width: 36px; height: 36px; border-radius: 10px; font-size: 18px; color: #64748b; cursor: pointer; transition: .2s; display: flex; align-items: center; justify-content: center; }
.flush-back-btn:hover { background: #e2e8f0; color: #0f172a; }

.flush-select { width: 100%; padding: 15px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 16px; background: #f8fafc; outline: none; transition: .2s; margin-bottom: 20px; font-family: inherit; color: #0f172a; }
.flush-select:focus { border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }

.flush-btn-primary { display: block; width: 100%; padding: 16px; background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; border: none; border-radius: 14px; font-size: 16px; font-weight: 700; cursor: pointer; transition: .2s; font-family: inherit; }
.flush-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59,130,246,.35); }

/* Календарь */
.flush-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 10px; }
.flush-cal-header { text-align: center; font-size: 12px; font-weight: 700; color: #94a3b8; padding-bottom: 8px; text-transform: uppercase; }
.flush-day { aspect-ratio: 1; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; background: #f8fafc; border: 2px solid #e2e8f0; color: #334155; cursor: pointer; transition: .2s; }
.flush-day:hover { border-color: #3b82f6; color: #3b82f6; }
.flush-day.empty { background: transparent; border-color: transparent; cursor: default; }
.flush-day.locked { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }
.flush-day.locked:hover { background: #fee2e2; border-color: #ef4444; }
.flush-day.today { background: #eff6ff; border-color: #60a5fa; color: #2563eb; }

/* Список пива */
.flush-beers-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.flush-beer-item { background: #f8fafc; border: 2px solid #e2e8f0; padding: 16px; border-radius: 14px; }
.flush-beer-name { font-size: 16px; font-weight: 800; color: #334155; text-align: center; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; margin-bottom: 12px; }
.flush-beer-inputs { display: flex; gap: 15px; }
.flush-input-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.flush-input-group label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .5px; }
.flush-input-ml { width: 100%; padding: 12px; border: 2px solid #cbd5e1; border-radius: 10px; text-align: center; font-size: 16px; font-weight: 700; color: #0f172a; outline: none; transition: .2s; font-family: inherit; }
.flush-input-ml:focus { border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.flush-input-ml::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.flush-input-ml[type=number] { -moz-appearance: textfield; }
.flush-input-ml[readonly] { background: #f1f5f9 !important; color: #94a3b8 !important; border-color: #e2e8f0 !important; cursor: not-allowed; }

.flush-actions { display: flex; flex-direction: column; gap: 12px; }
.flush-btn-save { padding: 16px; border: none; border-radius: 14px; background: #f1f5f9; color: #475569; font-size: 15px; font-weight: 700; cursor: pointer; transition: .2s; font-family: inherit; }
.flush-btn-save:hover { background: #e2e8f0; color: #0f172a; }
.flush-btn-send { padding: 16px; border: none; border-radius: 14px; background: linear-gradient(135deg, #10b981, #059669); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: .2s; font-family: inherit; }
.flush-btn-send:hover { box-shadow: 0 4px 15px rgba(16,185,129,.35); transform: translateY(-1px); }
.flush-btn-unlock { padding: 16px; border: none; border-radius: 14px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: .2s; font-family: inherit; width: 100%; }
.flush-btn-unlock:hover { box-shadow: 0 4px 15px rgba(245,158,11,.35); transform: translateY(-1px); }

/* Кнопка очистки дня */
.flush-btn-clear { padding: 14px; border: 2px dashed #fca5a5; border-radius: 14px; background: #fff; color: #dc2626; font-size: 15px; font-weight: 700; cursor: pointer; transition: .2s; font-family: inherit; margin-top: 4px; }
.flush-btn-clear:hover { background: #fef2f2; border-color: #ef4444; }

/* Оверлеи */
#flush-overlay, #flush-dialog-overlay { 
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
    z-index: 2147483647; background: rgba(15,23,42,.6); 
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); 
    align-items: center; justify-content: center; padding: 20px;
}
#flush-overlay.show, #flush-dialog-overlay.show { display: flex; }
.flush-ov-cell { width: 100%; max-width: 400px; }
.flush-ov-card { 
    background: #fff; border-radius: 24px; padding: 40px 24px 30px; 
    width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.15); 
    text-align: center; animation: flushCardIn .35s cubic-bezier(.34,1.46,.64,1) both; 
}
@keyframes flushCardIn { from { transform: scale(.8) translateY(24px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.flush-ov-icon { font-size: 76px; display: block; margin-bottom: 16px; line-height: 1; }
.flush-ov-title { font-size: 24px; font-weight: 800; margin: 0 0 10px; letter-spacing: -.3px; }
.flush-ov-title.ok { color: #065f46; }
.flush-ov-title.err { color: #991b1b; }
.flush-ov-sub { font-size: 14px; color: #64748b; margin: 0 0 28px; line-height: 1.65; }
.flush-ov-btn { display: block; width: 100%; padding: 16px; border: none; border-radius: 14px; font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit; transition: .2s; }
.flush-ov-btn.ok { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 4px 18px rgba(16,185,129,.4); }
.flush-ov-btn.ok:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,185,129,.4); }
.flush-ov-btn.err { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,.3); }

.flush-notice { padding: 14px; border-radius: 12px; margin-bottom: 20px; font-weight: 600; display: none; text-align: center; font-size: 14px; }

/* =========================================
   ОБНОВЛЕННЫЙ NUMPAD (ЦИФРОВАЯ КЛАВИАТУРА)
   ========================================= */
#flush-numpad {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: #cbd5e1; padding: 12px 6px; box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    z-index: 2147483647; user-select: none; -webkit-user-select: none;
}

#flush-numpad.active { 
    display: block; 
    animation: flushOskSlideUp 0.3s cubic-bezier(0.34, 1.46, 0.64, 1) forwards; 
}

@keyframes flushOskSlideUp { 
    from { transform: translateY(100%); } 
    to { transform: translateY(0); } 
}

.flush-np-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); 
    gap: 8px; max-width: 320px; margin: 0 auto; 
}

.flush-np-btn {
    background: #fff; border-radius: 8px; height: 54px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-family: inherit; color: #0f172a; 
    font-size: 26px; font-weight: 700; transition: 0.1s;
}

.flush-np-btn:active { background: #94a3b8; color: #fff; transform: translateY(1px); box-shadow: none; }

.flush-np-btn.action { background: #94a3b8; color: #fff; font-size: 20px; font-weight: 600; }

.flush-np-btn.primary { 
    background: #3b82f6; color: #fff; font-weight: 700; font-size: 18px;
    grid-column: span 3;
}
.flush-np-btn.primary:active { background: #2563eb; color: #fff; }

@media (max-width: 1023px) {
    #flush-numpad { display: none !important; }
}