:root {
    --med-primary: #0f766e;
    --med-primary-dark: #115e59;
    --med-blue: #2563eb;
    --med-soft: #f3f7f8;
    --med-ink: #10212a;
    --med-muted: #667985;
    --med-line: #dce7ea;
    --med-warning: #f59e0b;
    --med-danger: #ef4444;
}

body.medicine-app,
body.medicine-auth {
    background: var(--med-soft);
    color: var(--med-ink);
}

body.offcanvas-backdrop-open {
    overflow: hidden;
}

.medicine-header {
    border-bottom: 1px solid rgba(16, 33, 42, 0.08);
    z-index: 1030;
    box-shadow: 0 8px 22px rgba(16, 33, 42, 0.06);
}

.medicine-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--med-ink);
    font-weight: 800;
    letter-spacing: 0;
}

.medicine-brand-icon,
.medicine-login-logo,
.medicine-hero-icon,
.medicine-profile-avatar,
.medicine-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.medicine-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--med-primary);
}

.medicine-icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    position: relative;
    z-index: 2;
    border-radius: 8px;
    background: #ffffff;
    color: var(--med-ink);
    box-shadow: 0 8px 20px rgba(16, 33, 42, 0.08);
    pointer-events: auto;
    touch-action: manipulation;
}

.medicine-side-profile {
    background: linear-gradient(135deg, var(--med-primary), var(--med-blue));
}

.medicine-avatar {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 34px;
}

.medicine-page {
    padding-top: 62px;
    padding-bottom: 92px !important;
}

.medicine-offcanvas {
    visibility: hidden;
}

.medicine-offcanvas.show {
    visibility: visible;
}

.medicine-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(16, 33, 42, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.medicine-menu-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.medicine-card,
.medicine-login-card,
.medicine-stat-card,
.medicine-quick-actions a,
.medicine-empty-state {
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(16, 33, 42, 0.08);
}

.medicine-login-card {
    padding: 24px;
    margin: 22px 0;
}

.medicine-login-logo {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(37, 99, 235, 0.14));
    color: var(--med-primary);
    font-size: 38px;
}

.medicine-login-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0;
}

.medicine-security-note {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--med-line);
    border-radius: 8px;
    background: #f8fbfb;
}

.medicine-security-note h6,
.medicine-security-note p {
    margin: 0;
}

.medicine-security-note p,
.medicine-muted {
    color: var(--med-muted);
    font-size: 13px;
    line-height: 1.45;
}

.medicine-security-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--med-primary);
}

.medicine-alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 13px;
}

.medicine-alert.success {
    background: #dcfce7;
    color: #166534;
}

.medicine-alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.medicine-hero {
    min-height: 176px;
    margin: 8px 0 14px;
    padding: 22px;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--med-primary), var(--med-blue));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.medicine-hero h1 {
    color: #ffffff;
    font-size: 28px;
    line-height: 1.18;
    font-weight: 800;
    margin: 6px 0;
    letter-spacing: 0;
}

.medicine-hero p {
    color: rgba(255, 255, 255, 0.86);
    margin: 0;
    max-width: 260px;
}

.medicine-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0;
}

.medicine-hero-icon {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.17);
    font-size: 36px;
}

.medicine-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.medicine-stat-card {
    min-height: 86px;
    padding: 14px;
}

button.medicine-stat-card {
    width: 100%;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    appearance: none;
}

.medicine-action-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.medicine-action-card:hover,
.medicine-action-card:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(16, 33, 42, 0.12);
}

.medicine-action-card:focus {
    outline: 2px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.medicine-action-card:disabled {
    cursor: wait;
    opacity: 0.75;
}

.medicine-stat-card span,
.medicine-section-title span,
.medicine-page-title span,
.medicine-list-heading span,
.medicine-toggle-card span {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.medicine-stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0;
}

.medicine-switch-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    min-height: 94px;
}

.medicine-switch-card > span:first-child,
.medicine-switch-card strong {
    grid-column: 1;
}

.medicine-switch-card strong {
    color: var(--med-ink);
}

.medicine-switch {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 58px;
    height: 32px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid #d6e1e6;
    background: #e9eef1;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.medicine-switch span {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 12px rgba(16, 33, 42, 0.16);
    transition: transform 0.18s ease;
}

.medicine-switch.is-on {
    border-color: rgba(15, 118, 110, 0.2);
    background: var(--med-primary);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.medicine-switch.is-on span {
    transform: translateX(26px);
}

.medicine-switch-card[disabled] .medicine-switch {
    opacity: 0.6;
}

.medicine-card {
    padding: 16px;
    margin-bottom: 14px;
}

.medicine-section-title,
.medicine-page-title,
.medicine-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.medicine-page-title {
    margin-top: 8px;
}

.medicine-section-title h2,
.medicine-page-title h1,
.medicine-list-heading h2,
.medicine-toggle-card h2 {
    margin: 4px 0 0;
    font-weight: 800;
    letter-spacing: 0;
}

.medicine-section-title h2,
.medicine-list-heading h2,
.medicine-toggle-card h2 {
    font-size: 18px;
}

.medicine-page-title h1 {
    font-size: 26px;
}

.medicine-next-reminder {
    display: flex;
    align-items: center;
    gap: 14px;
}

.medicine-next-time,
.medicine-time-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 66px;
    height: 54px;
    border-radius: 8px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--med-primary-dark);
    font-size: 20px;
    font-weight: 800;
}

.medicine-next-reminder h3,
.medicine-list-item h3,
.medicine-obat-item h3,
.medicine-schedule-item h3,
.medicine-history-item h3,
.medicine-card h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: 0;
}

.medicine-next-reminder p,
.medicine-list-item p,
.medicine-obat-item p,
.medicine-schedule-item p,
.medicine-history-item p,
.medicine-card p {
    margin: 0;
    color: var(--med-muted);
    line-height: 1.4;
}

.medicine-next-reminder span {
    display: inline-block;
    margin-top: 6px;
    color: var(--med-blue);
    font-size: 12px;
    font-weight: 800;
}

.medicine-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.medicine-quick-actions a {
    min-height: 90px;
    padding: 12px 8px;
    color: var(--med-ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
}

.medicine-quick-actions i {
    color: var(--med-primary);
    font-size: 24px;
}

.medicine-quick-actions small {
    min-height: 30px;
    color: var(--med-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.medicine-list {
    display: grid;
    gap: 10px;
}

.medicine-reminder-list-panel,
.medicine-reminder-list-panel .medicine-list,
.medicine-reminder-list-panel .medicine-list-heading,
.medicine-schedule-item {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.medicine-schedule-item {
    overflow: hidden;
}

.medicine-schedule-head,
.medicine-schedule-main,
.medicine-schedule-copy {
    min-width: 0;
}

.medicine-schedule-main {
    flex: 1 1 auto;
}

.medicine-schedule-copy h3,
.medicine-schedule-copy p,
.medicine-schedule-copy small {
    overflow-wrap: anywhere;
}

.medicine-list-tools,
.medicine-obat-tools {
    display: grid;
    gap: 10px;
}

.medicine-search-field {
    position: relative;
}

.medicine-search-field i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--med-muted);
    font-size: 15px;
}

.medicine-search-field .form-control {
    padding-left: 40px;
}

.medicine-segmented-control {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border-radius: 8px;
    background: #eef6f6;
}

.medicine-segmented-control button {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 800;
}

.medicine-segmented-control button.active {
    background: #ffffff;
    color: var(--med-primary-dark);
    box-shadow: 0 6px 16px rgba(16, 33, 42, 0.08);
}

.medicine-obat-summary {
    min-width: 0;
}

.medicine-visit-summary {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.medicine-obat-summary h3,
.medicine-obat-summary p,
.medicine-obat-summary small,
.medicine-visit-summary h3,
.medicine-visit-summary p,
.medicine-visit-summary small {
    overflow-wrap: anywhere;
}

.medicine-list-pager {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 12px 0 16px;
}

.medicine-visit-history-list {
    display: grid;
    gap: 10px;
}

.medicine-visit-item {
    border: 1px solid rgba(16, 33, 42, 0.06);
    box-shadow: 0 8px 22px rgba(16, 33, 42, 0.07);
}

.medicine-visit-item > .d-flex {
    align-items: flex-start;
}

.medicine-visit-summary h3 {
    width: fit-content;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--med-blue);
    font-size: 13px;
}

.medicine-visit-summary p {
    color: var(--med-ink);
    font-weight: 800;
}

.medicine-visit-summary small {
    color: var(--med-muted);
    font-size: 12px;
}

.medicine-list-pager .btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
}

.medicine-list-pager span {
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.medicine-list-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--med-line);
}

.medicine-list-item:last-child {
    border-bottom: 0;
}

.medicine-visit-details {
    margin-top: 12px;
    border-top: 1px solid var(--med-line);
    padding-top: 10px;
}

.medicine-visit-details summary {
    cursor: pointer;
    color: var(--med-blue);
    font-size: 12px;
    font-weight: 800;
    list-style-position: inside;
}

.medicine-visit-details .medicine-profile-list {
    margin-top: 10px;
}

.medicine-empty-state {
    padding: 22px 18px;
    text-align: center;
    margin-bottom: 14px;
}

.medicine-empty-state.compact {
    box-shadow: none;
    border: 1px dashed var(--med-line);
}

.medicine-empty-state i {
    font-size: 38px;
    color: var(--med-primary);
    display: block;
    margin-bottom: 8px;
}

.medicine-empty-state h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.medicine-empty-state p {
    color: var(--med-muted);
    margin-bottom: 12px;
}

.medicine-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.medicine-status.active {
    background: #dcfce7;
    color: #166534;
}

.medicine-status.inactive {
    background: #ffedd5;
    color: #9a3412;
}

.medicine-note {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    background: #f8fbfb;
    color: var(--med-muted);
    font-size: 13px;
}

.medicine-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.medicine-card-actions .btn {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.medicine-dose-calendar {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--med-line);
}

.medicine-dose-calendar-head {
    margin-bottom: 8px;
}

.medicine-dose-calendar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.medicine-dose-calendar-head span {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
}

.medicine-dose-calendar-head small {
    display: block;
    margin-top: 2px;
    color: var(--med-blue);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.medicine-dose-calendar-nav {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 6px;
    margin-left: auto;
}

.medicine-dose-calendar-nav button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #eef6f6;
    color: var(--med-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.medicine-dose-calendar-track {
    --medicine-dose-day-gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: var(--medicine-dose-day-gap);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.medicine-dose-day {
    flex: 0 0 calc((100% - (var(--medicine-dose-day-gap) * 4)) / 5);
    width: calc((100% - (var(--medicine-dose-day-gap) * 4)) / 5);
    min-width: 0;
    height: 58px;
    border: 1px solid var(--med-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--med-ink);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1px;
    scroll-snap-align: start;
}

.medicine-dose-day strong {
    font-size: 13px;
    line-height: 1;
}

.medicine-dose-day small {
    color: var(--med-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.medicine-dose-day i {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
}

.medicine-dose-day.is-today {
    border-color: var(--med-primary);
}

.medicine-dose-day.is-taken {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.medicine-dose-day.is-taken i {
    background: #16a34a;
    color: #ffffff;
}

.medicine-dose-day.is-missed {
    background: #fff7ed;
    border-color: #fed7aa;
}

.medicine-dose-day.is-missed i {
    background: #ea580c;
    color: #ffffff;
}

.medicine-dose-calendar-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 800;
}

.medicine-dose-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.medicine-dose-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-flex;
}

.medicine-dose-dot.is-taken {
    background: #16a34a;
}

.medicine-dose-dot.is-missed {
    background: #ea580c;
}

.medicine-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.medicine-toggle-card p {
    font-size: 13px;
    margin-top: 6px;
}

.medicine-history-date {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.medicine-profile-hero {
    margin: 16px 0;
    padding: 24px 16px;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--med-primary), var(--med-blue));
    border-radius: 8px;
}

.medicine-profile-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 38px;
}

.medicine-profile-hero h1 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 0;
}

.medicine-profile-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.medicine-profile-list {
    display: grid;
    gap: 12px;
}

.medicine-profile-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--med-line);
}

.medicine-profile-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.medicine-profile-list span {
    color: var(--med-muted);
}

.medicine-profile-list strong {
    text-align: right;
    max-width: 58%;
    overflow-wrap: anywhere;
}

.medicine-logout-btn {
    min-height: 46px;
    margin-bottom: 18px;
}

.medicine-footer-nav {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(16, 33, 42, 0.08);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.medicine-footer-nav .footer-nav {
    height: 60px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(16, 33, 42, 0.12);
}

.medicine-footer-nav .footer-nav ul {
    margin: 0;
}

.medicine-footer-nav .footer-nav ul li {
    height: 100%;
}

.medicine-footer-nav .footer-nav ul li a {
    position: relative;
    display: flex;
    min-width: 58px;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--med-muted);
    font-weight: 800;
}

.medicine-footer-nav .footer-nav ul li a i {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 18px;
}

.medicine-footer-nav .footer-nav ul li a span {
    font-size: 9px;
    line-height: 1.1;
    letter-spacing: 0;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.medicine-footer-nav .footer-nav ul li.active a {
    color: var(--med-primary);
}

.medicine-footer-nav .footer-nav ul li.active a i {
    background: rgba(15, 118, 110, 0.12);
}

.medicine-footer-nav .footer-nav ul li.active a::before {
    content: "";
    position: absolute;
    top: 6px;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: var(--med-primary);
}

.form-control,
.form-select,
.btn {
    border-radius: 8px;
}

.medicine-submit-btn {
    position: relative;
}

.medicine-submit-btn.is-loading {
    pointer-events: none;
}

.medicine-submit-btn.is-loading i {
    display: none;
}

.medicine-submit-btn.is-loading::before {
    content: "";
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    display: inline-block;
    vertical-align: -3px;
    animation: medicine-spin 0.75s linear infinite;
}

@keyframes medicine-spin {
    to {
        transform: rotate(360deg);
    }
}

.medicine-picker-field {
    position: relative;
}

.medicine-picker-field .medicine-picker-input {
    padding-right: 46px;
    cursor: pointer;
    background-color: #ffffff;
}

.medicine-picker-trigger {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 36px;
    height: calc(100% - 10px);
    border: 0;
    border-radius: 8px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--med-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.medicine-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    background: rgba(16, 33, 42, 0.38);
}

.medicine-picker-panel {
    width: min(100%, 520px);
    padding: 18px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 58px rgba(16, 33, 42, 0.24);
}

.medicine-picker-head,
.medicine-calendar-nav,
.medicine-picker-actions,
.medicine-time-selectors {
    display: flex;
    gap: 10px;
}

.medicine-picker-head,
.medicine-calendar-nav {
    align-items: center;
    justify-content: space-between;
}

.medicine-picker-head {
    margin-bottom: 14px;
}

.medicine-picker-head span,
.medicine-calendar-jump span,
.medicine-time-selectors span {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.medicine-picker-head h2 {
    margin: 2px 0 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.medicine-picker-close,
.medicine-calendar-nav button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: #eef6f6;
    color: var(--med-primary-dark);
}

.medicine-calendar-jump {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 8px;
    flex: 1;
}

.medicine-calendar-jump span {
    margin-bottom: 5px;
    font-size: 10px;
}

.medicine-calendar-jump .form-select,
.medicine-calendar-jump .form-control {
    min-height: 38px;
    font-size: 13px;
    font-weight: 800;
}

.medicine-calendar-jump .form-control {
    padding-left: 10px;
    padding-right: 8px;
}

.medicine-calendar-weekdays,
.medicine-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.medicine-calendar-weekdays {
    margin: 14px 0 8px;
}

.medicine-calendar-weekdays span {
    text-align: center;
    color: var(--med-muted);
    font-size: 11px;
    font-weight: 800;
}

.medicine-calendar-grid button,
.medicine-calendar-blank {
    min-height: 38px;
    border-radius: 8px;
}

.medicine-calendar-grid button {
    border: 1px solid var(--med-line);
    background: #ffffff;
    color: var(--med-ink);
    font-weight: 800;
}

.medicine-calendar-grid button.today {
    border-color: rgba(37, 99, 235, 0.42);
    color: var(--med-blue);
}

.medicine-calendar-grid button.selected {
    border-color: var(--med-primary);
    background: var(--med-primary);
    color: #ffffff;
}

.medicine-picker-actions {
    margin-top: 14px;
}

.medicine-time-preview {
    padding: 14px;
    border-radius: 8px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--med-primary-dark);
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.medicine-time-selectors {
    margin-top: 14px;
}

.medicine-time-selectors label {
    flex: 1;
}

.medicine-time-selectors select {
    margin-top: 6px;
    min-height: 46px;
    font-weight: 800;
}

.medicine-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    background: rgba(16, 33, 42, 0.38);
}

.medicine-detail-panel {
    width: min(100%, 520px);
    padding: 18px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 58px rgba(16, 33, 42, 0.24);
}

.medicine-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.medicine-detail-head span,
.medicine-detail-grid span {
    display: block;
    color: var(--med-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.medicine-detail-head h2 {
    margin: 2px 0 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.medicine-detail-grid {
    display: grid;
    gap: 10px;
}

.medicine-detail-grid div {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--med-line);
}

.medicine-detail-grid div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.medicine-detail-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.btn-primary {
    background-color: var(--med-primary);
    border-color: var(--med-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--med-primary-dark);
    border-color: var(--med-primary-dark);
}

.medicine-reminder-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    background: rgba(16, 33, 42, 0.34);
}

.medicine-reminder-panel {
    width: min(100%, 520px);
    padding: 18px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 58px rgba(16, 33, 42, 0.24);
}

.medicine-reminder-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.medicine-reminder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--med-primary);
    font-size: 22px;
}

.medicine-reminder-head span,
.medicine-reminder-row p {
    color: var(--med-muted);
}

.medicine-reminder-head span {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.medicine-reminder-head h2 {
    margin: 2px 0 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.medicine-reminder-list {
    display: grid;
    gap: 10px;
}

.medicine-reminder-row {
    padding: 12px;
    border: 1px solid var(--med-line);
    border-radius: 8px;
    background: #f8fbfb;
}

.medicine-reminder-row strong {
    display: block;
    margin-bottom: 3px;
    font-size: 15px;
}

.medicine-reminder-row p {
    margin: 0;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.medicine-reminder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.medicine-reminder-actions .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
}

.medicine-report-table {
    min-width: 1060px;
    font-size: 12px;
}

.medicine-report-table th {
    white-space: nowrap;
}

@media print {
    .medicine-header,
    .medicine-footer-nav,
    .medicine-report-filter,
    .offcanvas,
    #preloader,
    #internetStatus {
        display: none !important;
    }

    body.medicine-app {
        background: #ffffff;
    }

    .medicine-page {
        padding-top: 0;
    }

    .medicine-card {
        box-shadow: none;
        border: 0;
        padding: 0;
    }

    .medicine-report-page .container,
    .medicine-app .container {
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .medicine-app .container,
    .medicine-auth .custom-container {
        max-width: 560px;
    }
}
