/* ======================================================
   GLOBAL
   ====================================================== */
   body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background: #f6f7f9;
    color: #222;
}

a {
    text-decoration: none;
    color: #005bbb;
}

a:hover {
    text-decoration: underline;
}

/* ======================================================
   LAYOUT
   ====================================================== */
.header {
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    padding: 14px 24px;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
}

.nav {
    margin-top: 8px;
}

.nav a {
    margin-right: 14px;
    font-size: 14px;
}

.container {
    padding: 24px;
}

/* ======================================================
   UTILITIES
   ====================================================== */
.muted {
    color: #666;
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 4px;
    background: #eee;
}

.readonly {
    background: #f0f0f0;
    color: #777;
}

/* ======================================================
   CARDS
   ====================================================== */
.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
}

/* ======================================================
   INFO GRID (PATIENT / FORMS)
   ====================================================== */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

.info-item {
    font-size: 14px;
}

.info-label {
    color: #666;
    font-size: 12px;
}

.info-value {
    font-weight: 500;
}

/* ======================================================
   FORMS
   ====================================================== */
input,
select,
textarea {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

textarea {
    min-height: 80px;
}

button {
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    background: #1fa84a;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* ======================================================
   MEDICAL HISTORY – FINAL, SINGLE SOURCE OF TRUTH
   ====================================================== */

/* One rectangle per visit (author + datetime) */
.medical-box {
    border: 1px solid #d8dee9;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    background: #fafafa;
}

/* Header: doctor + timestamp */
.medical-box-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

/* Individual lines inside a visit */
.medical-line {
    margin-bottom: 6px;
    font-size: 14px;
}
/* ===== Modal Success Popup ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: #fff;
    padding: 36px 40px;
    border-radius: 14px;
    width: 360px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.modal-icon {
    width: 70px;
    height: 70px;
    background: #7ed321;
    color: white;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.modal-box h3 {
    margin: 12px 0 8px;
    font-size: 20px;
}

.modal-box p {
    font-size: 14px;
    color: #666;
    margin-bottom: 22px;
}

.modal-box button {
    background: #7ed321;
    padding: 12px 0;
    width: 90%;
    max-width: 280px;
    border-radius: 10px;
    font-size: 15px;
}
