/* ══════════════════════════════════════════════════════════════════
   HOME — Senior-friendly dashboard
   Clean, calm, large touch targets, no dev info
   ══════════════════════════════════════════════════════════════════ */

#module-home { background: #f8fafa; }

/* ─── LAYOUT OVERRIDES ───
   dashboard-layout is display:flex (forced by radim-inline + sidebar-fix),
   so grid-template-columns doesn't work. Instead we ensure
   main-panel fills remaining space and hide right-panel.
   ─────────────────────────────────────────────────────────────── */
.main-panel { max-width: 100% !important; flex: 1 1 auto !important; }
aside.right-panel { display: none !important; }
.bottom-bar { display: none !important; }

/* Simplify top bar — override radim-inline (10px 20px) + radim-branding (10px 24px) */
.top-bar { padding: 6px 16px !important; min-height: auto !important; }
.top-bar .header-info-center { display: none !important; }
.top-bar .header-right { display: none !important; }

/* Hide dev widgets everywhere (these are never user-facing) */
[id*="consciousness"], [class*="consciousness"],
[id*="radimMath"], [class*="radim-math"],
[id*="brainBridge"],
.kafanek-panel, .env-summary { display: none !important; }

/* Hide floating widgets ONLY on home (JS adds body.home-active) */
body.home-active #brain-status-indicator,
body.home-active .brain-indicator,
body.home-active #notification-bell,
body.home-active .notification-bell,
body.home-active .radim-floating-chat-btn { display: none !important; }

/* ─── HOME CONTAINER ─── */
.rh-home {
    max-width: 540px;
    margin: 0 auto;
    padding: 12px;
}

/* Wider on tablet/desktop */
@media (min-width: 600px) {
    .rh-home { max-width: 640px; padding: 20px; }
}

/* ─── GREETING ─── */
.rh-greeting {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px 20px;
    background: linear-gradient(145deg, #2d6b65 0%, #225550 50%, #1a4540 100%) !important;
    border-radius: 24px;
    color: #ffffff !important;
    margin-bottom: 14px;
    box-shadow: 0 6px 24px rgba(91, 168, 160, 0.3);
    position: relative;
    overflow: hidden;
}

/* Force ALL text inside greeting to be white */
.rh-greeting,
.rh-greeting *,
.rh-greeting h2,
.rh-greeting p,
.rh-greeting span {
    color: #ffffff !important;
}

.rh-avatar {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3), 0 4px 12px rgba(0,0,0,0.2);
    margin-bottom: 12px;
}

.rh-avatar img {
    width: 100%;
    height: 180%;
    object-fit: cover;
    object-position: top center;
}

.rh-greeting-text {
    width: 100%;
}

.rh-greeting-text h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.rh-date {
    font-size: 0.95rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    font-weight: 500;
    opacity: 0.9;
}

.rh-weather {
    font-size: 0.9rem;
    margin: 4px 0 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    opacity: 0.85;
}

/* ─── TALK + MOOD ─── */
.rh-actions-top {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.rh-talk-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: #5BA8A0;
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 12px rgba(91, 168, 160, 0.3);
}

.rh-talk-btn:hover { box-shadow: 0 5px 20px rgba(91, 168, 160, 0.4); transform: translateY(-1px); }
.rh-talk-btn:active { transform: scale(0.98); }

.rh-talk-btn.active {
    animation: micPulse 2s infinite;
}

.rh-talk-icon { font-size: 1.3rem; }

@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(91, 168, 160, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(91, 168, 160, 0); }
}

.rh-mood {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
    text-align: center;
}

.rh-mood-label {
    font-size: 0.8rem;
    color: #718096;
    display: block;
    margin-bottom: 8px;
}

.rh-mood-options {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.rh-mood-options button {
    font-size: 1.5rem;
    background: none;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 4px 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.rh-mood-options button:hover {
    border-color: #5BA8A0;
    transform: scale(1.15);
}

.rh-mood-options button.selected {
    border-color: #5BA8A0;
    background: #f0fdfa;
}

/* ─── TODAY'S PLAN ─── */
.rh-today {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 16px;
    margin-bottom: 14px;
}

.rh-today h3 {
    font-size: 1rem;
    color: #2d3748;
    margin: 0 0 12px;
}

.rh-today-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rh-today-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f7fafc;
    border-radius: 12px;
}

.rh-today-icon { font-size: 1.2rem; flex-shrink: 0; }
.rh-today-text { flex: 1; font-size: 0.9rem; color: #2d3748; font-weight: 500; }

.rh-today-btn {
    padding: 8px 14px;
    background: #5BA8A0;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.rh-today-btn:hover { background: #4a9990; }
.rh-today-btn:active { transform: scale(0.97); }

/* ─── QUICK CHAT ─── */
.rh-quick-chat {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.rh-chat-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    color: #2d3748;
    background: white;
    transition: border-color 0.2s;
}

.rh-chat-input:focus {
    border-color: #5BA8A0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 168, 160, 0.12);
}

.rh-chat-send {
    padding: 14px 20px;
    background: #5BA8A0;
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.rh-chat-send:hover { background: #4a9990; }
.rh-chat-send:active { transform: scale(0.97); }

/* ─── QUICK ACTIONS ─── */
.rh-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.rh-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.rh-action-card:hover {
    border-color: #5BA8A0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 168, 160, 0.15);
}

.rh-action-card:active {
    transform: scale(0.96);
    box-shadow: none;
}

.rh-action-icon { font-size: 1.8rem; }
.rh-action-label { font-size: 0.8rem; font-weight: 600; color: #2d3748; text-align: center; }

/* ─── RECOMMENDATION ─── */
.rh-recommend {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0fff4, #ebf8ff);
    border: 2px solid #c6f6d5;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.rh-recommend:hover { border-color: #5BA8A0; }
.rh-recommend:active { transform: scale(0.98); }
.rh-recommend-icon { font-size: 1.5rem; flex-shrink: 0; }
.rh-recommend-text { flex: 1; }
.rh-recommend-text strong { display: block; font-size: 0.95rem; color: #2d3748; }
.rh-recommend-text span { font-size: 0.75rem; color: #718096; }

/* ─── GROWTH PREVIEW ─── */
.rh-growth {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.rh-growth:hover { border-color: #5BA8A0; }
.rh-growth:active { transform: scale(0.98); }
.rh-growth-icon { font-size: 1.5rem; flex-shrink: 0; }
.rh-growth-text { flex: 1; }
.rh-growth-text strong { display: block; font-size: 0.9rem; color: #2d3748; }
.rh-growth-text span { font-size: 0.8rem; color: #718096; }

/* ─── TABLET (481-767px) ─── */
@media (min-width: 481px) and (max-width: 767px) {
    .rh-home { padding: 14px; }
    .rh-greeting { padding: 24px 20px 18px; }
    .rh-quick-actions { gap: 12px; }
    .rh-action-card { padding: 18px 10px; }
    .rh-action-icon { font-size: 2rem; }
    .rh-action-label { font-size: 0.85rem; }
}

/* ─── MOBILE (<480px) ─── */
@media (max-width: 480px) {
    .rh-home { padding: 8px; max-width: 100%; }
    .rh-greeting { padding: 20px 16px 16px; border-radius: 18px; }
    .rh-avatar { width: 60px; height: 60px; min-width: 60px; }
    .rh-greeting-text h2 { font-size: 1.1rem; }
    .rh-date { font-size: 0.85rem; }
    .rh-weather { font-size: 0.8rem; }

    .rh-actions-top { grid-template-columns: 1fr; gap: 8px; }
    .rh-talk-btn { padding: 16px; font-size: 1rem; }
    .rh-mood { padding: 10px; }
    .rh-mood-options button { font-size: 1.6rem; padding: 5px 7px; }

    .rh-today { padding: 14px; }
    .rh-today-item { padding: 8px 10px; }

    .rh-chat-input { padding: 12px 14px; font-size: 0.95rem; }
    .rh-chat-send { padding: 12px 16px; font-size: 0.9rem; }

    .rh-quick-actions { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .rh-action-card { padding: 12px 4px; border-radius: 12px; }
    .rh-action-icon { font-size: 1.5rem; }
    .rh-action-label { font-size: 0.7rem; }

    .rh-recommend { padding: 12px 14px; gap: 10px; }
    .rh-recommend-text strong { font-size: 0.9rem; }
    .rh-growth { padding: 12px 14px; gap: 10px; }
}

/* ─── VERY SMALL (<360px) ─── */
@media (max-width: 360px) {
    .rh-home { padding: 6px; }
    .rh-greeting { padding: 16px 12px 14px; border-radius: 14px; }
    .rh-avatar { width: 52px; height: 52px; min-width: 52px; }
    .rh-greeting-text h2 { font-size: 1rem; }
    .rh-quick-actions { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .rh-action-card { padding: 14px 8px; }
    .rh-action-icon { font-size: 1.6rem; }
    .rh-action-label { font-size: 0.75rem; }
    .rh-chat-send { padding: 12px 14px; }
}

/* ─── EMERGENCY BUTTON ─── */
.rh-emergency-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: white;
    border: 2px solid #fed7d7;
    border-radius: 14px;
    color: #c53030;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    margin-bottom: 14px;
    -webkit-tap-highlight-color: transparent;
}

.rh-emergency-btn:hover {
    background: #fff5f5;
    border-color: #fc8181;
}

.rh-emergency-btn:active {
    transform: scale(0.97);
    background: #fed7d7;
}
