﻿/* =========================================================
   RAPID HMS
   OPD TOKEN DISPLAY
   opd.css
   ========================================================= */

/* =========================================================
   PAGE
   ========================================================= */

.token-display-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* =========================================================
   HERO
   ========================================================= */

.token-hero {
    position: relative;
    overflow: hidden;
    padding: 36px;
    border-radius: 36px;
    background: linear-gradient( 135deg, #020617, #0f172a, #1e3a8a );
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    box-shadow: 0 24px 50px rgba(15,23,42,.14);
}

    /* GLOW */
    .token-hero::before {
        content: "";
        position: absolute;
        top: -120px;
        right: -120px;
        width: 340px;
        height: 340px;
        border-radius: 50%;
        background: radial-gradient( rgba(255,255,255,.10), transparent 70% );
    }

/* =========================================================
   HERO CONTENT
   ========================================================= */

.token-hero-content {
    position: relative;
    z-index: 2;
}

/* LIVE BADGE */
.live-badge {
    width: fit-content;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.10);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
    backdrop-filter: blur(10px);
}

/* DOT */
.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

/* TITLE */
.token-hero-content h1 {
    margin: 0 0 12px;
    font-size: 54px;
    font-weight: 900;
    letter-spacing: -.8px;
    line-height: 1;
}

/* TEXT */
.token-hero-content p {
    margin: 0;
    font-size: 16px;
    color: rgba(255,255,255,.78);
}

/* =========================================================
   HERO ACTIONS
   ========================================================= */

.token-hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

/* HERO BUTTON */
.hero-btn {
    min-height: 52px;
    padding: 0 22px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.08);
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .25s ease;
    backdrop-filter: blur(10px);
}

    /* HOVER */
    .hero-btn:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,.14);
    }

/* =========================================================
   STATS
   ========================================================= */

.token-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 20px;
}

/* =========================================================
   STAT CARD
   ========================================================= */

.token-stat-card {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 30px;
    border-radius: 32px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 18px 36px rgba(15,23,42,.08);
    transition: .25s ease;
}

    /* HOVER */
    .token-stat-card:hover {
        transform: translateY(-4px);
    }

    /* GLOW */
    .token-stat-card::before {
        content: "";
        position: absolute;
        top: -50px;
        right: -50px;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        background: rgba(255,255,255,.10);
    }

    /* COLORS */
    .token-stat-card.blue {
        background: linear-gradient( 135deg, #2563eb, #3b82f6 );
    }

    .token-stat-card.green {
        background: linear-gradient( 135deg, #16a34a, #22c55e );
    }

    .token-stat-card.orange {
        background: linear-gradient( 135deg, #ea580c, #fb923c );
    }

    .token-stat-card.red {
        background: linear-gradient( 135deg, #dc2626, #ef4444 );
    }

    /* SMALL */
    .token-stat-card small {
        font-size: 13px;
        opacity: .9;
    }

    /* VALUE */
    .token-stat-card h2 {
        margin: 0;
        font-size: 54px;
        font-weight: 900;
        line-height: 1;
    }

    /* FOOT */
    .token-stat-card span {
        font-size: 14px;
        opacity: .9;
    }

/* =========================================================
   TOOLBAR
   ========================================================= */

.token-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px 28px;
    border-radius: 28px;
    background: linear-gradient( 180deg, #ffffff, #f8fafc );
    border: 1px solid rgba(226,232,240,.8);
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
}

/* LEFT */
.token-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* RIGHT */
.token-toolbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* =========================================================
   SEARCH
   ========================================================= */

.token-search {
    width: 320px;
    max-width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 18px;
    background: white;
    border: 1px solid rgba(226,232,240,.8);
    display: flex;
    align-items: center;
    gap: 12px;
}

    /* INPUT */
    .token-search input {
        flex: 1;
        border: none;
        outline: none;
        background: transparent;
        font-size: 14px;
    }

/* =========================================================
   GRID
   ========================================================= */

.token-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
    gap: 24px;
}

/* =========================================================
   CARD
   ========================================================= */

.token-card-modern {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: 32px;
    background: white;
    border: 1px solid rgba(226,232,240,.8);
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 18px 40px rgba(15,23,42,.05);
    transition: .25s ease;
}

    /* HOVER */
    .token-card-modern:hover {
        transform: translateY(-4px);
        box-shadow: 0 24px 44px rgba(15,23,42,.10);
    }

/* =========================================================
   TOP
   ========================================================= */

.token-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* =========================================================
   DOCTOR INFO
   ========================================================= */

.doctor-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* AVATAR */
.doctor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient( 135deg, rgba(37,99,235,.12), rgba(59,130,246,.08) );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

/* TITLE */
.doctor-info h3 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

/* SMALL */
.doctor-info small {
    color: var(--text-light);
    font-size: 14px;
}

/* =========================================================
   STATUS
   ========================================================= */

.doctor-status {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(34,197,94,.12);
    color: #16a34a;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
}

/* DOT */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
}

/* =========================================================
   CURRENT TOKEN
   ========================================================= */

.current-token-box {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient( 135deg, #2563eb, #3b82f6 );
    color: white;
    text-align: center;
}

    /* GLOW */
    .current-token-box::before {
        content: "";
        position: absolute;
        top: -30px;
        right: -30px;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: rgba(255,255,255,.10);
    }

/* LABEL */
.token-label {
    font-size: 13px;
    font-weight: 700;
    opacity: .9;
    margin-bottom: 12px;
}

/* NUMBER */
.token-number {
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 12px;
}

/* ROOM */
.token-room {
    font-size: 14px;
    opacity: .92;
}

/* =========================================================
   UPCOMING
   ========================================================= */

.upcoming-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* TITLE */
.section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

/* TOKENS */
.upcoming-tokens {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* CHIP */
.token-chip {
    min-width: 74px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient( 135deg, #f1f5f9, #f8fafc );
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

/* =========================================================
   FOOTER
   ========================================================= */

.token-footer {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px;
}

/* BOX */
.footer-box {
    min-height: 86px;
    border-radius: 22px;
    background: linear-gradient( 180deg, #ffffff, #f8fafc );
    border: 1px solid rgba(226,232,240,.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    /* SMALL */
    .footer-box small {
        font-size: 12px;
        color: var(--text-light);
    }

    /* VALUE */
    .footer-box strong {
        font-size: 24px;
        font-weight: 900;
        color: var(--text);
    }

/* =========================================================
   ACTIONS
   ========================================================= */

.token-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* BUTTON */
.action-btn {
    min-height: 52px;
    border: none;
    border-radius: 18px;
    background: linear-gradient( 180deg, #f8fafc, #f1f5f9 );
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .25s ease;
}

    /* PRIMARY */
    .action-btn.primary {
        background: linear-gradient( 135deg, #2563eb, #3b82f6 );
        color: white;
    }

    /* HOVER */
    .action-btn:hover {
        transform: translateY(-2px);
    }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:992px) {

    .token-hero {
        padding: 28px;
    }

    .token-hero-content h1 {
        font-size: 42px;
    }

    .token-toolbar {
        padding: 20px;
    }

    .token-search {
        width: 100%;
    }
}

/* MOBILE */
@media(max-width:768px) {

    .token-hero {
        border-radius: 28px;
    }

    .token-hero-actions {
        width: 100%;
        flex-direction: column;
    }

    .hero-btn,
    .token-hero .btn {
        width: 100%;
    }

    .token-toolbar-right {
        width: 100%;
    }

    .token-grid-modern {
        grid-template-columns: 1fr;
    }

    .token-footer {
        grid-template-columns: 1fr;
    }

    .token-actions {
        grid-template-columns: 1fr;
    }

    .token-number {
        font-size: 52px;
    }
}
/* =========================================================
   RAPID HMS
   OPD CONSULTATION
   opd.css
   ========================================================= */

/* =========================
   OPD Consultation Page - Modern Style
   ========================= */
.opd-consultation-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9fafb;
    color: #111827;
}

/* =========================
   Patient Profile Card
   ========================= */
.patient-profile-card {
    display: flex;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 14px;
}

    .patient-profile-card div strong {
        color: #111827;
        font-weight: 700;
    }

    .patient-profile-card div span {
        color: #6b7280;
    }

/* =========================
   Stepper
   ========================= */
.opd-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 6px;
    transition: all 0.3s;
}

.step.active .step-number {
    background: #2563eb;
    color: #ffffff;
}

.step.completed .step-number {
    background: #16a34a;
    color: #ffffff;
}

.step::after {
    content: '';
    position: absolute;
    top: 16px;
    right: -50%;
    height: 2px;
    width: 100%;
    background: #e5e7eb;
    z-index: -1;
}

.step:last-child::after {
    display: none;
}

/* =========================
   Step Card
   ========================= */
.step-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

    .step-card h4 {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 20px;
        color: #111827;
    }

/* =========================
   Input Row
   ========================= */
.input-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.modern-input, .modern-select {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    transition: all 0.2s;
}

    .modern-input:focus, .modern-select:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    }

/* =========================
   Step Table
   ========================= */
.step-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .step-table th,
    .step-table td {
        padding: 12px 14px;
        border: 1px solid #e5e7eb;
        text-align: left;
    }

    .step-table th {
        background: #f3f4f6;
        color: #111827;
        font-weight: 600;
    }

/* =========================
   Buttons
   ========================= */
.btn-add {
    background: #2563eb;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

    .btn-add:hover {
        background: #1d4ed8;
    }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 20px;
}

.btn-prev,
.btn-next {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-prev {
    background: #f3f4f6;
    color: #374151;
}

    .btn-prev:hover {
        background: #e5e7eb;
    }

.btn-next {
    background: #2563eb;
    color: #ffffff;
}

    .btn-next:hover {
        background: #1d4ed8;
    }

/* =========================
   Responsive
   ========================= */
@media(max-width: 1024px) {
    .input-row {
        flex-direction: column;
    }

    .step::after {
        width: 50%;
        right: -25%;
    }
}

@media(max-width: 640px) {
    .opd-stepper {
        flex-direction: column;
        align-items: flex-start;
    }

    .step {
        margin-bottom: 20px;
    }
}
/* =========================================================
   RAPID HMS
   PRESCRIPTION
   opd.css
   ========================================================= */

/* =========================================================
   PAGE
   ========================================================= */

.prescription-page {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* =========================================================
   TOOLBAR
   ========================================================= */

.prescription-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px 28px;
    border-radius: 28px;
    background: linear-gradient( 180deg, #ffffff, #f8fafc );
    border: 1px solid rgba(226,232,240,.8);
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
}

/* LEFT */
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* BADGE */
.toolbar-badge {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37,99,235,.10);
    color: #2563eb;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .4px;
}

/* TITLE */
.toolbar-left h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

/* ACTIONS */
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* BTN */
.toolbar-btn {
    min-height: 50px;
    padding: 0 20px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: white;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .25s ease;
}

    /* HOVER */
    .toolbar-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(15,23,42,.06);
    }

/* =========================================================
   CONTAINER
   ========================================================= */

.prescription-container {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border-radius: 34px;
    background: white;
    border: 1px solid rgba(226,232,240,.8);
    box-shadow: 0 24px 44px rgba(15,23,42,.06);
}

/* =========================================================
   WATERMARK
   ========================================================= */

.rx-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 120px;
    font-weight: 900;
    color: rgba(15,23,42,.03);
    pointer-events: none;
    white-space: nowrap;
}

/* =========================================================
   HEADER
   ========================================================= */

.rx-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 28px;
    border-bottom: 2px dashed #e2e8f0;
}

/* =========================================================
   HOSPITAL
   ========================================================= */

.rx-hospital {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* LOGO */
.hospital-logo {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    background: linear-gradient( 135deg, #2563eb, #3b82f6 );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: white;
    box-shadow: 0 14px 30px rgba(37,99,235,.24);
}

/* TITLE */
.rx-hospital h1 {
    margin: 0 0 8px;
    font-size: 36px;
    font-weight: 900;
    color: var(--text);
}

/* TEXT */
.rx-hospital p {
    margin: 0 0 6px;
    font-size: 15px;
    color: var(--text-light);
}

/* CONTACT */
.rx-hospital span {
    font-size: 14px;
    font-weight: 700;
    color: #2563eb;
}

/* =========================================================
   HEADER RIGHT
   ========================================================= */

.rx-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

/* CHIP */
.rx-chip {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(37,99,235,.10);
    color: #2563eb;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
}

/* DATE */
.rx-date-box {
    min-width: 220px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient( 180deg, #f8fafc, #ffffff );
    border: 1px solid #e2e8f0;
    text-align: right;
}

    /* SMALL */
    .rx-date-box small {
        display: block;
        margin-bottom: 8px;
        font-size: 12px;
        color: var(--text-light);
    }

    /* STRONG */
    .rx-date-box strong {
        font-size: 18px;
        color: var(--text);
    }

/* =========================================================
   DOCTOR STRIP
   ========================================================= */

.doctor-strip {
    margin-top: 28px;
    min-height: 72px;
    padding: 0 24px;
    border-radius: 22px;
    background: linear-gradient( 135deg, rgba(37,99,235,.08), rgba(59,130,246,.06) );
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

    /* LEFT */
    .doctor-strip strong {
        display: block;
        font-size: 18px;
        font-weight: 800;
        color: var(--text);
    }

    /* SPAN */
    .doctor-strip span {
        font-size: 13px;
        color: var(--text-light);
    }

/* =========================================================
   PATIENT CARD
   ========================================================= */

.rx-patient-card {
    margin-top: 28px;
    padding: 28px;
    border-radius: 30px;
    background: linear-gradient( 180deg, #ffffff, #f8fafc );
    border: 1px solid rgba(226,232,240,.8);
    display: flex;
    align-items: center;
    gap: 24px;
}

/* AVATAR */
.patient-avatar {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: linear-gradient( 135deg, rgba(37,99,235,.12), rgba(59,130,246,.08) );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
}

/* GRID */
.patient-info-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 20px;
}

/* ITEM */
.patient-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    /* SMALL */
    .patient-item small {
        font-size: 12px;
        color: var(--text-light);
    }

    /* STRONG */
    .patient-item strong {
        font-size: 16px;
        font-weight: 800;
        color: var(--text);
    }

/* =========================================================
   GRID
   ========================================================= */

.rx-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* =========================================================
   SECTION CARD
   ========================================================= */

.rx-section-card,
.rx-section-main {
    padding: 28px;
    border-radius: 30px;
    background: linear-gradient( 180deg, #ffffff, #f8fafc );
    border: 1px solid rgba(226,232,240,.8);
}

/* TITLE */
.section-title {
    margin-bottom: 18px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

/* TEXT */
.rx-section-card p {
    margin: 0;
    line-height: 1.8;
    color: #475569;
    font-size: 14px;
}

/* =========================================================
   SECTION HEADER
   ========================================================= */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

    /* TITLE */
    .section-header h3 {
        margin: 0;
        font-size: 22px;
        font-weight: 800;
        color: var(--text);
    }

/* COUNT */
.rx-count {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37,99,235,.10);
    color: #2563eb;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
}

/* =========================================================
   TABLE
   ========================================================= */

.rx-table {
    width: 100%;
    border-collapse: collapse;
}

    /* HEAD */
    .rx-table thead {
        background: linear-gradient( 180deg, #f8fafc, #f1f5f9 );
    }

    /* CELL */
    .rx-table th,
    .rx-table td {
        padding: 18px;
        text-align: left;
        border-bottom: 1px solid #f1f5f9;
        font-size: 14px;
    }

    /* HEAD */
    .rx-table th {
        font-weight: 800;
        color: var(--text);
    }

/* MED */
.medicine-name {
    font-weight: 700;
    color: var(--text);
}

/* DOSAGE */
.dosage-badge {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(34,197,94,.10);
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
}

/* =========================================================
   TAGS
   ========================================================= */

.rx-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* TAG */
.rx-tag {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient( 180deg, #f8fafc, #f1f5f9 );
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
}

    /* URGENT */
    .rx-tag.urgent {
        background: rgba(239,68,68,.10);
        color: #dc2626;
        border-color: rgba(239,68,68,.18);
    }

    /* LABEL */
    .rx-tag span {
        padding: 4px 8px;
        border-radius: 999px;
        background: rgba(255,255,255,.7);
        font-size: 10px;
        font-weight: 800;
    }

/* =========================================================
   FOLLOWUP
   ========================================================= */

.followup-section {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* BOX */
.followup-box {
    min-height: 110px;
    padding: 24px;
    border-radius: 28px;
    background: linear-gradient( 135deg, rgba(37,99,235,.08), rgba(59,130,246,.04) );
    border: 1px solid rgba(59,130,246,.10);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

    /* SMALL */
    .followup-box small {
        font-size: 12px;
        color: var(--text-light);
    }

    /* STRONG */
    .followup-box strong {
        font-size: 18px;
        font-weight: 800;
        color: var(--text);
    }

/* =========================================================
   FOOTER
   ========================================================= */

.rx-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

/* NOTE */
.footer-note {
    max-width: 520px;
}

    /* STRONG */
    .footer-note strong {
        display: block;
        margin-bottom: 12px;
        font-size: 15px;
        color: var(--text);
    }

    /* LIST */
    .footer-note ul {
        margin: 0;
        padding-left: 18px;
        color: #475569;
        line-height: 1.8;
        font-size: 14px;
    }

/* SIGN */
.doctor-signature {
    min-width: 240px;
    text-align: center;
}

/* LINE */
.signature-line {
    height: 1px;
    background: #0f172a;
    margin-bottom: 14px;
}

/* NAME */
.doctor-signature strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    color: var(--text);
}

/* SMALL */
.doctor-signature small {
    color: var(--text-light);
    font-size: 13px;
}

/* =========================================================
   PRINT
   ========================================================= */

@media print {

    body {
        background: white !important;
    }

    .no-print,
    .sidebar,
    .topbar,
    .smart-footer {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .page-body {
        padding: 0 !important;
    }

    .prescription-container {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 20px !important;
    }

    .rx-watermark {
        opacity: .05;
    }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:992px) {

    .prescription-container {
        padding: 28px;
    }

    .rx-grid,
    .followup-section {
        grid-template-columns: 1fr;
    }

    .rx-header {
        flex-direction: column;
    }

    .rx-header-right {
        width: 100%;
        align-items: flex-start;
    }
}

/* MOBILE */
@media(max-width:768px) {

    .prescription-toolbar {
        padding: 20px;
    }

    .toolbar-actions {
        width: 100%;
        flex-direction: column;
    }

    .toolbar-btn,
    .prescription-toolbar .btn {
        width: 100%;
    }

    .rx-hospital {
        flex-direction: column;
        align-items: flex-start;
    }

    .rx-patient-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .doctor-strip {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

    .rx-table {
        min-width: 700px;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .rx-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}