/* history.css */
#historyPage {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.history-header {
    background: #ffffff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-box {
    background: #f1f3f5;
    border-radius: 12px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box i { color: #adb5bd; }

.search-box input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 16px;
    outline: none;
}

.history-card-detailed {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid #f1f1f1;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.med-title-group h4 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #212529;
}

.type-badge {
    font-size: 10px;
    background: #e7f1ff;
    color: #0d6efd;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 700;
}

.card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-top: 1px dashed #eee;
    padding-top: 10px;
    margin-top: 10px;
}

.detail-item {
    font-size: 12px;
    color: #6c757d;
}

.detail-item span {
    display: block;
    font-weight: 600;
    color: #495057;
}

.timestamp {
    font-size: 11px;
    color: #adb5bd;
    text-align: right;
    margin-top: 10px;
    font-style: italic;
}
/* history.css */
.history-card {
    background: #fff;
    border-radius: 18px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.history-card.expanded {
    border-color: #0d6efd;
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.05);
}

.card-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.med-meta h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.med-meta span {
    font-size: 11px;
    color: #0d6efd;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Hidden Details Section */
.history-details-pane {
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    border-top: 1px dashed #eee;
    margin-top: 0;
    padding-top: 0;
}

.history-card.expanded .history-details-pane {
    max-height: 300px;
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-label {
    font-size: 10px;
    color: #adb5bd;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 13px;
    color: #343a40;
    font-weight: 500;
}

.full-width { grid-column: span 2; }