.dashboard-main {
    display: grid;
    gap: 18px;
}

.hero-gradient {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    background: linear-gradient(130deg, #ffffff 0%, #f0f6ff 100%);
}

.hero-cta {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-outline {
    border: 1px solid #0f6dff;
    color: #0f6dff;
    background: #fff;
}

.hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 10px;
}

.stat-card {
    box-shadow: 0 8px 20px rgba(15, 109, 255, 0.08);
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0b57d0;
    background: #eaf2ff;
}

.panel-soft {
    border: 1px solid #dbe7ff;
    box-shadow: 0 10px 22px rgba(15, 109, 255, 0.06);
}

.dashboard-grid {
    margin-top: 0;
}

.reminder-list {
    list-style: none;
    padding: 0;
    margin-top: 14px;
}

.reminder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

/* A long medicine name or note wraps instead of pushing the card wider. */
.reminder-item > div:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.reminder-note {
    font-size: 0.85rem;
    margin: 6px 0 10px;
}

.reminder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.reminder-paused,
.reminder-completed,
.reminder-expired {
    opacity: 0.75;
}

.reminder-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px solid #f5c26b;
    border-radius: 10px;
    background: #fff8e6;
}

.panel-soft [hidden] {
    display: none !important;
}

.reminder-banner p {
    margin: 0 0 4px;
}

.notify-panel {
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px solid #dbe7ff;
    border-radius: 10px;
    background: #f5faff;
}

.notify-panel p {
    margin: 4px 0 8px;
    font-size: 0.85rem;
}

.field-error {
    margin: 4px 0 0;
    color: #b42318;
    font-size: 0.9rem;
    font-weight: 500;
}

.field-error[hidden],
.error-summary[hidden] {
    display: none;
}

.error-summary {
    margin: 12px 0 0;
    padding: 10px 14px;
    border: 2px solid #b42318;
    border-radius: 8px;
    background: #fef3f2;
    color: #7a1a12;
    font-size: 0.9rem;
}

.error-summary:focus {
    outline: 3px solid #1d4ed8;
    outline-offset: 2px;
}

.error-summary-title {
    margin: 0 0 4px;
    font-weight: 700;
}

.error-summary ul {
    margin: 0;
    padding-left: 18px;
}

.error-summary a {
    color: inherit;
    text-decoration: underline;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: #b42318 !important;
    outline-color: #b42318;
}

.benefit-card {
    background: linear-gradient(140deg, #ffffff, #f5faff);
}

.benefit-list {
    margin: 0 0 16px;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.benefit-list[hidden] {
    display: none;
}

.chatbot-card {
    display: grid;
    gap: 10px;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-window {
    height: 260px;
    overflow-y: auto;
    border: 1px solid #dbe7ff;
    border-radius: 12px;
    padding: 10px;
    background: #f8fbff;
    display: grid;
    gap: 8px;
}

.chat-bubble {
    max-width: 85%;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.chat-bubble.user {
    justify-self: end;
    background: #0f6dff;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-bubble.bot {
    justify-self: start;
    background: #fff;
    border: 1px solid #dbe7ff;
    border-bottom-left-radius: 4px;
}

.chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    border: 1px solid #bdd3ff;
    background: #eef4ff;
    color: #134293;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

.chat-input-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
}

.chat-note {
    margin: 0;
    font-size: 0.8rem;
    color: #4a5a78;
}

.chat-bubble p {
    margin: 0;
}

.chat-bubble.urgent {
    background: #fff1f0;
    border: 2px solid #d92d20;
    color: #7a1410;
    font-weight: 600;
}

.chat-link {
    display: inline-block;
    margin: 8px 8px 0 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: #0f6dff;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.chat-bubble.urgent .chat-link {
    background: #d92d20;
}

.chat-link:focus-visible,
.chip:focus-visible {
    outline: 3px solid #134293;
    outline-offset: 2px;
}

.privacy-card h3 {
    margin: 14px 0 6px;
    font-size: 1rem;
}

.privacy-stored {
    margin: 0 0 14px;
    padding-left: 20px;
}

.privacy-confirm {
    margin-top: 14px;
    padding: 12px 14px;
    border: 2px solid #d92d20;
    border-radius: 10px;
    background: #fff1f0;
    color: #7a1410;
}

.privacy-confirm h3 {
    margin-top: 0;
}

.privacy-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.privacy-status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #dbe7ff;
    background: #f0f6ff;
}

.privacy-status p {
    margin: 0 0 6px;
}

.privacy-status--success {
    border-color: #1a7f4b;
    background: #effaf3;
    color: #0e4d2c;
}

.privacy-status--warning {
    border-color: #f5c26b;
    background: #fff8e8;
    color: #5c3b00;
}

.privacy-status--error {
    border-color: #d92d20;
    background: #fff1f0;
    color: #7a1410;
}

#privacy-delete:focus-visible,
.privacy-confirm .btn:focus-visible,
.privacy-status:focus-visible,
.privacy-confirm h3:focus-visible {
    outline: 3px solid #134293;
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .hero-gradient {
        grid-template-columns: 1fr;
    }

    .chat-input-row {
        grid-template-columns: 1fr;
    }
}

.schedule-group {
    margin: 12px 0 0;
    padding: 8px 12px 10px;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
}

.schedule-group legend {
    padding: 0 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.schedule-option {
    display: block;
    margin: 4px 0;
    font-weight: 400;
}

.schedule-explain {
    margin: 8px 0 0;
    font-size: 0.85rem;
    line-height: 1.45;
}

.schedule-explain:empty {
    display: none;
}

.reminder-saved {
    margin: 10px 0 0;
    padding: 8px 12px;
    border-left: 4px solid #1a7f37;
    background: #eefaf1;
    color: #14532d;
    font-size: 0.9rem;
}

.reminder-saved[hidden] {
    display: none;
}

.notify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notify-actions[hidden],
.notify-details[hidden] {
    display: none;
}

.notify-details {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 400;
}
