﻿﻿ /* =========================================================
   RAPID HMS
   COMPACT MODERN PATIENT REGISTRATION
   ========================================================= */
/* =====================================================
   PATIENT REGISTRATION PAGE
===================================================== */
/* =====================================================
   PATIENT REGISTRATION PAGE
===================================================== */
.patient-reg-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =====================================================
   HEADER
===================================================== */

.patient-reg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.patient-reg-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.patient-reg-subtitle {
    margin-top: 4px;
    font-size: 14px;
    color: #64748b;
}

/* =====================================================
   STEPPER
===================================================== */

.patient-reg-stepper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.patient-reg-step {
    flex: 1;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all .2s ease;
}

    .patient-reg-step.active {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff;
    }

.patient-reg-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.patient-reg-step.active .patient-reg-step-number {
    background: rgba(255,255,255,.2);
    color: #fff;
}

/* =====================================================
   CARD
===================================================== */

.patient-reg-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.patient-reg-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f7;
}

.patient-reg-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.patient-reg-card-subtitle {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.patient-reg-card-body {
    padding: 18px;
}

/* =====================================================
   GRID
===================================================== */

.patient-reg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.patient-reg-col-2 {
    grid-column: span 2;
}

.patient-reg-col-3 {
    grid-column: span 3;
}

.patient-reg-col-4 {
    grid-column: span 4;
}

/* =====================================================
   FIELD
===================================================== */

.patient-reg-field {
    display: flex;
    flex-direction: column;
}

    .patient-reg-field label {
        margin-bottom: 5px;
        font-size: 12px;
        font-weight: 600;
        color: #334155;
    }

.patient-reg-input,
.patient-reg-select,
.patient-reg-textarea {
    width: 100%;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    transition: .2s;
}

.patient-reg-input,
.patient-reg-select {
    height: 40px;
}

.patient-reg-textarea {
    min-height: 100px;
    resize: vertical;
}

    .patient-reg-input:focus,
    .patient-reg-select:focus,
    .patient-reg-textarea:focus {
        border-color: #2563eb;
        outline: none;
        box-shadow: 0 0 0 3px rgba(37,99,235,.08);
    }

/* =====================================================
   PHOTO
===================================================== */

.patient-reg-photo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.patient-reg-avatar {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    object-fit: cover;
}

/* =====================================================
   SWITCH
===================================================== */

.patient-reg-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.switch {
    position: relative;
    width: 42px;
    height: 22px;
}

    .switch input {
        display: none;
    }

.slider {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    background: #cbd5e1;
    cursor: pointer;
}

    .slider:before {
        content: "";
        width: 16px;
        height: 16px;
        position: absolute;
        left: 3px;
        top: 3px;
        background: #fff;
        border-radius: 50%;
        transition: .2s;
    }

.switch input:checked + .slider {
    background: #2563eb;
}

    .switch input:checked + .slider:before {
        transform: translateX(20px);
    }

/* =====================================================
   BADGES
===================================================== */

.patient-reg-badge-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.modern-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

    .modern-check.employee {
        background: #eff6ff;
        color: #2563eb;
    }

    .modern-check.vip {
        background: #fef2f2;
        color: #dc2626;
    }

/* =====================================================
   ACTIONS
===================================================== */

.patient-reg-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.patient-reg-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.patient-reg-btn-primary {
    background: #2563eb;
    color: #fff;
}

.patient-reg-btn-secondary {
    background: #f1f5f9;
    color: #334155;
}

.patient-reg-btn-success {
    background: #16a34a;
    color: #fff;
}

/* =====================================================
   VALIDATION
===================================================== */

.patient-reg-invalid,
.is-invalid {
    border-color: #dc2626 !important;
}

.invalid-feedback,
.error-text {
    color: #dc2626;
    font-size: 11px;
    margin-top: 4px;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width:1200px) {

    .patient-reg-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .patient-reg-col-2,
    .patient-reg-col-3,
    .patient-reg-col-4 {
        grid-column: span 2;
    }
}

@media (max-width:768px) {

    .patient-reg-grid {
        grid-template-columns: 1fr;
    }

    .patient-reg-col-2,
    .patient-reg-col-3,
    .patient-reg-col-4 {
        grid-column: span 1;
    }

    .patient-reg-stepper {
        flex-direction: column;
    }

    .patient-reg-step {
        min-width: 100%;
    }

    .patient-reg-actions {
        flex-direction: column;
    }

    .patient-reg-btn {
        width: 100%;
    }
}
/* ==========================================
   COMPLETED STEP
========================================== */

.patient-reg-step.completed {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

    .patient-reg-step.completed .patient-reg-step-number {
        background: rgba(255,255,255,.25);
        color: #fff;
    }
/*all patient*/
/* =========================================================
   PATIENT PAGE
   COMPACT ENTERPRISE UI
   ========================================================= */
/* =========================================================
   PAGE HEADER
   ========================================================= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* LEFT */
.page-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* TITLE */
.page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
}

/* SUBTITLE */
.page-subtitle {
    font-size: 13px;
    color: #64748b;
}

/* ACTIONS */
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* PRIMARY */
.btn-primary {
    background: linear-gradient( 135deg, #2563eb, #3b82f6 );
    color: white;
    box-shadow: 0 8px 18px rgba(37,99,235,.14);
}

/* SECONDARY */
.btn-secondary {
    background: #f1f5f9;
    color: #334155;
}

/* SMALL */
.btn-sm {
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 12px;
}

/* =========================================================
   STATS
   ========================================================= */
.patient-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.patient-stat-card {
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .patient-stat-card h3 {
        font-size: 42px;
        font-weight: 700;
        margin: 0;
    }

    .patient-stat-card span {
        display: block;
        margin-top: 10px;
        color: #475569;
    }

    .patient-stat-card::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 4px;
    }

/* ===== COLORS ===== */

.stat-blue h3 {
    color: #2563eb;
}

.stat-blue::after {
    background: #2563eb;
}

.stat-green h3 {
    color: #84cc16;
}

.stat-green::after {
    background: #84cc16;
}

.stat-orange h3 {
    color: #ea580c;
}

.stat-orange::after {
    background: #ea580c;
}

.stat-red h3 {
    color: #dc2626;
}

.stat-red::after {
    background: #dc2626;
}

.stat-purple h3 {
    color: #4338ca;
}

.stat-purple::after {
    background: #4338ca;
}

.stat-cyan h3 {
    color: #0891b2;
}

.stat-cyan::after {
    background: #0891b2;
}

/* ===== LARGE TABLETS ===== */

@media (max-width: 1200px) {

    .patient-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== TABLETS ===== */

@media (max-width: 768px) {

    .patient-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .patient-stat-card {
        padding: 22px 15px;
        min-height: 110px;
    }

        .patient-stat-card h3 {
            font-size: 34px;
        }

        .patient-stat-card span {
            font-size: 14px;
        }
}

/* ===== MOBILE ===== */

/* ===== MOBILE ===== */

@media (max-width: 576px) {

    .patient-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .patient-stat-card {
        min-height: 95px;
        padding: 20px;
    }

        .patient-stat-card h3 {
            font-size: 30px;
        }

        .patient-stat-card span {
            font-size: 14px;
        }

        .patient-stat-card small {
            font-size: 12px;
        }
}
/* =========================================================
   TOOLBAR
   ========================================================= */
.patients-toolbar-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* FILTERS */
.toolbar-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* SELECT */
.modern-select {
    min-width: 180px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #dbe3ee;
    background: white;
    font-size: 13px;
    outline: none;
}

/* =========================================================
   DIRECTORY CARD
   ========================================================= */

.patient-directory-card {
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    background: white;
}
/* =========================================================
   PATIENT DIRECTORY TABLE
   OPTIMIZED FINAL VERSION
   ========================================================= */

/* =========================================================
   TABLE HEADER
   ========================================================= */

.modern-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
    flex-wrap: wrap;
}

/* TITLE */
.table-header-left h4 {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

/* SUBTITLE */
.text-muted {
    font-size: 12px;
    color: #64748b;
}

/* =========================================================
   ACTIONS
   ========================================================= */

.table-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* BUTTON */
.table-header-btn {
    height: 38px;
    padding: 0 15px;
    border-radius: 12px;
    border: 1px solid #dbe3ee;
    background: white;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: .2s ease;
}

    /* HOVER */
    .table-header-btn:hover {
        border-color: #3b82f6;
        color: #2563eb;
        background: #f8fbff;
    }

    /* PRIMARY */
    .table-header-btn.primary {
        background: linear-gradient( 135deg, #2563eb, #3b82f6 );
        color: white;
        border: none;
        box-shadow: 0 8px 20px rgba(37,99,235,.14);
    }

/* =========================================================
   SEARCH PANEL
   ========================================================= */

.table-search-panel {
    padding: 14px 20px;
    border-bottom: 1px solid #edf2f7;
    background: #f8fafc;
}

/* =========================================================
   TABLE
   ========================================================= */

.modern-patient-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    /* =========================================================
   TABLE HEADER
   ========================================================= */

    .modern-patient-table thead th {
        background: #f8fafc;
        padding: 12px 12px;
        font-size: 11px;
        font-weight: 700;
        color: #64748b;
        border-bottom: 1px solid #edf2f7;
        white-space: nowrap;
    }

        /* ROUND CORNERS */
        .modern-patient-table thead th:first-child {
            border-top-left-radius: 14px;
        }

        .modern-patient-table thead th:last-child {
            border-top-right-radius: 14px;
        }

    /* =========================================================
   TABLE BODY
   ========================================================= */

    .modern-patient-table tbody td {
        padding: 8px 12px;
        vertical-align: middle;
        border-bottom: 1px solid #f1f5f9;
        font-size: 12px;
        color: #334155;
        height: 64px;
    }

    /* ROW */
    .modern-patient-table tbody tr {
        transition: .2s ease;
    }

        /* HOVER */
        .modern-patient-table tbody tr:hover {
            background: #fafcff;
        }

        /* LAST */
        .modern-patient-table tbody tr:last-child td {
            border-bottom: none;
        }

/* =========================================================
   PROFILE
   ========================================================= */

.patient-profile-card.compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* AVATAR */
.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient( 135deg, #dbeafe, #e0f2fe );
    color: #2563eb;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

    /* ONLINE */
    .profile-avatar::after {
        content: "";
        position: absolute;
        bottom: 0;
        right: 0;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #22c55e;
        border: 2px solid white;
    }

/* INFO */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* NAME */
.profile-name {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
}

/* META */
.profile-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 10px;
    color: #64748b;
}

/* =========================================================
   BADGES
   ========================================================= */

/* =========================================================
   BADGES
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2px;
}

/* SUCCESS */
.badge-success {
    background: rgba(34,197,94,.14);
    color: #16a34a;
}

/* INFO */
.badge-info {
    background: rgba(37,99,235,.12);
    color: #2563eb;
}

/* DANGER */
.badge-danger {
    background: rgba(239,68,68,.12);
    color: #dc2626;
    min-width: 42px;
}

/* =========================================================
   ACTIONS
   ========================================================= */

.table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: max-content;
}

.patient-directory-card .table-actions .btn {
    display: inline-flex;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0;
    border-radius: 6px;
    line-height: 1;
}

    .patient-directory-card .table-actions .btn .mdi {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
        font-size: 17px;
        line-height: 1;
    }


.patient-directory-card .table-header-actions {
    gap: 6px;
}

    .patient-directory-card .table-header-actions .btn {
        min-height: 30px;
        padding: 0.25rem 0.6rem;
        border-radius: 6px;
        font-size: 0.75rem;
        font-weight: 650;
        line-height: 1;
    }

        .patient-directory-card .table-header-actions .btn .mdi {
            margin-right: 0.25rem !important;
            font-size: 0.85rem;
        }

.patient-uhid {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.15rem 0.55rem;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ICON BUTTON */
.table-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
    font-size: 13px;
}

    /* HOVER */
    .table-action-btn:hover {
        background: rgba(37,99,235,.10);
        color: #2563eb;
        transform: translateY(-1px);
    }

/* =========================================================
   OPD BUTTON
   ========================================================= */

.opd-btn {
    height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient( 135deg, #2563eb, #3b82f6 );
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37,99,235,.14);
    transition: .2s ease;
}

    /* HOVER */
    .opd-btn:hover {
        transform: translateY(-1px);
    }
/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:992px) {

    .modern-table-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-header-actions {
        width: 100%;
    }
}

/* MOBILE */
@media(max-width:768px) {

    .modern-patient-table {
        min-width: 900px;
    }

    .table-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .table-header-btn {
        flex: 1;
    }
}
/* =========================================================
   FINAL VISIBILITY FIX
   ========================================================= */

/* TABLE TEXT */
.modern-patient-table {
    color: #0f172a !important;
}

    /* ALL TD */
    .modern-patient-table tbody td {
        opacity: 1 !important;
        color: #334155 !important;
    }

    /* HEADERS */
    .modern-patient-table thead th {
        color: #475569 !important;
        opacity: 1 !important;
    }

/* =========================================================
   PROFILE TEXT
   ========================================================= */

.profile-name {
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* META */
.profile-meta {
    color: #64748b !important;
    opacity: 1 !important;
}

/* =========================================================
   BADGES
   ========================================================= */

.badge {
    opacity: 1 !important;
    filter: none !important;
}

/* SUCCESS */
.badge-success {
    background: #dcfce7 !important;
    color: #15803d !important;
}

/* DANGER */
.badge-danger {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

/* INFO */
.badge-info {
    background: #dbeafe !important;
    color: #2563eb !important;
}

/* =========================================================
   ICON BUTTONS
   ========================================================= */

.table-action-btn {
    background: #f8fafc !important;
    color: #475569 !important;
    opacity: 1 !important;
}

    /* ICON */
    .table-action-btn i,
    .table-action-btn svg {
        opacity: 1 !important;
    }

/* =========================================================
   OPD BUTTON
   ========================================================= */

.opd-btn {
    opacity: 1 !important;
    color: white !important;
}

/* =========================================================
   BLOOD GROUP
   ========================================================= */

.blood-badge {
    font-weight: 700 !important;
    letter-spacing: .3px;
}

.patient-profile-header-card {
    margin-bottom: 20px;
}

.table-responsive {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

    .modern-table th {
        background: #f8fafc;
        padding: 14px;
        text-align: left;
        font-size: 13px;
        color: #64748b;
        font-weight: 700;
    }

    .modern-table td {
        padding: 14px;
        border-top: 1px solid #eef2f7;
    }

    .modern-table tbody tr:hover {
        background: #fafcff;
    }

.history-main-card {
    border-radius: 20px;
    overflow: hidden;
}

.date-cell {
    white-space: nowrap;
    min-width: 95px;
}

.patient-directory-card table th:nth-child(6),
.patient-directory-card table td:nth-child(6) {
    min-width: 110px;
    white-space: nowrap;
}

.patient-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    color: var(--hms-muted);
    font-size: 13px;
    white-space: nowrap;
}

.patient-age {
    white-space: nowrap;
}