/* =========================================
   GLOBAL RESET
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: Arial, sans-serif;
    background: #f1f5f9;
    color: #172b4d;
}


/* =========================================
   APP LAYOUT
========================================= */

.app {
    display: flex;
    min-height: 100vh;
}


/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    width: 290px;
    min-height: 100vh;
    background: #0f172a;
    color: white;
    padding: 28px 18px;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    padding: 0 20px 35px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 20px;
    color: #e2e8f0;
    text-decoration: none;
    border-radius: 12px;
    font-size: 17px;
    transition: 0.3s;
}

.sidebar nav a:hover {
    background: #1e293b;
}

.sidebar nav a.active {
    background: #2563eb;
    color: white;
}


/* =========================================
   MAIN CONTENT
========================================= */

.main-content {
    flex: 1;
    min-width: 0;
    padding: 36px;
    background: #f1f5f9;
}


/* =========================================
   TOPBAR
========================================= */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.topbar h1 {
    font-size: 38px;
    margin-bottom: 6px;
}

.topbar p {
    color: #64748b;
    font-size: 18px;
}


/* =========================================
   DASHBOARD STATISTICS
========================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: white;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: #dbeafe;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-card p {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 15px;
}

.stat-card h2 {
    font-size: 28px;
}


/* =========================================
   DASHBOARD GRID
========================================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 25px;
}


/* =========================================
   CONTENT CARD
========================================= */

.content-card {
    background: white;
    border-radius: 18px;
    padding: 36px;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}


/* =========================================
   SECTION HEADER
========================================= */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
}

.section-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.section-header p {
    color: #64748b;
    font-size: 16px;
}

.section-header a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}


/* =========================================
   FORM GRID
========================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 30px;
    width: 100%;
}


/* =========================================
   FORM GROUP
========================================= */

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-group.full-width {
    grid-column: 1 / -1;
}


/* =========================================
   FORM LABEL
========================================= */

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #334155;
    font-size: 16px;
    font-weight: 600;
}


/* =========================================
   FORM INPUTS
========================================= */

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: white;
    color: #172b4d;
    font-family: Arial, sans-serif;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}


/* INPUT HEIGHT */

.form-group input,
.form-group select {
    height: 54px;
}


/* TEXTAREA */

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}


/* PLACEHOLDER */

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}


/* INPUT FOCUS */

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* =========================================
   FORM ACTIONS
========================================= */

.form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 35px;
}


/* =========================================
   BUTTONS
========================================= */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 26px;
    min-height: 52px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 26px;
    min-height: 52px;
    border: none;
    border-radius: 10px;
    background: #e2e8f0;
    color: #334155;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: #cbd5e1;
}


/* =========================================
   TABLE
========================================= */

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    padding: 16px;
    text-align: left;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    white-space: nowrap;
}

table td {
    padding: 18px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
    white-space: nowrap;
}

table small {
    display: block;
    margin-top: 5px;
    color: #64748b;
}

.patient-code {
    color: #2563eb;
}

.empty-message {
    text-align: center;
    padding: 30px !important;
    color: #64748b;
}


/* =========================================
   STATUS
========================================= */

.status-paid,
.status-partial,
.status-pending {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-paid {
    background: #dcfce7;
    color: #15803d;
}

.status-partial {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pending {
    background: #fef3c7;
    color: #b45309;
}


/* =========================================
   MEDICAL UPLOAD FORM
========================================= */

.medical-upload-form {
    width: 100%;
}

.medical-field {
    width: 100%;
    margin-bottom: 28px;
}

.medical-field label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
}

.medical-field input[type="text"],
.medical-field select,
.medical-field input[type="file"] {
    display: block;
    width: 100%;
    height: 56px;
    padding: 0 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: white;
    font-size: 16px;
    outline: none;
}

.medical-field input[type="file"] {
    padding: 15px;
    cursor: pointer;
}

.medical-field small {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 14px;
}

.medical-field input:focus,
.medical-field select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* =========================================
   PATIENT SUMMARY
========================================= */

.patient-summary {
    padding: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.patient-summary h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.patient-summary p {
    font-size: 16px;
    color: #475569;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1100px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 800px) {

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: auto;
    }
}


@media (max-width: 700px) {

    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .main-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .section-header {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }

    .content-card {
        padding: 24px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}
/* =========================================
   PATIENT SEARCH AREA
========================================= */

.patient-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.patient-search-form input[type="text"] {
    width: 360px;
    height: 54px;
    padding: 0 18px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

.patient-search-form input[type="text"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* SEARCH BUTTON */

.patient-search-form .btn-primary {
    min-width: 145px;
    height: 54px;
}


/* CLEAR BUTTON */

.patient-search-form .btn-secondary {
    min-width: 100px;
    height: 54px;
}


/* =========================================
   VIEW PROFILE BUTTON
========================================= */

.view-profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}

.view-profile-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}
/* =========================================
   PATIENT PROFILE PAGE
========================================= */

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.profile-header h1 {
    font-size: 38px;
    margin-bottom: 8px;
}

.profile-header p {
    color: #64748b;
    font-size: 18px;
}


/* =========================================
   PROFILE CARD
========================================= */

.profile-card {
    background: white;
    border-radius: 18px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}


/* =========================================
   PATIENT PROFILE TOP
========================================= */

.profile-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 25px;

    margin-bottom: 30px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

}


/* =========================================
   PATIENT NAME - LEFT SIDE
========================================= */

.profile-name {

    order: 1;

    text-align: left;

}


.profile-name h2 {

    margin: 0 0 8px 0;

    font-size: 28px;

    color: #172b4d;

}


.profile-name p {

    margin: 0;

    color: #2563eb;

    font-size: 16px;

    font-weight: 600;

}


/* =========================================
   AVATAR - RIGHT SIDE
========================================= */

.profile-avatar {

    order: 2;

    width: 75px;

    height: 75px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #dbeafe;

    color: #2563eb;

    border-radius: 50%;

    font-size: 30px;

    font-weight: 700;

}

/* =========================================
   PATIENT DETAILS GRID
========================================= */

.patient-details {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 25px 40px;
}


/* =========================================
   EACH DETAIL
========================================= */

.detail-item {
    display: flex;
    flex-direction: column;

    gap: 8px;

    padding: 18px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 12px;
}


.detail-label {
    color: #64748b;

    font-size: 14px;

    font-weight: 600;

    text-transform: uppercase;
}


.detail-value {
    color: #172b4d;

    font-size: 17px;

    font-weight: 500;

    line-height: 1.6;
}


/* =========================================
   FULL WIDTH ADDRESS
========================================= */

.detail-item.full-width {
    grid-column: 1 / -1;
}


/* =========================================
   MEDICAL RECORDS SECTION
========================================= */

.records-section {
    background: white;

    border-radius: 18px;

    padding: 35px;

    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}


.records-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 30px;
}


.records-header h2 {
    font-size: 25px;
}


.records-header p {
    margin-top: 8px;

    color: #64748b;

    font-size: 15px;
}


/* =========================================
   MEDICAL RECORD ITEM
========================================= */

.record-item {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 20px;

    margin-bottom: 15px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 12px;
}


.record-info {
    display: flex;

    align-items: center;

    gap: 15px;
}


.record-icon {
    width: 45px;

    height: 45px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #dbeafe;

    border-radius: 10px;

    font-size: 22px;
}


.record-info h3 {
    font-size: 16px;

    margin-bottom: 5px;
}


.record-info p {
    color: #64748b;

    font-size: 14px;
}


.view-record {
    padding: 10px 18px;

    background: #2563eb;

    color: white;

    border-radius: 8px;

    text-decoration: none;

    font-weight: 600;

    font-size: 14px;
}


.view-record:hover {
    background: #1d4ed8;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    .profile-header {
        flex-direction: column;

        align-items: flex-start;

        gap: 20px;
    }


    .profile-card {
        padding: 22px;
    }


    .profile-top {
        align-items: flex-start;
    }


    .patient-details {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    .detail-item.full-width {
        grid-column: auto;
    }


    .records-section {
        padding: 22px;
    }


    .record-item {
        flex-direction: column;

        align-items: flex-start;

        gap: 15px;
    }

}
/* =========================================
   SUCCESS PAGE
========================================= */

.success-page {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 40px;

    background: #f1f5f9;

}


.success-card {

    width: 100%;

    max-width: 650px;

    padding: 55px 50px;

    text-align: center;

    background: white;

    border-radius: 22px;

    box-shadow: 0 15px 45px rgba(

        15,

        23,

        42,

        0.10

    );

}


/* SUCCESS ICON */

.success-icon {

    width: 80px;

    height: 80px;

    margin: 0 auto 25px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #dcfce7;

    color: #16a34a;

    font-size: 42px;

    font-weight: 700;

}


/* TITLE */

.success-card h1 {

    margin-bottom: 15px;

    font-size: 32px;

    color: #172b4d;

}


/* MESSAGE */

.success-message {

    margin-bottom: 30px;

    color: #64748b;

    font-size: 17px;

}


/* PATIENT CODE BOX */

.patient-code-box {

    display: flex;

    flex-direction: column;

    gap: 8px;

    padding: 22px;

    margin-bottom: 32px;

    background: #eff6ff;

    border: 1px solid #bfdbfe;

    border-radius: 14px;

}


.patient-code-box span {

    color: #64748b;

    font-size: 15px;

}


.patient-code-box strong {

    color: #2563eb;

    font-size: 28px;

    letter-spacing: 1px;

}


/* ACTION BUTTONS */

.success-actions {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 15px;

    flex-wrap: wrap;

}


/* RESPONSIVE */

@media (max-width: 600px) {


    .success-page {

        padding: 20px;

    }


    .success-card {

        padding: 40px 25px;

    }


    .success-card h1 {

        font-size: 26px;

    }


    .success-actions {

        flex-direction: column;

    }


    .success-actions a {

        width: 100%;

        text-align: center;

    }

}
/* =========================================
   SMALLER HEADINGS
========================================= */

.topbar h1 {
    font-size: 23px;
}

.section-header h2 {
    font-size: 22px;
}

.stat-card h2 {
    font-size: 26px;
}

.patient-summary h3 {
    font-size: 22px;
}

.success-card h1 {
    font-size: 28px;
}
/* =========================================
   BILL SUCCESS PAGE
========================================= */

.bill-success-card {

    max-width: 700px;

}


/* =========================================
   BILL DETAILS
========================================= */

.bill-details {

    width: 100%;

    margin: 25px 0 32px;

    padding: 8px 22px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

}


/* EACH ROW */

.bill-detail-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 17px 0;

    border-bottom: 1px solid #e2e8f0;

}


/* REMOVE BORDER FROM LAST ROW */

.bill-detail-row:last-child {

    border-bottom: none;

}


/* LABEL */

.bill-detail-row span {

    color: #64748b;

    font-size: 15px;

}


/* VALUE */

.bill-detail-row strong {

    color: #172b4d;

    font-size: 16px;

    text-align: right;

}


/* AMOUNT */

.amount-row {

    margin: 5px -22px -8px;

    padding: 20px 22px;

    background: #eff6ff;

    border-radius: 0 0 14px 14px;

}


.amount-row span {

    color: #475569;

    font-weight: 600;

}


.amount-row strong {

    color: #2563eb;

    font-size: 24px;

}


/* MOBILE */

@media (max-width: 600px) {


    .bill-detail-row {

        align-items: flex-start;

        flex-direction: column;

        gap: 5px;

    }


    .bill-detail-row strong {

        text-align: left;

    }


    .amount-row {

        flex-direction: row;

        align-items: center;

    }

}
/* =========================================
   BUTTON TEXT FIX
========================================= */

.btn-primary,
.btn-primary:visited,
.btn-primary:hover,
.btn-primary:active {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background: #2563eb !important;
    color: #ffffff !important;

    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;

    padding: 12px 20px;
    border-radius: 10px;

    border: none;
    cursor: pointer;
}
/* =========================================
   ACTION BUTTONS
========================================= */

.action-buttons{

    display:flex;

    gap:8px;

    align-items:center;

    justify-content:center;

    flex-wrap:wrap;

}

/* =========================================
   DELETE BUTTON
========================================= */

.btn-danger{

    display:inline-block;

    padding:8px 14px;

    background:#dc3545;

    color:#fff;

    text-decoration:none;

    border-radius:6px;

    font-size:14px;

    font-weight:600;

    transition:.3s;

}

.btn-danger:hover{

    background:#b02a37;

    color:#fff;

}
/*==================================================
            PREMIUM HOSPITAL INVOICE
==================================================*/

.invoice-wrapper{

    background:#eef4fb;

    padding:50px;

    min-height:100vh;

}

.invoice-container{

    width:900px;

    margin:auto;

    background:#fff;

    border-radius:18px;

    overflow:hidden;

    box-shadow:0 15px 50px rgba(0,0,0,.12);

}


/*==============================
        HEADER
==============================*/

.invoice-top{

    background:linear-gradient(135deg,#2563eb,#1d4ed8);

    color:#fff;

    padding:35px 40px;

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

}

.hospital-name{

    font-size:34px;

    font-weight:700;

    margin-bottom:10px;

}

.hospital-address{

    line-height:28px;

    opacity:.95;

}

.invoice-title{

    text-align:right;

}

.invoice-title h2{

    color:#fff;

    font-size:34px;

    margin-bottom:15px;

}

.invoice-title p{

    margin:8px 0;

}


/*==============================
       INFORMATION CARDS
==============================*/

.invoice-info{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:25px;

    padding:35px;

}

.info-box{

    background:#fff;

    border-left:6px solid #2563eb;

    border-radius:12px;

    padding:22px;

    box-shadow:0 5px 18px rgba(0,0,0,.08);

}

.info-box h3{

    color:#2563eb;

    margin-bottom:15px;

    font-size:22px;

}

.info-box p{

    margin:10px 0;

    color:#444;

    line-height:24px;

}


/*==============================
        BILL TABLE
==============================*/

.invoice-table{

    width:92%;

    margin:0 auto 30px;

    border-collapse:collapse;

    border-radius:12px;

    overflow:hidden;

}

.invoice-table thead{

    background:#2563eb;

    color:#fff;

}

.invoice-table th{

    padding:16px;

    font-size:16px;

}

.invoice-table td{

    padding:16px;

    border-bottom:1px solid #e5e7eb;

}

.invoice-table tbody tr:nth-child(even){

    background:#f8fafc;

}

.invoice-table tbody tr:hover{

    background:#eef5ff;

}

.invoice-table tfoot{

    background:#eff6ff;

    font-size:18px;

    font-weight:bold;

}

.invoice-table tfoot th{

    padding:18px;

    color:#2563eb;

}


/*==============================
      STATUS BADGES
==============================*/

.paid{

    display:inline-block;

    background:#16a34a;

    color:#fff;

    padding:6px 18px;

    border-radius:50px;

    font-size:13px;

    font-weight:bold;

}

.pending{

    display:inline-block;

    background:#dc2626;

    color:#fff;

    padding:6px 18px;

    border-radius:50px;

    font-size:13px;

    font-weight:bold;

}

.partial{

    display:inline-block;

    background:#f59e0b;

    color:#fff;

    padding:6px 18px;

    border-radius:50px;

    font-size:13px;

    font-weight:bold;

}


/*==============================
        NOTES
==============================*/

.invoice-note{

    width:92%;

    margin:25px auto;

    background:#fff8e7;

    border-left:5px solid #f59e0b;

    padding:20px;

    border-radius:10px;

}

.invoice-note h3{

    margin-bottom:10px;

    color:#d97706;

}


/*==============================
       SIGNATURES
==============================*/

.invoice-signatures{

    display:flex;

    justify-content:space-between;

    width:92%;

    margin:70px auto 20px;

    text-align:center;

}

.invoice-signatures div{

    width:220px;

    padding-top:15px;

    border-top:2px solid #555;

    font-weight:600;

    color:#333;

}


/*==============================
         BUTTONS
==============================*/

.invoice-actions{

    display:flex;

    justify-content:center;

    gap:20px;

    padding:30px;

}

.invoice-actions a,

.invoice-actions button{

    border:none;

    padding:14px 28px;

    border-radius:50px;

    cursor:pointer;

    font-size:15px;

    font-weight:600;

    text-decoration:none;

    transition:.3s;

}

.invoice-actions .btn-primary{

    background:#2563eb;

    color:#fff;

}

.invoice-actions .btn-primary:hover{

    background:#1e40af;

    transform:translateY(-3px);

}

.invoice-actions .btn-secondary{

    background:#f1f5f9;

    color:#111827;

}

.invoice-actions .btn-secondary:hover{

    background:#e2e8f0;

}


/*==============================
        PRINT
==============================*/

@media print{

    body{

        background:#fff;

    }

    .invoice-wrapper{

        padding:0;

        background:#fff;

    }

    .invoice-container{

        width:100%;

        box-shadow:none;

        border-radius:0;

    }

    .invoice-actions{

        display:none;

    }

}

/* ========================================
   MAIN PAGE LAYOUT
======================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    z-index: 1000;
}

.main-content {
    margin-left: 240px;
    width: calc(100% - 240px);
    min-height: 100vh;
    padding: 24px 30px;
    box-sizing: border-box;
}


/* ========================================
   PATIENT PROFILE
======================================== */

.profile-card,
.content-card {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}


/* ========================================
   PATIENT DETAILS
======================================== */

.patient-details {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.patient-details .full-width {
    grid-column: 1 / -1;
}


/* ========================================
   CLINICAL FORM
======================================== */

.clinical-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 16px;
}


/* Prescription uses full width */

.prescription-box {
    grid-column: 1 / -1;
}


/* ========================================
   TEXTAREA
======================================== */

.clinical-grid textarea {
    width: 100%;
    min-height: 105px;
    resize: vertical;
    box-sizing: border-box;
}


/* ========================================
   CONSULTATION FEE
======================================== */

.fee-grid {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.fee-grid .form-group {
    min-width: 0;
}


/* ========================================
   SECTION TITLE
======================================== */

.visit-section-title {
    margin-top: 22px;
    margin-bottom: 14px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.visit-section-title h2 {
    margin: 0;
}

.visit-section-title p {
    margin: 4px 0 0;
}


/* ========================================
   FORM ACTIONS
======================================== */

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}


/* ========================================
   TABLE
======================================== */

.table-container {
    width: 100%;
    overflow-x: auto;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1100px) {

    .clinical-grid {
        grid-template-columns: 1fr;
    }

    .prescription-box {
        grid-column: auto;
    }

    .fee-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .patient-details {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 768px) {

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

    .patient-details,
    .clinical-grid,
    .fee-grid {
        grid-template-columns: 1fr;
    }

    .prescription-box {
        grid-column: auto;
    }

}
/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    z-index: 9999;
    box-sizing: border-box;
}


/* =========================================
   MAIN CONTENT
========================================= */

.main-content {
    margin-left: 240px !important;
    width: calc(100% - 240px) !important;
    min-height: 100vh;
    padding: 24px 30px;
    box-sizing: border-box;
}


/* =========================================
   PATIENT DETAILS
========================================= */

.patient-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.address-item {
    grid-column: 1 / -1;
}


/* =========================================
   CLINICAL FORM
========================================= */

.clinical-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.clinical-grid .form-group {
    min-width: 0;
}

.prescription-box {
    grid-column: 1 / -1;
}


/* =========================================
   FEE GRID
========================================= */

.fee-grid {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 14px;
}


/* =========================================
   TEXTAREA
========================================= */

.clinical-grid textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 100px;
}


/* =========================================
   TABLE
========================================= */

.table-container {
    width: 100%;
    overflow-x: auto;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 1100px) {

    .clinical-grid {
        grid-template-columns: 1fr;
    }

    .prescription-box {
        grid-column: auto;
    }

    .fee-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .patient-details {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 768px) {

    .sidebar {
        position: relative !important;
        width: 100%;
        height: auto;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px;
    }

    .clinical-grid,
    .fee-grid,
    .patient-details {
        grid-template-columns: 1fr;
    }

    .prescription-box,
    .address-item {
        grid-column: auto;
    }

}
