 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #f4f8fb;
    color: #243447;
}

header {
    background: white;
    padding: 20px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.logo-area h1 {
    font-size: 30px;
    color: #228b7a;
}

.logo-area p {
    margin-top: 5px;
    color: #777;
}

.date-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-weight: bold;
}

#currentTime {
    font-size: 25px;
    color: #228b7a;
    margin-top: 5px;
}

main {
    width: 88%;
    margin: 30px auto;
}

/* KARŞILAMA */

.welcome-card {
    background: linear-gradient(135deg, #228b7a, #42b49e);
    color: white;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.welcome-card h2 {
    font-size: 30px;
    margin-bottom: 10px;
}

.patient-area {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.patient-area select {
    min-width: 220px;
    padding: 13px 15px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
}

.patient-area button {
    border: none;
    background: white;
    color: #228b7a;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

/* İSTATİSTİK */

.stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-top: 25px;
}

.stat-card {
    background: white;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.stat-card h3 {
    color: #777;
    font-size: 14px;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
    color: #228b7a;
}

.success strong {
    color: #28a745;
}

.warning strong {
    color: #f39c12;
}

.danger strong {
    color: #dc3545;
}

/* ANA PANEL */

.content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.medicine-panel,
.reminder-panel,
.history-panel,
.relative-panel {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-title button,
.modal-content button {
    border: none;
    background: #228b7a;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
}

.medicine-card {
    border: 1px solid #e8e8e8;
    border-left: 6px solid #f39c12;
    padding: 18px;
    border-radius: 14px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.medicine-card.taken {
    border-left-color: #28a745;
    background: #f3fff6;
}

.medicine-card.missed {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.medicine-info h3 {
    margin-bottom: 7px;
}

.medicine-info p {
    color: #777;
    margin: 4px 0;
}

.time {
    font-size: 24px;
    font-weight: bold;
    color: #228b7a;
}

.status {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.status-waiting {
    background: #fff5db;
    color: #a76a00;
}

.status-taken {
    background: #e5f8e9;
    color: #188038;
}

.status-missed {
    background: #ffe4e4;
    color: #c62828;
}

.actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.take-btn {
    border: none;
    padding: 10px 15px;
    border-radius: 9px;
    background: #28a745;
    color: white;
    cursor: pointer;
}

.delete-btn {
    border: none;
    padding: 10px 15px;
    border-radius: 9px;
    background: #dc3545;
    color: white;
    cursor: pointer;
}

/* HATIRLATICI */

.reminder-panel h2 {
    margin-bottom: 20px;
}

.next-medicine {
    background: #eef9f6;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.next-medicine h3 {
    color: #228b7a;
}

.next-medicine strong {
    display: block;
    font-size: 35px;
    margin: 10px 0;
}

/* SANAL KUTU */

.virtual-box {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.virtual-box h3 {
    margin-bottom: 15px;
}

.medicine-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.box {
    height: 100px;
    background: #f1f1f1;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.4s;
}

.box span {
    font-size: 26px;
    font-weight: bold;
}

.box small {
    margin-top: 5px;
    color: #777;
}

.box.active {
    background: #ffe47a;
    box-shadow: 0 0 25px #ffd700;
    animation: blink 1s infinite;
}

@keyframes blink {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.simulation-text {
    margin-top: 15px;
    color: #777;
    font-size: 13px;
}

/* İLERLEME */

.history-panel {
    margin-top: 25px;
}

.progress-area {
    margin-top: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress {
    width: 100%;
    background: #e8e8e8;
    height: 18px;
    border-radius: 20px;
    overflow: hidden;
}

#progressBar {
    height: 100%;
    width: 0;
    background: #28a745;
    transition: 0.5s;
}

/* YAKIN TAKİP */

.relative-panel {
    margin-top: 25px;
}

.relative-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.relative-title p {
    margin-top: 5px;
    color: #777;
}

.live-badge {
    background: #e6fff1;
    color: #188038;
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.relative-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.relative-info-card {
    background: #f6f9fb;
    padding: 18px;
    border-radius: 14px;
}

.relative-info-card small {
    display: block;
    color: #888;
    margin-bottom: 5px;
}

.relative-info-card strong {
    color: #243447;
}

.relative-med-title {
    margin-bottom: 15px;
}

.relative-medicine {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.relative-medicine:last-child {
    border-bottom: none;
}

.relative-medicine-time {
    font-weight: bold;
    color: #228b7a;
}

/* MODAL */

.modal,
.alert-modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content,
.alert-content {
    background: white;
    width: 430px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 30px;
    position: relative;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #228b7a;
}

.modal-content label {
    display: block;
    margin-top: 12px;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.modal-content button {
    width: 100%;
    margin-top: 20px;
}

#closeModal,
#closePatientModal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    cursor: pointer;
}

/* UYARI */

.alert-content {
    text-align: center;
}

.alert-icon {
    font-size: 60px;
}

.alert-content h2 {
    margin: 15px 0;
    color: #228b7a;
}

.alert-content button {
    border: none;
    background: #228b7a;
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    margin-top: 20px;
    cursor: pointer;
}

.empty {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* TELEFON */

@media(max-width: 1000px) {

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .content {
        grid-template-columns: 1fr;
    }

    .relative-info {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 600px) {

    header {
        flex-direction: column;
        gap: 15px;
    }

    .date-box {
        align-items: center;
    }

    .welcome-card {
        flex-direction: column;
        align-items: stretch;
    }

    .patient-area {
        flex-direction: column;
    }

    .patient-area select,
    .patient-area button {
        width: 100%;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .medicine-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .relative-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .relative-medicine {
        grid-template-columns: 1fr;
    }
}
/* HAFTALIK TAKİP */

.weekly-panel,
.medicine-history-panel {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
}

.weekly-title,
.history-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.weekly-title p,
.history-title p {
    color: #777;
    margin-top: 5px;
}

.weekly-score {
    background: #eef9f6;
    padding: 15px 22px;
    border-radius: 15px;
    text-align: center;
}

.weekly-score span {
    display: block;
    color: #777;
    font-size: 13px;
}

.weekly-score strong {
    display: block;
    margin-top: 5px;
    color: #228b7a;
    font-size: 28px;
}

.weekly-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    align-items: end;
    min-height: 240px;
}

.day-column {
    text-align: center;
}

.day-bar-area {
    height: 170px;
    background: #f1f1f1;
    border-radius: 12px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: 10px;
}

.day-bar {
    width: 100%;
    background: #228b7a;
    min-height: 3px;
    transition: 0.5s;
}

.day-column strong {
    display: block;
    font-size: 13px;
}

.day-column span {
    font-size: 12px;
    color: #777;
}

.history-title button {
    border: none;
    background: #dc3545;
    color: white;
    padding: 11px 16px;
    border-radius: 10px;
    cursor: pointer;
}

.history-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    color: #777;
    font-size: 13px;
}

.history-time {
    color: #228b7a;
    font-weight: bold;
}

@media(max-width: 800px) {

    .weekly-chart {
        grid-template-columns: repeat(4, 1fr);
    }

}

@media(max-width: 600px) {

    .weekly-title,
    .history-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .weekly-chart {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-item {
        grid-template-columns: 1fr;
    }

}
.edit-patient-btn {
    background: #ffffff !important;
    color: #228b7a !important;
    border: 2px solid #ffffff !important;
}

.edit-patient-btn:hover {
    background: #e8fff9 !important;
}

.delete-patient-btn {
    background: #dc3545 !important;
    color: white !important;
}

.delete-patient-btn:hover {
    background: #b52a37 !important;
}
/* ===================================
   ACİL YARDIM
=================================== */

.emergency-panel {
    margin-top: 25px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #fff5f5, #ffe5e5);
    border: 2px solid #ffc7c7;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.08);
}

.emergency-info h2 {
    color: #c62828;
    margin-bottom: 8px;
}

.emergency-info p {
    color: #666;
    line-height: 1.6;
}

#emergencyButton {
    border: none;
    background: #dc3545;
    color: white;
    padding: 18px 30px;
    min-width: 210px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 7px 20px rgba(220, 53, 69, 0.25);
    transition: 0.2s;
}

#emergencyButton:hover {
    background: #bd2130;
    transform: scale(1.04);
}

.emergency-modal-content {
    background: white;
    width: 460px;
    max-width: 95%;
    padding: 35px;
    border-radius: 22px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
}

.emergency-icon {
    font-size: 65px;
}

.emergency-modal-content h2 {
    color: #dc3545;
    margin: 15px 0;
}

.emergency-modal-content p {
    line-height: 1.6;
}

.emergency-relative-info {
    background: #f5f7f9;
    margin-top: 20px;
    padding: 18px;
    border-radius: 14px;
    text-align: left;
    line-height: 1.8;
}

.emergency-success {
    margin-top: 20px;
    background: #e8f8ed;
    color: #188038;
    padding: 14px;
    border-radius: 12px;
    font-weight: bold;
}

.prototype-warning {
    margin-top: 15px;
    font-size: 13px;
    color: #888;
}

#closeEmergency {
    margin-top: 20px;
    border: none;
    background: #228b7a;
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
}

@media(max-width: 650px) {

    .emergency-panel {
        flex-direction: column;
        align-items: stretch;
    }

    #emergencyButton {
        width: 100%;
    }

}
/* =========================================================
   TÜM KİŞİLERİN İLAÇ TAKİBİ
========================================================= */

.all-medicines-panel {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}


/* BAŞLIK */

.all-medicines-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.all-medicines-header p {
    color: #777;
    margin-top: 6px;
    line-height: 1.5;
}


/* RENK AÇIKLAMALARI */

.all-medicines-legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.legend-item {
    padding: 7px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.legend-due {
    background: #e6f8eb;
    color: #188038;
}

.legend-approaching {
    background: #fff1d6;
    color: #a65e00;
}

.legend-overdue {
    background: #ffe4e4;
    color: #c62828;
}

.legend-taken {
    background: #eef1f4;
    color: #65717e;
}


/* =========================================================
   SIRADAKİ / ÖNCELİKLİ İLAÇ
========================================================= */

.global-next-medicine {
    border: 2px solid #228b7a;
    background: #eef9f6;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 18px;
}


/* GECİKMİŞ İLAÇ VARSA */

.global-next-medicine.overdue-highlight {
    border-color: #dc3545;
    background: #fff1f1;
}


.global-next-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}


.global-next-label {
    font-size: 13px;
    font-weight: bold;
    color: #228b7a;
}


.global-next-medicine.overdue-highlight
.global-next-label {
    color: #c62828;
}


.global-next-time {
    font-size: 30px;
    font-weight: bold;
    color: #228b7a;
}


.global-next-medicine.overdue-highlight
.global-next-time {
    color: #dc3545;
}


.global-next-person {
    font-size: 20px;
    font-weight: bold;
    color: #243447;
}


.global-next-details {
    color: #667788;
    margin-top: 6px;
    line-height: 1.6;
}


/* =========================================================
   GENEL SAYILAR
========================================================= */

.global-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}


.global-summary div {
    background: #f6f9fb;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}


.global-summary span {
    display: block;
    color: #7a8793;
    font-size: 12px;
}


.global-summary strong {
    display: block;
    margin-top: 5px;
    font-size: 23px;
    color: #243447;
}


/* =========================================================
   TÜM İLAÇ LİSTESİ
========================================================= */

.all-medicine-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.global-medicine-card {

    display: grid;

    grid-template-columns:
        minmax(180px, 1.3fr)
        minmax(180px, 1.7fr)
        auto;

    gap: 18px;

    align-items: center;

    border: 1px solid #e5e9ed;

    border-left: 8px solid #9aa5af;

    border-radius: 16px;

    padding: 17px;

    transition: 0.2s ease;
}


.global-medicine-card:hover {

    transform: translateY(-1px);

    box-shadow:
        0 5px 14px
        rgba(0, 0, 0, 0.06);
}


/* =========================================================
   🟢 VAKTİ GELDİ
========================================================= */

.global-medicine-card.state-due {

    border-left-color: #28a745;

    background: #effbf2;
}


/* =========================================================
   🟠 VAKTİ YAKLAŞIYOR
========================================================= */

.global-medicine-card.state-approaching {

    border-left-color: #f39c12;

    background: #fff8e8;
}


/* =========================================================
   🔴 VAKTİ GEÇTİ
========================================================= */

.global-medicine-card.state-overdue {

    border-left-color: #dc3545;

    background: #fff2f2;
}


/* =========================================================
   ⚪ DAHA SONRA
========================================================= */

.global-medicine-card.state-later {

    border-left-color: #7aa6c2;

    background: #f7fbfd;
}


/* =========================================================
   ✅ VERİLDİ
========================================================= */

.global-medicine-card.state-taken {

    border-left-color: #aab2b9;

    background: #f5f6f7;

    opacity: 0.72;

    order: 99;
}


/* =========================================================
   KİŞİ BİLGİSİ
========================================================= */

.global-person-name {

    font-weight: bold;

    font-size: 17px;

    color: #243447;
}


.global-person-note {

    color: #85919c;

    font-size: 12px;

    margin-top: 3px;
}


/* =========================================================
   İLAÇ BİLGİSİ
========================================================= */

.global-med-name {

    font-weight: bold;

    font-size: 16px;

    margin-bottom: 4px;
}


.global-med-meta {

    color: #6d7882;

    font-size: 13px;

    line-height: 1.55;
}


/* =========================================================
   SAAT
========================================================= */

.global-card-right {

    min-width: 170px;

    text-align: right;
}


.global-card-time {

    font-size: 26px;

    font-weight: bold;

    color: #243447;
}


/* =========================================================
   DURUM ETİKETİ
========================================================= */

.global-card-status {

    display: inline-block;

    margin-top: 6px;

    padding: 6px 10px;

    border-radius: 18px;

    font-size: 12px;

    font-weight: bold;
}


/* YEŞİL */

.state-due .global-card-status {

    background: #dff5e5;

    color: #188038;
}


/* TURUNCU */

.state-approaching .global-card-status {

    background: #ffedc6;

    color: #9b5b00;
}


/* KIRMIZI */

.state-overdue .global-card-status {

    background: #ffdede;

    color: #c62828;
}


/* DAHA SONRA */

.state-later .global-card-status {

    background: #eaf2f7;

    color: #4f748d;
}


/* VERİLDİ */

.state-taken .global-card-status {

    background: #e4e7ea;

    color: #65717e;
}


/* =========================================================
   BUTONLAR
========================================================= */

.global-card-actions {

    display: flex;

    justify-content: flex-end;

    gap: 7px;

    margin-top: 9px;

    flex-wrap: wrap;
}


.global-give-btn,
.global-open-btn {

    border: none;

    border-radius: 9px;

    padding: 9px 12px;

    font-weight: bold;

    cursor: pointer;
}


.global-give-btn {

    background: #228b7a;

    color: white;
}


.global-give-btn:hover {

    background: #176c5e;
}


.global-open-btn {

    background: #e8eef2;

    color: #34495e;
}


/* =========================================================
   SEÇİLEN KİŞİNİN İLAÇLARINDA DA RENKLER
========================================================= */

.medicine-card.state-due {

    border-left-color: #28a745;

    background: #effbf2;
}


.medicine-card.state-approaching {

    border-left-color: #f39c12;

    background: #fff8e8;
}


.medicine-card.state-overdue {

    border-left-color: #dc3545;

    background: #fff2f2;
}


.medicine-card.state-later {

    border-left-color: #7aa6c2;

    background: #f7fbfd;
}


.medicine-card.state-taken {

    border-left-color: #aab2b9;

    background: #f5f6f7;

    opacity: 0.7;
}


/* =========================================================
   MOBİL
========================================================= */

@media(max-width: 900px) {

    .all-medicines-header {

        flex-direction: column;
    }


    .all-medicines-legend {

        justify-content: flex-start;
    }


    .global-summary {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .global-medicine-card {

        grid-template-columns: 1fr;
    }


    .global-card-right {

        text-align: left;

        min-width: 0;
    }


    .global-card-actions {

        justify-content: flex-start;
    }

}


@media(max-width: 550px) {

    .global-summary {

        grid-template-columns:
            1fr 1fr;
    }


    .global-next-top {

        align-items: flex-start;

        flex-direction: column;
    }

}
/* =========================================================
   KİŞİLER YAN YANA - İLAÇLAR KARTIN İÇİNDE ALT ALTA
========================================================= */

.patient-medicine-grid {

    display: grid !important;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;

    align-items: start;

    width: 100%;

}


/* =========================================================
   KİŞİ KARTI
========================================================= */

.patient-care-card {

    background: #ffffff;

    border: 1px solid #e3e8ec;

    border-radius: 20px;

    overflow: hidden;

    box-shadow:
        0 5px 18px
        rgba(0, 0, 0, 0.07);

    min-width: 0;

}


/* =========================================================
   KİŞİ BAŞLIĞI
========================================================= */

.patient-care-header {

    background:
        linear-gradient(
            135deg,
            #228b7a,
            #42b49e
        );

    color: white;

    padding: 18px;

}


.patient-care-header-top {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 10px;

}


.patient-care-name {

    font-size: 19px;

    font-weight: bold;

}


.patient-care-age {

    margin-top: 5px;

    font-size: 13px;

    line-height: 1.4;

}


.patient-care-count {

    background:
        rgba(255, 255, 255, 0.22);

    padding: 6px 9px;

    border-radius: 20px;

    font-size: 12px;

    white-space: nowrap;

}


/* =========================================================
   KİŞİNİN İLAÇLARI

   BURASI ALT ALTA OLACAK
========================================================= */

.patient-care-medicines {

    display: flex !important;

    flex-direction: column !important;

    gap: 10px;

    padding: 15px;

}


/* =========================================================
   TEK İLAÇ KARTI
========================================================= */

.patient-med-item {

    width: 100%;

    border: 1px solid #e4e8eb;

    border-left: 6px solid #9aa6af;

    border-radius: 13px;

    padding: 12px;

    box-sizing: border-box;

}


.patient-med-top {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 10px;

}


.patient-med-name {

    font-weight: bold;

    font-size: 15px;

}


.patient-med-time {

    font-size: 18px;

    font-weight: bold;

    white-space: nowrap;

}


.patient-med-details {

    margin-top: 4px;

    color: #6f7d87;

    font-size: 12px;

    line-height: 1.4;

}


.patient-med-status {

    display: inline-block;

    margin-top: 7px;

    padding: 5px 8px;

    border-radius: 15px;

    font-size: 11px;

    font-weight: bold;

}


.patient-give-btn {

    margin-top: 8px;

    border: none;

    background: #228b7a;

    color: white;

    padding: 8px 10px;

    border-radius: 8px;

    cursor: pointer;

}


/* =========================================================
   RENKLER
========================================================= */

.patient-med-item.state-due {

    background: #edf9f0;

    border-left-color: #28a745;

}


.patient-med-item.state-approaching {

    background: #fff8e5;

    border-left-color: #f39c12;

}


.patient-med-item.state-overdue {

    background: #fff0f0;

    border-left-color: #dc3545;

}


.patient-med-item.state-later {

    background: #f5f9fc;

    border-left-color: #7aa6c2;

}


.patient-med-item.state-taken {

    background: #f2f3f4;

    border-left-color: #aab2b9;

    opacity: 0.68;

}


/* =========================================================
   DETAY BUTONU
========================================================= */

.patient-open-detail {

    margin-top: 12px;

    border: none;

    background: white;

    color: #228b7a;

    padding: 8px 12px;

    border-radius: 9px;

    font-weight: bold;

    cursor: pointer;

}


/* =========================================================
   TABLET
========================================================= */

@media(max-width: 1100px) {

    .patient-medicine-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

}


/* =========================================================
   TELEFON
========================================================= */

@media(max-width: 700px) {

    .patient-medicine-grid {

        grid-template-columns:
            1fr;

    }

}
/* =========================================================
   PERSONEL / VARDİYA SİSTEMİ
========================================================= */

.staff-panel {
    margin-top: 25px;
    background: white;
    border-radius: 20px;
    padding: 22px 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 25px;
}


/* PERSONEL BİLGİSİ */

.staff-info {
    display: flex;
    align-items: center;
    gap: 15px;
}


.staff-icon {
    width: 58px;
    height: 58px;

    border-radius: 16px;

    background: #eef9f6;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;
}


.staff-label {
    display: inline-block;

    color: #228b7a;

    font-size: 12px;
    font-weight: bold;

    letter-spacing: 0.5px;

    margin-bottom: 4px;
}


#activeStaffName {
    color: #243447;
    font-size: 21px;
    margin-bottom: 4px;
}


#activeStaffStatus {
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}


/* AKTİF PERSONEL VARSA */

.staff-panel.staff-active {
    border: 2px solid #bfe8dc;
}


.staff-panel.staff-active .staff-icon {
    background: #e5f8e9;
}


/* PERSONEL BUTONLARI */

.staff-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    flex-wrap: wrap;
}


.staff-actions select {
    min-width: 210px;

    padding: 12px 14px;

    border: 1px solid #d9e2e7;

    border-radius: 11px;

    background: white;

    color: #243447;

    font-size: 14px;

    outline: none;
}


.staff-actions button {
    border: none;

    padding: 12px 16px;

    border-radius: 11px;

    cursor: pointer;

    font-weight: bold;

    font-size: 14px;
}


#activateStaffButton {
    background: #228b7a;
    color: white;
}


#activateStaffButton:hover {
    background: #176c5e;
}


.add-staff-btn {
    background: #eef2f5;
    color: #34495e;
}


.add-staff-btn:hover {
    background: #dfe8ed;
}


/* PERSONEL MODALI KAPAT */

#closeStaffModal {
    position: absolute;

    right: 20px;
    top: 15px;

    font-size: 30px;

    cursor: pointer;
}


/* İLAÇ GEÇMİŞİNDE PERSONEL */

.history-staff {
    margin-top: 5px;

    color: #228b7a;

    font-size: 13px;

    font-weight: bold;
}


/* TABLET */

@media(max-width: 850px) {

    .staff-panel {
        flex-direction: column;
        align-items: stretch;
    }


    .staff-actions {
        justify-content: flex-start;
    }

}


/* TELEFON */

@media(max-width: 600px) {

    .staff-actions {
        flex-direction: column;
        align-items: stretch;
    }


    .staff-actions select,
    .staff-actions button {
        width: 100%;
    }

}
/* =========================================================
   VARDİYA GEÇMİŞİ
========================================================= */

.shift-history-panel {
    margin-top: 25px;
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.shift-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.shift-history-header h2 {
    margin-bottom: 5px;
    color: #243447;
}

.shift-history-header p {
    color: #777;
    font-size: 14px;
}

#clearShiftHistory {
    border: none;
    background: #eef2f5;
    color: #555;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

#clearShiftHistory:hover {
    background: #e1e7ea;
}

.shift-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding: 16px 18px;
    margin-bottom: 10px;

    border: 1px solid #e4eeeb;
    border-left: 5px solid #228b7a;
    border-radius: 13px;

    background: #fbfefd;
}

.shift-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shift-person-icon {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #e9f7f3;
    border-radius: 50%;

    font-size: 22px;
}

.shift-person-name {
    font-weight: bold;
    color: #243447;
    font-size: 16px;
}

.shift-action {
    margin-top: 4px;
    color: #228b7a;
    font-size: 13px;
    font-weight: bold;
}

.shift-date {
    text-align: right;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

@media(max-width: 600px) {

    .shift-history-header {
        flex-direction: column;
        align-items: stretch;
    }

    .shift-history-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .shift-date {
        text-align: left;
        padding-left: 56px;
    }

}
/* =========================================================
   YENİ VARDİYA SİSTEMİ
========================================================= */


/* VARDİYAYI BİTİR BUTONU */

.end-shift-btn {
    border: none;
    background: #e74c3c;
    color: white;
    padding: 11px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.end-shift-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}


/* =========================================================
   VARDİYA AYARLARI PANELİ
========================================================= */

.shift-settings-panel {
    margin-top: 25px;
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}


/* BAŞLIK */

.shift-settings-header {
    margin-bottom: 22px;
}

.shift-settings-header h2 {
    margin: 0 0 6px 0;
    color: #243447;
}

.shift-settings-header p {
    margin: 0;
    color: #777;
    font-size: 14px;
}


/* =========================================================
   VARDİYA OLUŞTURMA ALANI
========================================================= */

.shift-create-area {
    display: grid;
    grid-template-columns:
        minmax(180px, 2fr)
        minmax(130px, 1fr)
        minmax(130px, 1fr)
        auto;

    gap: 15px;
    align-items: end;

    padding: 20px;
    margin-bottom: 22px;

    background: #f7fbfa;
    border: 1px solid #e1eeeb;
    border-radius: 15px;
}


/* ALANLAR */

.shift-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.shift-field label {
    color: #40505f;
    font-size: 13px;
    font-weight: bold;
}

.shift-field input {
    width: 100%;
    box-sizing: border-box;

    padding: 11px 12px;

    border: 1px solid #d8e3e0;
    border-radius: 10px;

    background: white;
    color: #243447;

    font-size: 14px;
    outline: none;
}

.shift-field input:focus {
    border-color: #228b7a;
    box-shadow: 0 0 0 3px rgba(34, 139, 122, 0.08);
}


/* VARDİYA EKLE BUTONU */

#addShiftButton {
    border: none;
    background: #228b7a;
    color: white;

    padding: 12px 18px;

    border-radius: 10px;

    cursor: pointer;
    font-weight: bold;

    min-height: 42px;

    transition: 0.2s;
}

#addShiftButton:hover {
    background: #197263;
    transform: translateY(-1px);
}


/* =========================================================
   OLUŞTURULAN VARDİYALAR
========================================================= */

#shiftSettingsList {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px, 1fr)
        );

    gap: 15px;
}


/* TEK VARDİYA KARTI */

.shift-setting-card {
    border: 1px solid #e2ece9;
    border-left: 5px solid #228b7a;

    border-radius: 14px;

    padding: 17px;

    background: #fbfefd;
}

.shift-setting-name {
    font-size: 16px;
    font-weight: bold;
    color: #243447;

    margin-bottom: 10px;
}

.shift-setting-time {
    color: #59666f;
    font-size: 14px;
    margin-bottom: 13px;
}


/* VARDİYA SİL */

.delete-shift-btn {
    border: none;

    background: #fff0ee;
    color: #c0392b;

    padding: 8px 12px;

    border-radius: 8px;

    cursor: pointer;
    font-weight: bold;
}

.delete-shift-btn:hover {
    background: #ffe2de;
}


/* =========================================================
   PERSONEL ALANINDAKİ VARDİYA SEÇİMİ
========================================================= */

#shiftSelect {
    min-width: 180px;

    padding: 11px 12px;

    border: 1px solid #d8e3e0;
    border-radius: 10px;

    background: white;
    color: #243447;

    cursor: pointer;
    outline: none;
}

#shiftSelect:focus {
    border-color: #228b7a;
}


/* =========================================================
   MOBİL UYUMLULUK
========================================================= */

@media (max-width: 850px) {

    .shift-create-area {
        grid-template-columns:
            1fr 1fr;
    }

    #addShiftButton {
        width: 100%;
    }

}


@media (max-width: 600px) {

    .shift-create-area {
        grid-template-columns: 1fr;
    }

    #shiftSettingsList {
        grid-template-columns: 1fr;
    }

    #shiftSelect {
        width: 100%;
    }

    .end-shift-btn {
        width: 100%;
    }

}
/* =========================================================
   İLAÇ STOK TAKİBİ
========================================================= */

.stock-info {
    margin-top: 10px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 7px 10px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: bold;
}


/* STOK YETERLİ */

.stock-ok {
    background: #e8f7ef;
    color: #1f7a4d;
}


/* STOK AZALIYOR */

.stock-low {
    background: #fff4df;
    color: #c47a00;
}


/* KRİTİK STOK */

.stock-critical {
    background: #ffe6e2;
    color: #c0392b;
}


/* STOK TÜKENDİ */

.stock-empty {
    background: #f2f2f2;
    color: #777;
}


/* TÜM KİŞİLER PANELİNDE STOK */

.patient-med-stock {
    margin-top: 7px;

    font-size: 12px;
    font-weight: bold;
}


/* MOBİL */

@media(max-width: 600px) {

    .stock-info {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

}
.end-shift-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}
/* =========================================================
   HIZLI VARDİYA EKRANI
========================================================= */

.quick-shift-panel {
    margin-top: 25px;
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}


/* BAŞLIK */

.quick-shift-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.quick-shift-header h2 {
    margin: 0 0 5px 0;
    color: #243447;
}

.quick-shift-header p {
    margin: 0;
    color: #777;
    font-size: 14px;
}


/* BEKLEYEN İLAÇ SAYISI */

.quick-shift-count {
    min-width: 100px;
    padding: 12px 18px;
    border-radius: 14px;
    background: #f2f8f7;
    text-align: center;
}

.quick-shift-count span {
    display: block;
    font-size: 25px;
    font-weight: bold;
    color: #228b7a;
}

.quick-shift-count small {
    color: #687777;
    font-size: 12px;
}


/* AKTİF VARDİYA YOK MESAJI */

.quick-shift-message {
    padding: 16px;
    margin-bottom: 15px;
    border-radius: 12px;
    background: #fff7e6;
    color: #9a6500;
    font-weight: 600;
}


/* İLAÇ LİSTESİ */

.quick-shift-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* TEK İLAÇ KARTI */

.quick-shift-card {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 18px;

    padding: 17px 18px;

    border: 1px solid #e3ecea;
    border-radius: 14px;

    background: #fbfefd;
}


/* DURUM */

.quick-shift-status {
    font-size: 13px;
    font-weight: bold;
}


/* GECİKMİŞ */

.quick-shift-card.quick-overdue {
    border-left: 6px solid #d64545;
    background: #fff7f6;
}

.quick-overdue .quick-shift-status {
    color: #c0392b;
}


/* ŞİMDİ VERİLMELİ */

.quick-shift-card.quick-due {
    border-left: 6px solid #228b7a;
    background: #f4fbf9;
}

.quick-due .quick-shift-status {
    color: #167263;
}


/* YAKLAŞAN */

.quick-shift-card.quick-approaching {
    border-left: 6px solid #e4a11b;
    background: #fffaf0;
}

.quick-approaching .quick-shift-status {
    color: #ad7200;
}


/* HASTA VE İLAÇ BİLGİSİ */

.quick-shift-person {
    font-size: 17px;
    font-weight: bold;
    color: #243447;
    margin-bottom: 5px;
}

.quick-shift-medicine {
    font-size: 14px;
    color: #56636c;
}

.quick-shift-time {
    margin-top: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #394a54;
}


/* BUTONLAR */

.quick-shift-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.quick-give-btn {
    border: none;
    border-radius: 10px;

    padding: 11px 15px;

    background: #228b7a;
    color: white;

    cursor: pointer;
    font-weight: bold;

    transition: 0.2s;
}

.quick-give-btn:hover {
    background: #197263;
    transform: translateY(-1px);
}

.quick-open-btn {
    border: 1px solid #d5e3e0;
    border-radius: 10px;

    padding: 10px 13px;

    background: white;
    color: #40505f;

    cursor: pointer;
    font-weight: 600;
}

.quick-open-btn:hover {
    background: #f2f7f6;
}


/* BOŞ DURUM */

.quick-shift-list .empty {
    text-align: center;
    padding: 25px;
    color: #84908f;
}


/* =========================================================
   TELEFON / TABLET
========================================================= */

@media (max-width: 750px) {

    .quick-shift-card {
        grid-template-columns: 1fr;
    }

    .quick-shift-actions {
        justify-content: stretch;
    }

    .quick-give-btn,
    .quick-open-btn {
        width: 100%;
    }

}


@media (max-width: 500px) {

    .quick-shift-header {
        align-items: flex-start;
    }

    .quick-shift-panel {
        padding: 18px;
    }

    .quick-shift-count {
        min-width: 75px;
        padding: 10px;
    }

}
/* =========================================================
   MEDICARE - İLAÇ STOK TAKİBİ TASARIMI
========================================================= */

.stock-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    margin-top: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.stock-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.stock-panel-header h2 {
    margin: 0 0 6px 0;
    font-size: 26px;
    color: #1f2937;
}

.stock-panel-header p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
}

.stock-summary {
    min-width: 110px;
    background: #fff4f2;
    border: 1px solid #ffd7d2;
    border-radius: 18px;
    padding: 14px 18px;
    text-align: center;
}

.stock-summary span {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #e74c3c;
}

.stock-summary small {
    color: #7f8c8d;
    font-size: 12px;
}

.medicine-stock-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.stock-item {
    background: #f9fbfc;
    border: 1px solid #e5eaee;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: 0.2s ease;
}

.stock-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.stock-item > div:first-child {
    min-width: 0;
}

.stock-item > div:first-child strong {
    display: block;
    color: #374151;
    font-size: 14px;
    margin-bottom: 8px;
}

.stock-item p {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.stock-item small {
    color: #6b7280;
    font-size: 13px;
}

.stock-item > div:last-child {
    min-width: 120px;
    text-align: right;
}

.stock-item > div:last-child strong {
    font-size: 20px;
    color: #1f2937;
}

.stock-item > div:last-child span {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef4f3;
    color: #2c7a6b;
    font-size: 12px;
    font-weight: 700;
}

.stock-item .empty {
    grid-column: 1 / -1;
}

@media (max-width: 1100px) {
    .medicine-stock-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .stock-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .medicine-stock-list {
        grid-template-columns: 1fr;
    }

    .stock-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .stock-item > div:last-child {
        text-align: left;
    }
}
/* =========================================================
   STOK KİŞİ SEÇME ALANI
========================================================= */

.stock-patient-filter {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 22px 0;
    padding: 14px 16px;
    background: #f8fafb;
    border: 1px solid #e4e9ec;
    border-radius: 14px;
}

.stock-patient-filter label {
    font-weight: 700;
    color: #25364a;
    white-space: nowrap;
}

.stock-patient-filter select {
    flex: 1;
    max-width: 320px;
    padding: 10px 12px;
    border: 1px solid #d8e0e5;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.stock-patient-filter select:focus {
    border-color: #2f9b87;
    box-shadow: 0 0 0 3px rgba(47, 155, 135, 0.12);
}