/* Cardio e-Library — responsive doctor portal */
.mel-app,.mel-login-wrap{--mel-primary:#23588f;--mel-primary-dark:#173f69;--mel-secondary:#69acd1;--mel-red:#d9373b;--mel-dark:#102f52;--mel-grey:#66788a;--mel-border:#dce7f0;--mel-bg:#f5f9fc;--mel-card:#fff;--mel-radius:18px;--mel-shadow:0 12px 35px rgba(25,70,110,.09);font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;color:var(--mel-dark);line-height:1.55;box-sizing:border-box}
.mel-app *,.mel-login-wrap *{box-sizing:border-box}.mel-app{width:100%;max-width:1480px;margin:0 auto;background:transparent}.mel-app a{transition:.18s ease}
.mel-accent-red{--mel-accent:var(--mel-red)}.mel-accent-green{--mel-accent:#45a782}.mel-accent-purple{--mel-accent:#6c7acb}.mel-accent-orange{--mel-accent:#e89a42}.mel-accent-dark{--mel-accent:var(--mel-dark)}

/* Login */
.mel-login-wrap{display:flex;justify-content:center;min-height:70vh;padding:70px 18px;background:radial-gradient(700px 260px at 20% 0,rgba(105,172,209,.18),transparent 70%),linear-gradient(180deg,#fff 0,var(--mel-bg) 100%)}
.mel-login-card{width:100%;max-width:480px;background:#fff;border:1px solid var(--mel-border);border-radius:24px;padding:38px;box-shadow:var(--mel-shadow);position:relative;overflow:hidden}.mel-login-card:before{content:"";position:absolute;left:0;top:0;right:0;height:5px;background:linear-gradient(90deg,var(--mel-primary),var(--mel-secondary),var(--mel-red))}
.mel-login-head{text-align:center;margin-bottom:25px}.mel-logo-img{display:block;max-width:245px;width:auto;height:auto;object-fit:contain}.mel-login-head .mel-logo-img{margin:0 auto;max-width:265px}.mel-login-head h2{margin:16px 0 4px;font-size:25px}.mel-login-head p{margin:0;color:var(--mel-grey);font-size:14px}
.mel-form label{display:block;margin-bottom:14px;font-size:14px;font-weight:650}.mel-form input[type=text],.mel-form input[type=email],.mel-form input[type=password],.mel-form input[type=search]{width:100%;margin-top:7px;padding:12px 14px;border:1px solid var(--mel-border);border-radius:12px;background:#fff;color:var(--mel-dark);font-size:15px}.mel-form input:focus,.mel-search input:focus,.mel-cat-search input:focus,.mel-filters select:focus{outline:3px solid rgba(105,172,209,.22);border-color:var(--mel-primary)}.mel-check{font-weight:400!important;display:flex!important;align-items:center;gap:8px}.mel-form-inline{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end}.mel-form-inline label{margin-bottom:0}
.mel-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:10px 17px;border:1px solid var(--mel-border);border-radius:11px;background:#fff;color:var(--mel-dark);font-size:14px;font-weight:700;cursor:pointer;text-decoration:none}.mel-btn:hover{border-color:var(--mel-primary);color:var(--mel-primary);transform:translateY(-1px)}.mel-btn-primary{background:var(--mel-primary);border-color:var(--mel-primary);color:#fff;box-shadow:0 8px 18px rgba(35,88,143,.18)}.mel-btn-primary:hover{background:var(--mel-primary-dark);border-color:var(--mel-primary-dark);color:#fff}.mel-btn-ghost{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.45);color:#fff}.mel-btn-ghost:hover{background:#fff;color:var(--mel-primary)}
.mel-error,.mel-alert{padding:11px 13px;border-radius:11px;margin-bottom:16px;font-size:14px}.mel-error{background:#fff0f0;border:1px solid #f2c0c1;color:#9b2429}.mel-alert{background:#eef7ff;border:1px solid #c9dfef;color:#255577}.mel-hint{color:var(--mel-grey);font-size:13px}.mel-forgot{margin-top:16px;font-size:14px}.mel-forgot summary{cursor:pointer;color:var(--mel-primary);font-weight:700}

/* Header */
.mel-header{display:grid;grid-template-columns:minmax(210px,auto) minmax(260px,1fr) auto;align-items:center;gap:18px;background:#fff;border:1px solid var(--mel-border);border-radius:20px;padding:13px 18px;box-shadow:0 7px 24px rgba(25,70,110,.06)}
.mel-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--mel-dark);min-width:0}.mel-header .mel-logo-img{max-width:205px;max-height:68px}.mel-brand-text{display:none}.mel-search{display:flex;align-items:center;gap:8px}.mel-search input{width:100%;min-width:0;padding:11px 15px;border:1px solid var(--mel-border);border-radius:999px;background:var(--mel-bg);color:var(--mel-dark)}.mel-search button{padding:11px 19px;border:0;border-radius:999px;background:var(--mel-primary);color:#fff;font-weight:700;cursor:pointer}.mel-search button:hover{background:var(--mel-primary-dark)}
.mel-user{position:relative}.mel-avatar{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,var(--mel-primary),var(--mel-secondary));color:#fff;font-weight:800;cursor:pointer;border:3px solid #eaf3f9}.mel-user-menu{position:absolute;right:0;top:52px;min-width:195px;background:#fff;border:1px solid var(--mel-border);border-radius:13px;padding:9px;display:none;z-index:50;box-shadow:var(--mel-shadow)}.mel-user:hover .mel-user-menu,.mel-user.is-open .mel-user-menu{display:block}.mel-user-name{display:block;font-weight:800;padding:5px 7px}.mel-user-menu a{display:block;padding:8px;color:var(--mel-dark);text-decoration:none;border-radius:8px;font-size:14px}.mel-user-menu a:hover{background:var(--mel-bg);color:var(--mel-primary)}

/* Top icon navigation */
.mel-top-nav{display:flex;align-items:center;gap:10px;margin-top:14px;padding:9px;background:#fff;border:1px solid var(--mel-border);border-radius:18px;box-shadow:0 6px 18px rgba(25,70,110,.04)}.mel-top-links{display:flex;gap:6px}.mel-top-link{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;text-decoration:none;color:var(--mel-grey);font-size:13px;font-weight:750;padding:9px 11px;border-radius:11px}.mel-top-link:hover,.mel-top-link.is-active{background:#edf5fb;color:var(--mel-primary)}.mel-top-mini-icon{font-size:16px;line-height:1}.mel-profile-link{margin-left:auto}.mel-category-strip{display:flex;align-items:center;gap:7px;overflow-x:auto;scrollbar-width:thin;padding:1px 3px;flex:1}.mel-category-pill{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;padding:7px 10px;border-radius:12px;text-decoration:none;color:var(--mel-dark);font-size:12px;font-weight:700;border:1px solid transparent}.mel-category-pill:hover{background:#f3f8fc;border-color:#cfe1ee;color:var(--mel-primary)}.mel-category-pill-icon{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 6px;border-radius:9px;background:linear-gradient(135deg,#e9f4fb,#f9fcfe);color:var(--mel-primary);font-size:14px;font-weight:800;border:1px solid #d7e8f3}

/* Main */
.mel-body{display:block;margin-top:18px}.mel-main{width:100%;min-width:0}.mel-hero{position:relative;overflow:hidden;color:#fff;border-radius:24px;padding:37px 40px;margin-bottom:18px;background:linear-gradient(115deg,var(--mel-dark),var(--mel-primary) 68%,#4d97c4)}.mel-hero:after{content:"♥";position:absolute;right:40px;top:50%;transform:translateY(-50%);font-size:150px;color:rgba(255,255,255,.055);font-family:Arial}.mel-hero-text{position:relative;z-index:2;max-width:760px}.mel-hero-kicker{display:inline-flex;padding:5px 10px;border-radius:999px;background:rgba(255,255,255,.13);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.mel-hero h1{margin:12px 0 6px;font-size:34px;line-height:1.15;color:#fff}.mel-hero p{margin:0;max-width:690px;opacity:.85}.mel-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:19px}
.mel-resume-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:15px;background:#fff;border:1px solid #cfe0ed;border-radius:18px;padding:15px 17px;margin-bottom:18px;box-shadow:0 7px 22px rgba(25,70,110,.055)}.mel-resume-icon{width:46px;height:46px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#edf6fc;color:var(--mel-primary);font-size:24px;font-weight:800}.mel-resume-copy{display:flex;flex-direction:column;min-width:0}.mel-resume-copy span{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--mel-secondary);font-weight:850}.mel-resume-copy strong{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mel-resume-copy small{color:var(--mel-grey)}
.mel-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:30px}.mel-stat{background:#fff;border:1px solid var(--mel-border);border-top:3px solid var(--mel-accent,var(--mel-primary));border-radius:15px;padding:16px 17px;display:flex;flex-direction:column;box-shadow:0 6px 18px rgba(25,70,110,.04)}.mel-stat strong{font-size:23px;letter-spacing:-.02em}.mel-stat span{font-size:12px;color:var(--mel-grey)}
.mel-page-head{display:flex;flex-wrap:wrap;gap:15px;align-items:flex-end;justify-content:space-between;margin-bottom:18px}.mel-page-title{font-size:28px;margin:8px 0 5px;letter-spacing:-.025em}.mel-page-title:after{content:"";display:block;width:48px;height:4px;margin-top:8px;border-radius:5px;background:linear-gradient(90deg,var(--mel-primary),var(--mel-secondary),var(--mel-red))}.mel-section{margin-bottom:34px}.mel-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.mel-section-head h2{font-size:21px;margin:0}.mel-section-head a,.mel-breadcrumbs a{color:var(--mel-primary);text-decoration:none;font-weight:700}.mel-breadcrumbs{font-size:13px;color:var(--mel-grey);margin-bottom:8px}.mel-sep{margin:0 6px}

/* Categories */
.mel-cat-search{display:flex;gap:8px}.mel-cat-search input{min-width:260px;padding:10px 14px;border:1px solid var(--mel-border);border-radius:12px}.mel-cat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.mel-cat-card{position:relative;overflow:hidden;background:#fff;border:1px solid var(--mel-border);border-radius:17px;padding:18px;text-decoration:none;color:var(--mel-dark);display:flex;flex-direction:column;gap:8px;min-height:180px;box-shadow:0 5px 16px rgba(25,70,110,.035)}.mel-cat-card:before{content:"";position:absolute;left:0;top:0;right:0;height:3px;background:var(--mel-accent,var(--mel-primary))}.mel-cat-card:hover{box-shadow:var(--mel-shadow);transform:translateY(-3px);border-color:#bdd4e4}.mel-cat-icon{width:46px;height:46px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;background:#edf6fc;color:var(--mel-primary);font-size:18px;font-weight:850;border:1px solid #d7e8f3}.mel-cat-card strong{font-size:16px}.mel-cat-desc{margin:0;font-size:13px;color:var(--mel-grey)}.mel-cat-foot{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:7px}.mel-cat-foot small{color:var(--mel-grey);font-size:12px}.mel-cat-foot em{font-style:normal;color:var(--mel-primary);font-size:12px;font-weight:800}

/* Books */
.mel-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-bottom:18px;background:#fff;border:1px solid var(--mel-border);border-radius:15px;padding:12px 14px}.mel-filters{display:flex;flex-wrap:wrap;gap:8px}.mel-filters select{padding:9px 12px;border:1px solid var(--mel-border);border-radius:10px;background:#fff;color:var(--mel-dark)}.mel-count{color:var(--mel-grey);font-size:13px;margin:0}.mel-book-list.mel-view-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.mel-book-list.mel-view-list{display:flex;flex-direction:column;gap:13px}.mel-book-card{background:#fff;border:1px solid var(--mel-border);border-radius:17px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 5px 16px rgba(25,70,110,.035)}.mel-book-card:hover{box-shadow:var(--mel-shadow);transform:translateY(-3px);border-color:#bdd4e4}.mel-view-list .mel-book-card{flex-direction:row}.mel-view-list .mel-book-cover{flex:0 0 125px;min-height:135px}.mel-book-cover{background:linear-gradient(145deg,#f7fbfe,#edf5fa);min-height:190px;display:flex;align-items:center;justify-content:center;text-decoration:none;overflow:hidden}.mel-book-cover img{width:100%;height:100%;max-height:260px;object-fit:cover;display:block}.mel-cover-fallback{font-size:46px;font-weight:850;color:var(--mel-primary)}.mel-cover-fallback.lg{font-size:76px}.mel-book-meta{padding:15px}.mel-book-meta h3{font-size:16px;line-height:1.3;margin:8px 0 4px}.mel-book-meta h3 a{color:var(--mel-dark);text-decoration:none}.mel-book-meta h3 a:hover{color:var(--mel-primary)}.mel-tag{display:inline-block;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;background:#eaf4fb;color:var(--mel-primary);padding:4px 8px;border-radius:999px}.mel-author{color:var(--mel-grey);font-size:13px;margin:0}.mel-date{color:var(--mel-grey);font-size:11px;margin:2px 0}.mel-excerpt{font-size:12px;color:var(--mel-grey);margin:8px 0 0}.mel-empty{color:var(--mel-grey);background:#fff;border:1px dashed var(--mel-border);border-radius:14px;padding:25px;text-align:center}.mel-pagination{display:flex;gap:6px;flex-wrap:wrap;margin-top:25px}.mel-page{padding:8px 12px;border:1px solid var(--mel-border);border-radius:9px;text-decoration:none;color:var(--mel-dark);background:#fff;font-size:13px;font-weight:700}.mel-page.is-active,.mel-page:hover{background:var(--mel-primary);border-color:var(--mel-primary);color:#fff}
.mel-book-detail{display:grid;grid-template-columns:minmax(220px,280px) 1fr;gap:28px;background:#fff;border:1px solid var(--mel-border);border-radius:20px;padding:25px;box-shadow:0 6px 20px rgba(25,70,110,.05)}.mel-detail-cover{background:linear-gradient(145deg,#f8fbfd,#edf5fa);border:1px solid var(--mel-border);border-radius:15px;display:flex;align-items:center;justify-content:center;padding:12px;min-height:330px}.mel-detail-cover img{max-width:100%;height:auto;border-radius:10px}.mel-detail-info{min-width:0}.mel-detail-info h1{font-size:30px;line-height:1.2;margin:0 0 5px}.mel-facts{list-style:none;padding:0;margin:16px 0}.mel-facts li{display:flex;gap:10px;padding:8px 0;border-bottom:1px solid var(--mel-border);font-size:13px}.mel-facts li span{flex:0 0 125px;color:var(--mel-grey);font-weight:700}.mel-detail-actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.mel-description{font-size:14px;color:#324b61}

/* Profile */
.mel-profile-reading{background:linear-gradient(120deg,#102f52,#23588f);color:#fff;border-radius:19px;padding:22px 24px;margin:15px 0 20px;box-shadow:0 10px 26px rgba(35,88,143,.15)}.mel-profile-reading-head{display:flex;align-items:center;gap:9px;font-size:12px;opacity:.88}.mel-reading-badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:var(--mel-red);font-size:9px;font-weight:900;letter-spacing:.1em}.mel-profile-reading h2{margin:10px 0 3px;font-size:22px;color:#fff}.mel-profile-reading p{margin:0 0 14px;opacity:.82}.mel-profile-reading .mel-btn-primary{background:#fff;color:var(--mel-primary);border-color:#fff;box-shadow:none}.mel-panel{background:#fff;border:1px solid var(--mel-border);border-radius:18px;padding:21px;margin-bottom:18px;box-shadow:0 5px 16px rgba(25,70,110,.035)}.mel-panel h2{margin-top:0;font-size:18px}.mel-table{width:100%;border-collapse:collapse;font-size:13px}.mel-table th,.mel-table td{text-align:left;padding:9px;border-bottom:1px solid var(--mel-border)}.mel-table th{color:var(--mel-grey);text-transform:uppercase;font-size:10px;letter-spacing:.06em}

/* Old sidebar hidden: categories now live at the top */
.mel-sidebar{display:none!important}

@media(max-width:1100px){.mel-cat-grid,.mel-book-list.mel-view-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.mel-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.mel-header{grid-template-columns:auto 1fr auto}.mel-header .mel-logo-img{max-width:180px}.mel-top-link span:last-child{display:none}.mel-profile-link{margin-left:0}}
@media(max-width:782px){.mel-app{padding:0 1px}.mel-header{grid-template-columns:1fr auto;gap:10px;padding:11px 12px;border-radius:16px}.mel-brand{min-width:0}.mel-header .mel-logo-img{max-width:165px;max-height:58px}.mel-search{grid-column:1/-1;grid-row:2}.mel-search input{padding:10px 13px}.mel-search button{padding:10px 14px}.mel-top-nav{align-items:center;border-radius:14px;padding:7px;gap:5px;overflow:hidden}.mel-top-links{flex:0 0 auto}.mel-category-strip{order:2}.mel-profile-link{order:3}.mel-top-link{padding:8px 9px}.mel-category-pill{padding:5px 7px}.mel-category-pill span:last-child{display:none}.mel-category-pill-icon{min-width:34px;height:34px}.mel-hero{padding:26px 22px;border-radius:18px}.mel-hero:after{right:10px;font-size:110px}.mel-hero h1{font-size:25px}.mel-resume-card{grid-template-columns:auto 1fr}.mel-resume-card .mel-btn{grid-column:1/-1;width:100%}.mel-cat-grid,.mel-book-list.mel-view-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.mel-book-cover{min-height:165px}.mel-book-detail{grid-template-columns:1fr;padding:18px}.mel-detail-cover{min-height:260px}.mel-page-title{font-size:24px}.mel-page-head{align-items:stretch}.mel-cat-search{width:100%}.mel-cat-search input{min-width:0;flex:1}.mel-toolbar{align-items:stretch}.mel-filters{width:100%}.mel-filters select,.mel-filters .mel-btn{flex:1 1 calc(50% - 6px);min-width:0}.mel-form-inline{display:block}.mel-form-inline label{margin-bottom:13px}.mel-table{display:block;overflow-x:auto;white-space:nowrap}}
@media(max-width:520px){.mel-login-wrap{padding:35px 12px}.mel-login-card{padding:27px 20px}.mel-login-head .mel-logo-img{max-width:230px}.mel-header .mel-logo-img{max-width:145px}.mel-user .mel-avatar{width:40px;height:40px}.mel-search button{font-size:0;width:42px;padding:0}.mel-search button:after{content:"⌕";font-size:18px}.mel-stats{grid-template-columns:1fr 1fr;gap:9px}.mel-stat{padding:13px}.mel-stat strong{font-size:19px}.mel-cat-grid,.mel-book-list.mel-view-grid{grid-template-columns:1fr}.mel-cat-card{min-height:auto}.mel-view-list .mel-book-card{flex-direction:column}.mel-view-list .mel-book-cover{flex:auto;min-height:180px}.mel-hero-actions .mel-btn{width:100%}.mel-detail-info h1{font-size:24px}.mel-facts li{display:grid;grid-template-columns:105px 1fr}.mel-facts li span{flex:none}.mel-profile-reading{padding:18px}.mel-panel{padding:17px}}
\n/* v1.2.2: logo-free header + top 10 specialty icon navigation */\n.mel-brand-text-visible{display:flex!important;flex-direction:column;line-height:1.2}.mel-brand-text-visible strong{font-size:20px;color:var(--mel-primary-dark)}.mel-brand-text-visible small{font-size:11px;color:var(--mel-grey);margin-top:3px}.mel-category-strip{gap:8px}.mel-category-pill{background:#f7fbfe;border:1px solid #d9eaf5;padding:7px 10px}.mel-category-pill:hover{background:#eef7fc;border-color:#9fcbe6}.mel-category-pill-icon.mel-med-icon{width:32px;min-width:32px;height:32px;padding:0;border:0;border-radius:10px;background-color:#6db4dc;position:relative}.mel-med-icon:before,.mel-med-icon:after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;border-radius:2px}.mel-med-icon-1:before{width:18px;height:4px}.mel-med-icon-1:after{width:4px;height:18px}.mel-med-icon-2:before{width:16px;height:16px;border:2px solid #fff;background:transparent;border-radius:50%}.mel-med-icon-2:after{width:7px;height:2px;transform:translate(5px,6px) rotate(45deg)}.mel-med-icon-3:before{width:18px;height:6px;border:2px solid #fff;background:transparent;border-radius:8px;transform:translate(-50%,-50%) rotate(-35deg)}.mel-med-icon-3:after{width:4px;height:4px;border-radius:50%;box-shadow:7px 0 0 #fff,-7px 0 0 #fff}.mel-med-icon-4:before{width:15px;height:15px;border:2px solid #fff;background:transparent;border-radius:50%}.mel-med-icon-4:after{width:4px;height:4px;border-radius:50%}.mel-med-icon-5:before{width:18px;height:4px}.mel-med-icon-5:after{width:4px;height:18px}.mel-med-icon-6:before{width:17px;height:13px;border:2px solid #fff;background:transparent;border-radius:50% 50% 45% 45%}.mel-med-icon-6:after{width:3px;height:9px;transform:translate(-50%,5px)}.mel-med-icon-7:before{content:"Rx";background:transparent;color:#fff;font-size:12px;font-weight:900}.mel-med-icon-7:after{display:none}.mel-med-icon-8:before{width:17px;height:17px;border:2px solid #fff;background:transparent;border-radius:50%}.mel-med-icon-8:after{width:2px;height:12px;box-shadow:-5px 0 0 #fff,5px 0 0 #fff}.mel-med-icon-9:before{width:16px;height:16px;border:2px solid #fff;background:transparent;border-radius:4px;transform:translate(-50%,-50%) rotate(45deg)}.mel-med-icon-9:after{width:5px;height:5px;border-radius:50%}.mel-med-icon-10:before{width:17px;height:12px;border:2px solid #fff;background:transparent;border-radius:50%}.mel-med-icon-10:after{width:7px;height:2px;box-shadow:0 -5px 0 #fff,0 5px 0 #fff}.mel-login-head{padding-top:2px}@media(max-width:782px){.mel-brand-text-visible strong{font-size:17px}.mel-brand-text-visible small{display:none}.mel-category-pill span:last-child{display:inline;font-size:11px}.mel-category-pill{flex-direction:column;min-width:76px;padding:7px 6px}.mel-category-strip{padding-bottom:3px}}\n
/* v1.2.3: fixed 10-category desktop navigation — no horizontal slider */
.mel-top-nav-fixed{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px 9px;overflow:visible}
.mel-top-nav-fixed .mel-top-links{display:flex;gap:4px;min-width:max-content}
.mel-top-nav-fixed .mel-profile-link{margin-left:0;min-width:max-content}
.mel-category-grid{display:grid!important;grid-template-columns:repeat(10,minmax(0,1fr));gap:5px;overflow:visible!important;scrollbar-width:none;padding:0;min-width:0;width:100%}
.mel-category-grid::-webkit-scrollbar{display:none}
.mel-category-grid .mel-category-pill{min-width:0;width:100%;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:4px 2px;border:1px solid #dbeaf4;border-radius:11px;background:#f8fbfd;color:#103b59;overflow:hidden;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease}
.mel-category-grid .mel-category-pill:hover{transform:translateY(-1px);background:#fff;border-color:#acd6eb;box-shadow:0 5px 13px rgba(16,85,128,.09)}
.mel-category-grid .mel-category-pill-icon{width:27px;min-width:27px;height:27px;padding:0;border:0;border-radius:8px;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.2),0 2px 5px rgba(21,82,122,.12)}
.mel-category-grid .mel-category-pill-icon svg{width:18px;height:18px;display:block;fill:#fff}
.mel-category-grid .mel-category-pill-icon svg .mel-icon-line{fill:none;stroke:#fff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.mel-category-grid .mel-category-pill-icon svg .mel-icon-hole{fill:rgba(255,255,255,.18)}
.mel-category-grid .mel-category-pill-icon svg .mel-icon-hole-stroke{fill:none;stroke:#fff;stroke-width:1.7}
.mel-category-grid .mel-category-pill-label{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;line-height:1.05;font-weight:800;text-align:center;color:#073a5d;letter-spacing:-.1px}
.mel-category-grid .mel-category-1 .mel-category-pill-icon{background:linear-gradient(135deg,#e84d5b,#ff7580)}
.mel-category-grid .mel-category-2 .mel-category-pill-icon{background:linear-gradient(135deg,#6658d8,#8d83ee)}
.mel-category-grid .mel-category-3 .mel-category-pill-icon{background:linear-gradient(135deg,#2d9cdb,#63c0ee)}
.mel-category-grid .mel-category-4 .mel-category-pill-icon{background:linear-gradient(135deg,#f29a45,#ffba72)}
.mel-category-grid .mel-category-5 .mel-category-pill-icon{background:linear-gradient(135deg,#18a88a,#45cdb4)}
.mel-category-grid .mel-category-6 .mel-category-pill-icon{background:linear-gradient(135deg,#3576cf,#65a5ed)}
.mel-category-grid .mel-category-7 .mel-category-pill-icon{background:linear-gradient(135deg,#9b62d0,#bc88e8)}
.mel-category-grid .mel-category-8 .mel-category-pill-icon{background:linear-gradient(135deg,#06a6b5,#51cad4)}
.mel-category-grid .mel-category-9 .mel-category-pill-icon{background:linear-gradient(135deg,#d66b94,#ed92b4)}
.mel-category-grid .mel-category-10 .mel-category-pill-icon{background:linear-gradient(135deg,#4f8bcb,#7ab5e4)}
@media (max-width:1180px) and (min-width:783px){
  .mel-top-nav-fixed{grid-template-columns:auto minmax(0,1fr) auto;gap:5px;padding:7px}
  .mel-top-nav-fixed .mel-top-link{padding:8px 7px;font-size:11px;gap:4px}
  .mel-top-nav-fixed .mel-top-mini-icon{font-size:14px}
  .mel-category-grid{gap:3px}
  .mel-category-grid .mel-category-pill{height:49px;border-radius:9px;padding:3px 1px}
  .mel-category-grid .mel-category-pill-icon{width:24px;min-width:24px;height:24px;border-radius:7px}
  .mel-category-grid .mel-category-pill-icon svg{width:16px;height:16px}
  .mel-category-grid .mel-category-pill-label{font-size:8px}
}
@media(max-width:782px){
  .mel-top-nav-fixed{display:flex;flex-wrap:wrap;overflow:visible;gap:6px;padding:7px}
  .mel-top-nav-fixed .mel-top-links{order:1}
  .mel-top-nav-fixed .mel-profile-link{order:1;margin-left:auto}
  .mel-category-grid{order:2;flex-basis:100%;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px!important;overflow:visible!important;padding:0!important}
  .mel-category-grid .mel-category-pill{height:58px;min-width:0!important;padding:5px 2px!important;flex-direction:column!important}
  .mel-category-grid .mel-category-pill-icon{width:30px;min-width:30px;height:30px}
  .mel-category-grid .mel-category-pill-label,.mel-category-grid .mel-category-pill span:last-child{display:block!important;font-size:8.5px;max-width:100%}
}
@media(max-width:420px){
  .mel-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mel-category-grid .mel-category-pill{height:54px;flex-direction:row!important;justify-content:flex-start;padding:5px 7px!important;gap:6px}
  .mel-category-grid .mel-category-pill-label,.mel-category-grid .mel-category-pill span:last-child{font-size:10px;text-align:left}
}

/* v1.2.4 doctor profile redesign */
.mel-doctor-profile-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;padding:22px 24px;margin:16px 0 18px;background:linear-gradient(120deg,#073f64,#0b79ae 68%,#55a9d2);border-radius:22px;color:#fff;box-shadow:0 12px 30px rgba(8,74,112,.13)}
.mel-doctor-avatar{width:68px;height:68px;border-radius:20px;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:900;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.24);box-shadow:inset 0 0 0 4px rgba(255,255,255,.05)}
.mel-doctor-profile-main h2{margin:4px 0 4px;font-size:26px;color:#fff}.mel-doctor-profile-main p{margin:0;color:rgba(255,255,255,.83);font-size:14px}.mel-doctor-eyebrow{font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:850;color:#d8f2ff}
.mel-profile-status{display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.25);font-size:12px;font-weight:800}.mel-profile-status:before{content:"";width:7px;height:7px;border-radius:50%;background:#9af0d5}.mel-profile-status.is-inactive:before{background:#ffc5c5}
.mel-profile-details-panel{padding:22px;margin-bottom:18px}.mel-profile-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.mel-profile-panel-head h2{margin:0;font-size:19px}.mel-profile-panel-head>span{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#edf7fc;color:#1684bd;font-weight:900}
.mel-profile-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.mel-profile-info-grid>div{padding:14px 15px;border:1px solid #dceaf3;border-radius:13px;background:#fbfdff;min-width:0}.mel-profile-info-grid small{display:block;margin-bottom:5px;color:#6b8190;font-size:10px;text-transform:uppercase;letter-spacing:.05em;font-weight:800}.mel-profile-info-grid strong{display:block;color:#143b54;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.mel-reading-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:24px}.mel-reading-library-card{padding:20px;min-height:230px}.mel-current-book-mini{display:grid;grid-template-columns:auto 1fr;gap:13px;align-items:center;padding:13px;background:#f7fbfe;border:1px solid #dceaf3;border-radius:14px;margin-bottom:14px}.mel-current-book-icon,.mel-downloaded-icon{width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#1c8ac3,#70bde4);color:#fff;font-size:20px;font-weight:900}.mel-current-book-mini strong{display:block;font-size:14px;color:#123d59}.mel-current-book-mini p{margin:3px 0;color:#6d8190;font-size:12px}.mel-current-book-mini small{color:#8495a1;font-size:10px}.mel-profile-empty{padding:18px;margin:0 0 13px}.mel-downloaded-list{display:flex;flex-direction:column;gap:8px}.mel-downloaded-item{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;padding:10px;border:1px solid #dfeaf2;border-radius:12px;text-decoration:none;background:#fbfdff}.mel-downloaded-item:hover{background:#f3f9fd;border-color:#b9d9eb}.mel-downloaded-item .mel-downloaded-icon{width:34px;height:34px;border-radius:9px;font-size:16px}.mel-downloaded-item strong{display:block;color:#173f58;font-size:12px}.mel-downloaded-item small{display:block;color:#81929f;font-size:10px;margin-top:2px}
@media(max-width:900px){.mel-profile-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mel-reading-library-grid{grid-template-columns:1fr}}
@media(max-width:560px){.mel-doctor-profile-card{grid-template-columns:auto 1fr;padding:18px}.mel-profile-status{grid-column:1/-1;width:max-content}.mel-doctor-avatar{width:56px;height:56px;border-radius:16px;font-size:23px}.mel-doctor-profile-main h2{font-size:21px}.mel-profile-info-grid{grid-template-columns:1fr}.mel-profile-details-panel,.mel-reading-library-card{padding:16px}}


/* v1.2.5: streamlined full-width portal + larger specialty navigation */
.mel-app{
  width:100%;
  max-width:none;
  margin:0;
}

/* Search/header row intentionally removed from the portal in v1.2.5. */
.mel-header{display:none!important}

.mel-top-nav-fixed{
  margin-top:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:stretch;
  gap:10px;
  padding:10px;
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  border:1px solid #d7e7f2;
  box-shadow:0 8px 28px rgba(28,83,122,.075);
}
.mel-top-nav-fixed .mel-top-links{
  display:grid;
  grid-template-columns:repeat(2,auto);
  align-items:stretch;
  gap:7px;
}
.mel-top-nav-fixed .mel-top-link{
  min-height:72px;
  padding:8px 11px;
  border-radius:14px;
  border:1px solid transparent;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  font-size:11px;
  line-height:1.1;
  font-weight:800;
  color:#36566f;
}
.mel-top-nav-fixed .mel-top-link:hover,
.mel-top-nav-fixed .mel-top-link.is-active{
  background:#eef7fc;
  border-color:#c9e1ef;
  color:#075486;
}
.mel-top-nav-fixed .mel-top-mini-icon{
  width:34px;
  height:34px;
  border-radius:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#e7f4fb,#f7fbfe);
  color:#0874ad;
  font-size:18px;
  box-shadow:inset 0 0 0 1px #d4e9f4;
}
.mel-top-nav-fixed .mel-profile-link{
  margin-left:0;
  min-width:72px;
}

.mel-category-grid{
  display:grid!important;
  grid-template-columns:repeat(10,minmax(0,1fr));
  gap:7px;
  width:100%;
  min-width:0;
  overflow:visible!important;
  padding:0!important;
}
.mel-category-grid .mel-category-pill{
  width:100%;
  min-width:0;
  height:72px;
  padding:7px 3px;
  border-radius:14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  background:#f7fbfe;
  border:1px solid #d8e9f3;
  box-shadow:0 2px 8px rgba(31,91,131,.035);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.mel-category-grid .mel-category-pill:hover{
  transform:translateY(-2px);
  background:#fff;
  border-color:#a9d4e9;
  box-shadow:0 8px 18px rgba(31,91,131,.11);
}
.mel-category-grid .mel-category-pill-icon{
  width:38px;
  min-width:38px;
  height:38px;
  border-radius:12px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.25),0 4px 9px rgba(21,82,122,.14);
}
.mel-category-grid .mel-category-pill-icon svg{
  width:23px;
  height:23px;
}
.mel-category-grid .mel-category-pill-label{
  display:block!important;
  width:100%;
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
  font-size:10.5px;
  line-height:1.05;
  font-weight:850;
  text-align:center;
  color:#073a5d;
  letter-spacing:-.15px;
}

@media(max-width:1180px) and (min-width:783px){
  .mel-top-nav-fixed{gap:7px;padding:8px}
  .mel-top-nav-fixed .mel-top-link{min-height:66px;padding:7px 7px;font-size:10px}
  .mel-top-nav-fixed .mel-top-mini-icon{width:31px;height:31px;font-size:16px}
  .mel-category-grid{gap:4px}
  .mel-category-grid .mel-category-pill{height:66px;padding:5px 2px;border-radius:11px}
  .mel-category-grid .mel-category-pill-icon{width:34px;min-width:34px;height:34px;border-radius:10px}
  .mel-category-grid .mel-category-pill-icon svg{width:20px;height:20px}
  .mel-category-grid .mel-category-pill-label{font-size:9px}
}

@media(max-width:782px){
  .mel-app{width:100%;max-width:none;margin:0;padding:0 1px}
  .mel-top-nav-fixed{display:flex;flex-wrap:wrap;gap:7px;padding:8px;border-radius:16px}
  .mel-top-nav-fixed .mel-top-links{order:1;display:flex;gap:6px}
  .mel-top-nav-fixed .mel-profile-link{order:1;margin-left:auto;min-width:62px}
  .mel-top-nav-fixed .mel-top-link{min-height:48px;flex-direction:row;padding:7px 9px;font-size:10px}
  .mel-top-nav-fixed .mel-top-mini-icon{width:28px;height:28px;font-size:14px;border-radius:9px}
  .mel-category-grid{order:2;flex-basis:100%;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px!important}
  .mel-category-grid .mel-category-pill{height:70px;padding:6px 2px!important;border-radius:12px}
  .mel-category-grid .mel-category-pill-icon{width:36px;min-width:36px;height:36px}
  .mel-category-grid .mel-category-pill-icon svg{width:21px;height:21px}
  .mel-category-grid .mel-category-pill-label,.mel-category-grid .mel-category-pill span:last-child{display:block!important;font-size:9px;text-align:center}
}

@media(max-width:480px){
  .mel-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mel-category-grid .mel-category-pill{height:58px;flex-direction:row!important;justify-content:flex-start;padding:6px 9px!important;gap:8px}
  .mel-category-grid .mel-category-pill-label,.mel-category-grid .mel-category-pill span:last-child{font-size:10.5px;text-align:left}
}

/* v1.2.6 — Red + charcoal brand refresh; larger specialty navigation */
.mel-app,.mel-login-wrap{
  --mel-primary:#FF0000;
  --mel-primary-dark:#D60000;
  --mel-secondary:#231F20;
  --mel-red:#FF0000;
  --mel-dark:#231F20;
  --mel-grey:#625d5f;
  --mel-border:#e7dfe1;
  --mel-bg:#faf8f8;
  --mel-shadow:0 12px 35px rgba(35,31,32,.09);
}
.mel-login-wrap{background:radial-gradient(700px 260px at 20% 0,rgba(255,0,0,.08),transparent 70%),linear-gradient(180deg,#fff 0,var(--mel-bg) 100%)}
.mel-login-card:before{background:linear-gradient(90deg,#231F20,#FF0000,#231F20)}
.mel-form input:focus,.mel-search input:focus,.mel-cat-search input:focus,.mel-filters select:focus{outline-color:rgba(255,0,0,.13);border-color:#FF0000}
.mel-btn-primary{background:#FF0000;border-color:#FF0000;box-shadow:0 8px 18px rgba(255,0,0,.16)}
.mel-btn-primary:hover{background:#231F20;border-color:#231F20}
.mel-avatar{background:linear-gradient(135deg,#231F20,#FF0000)}
.mel-top-link:hover,.mel-top-link.is-active{background:#fff0f0;color:#FF0000}
.mel-hero{background:linear-gradient(115deg,#231F20 0%,#3a3032 45%,#FF0000 140%)}
.mel-resume-icon{background:#fff0f0;color:#FF0000}
.mel-tag{background:#fff0f0;color:#d90000}
.mel-page.is-active,.mel-page:hover{background:#FF0000;border-color:#FF0000;color:#fff}
.mel-profile-reading{background:linear-gradient(120deg,#231F20,#4a3032 70%,#8e1115)}

/* Larger, cleaner 10-category navigation */
.mel-category-grid{gap:8px}
.mel-category-grid .mel-category-pill{
  height:72px;
  gap:6px;
  padding:7px 4px;
  border-color:#eadfe1;
  border-radius:13px;
  background:#fffafa;
  color:#231F20;
}
.mel-category-grid .mel-category-pill:hover{background:#fff;border-color:#FF0000;box-shadow:0 7px 18px rgba(255,0,0,.10)}
.mel-category-grid .mel-category-pill-icon{
  width:38px;
  min-width:38px;
  height:38px;
  border-radius:10px;
  background:#FF0000!important;
  box-shadow:0 4px 10px rgba(255,0,0,.18);
}
.mel-category-grid .mel-category-pill-icon svg{width:24px;height:24px}
.mel-category-grid .mel-category-pill-label{
  font-size:11.5px;
  line-height:1.1;
  font-weight:800;
  color:#231F20;
  letter-spacing:0;
}
@media (max-width:1180px) and (min-width:783px){
  .mel-category-grid{gap:5px}
  .mel-category-grid .mel-category-pill{height:66px;padding:5px 2px}
  .mel-category-grid .mel-category-pill-icon{width:34px;min-width:34px;height:34px}
  .mel-category-grid .mel-category-pill-icon svg{width:21px;height:21px}
  .mel-category-grid .mel-category-pill-label{font-size:9.5px}
}
@media(max-width:782px){
  .mel-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important}
  .mel-category-grid .mel-category-pill{height:64px!important;flex-direction:row!important;justify-content:flex-start!important;gap:9px!important;padding:7px 9px!important}
  .mel-category-grid .mel-category-pill-icon{width:38px;min-width:38px;height:38px}
  .mel-category-grid .mel-category-pill-label,.mel-category-grid .mel-category-pill span:last-child{font-size:11px!important;text-align:left}
}

/* v1.2.7 — Complete red + charcoal cleanup (profile + remaining blue accents) */
.mel-doctor-profile-card{background:linear-gradient(120deg,#231F20 0%,#3a3032 68%,#FF0000 145%);box-shadow:0 12px 30px rgba(35,31,32,.14)}
.mel-profile-panel-head>span{background:#fff0f0;color:#FF0000}
.mel-profile-info-grid>div{border-color:#eadfe1;background:#fffafa}
.mel-profile-info-grid strong,.mel-current-book-mini strong,.mel-downloaded-item strong{color:#231F20}
.mel-current-book-mini{background:#fffafa;border-color:#eadfe1}
.mel-current-book-icon,.mel-downloaded-icon{background:linear-gradient(135deg,#231F20,#FF0000);color:#fff}
.mel-downloaded-item{border-color:#eadfe1;background:#fffafa}
.mel-downloaded-item:hover{background:#fff0f0;border-color:#FF0000}
.mel-alert{background:#fff5f5;border-color:#f2caca;color:#7a2225}
.mel-forgot summary{color:#FF0000}
/* override any legacy blue text accents */
.mel-app a:not(.mel-btn):not(.mel-category-pill):not(.mel-downloaded-item){color:#FF0000}
