* {
    box-sizing: border-box;
}

html {
    font-family: Arial, sans-serif;
    background: #f4f5f7;
    color: #222;
}

body {
    margin: 0;
    min-height: 100vh;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
}

.login-card h1 {
    margin: 0 0 28px;
    text-align: center;
}

.login-card label {
    display: block;
    margin: 0 0 7px;
    font-weight: 600;
}

.login-card input {
    width: 100%;
    margin-bottom: 18px;
    padding: 13px;
    border: 1px solid #bbb;
    border-radius: 8px;
}

.button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 13px 20px;
    cursor: pointer;
    font-weight: 700;
}

.button-primary {
    background: #1769aa;
    color: #fff;
}

.login-card .button {
    width: 100%;
    margin-top: 6px;
}

.error-message {
    margin-bottom: 18px;
    padding: 12px;
    border-radius: 8px;
    background: #ffe5e5;
    color: #9b0000;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 18px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.topbar h1 {
    margin: 0;
    font-size: 1.35rem;
}

.logout-link,
.back-link {
    text-decoration: none;
    font-weight: 600;
}

.page-container {
    width: min(800px, calc(100% - 24px));
    margin: 18px auto 40px;
}

.patient-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.patient-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 72px;
    padding: 14px 16px;
    border-radius: 10px;
    border-left: 9px solid;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.patient-name {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.patient-name strong {
    font-size: 1.08rem;
}

.patient-room {
    white-space: nowrap;
    font-weight: 600;
}


.patient-header {
    padding: 18px;
    border-left: 10px solid;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.patient-header h1 {
    margin: 0 0 10px;
    font-size: 1.45rem;
}

.sector-uv1 {
    border-color: #38a169;
}

.sector-uv2 {
    border-color: #e53e3e;
}

.sector-uv3 {
    border-color: #3182ce;
}

.sector-default {
    border-color: #777;
}
.patient-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-weight: 600;
}

.comments-section,
.new-comment {
    margin-top: 22px;
}

.comments-section h2,
.new-comment h2 {
    margin: 0 0 12px;
    font-size: 1.15rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment {
    background: #fff;
    border-radius: 10px;
    padding: 13px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.comment time {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 0.88rem;
    font-weight: 600;
}

.comment-content {
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.new-comment form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.new-comment textarea {
    width: 100%;
    resize: vertical;
    min-height: 130px;
    padding: 13px;
    border: 1px solid #bbb;
    border-radius: 8px;
    background: #fff;
}

.new-comment .button {
    align-self: flex-start;
}

.empty-message {
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    color: #666;
}

@media (max-width: 520px) {
    .page-container {
        width: calc(100% - 16px);
        margin-top: 12px;
    }

    .topbar {
        padding: 12px;
    }

    .patient-card {
        min-height: 68px;
        padding: 12px;
    }

    .patient-room {
        font-size: 0.9rem;
    }

    .patient-header {
        padding: 15px;
    }

    .patient-header h1 {
        font-size: 1.25rem;
    }
}
