




body {
    background: #D5E4FF;

    overflow-x: hidden;

}

h1 {
    text-align: center;
    color: rgba(59,130,246,.9);
}


.index-header {
    display: flex;
    justify-content: center;
    align-items: center;
    /*flex-direction: column;*/
}
.logo-img {
    max-width: 7rem;
}
.logo-text-img {
    height: 10rem;
}












/* Polished cards (can move to style.css later) */
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 4px 16px 24px; }
.topbar {
    display:flex; justify-content:space-between; align-items:center;
    gap:12px; ;
}
.topbar h1 { margin:0; font-size: 20px; }

.grid {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.drug-card {
    background: #f3f3f3;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
    padding: 8px;
    display:flex;
    flex-direction:column;
    gap: 12px;
    min-height: 320px;
}

.drug-header {
    display:flex; justify-content:space-between; align-items:flex-start; gap:12px;
}

.drug-name { margin:0; font-size: 18px; color:#111; }
.drug-name-sub { color:#6b7280; font-size: 13px; margin-top: 4px; display:block; }

.pill {
    background: #f1f5f9; color:#0f172a;
    padding: 6px 10px; border-radius: 999px;
    font-size: 12px; white-space: nowrap;
    border: 1px solid rgba(0,0,0,.05);
}

.section-title {
    font-size: 13px; font-weight: 700; color:#334155; margin: 2px 0 6px;
}

.kv {
    display:flex; flex-direction:column; gap:6px;
    color:#0f172a;
}
.kv p { margin:0; color:#334155; font-size: 13px; line-height:1.5; }

.inline-label { font-weight: 700; margin-left: 8px; color:#0b1220; }

.drug-type {
    background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(16,185,129,.10));
    border: 1px solid rgba(59,130,246,.18);
    border-radius: 12px;
    padding: 10px;
}
.drug-type p { margin: 0; color:#111827; font-size: 13px; }
.drug-type b { color:#0f172a; }

.brands-list {
    list-style:none; padding:0; margin:0;
    display:flex; flex-wrap:wrap; gap: 8px;
}
.brands-list li {
    background:#eef2ff;
    border: 1px solid rgba(99,102,241,.18);
    color:#3730a3;
    padding: 6px 10px; border-radius: 999px;
    font-size: 12px;
}

.muted {
    color:#6b7280;
    font-size: 12px;
    display:flex; justify-content:space-between; gap:10px;
    margin-top:auto;
    padding-top: 4px;
    border-top: 1px dashed rgba(0,0,0,.08);
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 0%, #e5e7eb 40%, #f1f5f9 80%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 10px;
    height: 14px;
    width: 100%;
}
@keyframes shimmer { from{background-position: 200% 0;} to{background-position:-200% 0;} }

.empty {
    background: #fff;
    border: 1px dashed rgba(0,0,0,.15);
    border-radius: 16px;
    padding: 18px;
    color:#6b7280;
    text-align:center;
}





















#pre {
    display: flex;
    justify-content: center;
    align-items: center;
}


#drugForm {
    /*border: 1px solid #3c3535;*/
    background-color: rgba(108, 108, 108, 0.2);

    padding: 1rem;
}

::placeholder {
    text-align: right;
}

label {
    user-select: none;
}
button {
    background-color: #d1d6ec;
    padding: .5rem;
    border-radius: .2rem;
}


#drugNameFields {

}
#drugName {

}
#drugNameP {

}

#drugTypeDoseFields {

}
.drug-type-dose {

}
#drugType {

}
#drugExtra {

}
#drugDose {

}
#drugBrandName {

}

#drugBrandFields {

}
.drug-brand {

}

#drugCategoryFields {

}
#drugCategory {

}

#drugUseSideEffFields {

}
#drugUse {

}
#drugSideEff {

}

#drugImageFields {

}
#drugImg {
 border: dashed 1px black;
}


#drug-submit-btn {

}
#drug-Extra-Detail {
    display: flex;
    width: 100%;
}

.drug-type p {
    display: flex;
    gap: .2rem;
}
.d-t {
    color: #1d4ed8;
}
.d-e {
    color: slategrey;
}
.d-d {
    color: #da0847;
}


#search {
    padding: .5rem;
    background-color: #ecd1d1;
    border-radius: .5rem;
}




.drug-card {
    /*background-color: #ddd5d5;*/
    /*padding: .5rem;*/
}

.type-row {
    background-color: rgba(60, 53, 53, 0.4);
    padding: .3rem;
    border: 1px solid rgb(60, 53, 53);
}

.type-row > div > span:nth-child(2) {
    color: #801313;
}
.type-row > div > span:nth-child(3) {
    color: #575555;
}
.type-row > div > span:last-child {
    color: #2f2fe8;
}













#form-part1-2,
#form-part3-4 {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-direction: row;
    gap: .5rem;


    /*background: #2ecc71;*/
    /*border: #2ecc71 solid 1px;*/
}
@media (max-width: 768px) {
    #form-part1-2,
    #form-part3-4{
        flex-direction: column;
    }
    .field-grid {
        flex-direction: column;
    }
}
#form-part3-4 {
    /*background: #1e7e34;*/
}

.form-section {
    display: flex;
    justify-content: start;
    align-items: center;
    flex-direction: column;
    gap: .2rem;
    flex: 1 1 100%;
    padding: .5rem;

    border: 1px solid rgb(60, 53, 53);
}

#form-part1-2 > div > div,
#form-part1-2 > div > div > label,
#form-part1-2 > div > div > div > label {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
}


.field-grid {
    /*width: 100%;*/
    display: flex;
    gap: .5rem;
}
.field-group {
    flex: 1 1 100%;
}
.dynamic-fields-container {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.drug-type-dose,
.drug-brand {
    box-shadow: inset 0 0 0 1px rgb(107, 169, 179);
    padding: .5rem;
    border-radius: .5rem;
    /*flex-direction: column;*/
}

.drug-demand-options {
    gap: .5rem;
}
.drug-demand-options > label,
.drug-checkbox-wrapper label {
    /*border: 1px solid rgb(107, 169, 179);*/
    box-shadow: inset 0 0 0 1px rgb(107, 169, 179);
    border-radius: .25rem;
    padding: .25rem;
}

button[type="submit"] {
    width: 80%;
}


input,
textarea,
#drugCategory {
    padding: .4rem;
    background-color: #ccdee4;
    border-radius: .5rem;
    width: 80%;
}

.field-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.field-group,
.drug-demand-options,
#drug-demand-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
#drug-demand-wrapper {
    width: 80%;
}

#drug-type-dose-container,
#drug-brand-container {
    width: 100%;
}
.remove-row-btn,
.cancel-btn{
    background-color: rgba(248, 152, 184, 0.68);
    border: solid 1px #f898b8;
}




nav,
nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .25rem;
}
nav ul {}
nav a {
    border: 1px solid rgb(60, 53, 53);
    border-radius: .25rem;
    text-decoration: none;
    width: 100%;
    height: 100%;
    padding: .5rem;
    background: rgba(85, 128, 209, 0.78);
    color: #ededed;

}
nav li {
    list-style: none;
    /*width: 100%;*/
    /*height: 100%;*/

}







/*=============  Filters  ============*/
#filter-wrapper {
    background-color: #F1F5F9;
    padding: .5rem;
    border-radius: 1rem;
    box-shadow: #1f2937 1px 1px 1px;
}
#filter-wrapper h3 {
    margin: 0;
}
#display-filters {
}
.main-filter-container {

}
.filter-rows-container {
}
.filter-row {
    display: flex;
    justify-content: start;
    align-items: start;
    gap: .2rem;
    flex-direction: column;
}
.filter-buttons {
    display: flex;
    justify-content: start;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}
.filter-btn {
    background: #b0c9ff;
    color: #13283a;
    padding: 6px 10px; border-radius: 999px;
    font-size: 12px; white-space: nowrap;
    border: 1px solid rgba(0,0,0,.05);
    font-size: 14px;
    background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(16,185,129,.10));

}
.active-filter {
    background: rgba(59,130,246,.7);
    color: #fff;
}
.filter-count-row {
    margin-top: .5rem;
}
.filter-count-display {
    background: gainsboro;
    padding: .5rem;
    color: #5050e7;
    font-weight: bold;
    border-radius: .5rem;
    background: linear-gradient(135deg, rgba(59,130,246,.5), rgba(16,185,129,.10));
    color: rgb(33, 39, 87);

}
.filter-count-display span {
    color: #801313;
    color: rgba(16,185,129,.10);

}
/*=========================*/



#search-input {
    background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(16,185,129,.10));

}







.extra-info-label {
    background: linear-gradient(135deg, rgba(59,130,246,.5), rgba(16,185,129,.5));
    border-radius: .2rem;
    cursor: pointer;
    padding: .5rem;
}
.extra-info-label > * {
    pointer-events: none;
}
.extra-info-wrapper {
    background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(16,185,129,.10));

    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition:
            max-height 0.4s ease,
            opacity 0.3s ease;

    padding: .5rem;
    border-radius: 0 0 .5rem .5rem;

    text-align: justify;
    text-align-last: start;
}
.extra-info-wrapper.active-extra-info {
    max-height: 1000px; /* large enough to fit content */
    opacity: 1;
}




.drug-card {
    direction: rtl;
}
.drug-card .drug-type {
    direction: ltr;
}
.drug-card .drug-type > div {
    text-align: right;
}











