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

button,
.primary-link,
.secondary-button,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

button,
.primary-link {
    background: #1d1d1f;
    color: #ffffff;
}

button:hover,
.primary-link:hover {
    background: #333336;
}

.secondary-button,
.secondary-link {
    background: #ffffff;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
}

.secondary-button:hover,
.secondary-link:hover {
    background: #f5f5f7;
}


/* ==============================
   PATIENT LIST
============================== */

.search-bar {
    margin-bottom: 24px;
}

.search-bar input {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid #d2d2d7;
    font-size: 15px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-bar input:focus {
    border-color: #86868b;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.list {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 22px;
    overflow: hidden;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 26px;
    border-bottom: 1px solid #e5e5e7;
    transition: background 0.2s ease;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: #fafafa;
}

.patient-name {
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.2px;
}

.patient-meta {
    margin-top: 6px;
    font-size: 14px;
    color: #6e6e73;
}

.list-right a {
    color: #0071e3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.list-right a:hover {
    text-decoration: underline;
}

/* ==============================
   PATIENT DETAIL
============================== */

.patient-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 30px;
}

.detail-subtitle {
    color: #6e6e73;
    font-size: 15px;
    margin: 14px 0 0 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inline-form {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}

.summary-card {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 20px;
    padding: 20px;
}

.summary-card span {
    display: block;
    color: #6e6e73;
    font-size: 13px;
    margin-bottom: 8px;
}

.summary-card strong {
    font-size: 17px;
    font-weight: 600;
}

.clinical-layout {
    display: grid;
    gap: 22px;
}

.clinical-section {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 24px;
    padding: 30px;
}

.clinical-section h2 {
    margin-bottom: 22px;
}

.clinical-section p {
    color: #333336;
    margin: 0;
}

.field-block {
    border-top: 1px solid #eeeeef;
    padding-top: 20px;
    margin-top: 20px;
}

.field-block:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.field-block h3 {
    color: #6e6e73;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px 0;
}


/* ==============================
   eUCCAP EMPTY STATES SPACING
============================== */

.empty-group-message {
    margin: 12px 0 0 0;
}

.empty-section-message {
    margin: 22px 0 0 0;
}

.clinical-section > .field-block + .empty-section-message {
    margin-top: 24px;
}

.clinical-section .field-block {
    margin-bottom: 18px;
}

.clinical-section .field-block:last-of-type {
    margin-bottom: 0;
}

.compact-error {
    margin-bottom: 14px;
    padding: 10px 12px;
    font-size: 14px;
}
