/* ============================================================
   GLOBAL
============================================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f4f6f8;
    color: #2d3748;
}


/* ============================================================
   CONTAINER
============================================================ */

.container {
    max-width: 1200px;
    margin: auto;
}


/* ============================================================
   HEADER
============================================================ */

header {
    background: white;

    border-radius: 14px;

    padding: 22px;

    margin-bottom: 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    box-shadow:
        0 3px 12px
        rgba(0, 0, 0, 0.08);
}

h1 {
    margin: 0 0 5px;

    font-size: 28px;
}

.subtitle {
    color: #718096;
}


/* ============================================================
   STATUS
============================================================ */

.status {
    padding: 9px 15px;

    border-radius: 20px;

    font-weight: bold;

    font-size: 14px;

    background: #c6f6d5;

    color: #276749;
}

.status.offline {
    background: #fed7d7;

    color: #c53030;
}

.status.held {
    background: #feebc8;

    color: #c05621;
}


/* ============================================================
   MAIN GRID
============================================================ */

.grid {
    display: grid;

    grid-template-columns:
        1fr 350px;

    gap: 20px;
}


/* ============================================================
   CARD
============================================================ */

.card {
    background: white;

    border-radius: 14px;

    padding: 20px;

    margin-bottom: 20px;

    box-shadow:
        0 3px 12px
        rgba(0, 0, 0, 0.06);
}

.card-title {
    font-size: 20px;

    font-weight: bold;

    margin-bottom: 18px;
}


/* ============================================================
   BUTTONS
============================================================ */

.buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

button {
    border: none;

    border-radius: 9px;

    padding: 11px 16px;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;
}

button:hover {
    opacity: 0.88;
}

button:active {
    transform: scale(0.98);
}


/* ============================================================
   BUTTON COLORS
============================================================ */

.primary {
    background: #319795;

    color: white;
}

.warning {
    background: #dd6b20;

    color: white;
}

.secondary {
    background: #cbd5e0;

    color: #2d3748;
}

.danger {
    background: #e53e3e;

    color: white;
}


/* ============================================================
   INPUTS
============================================================ */

input,
select,
textarea {
    width: 100%;

    border: 1px solid #cbd5e0;

    border-radius: 8px;

    padding: 11px;

    font-size: 15px;

    margin-top: 5px;

    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;

    border-color: #319795;

    box-shadow:
        0 0 0 2px
        rgba(49, 151, 149, 0.15);
}

textarea {
    resize: vertical;

    min-height: 100px;
}

label {
    display: block;

    margin-top: 12px;

    font-size: 14px;

    font-weight: bold;

    color: #4a5568;
}


/* ============================================================
   ADD PATIENT
============================================================ */

.add-grid {
    display: grid;

    grid-template-columns:
        100px 1fr 100px;

    gap: 10px;
}


/* ============================================================
   TABLE
============================================================ */

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 13px 10px;

    border-bottom:
        1px solid #e2e8f0;

    text-align: left;
}

th {
    color: #718096;

    font-size: 14px;
}


/* ============================================================
   QUEUE STATUS
============================================================ */

.now {
    background: #e6fffa;
}

.wait {
    color: #319795;

    font-weight: bold;
}

.now-label {
    color: #38a169;

    font-weight: bold;
}

.served {
    color: #718096;
}


/* ============================================================
   MESSAGE
============================================================ */

.message {
    display: inline-block;

    background: #fefcbf;

    color: #744210;

    border-radius: 6px;

    padding: 5px 8px;

    margin-top: 4px;

    font-size: 13px;
}


/* ============================================================
   M5 STATUS
============================================================ */

.m5-box {
    background: #edf2f7;

    border-radius: 10px;

    padding: 15px;
}

.m5-row {
    display: flex;

    justify-content:
        space-between;

    gap: 10px;

    margin-bottom: 10px;
}

.m5-row:last-child {
    margin-bottom: 0;
}

.live {
    color: #38a169;

    font-weight: bold;
}

.m5-offline {
    color: #e53e3e;

    font-weight: bold;
}


/* ============================================================
   TEXT
============================================================ */

.error {
    color: #e53e3e;

    font-size: 14px;

    margin-top: 8px;
}

.info {
    color: #718096;

    font-size: 13px;

    margin-top: 10px;
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 850px) {

    .grid {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;

        align-items: flex-start;
    }

    .add-grid {
        grid-template-columns: 1fr;
    }

    table {
        display: block;

        overflow-x: auto;
    }
}


/* ============================================================
   SMALL PHONE
============================================================ */

@media (max-width: 500px) {

    body {
        padding: 10px;
    }

    header {
        padding: 18px;
    }

    .card {
        padding: 16px;
    }

    h1 {
        font-size: 24px;
    }

    button {
        width: 100%;
    }

    .buttons {
        flex-direction: column;
    }
}