* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f0f4f8; color: #2d3748; min-height: 100vh; direction: rtl; }
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }
#loading-screen.active { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2c7be5, #1a56d6); color: white; }
.loading-container { text-align: center; }
.loading-container .logo { font-size: 60px; margin-bottom: 12px; }
.loading-container h1 { font-size: 32px; font-weight: 700; margin-bottom: 6px; }
.loading-container p { opacity: 0.8; font-size: 16px; margin-bottom: 24px; }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
#login-screen.active, #register-screen.active { display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #2c7be5, #1a56d6); }
.login-container, .register-container { background: white; border-radius: 20px; padding: 32px 24px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.login-container .logo { font-size: 48px; text-align: center; margin-bottom: 8px; }
.login-container h1 { text-align: center; font-size: 28px; color: #2c7be5; margin-bottom: 4px; }
.login-container .subtitle { text-align: center; color: #718096; margin-bottom: 28px; }
.register-container .top-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.register-container h2 { font-size: 22px; color: #2c7be5; }
.back-btn { background: none; border: none; font-size: 15px; color: #2c7be5; cursor: pointer; padding: 6px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: #4a5568; margin-bottom: 6px; }
.form-group input, .form-group select { width: 100%; padding: 12px 14px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 15px; color: #2d3748; transition: border-color 0.2s; background: white; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #2c7be5; }
.members-input { display: flex; gap: 8px; }
.members-input input { flex: 1; }
.members-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.member-tag { background: #ebf4ff; color: #2c7be5; padding: 5px 10px; border-radius: 20px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.member-tag .remove { cursor: pointer; color: #e53e3e; font-size: 16px; }
.btn { padding: 12px 20px; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.btn-primary { background: #2c7be5; color: white; }
.btn-primary:hover { background: #1a56d6; }
.btn-secondary { background: #e2e8f0; color: #4a5568; white-space: nowrap; }
.btn-secondary:hover { background: #cbd5e0; }
.btn-full { width: 100%; }
.btn-large { padding: 16px; font-size: 17px; margin-top: 16px; }
.register-link { text-align: center; margin-top: 16px; font-size: 14px; color: #718096; }
.register-link a { color: #2c7be5; text-decoration: none; font-weight: 600; }
.error-msg { color: #e53e3e; font-size: 13px; margin-top: 10px; text-align: center; min-height: 20px; }
.success-msg { background: #c6f6d5; color: #276749; padding: 14px; border-radius: 10px; text-align: center; font-weight: 600; margin-top: 12px; }
.app-header { background: linear-gradient(135deg, #2c7be5, #1a56d6); color: white; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.header-info h2 { font-size: 18px; }
.header-info p { font-size: 13px; opacity: 0.85; margin-top: 2px; }
.logout-btn { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.4); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; font-family: inherit; }
.content { padding: 16px; max-width: 600px; margin: 0 auto; }
.date-display { background: white; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 15px; color: #4a5568; font-weight: 500; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.status-card { background: white; border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.status-card h3 { font-size: 18px; color: #2d3748; margin-bottom: 4px; }
.card-subtitle { color: #718096; font-size: 13px; margin-bottom: 16px; }
.family-list { display: flex; flex-direction: column; gap: 10px; }
.family-member-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 2px solid #e2e8f0; border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.family-member-item.present { border-color: #48bb78; background: #f0fff4; }
.family-member-item.absent { border-color: #fc8181; background: #fff5f5; }
.member-name { font-size: 16px; font-weight: 500; }
.member-status { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 20px; }
.present .member-status { background: #c6f6d5; color: #276749; }
.absent .member-status { background: #fed7d7; color: #9b2c2c; }
.last-report { background: #ebf8ff; color: #2b6cb0; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 8px; }
.summary-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.summary-card { background: white; border-radius: 14px; padding: 16px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-right: 4px solid transparent; }
.summary-card.green { border-right-color: #48bb78; }
.summary-card.red { border-right-color: #fc8181; }
.summary-card.blue { border-right-color: #63b3ed; }
.summary-card.gray { border-right-color: #a0aec0; }
.card-num { font-size: 32px; font-weight: 700; color: #2d3748; }
.card-label { font-size: 13px; color: #718096; margin-top: 4px; }
.section-title { font-size: 16px; font-weight: 700; color: #4a5568; margin: 20px 0 10px; padding-bottom: 8px; border-bottom: 2px solid #e2e8f0; }
.capsules-grid { display: flex; flex-direction: column; gap: 10px; }
.capsule-row { background: white; border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 6px rgba(0,0,0,0.07); }
.capsule-name { font-size: 15px; font-weight: 600; }
.capsule-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.badge-complete { background: #c6f6d5; color: #276749; }
.badge-partial { background: #fefcbf; color: #744210; }
.badge-missing { background: #fed7d7; color: #9b2c2c; }
.capsule-details { display: flex; flex-direction: column; gap: 10px; }
.household-card { background: white; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 6px rgba(0,0,0,0.07); }
.household-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.household-name { font-weight: 600; font-size: 15px; }
.not-reported { color: #a0aec0; font-style: italic; font-size: 13px; }
.person-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.person-badge { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.person-present { background: #c6f6d5; color: #276749; }
.person-absent { background: #fed7d7; color: #9b2c2c; }
.admin-capsules-list { display: flex; flex-direction: column; gap: 16px; }
.admin-capsule-card { background: white; border-radius: 14px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.admin-capsule-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #e2e8f0; }
.admin-capsule-title { font-size: 16px; font-weight: 700; }
.capsule-stats { display: flex; gap: 12px; font-size: 13px; color: #718096; align-items: center; }