﻿/* =========================================================
   PAGE
========================================================= */

.appointment-page {
    max-width: 1600px;
    margin: auto;
    padding: 18px;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* =========================================================
   PAGE HEADER
========================================================= */

.page-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 6px;
    margin-bottom: 4px;
}

.page-main-title {
    margin: 0 0 2px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: #0f172a;
}

.page-subtitle {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* =========================================================
   HEADER ACTIONS
========================================================= */

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-btn {
    height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid #dbe3ee;
    background: white;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

    .header-btn:hover {
        transform: translateY(-1px);
        border-color: #2563eb;
        color: #2563eb;
    }

    .header-btn.primary {
        border: none;
        color: white;
        background: linear-gradient( 135deg, #2563eb, #3b82f6);
        box-shadow: 0 10px 24px rgba(37,99,235,.18);
    }

/* =========================================================
   MAIN LAYOUT
========================================================= */

.appointment-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

/* =========================================================
   SECTION
========================================================= */

.appointment-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeUp .25s ease;
}

/* =========================================================
   SECTION HEADER
========================================================= */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .section-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 800;
        color: #0f172a;
    }

.mt-20 {
    margin-top: 4px;
}

/* =========================================================
   PATIENT SEARCH
========================================================= */

.patient-search input {
    height: 52px;
}

.search-actions button {
    height: 48px;
}

/* =========================================================
   PATIENT CARD
========================================================= */

.patient-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    transition: .2s ease;
    animation: fadeUp .25s ease;
}

    .patient-card:hover {
        border-color: #dbeafe;
        background: #f8fbff;
    }

.patient-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: linear-gradient( 135deg, #2563eb, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    flex-shrink: 0;
}

.patient-info {
    flex: 1;
}

    .patient-info h4 {
        margin: 0 0 4px;
        font-size: 22px;
        font-weight: 800;
        color: #0f172a;
    }

    .patient-info p {
        margin: 0 0 4px;
        font-size: 14px;
        color: #64748b;
    }

    .patient-info span {
        font-size: 13px;
        color: #94a3b8;
    }

.patient-status {
    padding: 8px 14px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
}

/* =========================================================
   FORM GRID
========================================================= */

.form-grid-appointment {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px;
}

/* =========================================================
   FIELD
========================================================= */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field label {
        font-size: 14px;
        font-weight: 700;
        color: #1e293b;
    }

    .field input,
    .field select,
    .field textarea {
        width: 100%;
        border: 1px solid #dbe3ee;
        border-radius: 16px;
        background: white;
        padding: 13px 15px;
        font-size: 14px;
        color: #0f172a;
        outline: none;
        transition: .2s ease;
    }

    .field textarea {
        min-height: 110px;
        resize: vertical;
    }

        .field input:focus,
        .field select:focus,
        .field textarea:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 4px rgba(37,99,235,.08);
        }

/* =========================================================
   PRIORITY
========================================================= */

.priority-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.priority-chip {
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: none;
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

    .priority-chip.active {
        background: #dbeafe;
        color: #2563eb;
    }

    .priority-chip.urgent {
        background: #fef3c7;
        color: #d97706;
    }

    .priority-chip.emergency {
        background: #fee2e2;
        color: #dc2626;
    }

/* =========================================================token
   TOKEN BOX
========================================================= */

..token-box {
    height: 60px;
    border-radius: 18px;
    background: linear-gradient( 135deg, #2563eb, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 10px 22px rgba(37,99,235,.18);
}

/* =========================================================
   DOCTOR CARD
========================================================= */

.doctor-card {
    min-height: 110px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    transition: .2s ease;
    animation: fadeUp .25s ease;
}

    .doctor-card:hover {
        background: #f8fbff;
        border-color: #dbeafe;
    }

.doctor-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    flex-shrink: 0;
}

.doctor-card h4 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.doctor-card p {
    margin: 0 0 4px;
    font-size: 14px;
    color: #64748b;
}

.doctor-card span {
    font-size: 13px;
    color: #94a3b8;
}

/* =========================================================
   SLOT GRID
========================================================= */

.slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.slot-btn {
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid #dbe3ee;
    background: white;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

    .slot-btn:hover {
        border-color: #2563eb;
        color: #2563eb;
    }

    .slot-btn.active {
        background: linear-gradient( 135deg, #2563eb, #3b82f6);
        color: white;
        border-color: transparent;
        box-shadow: 0 10px 20px rgba(37,99,235,.18);
    }

/* =========================================================
   SUMMARY
========================================================= */

.summary-card {
    background: #f8fafc;
    border-radius: 22px;
    padding: 18px;
    border: 1px solid #eef2f7;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeUp .25s ease;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .summary-item span {
        font-size: 14px;
        color: #64748b;
    }

    .summary-item strong {
        font-size: 15px;
        font-weight: 700;
        color: #0f172a;
    }

/* =========================================================
   ACTIONS
========================================================= */

.appointment-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.btn-primary,
.btn-secondary {
    height: 54px;
    border-radius: 16px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.btn-primary {
    background: linear-gradient( 135deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 10px 24px rgba(37,99,235,.18);
}

    .btn-primary:hover {
        transform: translateY(-1px);
    }

.btn-secondary {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

    .btn-secondary:hover {
        background: #f1f5f9;
    }

/* =========================================================
   ANIMATION
========================================================= */

@keyframes fadeUp {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:1100px) {

    .appointment-layout {
        grid-template-columns: 1fr;
    }
}

@media(max-width:768px) {

    .appointment-page {
        padding: 12px;
    }

    .page-header-simple {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-main-title {
        font-size: 26px;
    }

    .header-actions {
        width: 100%;
    }

    .header-btn {
        flex: 1;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .appointment-actions {
        grid-template-columns: 1fr;
    }

    .patient-card,
    .doctor-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .patient-status {
        align-self: flex-start;
    }
}

/*Calaneder page*/


/* =========================================================
   RAPID HMS
   APPOINTMENT CALENDAR
   appointments.css
   ========================================================= */

/* =========================================================
   PAGE
   ========================================================= */

.calendar-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* =========================================================
   HEADER
   ========================================================= */

.calendar-header {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    padding: 34px;
    border-radius: 34px;
    background: linear-gradient( 135deg, #020617, #0f172a, #1e3a8a );
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    box-sizing: border-box;
    box-shadow: 0 24px 50px rgba(15,23,42,.14);
}
    /* GLOW */
    .calendar-header::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% );
    }

    /* TITLE */
    .calendar-header h2 {
        margin: 0 0 10px;
        font-size: 42px;
        font-weight: 900;
        letter-spacing: -.8px;
        color: white;
    }

    /* SUBTITLE */
    .calendar-header p {
        margin: 0;
        font-size: 15px;
        color: rgba(255,255,255,.78);
    }

/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.calendar-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
/* HEADER BUTTON */
.header-btn {
    min-height: 50px;
    padding: 0 18px;
    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;
    backdrop-filter: blur(10px);
    transition: .25s ease;
    white-space: nowrap;
    flex-shrink: 1;
    max-width: 100%;
}

    /* HOVER */
    .header-btn:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,.14);
    }

/* =========================================================
   STATS
   ========================================================= */

.calendar-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr));
    gap: 20px;
    overflow: hidden;
}

/* =========================================================
   STAT CARD
   ========================================================= */

.calendar-stat-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    min-height: 170px;
    padding: 30px;
    border-radius: 32px;
    box-sizing: border-box;
    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 */
    .calendar-stat-card:hover {
        transform: translateY(-4px);
    }

    /* GLOW */
    .calendar-stat-card::before {
        content: "";
        position: absolute;
        top: -40px;
        right: -40px;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background: rgba(255,255,255,.10);
    }

    /* COLORS */
    .calendar-stat-card.blue {
        background: linear-gradient( 135deg, #2563eb, #3b82f6 );
    }

    .calendar-stat-card.green {
        background: linear-gradient( 135deg, #16a34a, #22c55e );
    }

    .calendar-stat-card.orange {
        background: linear-gradient( 135deg, #ea580c, #fb923c );
    }

    .calendar-stat-card.red {
        background: linear-gradient( 135deg, #dc2626, #ef4444 );
    }

    /* SMALL */
    .calendar-stat-card small {
        font-size: 13px;
        opacity: .92;
    }

    /* VALUE */
    .calendar-stat-card h2 {
        margin: 0;
        font-size: 52px;
        font-weight: 900;
        line-height: 1;
    }

    /* FOOT */
    .calendar-stat-card span {
        font-size: 14px;
        opacity: .92;
    }

/* =========================================================
   TOOLBAR
   ========================================================= */

.calendar-toolbar-modern {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px 28px;
    border-radius: 30px;
    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
   ========================================================= */

.calendar-toolbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* NAV BUTTON */
.calendar-nav-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 18px;
    background: rgba(59,130,246,.10);
    color: #2563eb;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: .25s ease;
}

    /* HOVER */
    .calendar-nav-btn:hover {
        transform: translateY(-2px);
        background: rgba(59,130,246,.16);
    }

/* MONTH */
.calendar-month-box h3 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
}

/* TEXT */
.calendar-month-box span {
    font-size: 14px;
    color: var(--text-light);
}

/* =========================================================
   RIGHT
   ========================================================= */

.calendar-toolbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
}

/* =========================================================
   SEARCH
   ========================================================= */

.calendar-search {
    flex: 1;
    min-width: 220px;
    max-width: 340px;
    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;
    box-sizing: border-box;
}

    /* INPUT */
    .calendar-search input {
        flex: 1;
        min-width: 0;
        border: none;
        outline: none;
        background: transparent;
        font-size: 14px;
    }

/* =========================================================
   SELECT
   ========================================================= */

.calendar-select {
    height: 52px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid rgba(226,232,240,.8);
    background: white;
    outline: none;
    font-size: 14px;
}

/* =========================================================
   CALENDAR WRAPPER
   ========================================================= */

.calendar-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 30px;
    background: white;
    border: 1px solid rgba(226,232,240,.8);
    box-shadow: 0 14px 34px rgba(15,23,42,.05);
    box-sizing: border-box;
}
/* =========================================================
   INNER GRID
   ========================================================= */

.calendar-grid {
    display: grid;
    grid-template-columns: 90px repeat(7,minmax(180px,1fr));
    min-width: 1450px;
}

/* =========================================================
   TIME COLUMN
   ========================================================= */

.calendar-time-column {
    background: linear-gradient( 180deg, #f8fafc, #ffffff );
    border-right: 1px solid #f1f5f9;
}

/* HEADER */
.calendar-time-header {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    color: var(--text);
    border-bottom: 1px solid #f1f5f9;
}

/* SLOT */
.calendar-time-slot {
    height: 110px;
    min-height: 110px;
    max-height: 110px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    border-bottom: 1px solid #f8fafc;
}

/* =========================================================
   DAY COLUMN
   ========================================================= */

.calendar-day-column {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    border-right: 1px solid #f1f5f9;
}

/* =========================================================
   DAY HEADER
   ========================================================= */

.calendar-day-header {
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient( 180deg, #ffffff, #f8fafc );
}

    /* DAY */
    .calendar-day-header strong {
        font-size: 15px;
        font-weight: 900;
        color: var(--text);
    }

    /* DATE */
    .calendar-day-header span {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        background: rgba(59,130,246,.10);
        color: #2563eb;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 900;
    }

/* =========================================================
   CELL
   ========================================================= */

.calendar-cell {
    height: 110px;
    min-height: 110px;
    max-height: 110px;
    padding: 8px;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    background: white;
}

/* =========================================================
   APPOINTMENT
   ========================================================= */

.calendar-appointment {
    width: 100%;
    height: 92px;
    border-radius: 18px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15,23,42,.06);
    transition: .25s ease;
}

    /* HOVER */
    .calendar-appointment:hover {
        transform: translateY(-2px);
    }

    /* OPD */
    .calendar-appointment.opd {
        background: linear-gradient( 135deg, rgba(37,99,235,.12), rgba(59,130,246,.10) );
        border-left: 4px solid #2563eb;
    }

    /* FOLLOWUP */
    .calendar-appointment.followup {
        background: linear-gradient( 135deg, rgba(34,197,94,.12), rgba(74,222,128,.10) );
        border-left: 4px solid #22c55e;
    }

    /* EMERGENCY */
    .calendar-appointment.emergency {
        background: linear-gradient( 135deg, rgba(239,68,68,.12), rgba(248,113,113,.10) );
        border-left: 4px solid #ef4444;
    }

/* =========================================================
   TOP
   ========================================================= */

.calendar-appointment-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

    /* NAME */
    .calendar-appointment-top strong {
        font-size: 13px;
        font-weight: 800;
        color: var(--text);
    }

    /* TIME */
    .calendar-appointment-top span {
        font-size: 11px;
        font-weight: 700;
        color: #64748b;
    }

/* SMALL */
.calendar-appointment small {
    font-size: 12px;
    color: var(--text-light);
}

/* =========================================================
   TYPE
   ========================================================= */

.appointment-type {
    align-self: flex-start;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--text);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:992px) {

    .calendar-header {
        padding: 26px;
    }

        .calendar-header h2 {
            font-size: 34px;
        }

    .calendar-toolbar-modern {
        padding: 20px;
    }

    .calendar-toolbar-left {
        width: 100%;
        justify-content: space-between;
    }

    .calendar-toolbar-right {
        width: 100%;
    }

    .calendar-search {
        width: 100%;
    }

    .calendar-select {
        width: 100%;
    }
}

/* MOBILE */
@media(max-width:768px) {

    .calendar-header {
        border-radius: 26px;
    }

    .calendar-header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-btn,
    .calendar-header .btn {
        width: 100%;
    }

    .calendar-stat-card {
        min-height: 150px;
    }

        .calendar-stat-card h2 {
            font-size: 40px;
        }

    .calendar-wrapper {
        border-radius: 24px;
    }
}