/* Account, notifikasi, komentar, login/register (port dari bacabl) */
/* ===== Account slot + bell ===== */
.acct-slot{display:flex;align-items:center;gap:8px}
.acct-login{display:inline-flex;align-items:center;height:36px;padding:0 16px;border-radius:999px;background:linear-gradient(180deg,#efb78f,#e99b63);color:#fff;font-size:13.5px;font-weight:700;white-space:nowrap;box-shadow:0 6px 16px rgba(233,155,99,.28)}
.acct-login:hover{filter:brightness(1.1)}
.acct-bellwrap,.acct-userwrap{position:relative}
.acct-bell,.acct-user{position:relative;width:38px;height:38px;display:flex;align-items:center;justify-content:center;border:1px solid rgb(70,72,82);border-radius:50%;background:rgba(255,255,255,.06);color:#e5e7eb;cursor:pointer;transition:background .15s,color .15s}
.acct-bell:hover,.acct-user:hover{background:rgba(233,155,99,.28);color:#fff}
.acct-badge{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;font-size:10.5px;font-weight:800;line-height:18px;text-align:center;box-shadow:0 0 0 2px #0d0e12}
.acct-badge[hidden]{display:none}
.acct-user .cm-avatar{width:30px;height:30px;font-size:13px}
.acct-panel{position:absolute;right:0;top:calc(100% + 10px);z-index:1200;width:340px;max-width:calc(100vw - 20px);background:#0d0e12;border:1px solid rgb(70,72,82);border-radius:16px;box-shadow:0 18px 44px rgba(0,0,0,.6);overflow:hidden}
.acct-panel[hidden]{display:none}
.acct-panel-head{padding:12px 16px;font-weight:800;color:#fff;border-bottom:1px solid rgba(255,255,255,.08);font-size:14px}
.acct-notif-list{max-height:min(60vh,380px);overflow-y:auto}
.acct-empty{padding:22px 16px;text-align:center;color:#8991a4;font-size:13px}
.acct-notif{display:flex;align-items:flex-start;gap:10px;padding:11px 14px;color:#d1d5db;font-size:13px;line-height:1.4;border-bottom:1px solid rgba(255,255,255,.05);transition:background .15s}
.acct-notif:hover{background:rgba(255,255,255,.06)}
.acct-notif.is-unread{background:rgba(233,155,99,.10)}
.acct-notif-text{flex:1;min-width:0}
.acct-notif-text b{color:#fff;font-weight:700}
.acct-notif-time{flex:0 0 auto;font-size:11.5px;color:#6b7280;white-space:nowrap}
.acct-menu{width:190px}
.acct-menu-name{padding:12px 16px;font-weight:700;color:#fff;border-bottom:1px solid rgba(255,255,255,.08);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acct-menu-item{display:block;width:100%;padding:11px 16px;text-align:left;background:transparent;border:0;color:#fca5a5;font-size:13.5px;font-weight:600;cursor:pointer}
.acct-menu-item:hover{background:rgba(239,68,68,.12)}
.acct-slot-mobile{margin-left:12px;margin-right:2px}
.acct-slot-mobile .acct-login{height:32px;padding:0 12px;font-size:12.5px}
.acct-slot-mobile .acct-bell,.acct-slot-mobile .acct-user{width:34px;height:34px}
.acct-slot-mobile .acct-panel{position:fixed;left:10px;right:10px;top:62px;width:auto;max-width:none}

/* ===== Comments ===== */
.comments-root{margin-top:16px;padding:16px;border-radius:16px;background:linear-gradient(180deg,#0d0e12,#0c0d10);border:1px solid rgba(255,255,255,.08);box-shadow:0 6px 18px rgba(0,0,0,.35);color:#e5e7eb}
.cm-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.cm-head h2{display:flex;align-items:center;gap:8px;font-size:1.1rem;font-weight:800;color:#fff;margin:0}
.cm-head h2::before{content:"";width:5px;height:20px;border-radius:3px;background:linear-gradient(180deg,#efb78f,#e99b63)}
.cm-total{color:#8991a4;font-weight:600;font-size:.95rem}
.cm-hint{font-size:12px;color:#6b7280}
.cm-form{margin-bottom:14px}
.cm-input{width:100%;resize:vertical;min-height:72px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.06);border:1px solid rgb(70,72,82);color:#fff;font-size:16px;line-height:1.5;outline:none}
.cm-input:focus{border-color:#e99b63;box-shadow:0 0 0 3px rgba(233,155,99,.22)}
.cm-form-bar{display:flex;align-items:center;justify-content:space-between;margin-top:8px}
.cm-count{font-size:12px;color:#6b7280}
.cm-error{margin-top:6px;padding:8px 12px;border-radius:10px;background:rgba(239,68,68,.14);border:1px solid rgba(239,68,68,.35);color:#fecaca;font-size:13px}
.cm-error[hidden]{display:none}
.cm-btn{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 16px;border-radius:10px;border:1px solid rgb(70,72,82);background:rgba(255,255,255,.07);color:#fff;font-size:13px;font-weight:700;cursor:pointer;transition:all .15s}
.cm-btn:hover{background:#e99b63;border-color:#e99b63}
.cm-btn-primary{background:linear-gradient(180deg,#efb78f,#e99b63);border-color:transparent}
.cm-btn:disabled{opacity:.6;cursor:default}
.cm-login{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:12px 14px;border-radius:12px;background:rgba(233,155,99,.08);border:1px dashed rgba(233,155,99,.45);color:#cbd5e1;font-size:13.5px}
.cm-thread{padding:12px 0;border-top:1px solid rgba(255,255,255,.07)}
.cm-thread:first-child{border-top:0}
.cm-item{display:flex;gap:10px}
.cm-item.is-reply{margin-top:10px}
.cm-avatar{flex:0 0 auto;width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:15px}
.cm-main{flex:1;min-width:0}
.cm-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.cm-name{color:#fff;font-weight:700;font-size:14px}
.cm-tag{padding:1px 8px;border-radius:999px;font-size:10.5px;font-weight:700;background:rgba(70,72,82,.8);color:#cbd5e1}
.cm-tag-admin{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff}
.cm-time{font-size:12px;color:#6b7280}
.cm-body{margin-top:3px;font-size:14px;line-height:1.55;color:#e5e7eb;white-space:pre-wrap;word-break:break-word}
.cm-actions{margin-top:4px}
.cm-link{background:transparent;border:0;padding:0;color:#efb78f;font-size:12.5px;font-weight:700;cursor:pointer}
.cm-link:hover{color:#fff}
.cm-replies{margin-left:46px}
.cm-replies .cm-avatar{width:28px;height:28px;font-size:12px}
.cm-reply-slot{margin-top:8px}
.cm-empty{padding:22px 0;text-align:center;color:#8991a4;font-size:14px}
.cm-more{display:block;margin:12px auto 0;height:36px;padding:0 20px;border-radius:999px;border:1px solid rgb(70,72,82);background:rgba(255,255,255,.06);color:#fff;font-size:13px;font-weight:700;cursor:pointer}
.cm-more:hover{background:#e99b63;border-color:#e99b63}
.cm-more[hidden]{display:none}
.chapter-comments{max-width:800px;margin:0 auto;padding:0 12px 96px}
@media (max-width:767.98px){.cm-replies{margin-left:30px}.cm-hint{display:none}}

/* ===== Login / Register ===== */
.auth-wrap{display:flex;justify-content:center;padding:40px 14px 60px}
.auth-card{width:100%;max-width:400px;padding:26px 24px;border-radius:20px;background:linear-gradient(180deg,#0d0e12,#0c0d10);border:1px solid rgba(70,72,82,.8);box-shadow:0 18px 50px rgba(0,0,0,.5);color:#e5e7eb}
.auth-card h1{font-size:1.5rem;font-weight:800;color:#fff;margin:0 0 4px}
.auth-sub{color:#8991a4;font-size:13.5px;margin-bottom:18px}
.auth-card label{display:block;margin:12px 0 6px;font-size:13px;font-weight:600;color:#cbd5e1}
.auth-card .opt{color:#6b7280;font-weight:500}
.auth-card input[type=text],.auth-card input[type=email],.auth-card input[type=password]{width:100%;height:42px;padding:0 14px;border-radius:12px;background:rgba(255,255,255,.06);border:1px solid rgb(70,72,82);color:#fff;font-size:14.5px;outline:none}
.auth-card input:focus{border-color:#e99b63;box-shadow:0 0 0 3px rgba(233,155,99,.22)}
.auth-btn{width:100%;height:44px;margin-top:20px;border:0;border-radius:12px;background:linear-gradient(180deg,#efb78f,#e99b63);color:#fff;font-size:15px;font-weight:800;cursor:pointer;box-shadow:0 8px 20px rgba(233,155,99,.30)}
.auth-btn:hover{filter:brightness(1.1)}
.auth-error{margin-bottom:6px;padding:10px 12px;border-radius:10px;background:rgba(239,68,68,.14);border:1px solid rgba(239,68,68,.35);color:#fecaca;font-size:13.5px}
.auth-alt{margin-top:16px;text-align:center;font-size:13.5px;color:#8991a4}
.auth-alt a{color:#efb78f;font-weight:700}

/* ===== Comment count icon on cards ===== */
.cm-count-chip{display:inline-flex;align-items:center;gap:5px;margin-left:14px}
.cm-count-chip svg{width:14px;height:14px;opacity:.85}
.acct-notif-ico{flex:0 0 auto;width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#059669,#10b981);color:#fff}

/* ===== Avatar image, profile page, misc ===== */
img.cm-avatar-img{object-fit:cover;background:#171920;border:1px solid rgb(70,72,82)}
.acct-user img.cm-avatar-img{width:30px;height:30px}
.acct-menu-link{text-decoration:none;color:#e5e7eb!important}
.acct-menu-link:hover{background:rgba(255,255,255,.08)}
.cm-item.is-focus{animation:cmFocus 3.5s ease}
@keyframes cmFocus{0%,60%{background:rgba(233,155,99,.22);box-shadow:0 0 0 6px rgba(233,155,99,.22);border-radius:12px}100%{background:transparent;box-shadow:0 0 0 0 transparent}}
.auth-ok{margin-bottom:10px;padding:10px 12px;border-radius:10px;background:rgba(16,185,129,.14);border:1px solid rgba(16,185,129,.4);color:#a7f3d0;font-size:13.5px}
.profile-card{max-width:460px}
.profile-head{display:flex;align-items:center;gap:14px;margin:6px 0 10px;padding:14px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
.profile-avatar{width:72px;height:72px;border-radius:50%;object-fit:cover;flex:0 0 auto;border:2px solid rgba(233,155,99,.6);background:#171920}
.profile-avatar-ph{display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:28px;font-weight:800;background:linear-gradient(180deg,#efb78f,#e99b63)}
.profile-name{font-size:1.15rem;font-weight:800;color:#fff}
.profile-mail{font-size:13px;color:#8991a4;word-break:break-all}
.profile-section{margin-top:16px;padding-top:16px;border-top:1px solid rgba(255,255,255,.08)}
.profile-hint{margin-top:6px;font-size:12px;color:#6b7280}
.profile-actions .auth-btn{margin-top:12px}
.profile-soon{margin:10px 0 0;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.04);border:1px dashed rgb(70,72,82)}
/* notification poster */
.acct-notif{align-items:center}
.acct-notif-poster-wrap{position:relative;flex:0 0 auto;width:42px;height:58px}
.acct-notif-poster{display:block;width:42px;height:58px;object-fit:cover;border-radius:8px;background:#171920;border:1px solid rgb(70,72,82);box-shadow:0 3px 8px rgba(0,0,0,.4)}
.acct-notif-poster-ph{display:flex;align-items:center;justify-content:center;color:#8991a4;font-size:20px}
.acct-notif-poster-wrap .cm-avatar{width:42px;height:42px;margin-top:8px}
.acct-notif-chip{position:absolute;right:-5px;bottom:-4px;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:0 0 0 2px #0d0e12}
.acct-notif-chip-chap{background:linear-gradient(135deg,#10b981,#059669)}
.acct-notif-chip-cmt{background:linear-gradient(180deg,#efb78f,#e99b63)}
.acct-notif-text{padding-left:4px}

/* notification list: 3 items + a peek of the 4th, scrollable */
.acct-notif-list{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(233,155,99,.6) transparent;scroll-snap-type:y proximity}
.acct-notif-list::-webkit-scrollbar{width:6px}
.acct-notif-list::-webkit-scrollbar-thumb{background:rgba(233,155,99,.55);border-radius:3px}
.acct-notif{box-sizing:border-box;min-height:78px;scroll-snap-align:start}
.acct-notif-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}

/* komikbl header: panel notifikasi di layar kecil */
.acct-slot{margin-right:2px}
@media (max-width:767.98px){.acct-panel{position:fixed;left:10px;right:10px;top:70px;width:auto;max-width:none}.acct-login{height:34px;padding:0 12px;font-size:12.5px}.acct-bell,.acct-user{width:34px;height:34px}}
.comments-root{margin:24px 0}
.auth-wrap a{color:#efb78f}


/* ===== Hợp theme komikbl: nút chính màu cam, chữ tối ===== */
.acct-login,.auth-btn,.cm-btn-primary{color:#0d0e12!important;font-weight:700;box-shadow:none}
.acct-login{border-radius:999px;height:42px;padding:0 18px}
.auth-btn{border-radius:16px;box-shadow:none}
.auth-btn:hover,.acct-login:hover,.cm-btn-primary:hover{filter:brightness(1.07);background:linear-gradient(180deg,#efb78f,#e99b63)}
.cm-btn{border-radius:12px;background:#171920;border:1px solid rgb(70,72,82);color:#e5e7eb}
.cm-btn:hover{background:#1f222b;border-color:#e99b63;color:#fff}
.cm-btn-primary{background:linear-gradient(180deg,#efb78f,#e99b63);border-color:transparent}
.cm-more{background:#171920;border-color:rgb(70,72,82)}.cm-more:hover{background:#1f222b;border-color:#e99b63}
.acct-bell,.acct-user{width:46px;height:46px;border-color:rgb(70,72,82);background:#0c0d10}
.acct-bell:hover,.acct-user:hover{background:#171920;border-color:#e99b63;color:#fff}
.acct-user .cm-avatar,.acct-user img.cm-avatar-img{width:36px;height:36px}
.acct-badge{background:linear-gradient(180deg,#efb78f,#e99b63);color:#0d0e12;box-shadow:0 0 0 2px #0c0d10}
.acct-panel{background:#0d0e12;border-radius:20px;border-color:rgb(70,72,82)}
.acct-notif.is-unread{background:rgba(233,155,99,.10)}
.auth-card,.comments-root{border-radius:20px;border-color:rgb(70,72,82);box-shadow:none}
.auth-card input[type=text],.auth-card input[type=email],.auth-card input[type=password],.cm-input{background:#0c0d10;border-color:rgb(70,72,82);border-radius:14px}
.auth-card input[type=file]{width:100%;color:#8991a4;font-size:13px}
.auth-card input[type=file]::file-selector-button{margin-right:12px;padding:8px 14px;border:1px solid rgb(70,72,82);border-radius:12px;background:#171920;color:#e5e7eb;font-weight:600;cursor:pointer}
.auth-card input[type=file]::file-selector-button:hover{border-color:#e99b63}
.auth-btn-ghost{background:#171920!important;border:1px solid rgb(70,72,82)!important;color:#e5e7eb!important;margin-left:0;margin-top:10px}
.profile-actions{display:flex;flex-direction:column}
.profile-head,.profile-section{border-color:rgb(70,72,82)}
.profile-avatar-ph,.cm-avatar{color:#0d0e12}
.cm-link{color:#efb78f}.cm-link:hover{color:#fff}
.cm-head h2::before{background:linear-gradient(180deg,#efb78f,#e99b63)}
.cm-login{background:rgba(233,155,99,.08);border-color:rgba(233,155,99,.45)}
.cm-login a{color:#efb78f;font-weight:700}

/* Ba nút ở header (chuông / avatar / search) cùng một cỡ */
.acct-slot{gap:8px}
.acct-bell,.acct-user,#search-toggle-btn{box-sizing:border-box!important;width:44px!important;height:44px!important;min-width:44px;padding:0!important;display:flex!important;align-items:center;justify-content:center;border-radius:50%!important;flex:0 0 auto;overflow:visible}
.acct-user{overflow:hidden}
.acct-user .cm-avatar,.acct-user img.cm-avatar-img{width:100%!important;height:100%!important;border-radius:50%;font-size:16px}
.acct-bell svg,#search-toggle-btn svg{width:20px!important;height:20px!important}
@media (max-width:767.98px){
  .acct-bell,.acct-user,#search-toggle-btn{width:40px!important;height:40px!important;min-width:40px}
  .acct-login{height:40px}
}
/* Panel menu / thông báo: thả xuống dưới header, không che header (vị trí do JS tính) */
.acct-panel.is-fixed{position:fixed;z-index:1200}
@media (max-width:767.98px){.acct-panel.is-fixed{left:10px!important;right:10px!important;width:auto;max-width:none}}

/* Lượt xem + số bình luận dưới tên truyện ở thẻ manga */
.card-stats{display:flex;align-items:center;gap:12px;margin:0 0 6px;color:#8991a4;font-size:11.5px;font-weight:600}
.card-stat{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.card-stat svg{width:13px;height:13px;flex:0 0 auto}

/* iOS Safari tự zoom khi focus vào ô nhập có font-size < 16px */
@media (max-width:768px){.cm-input,#search-input-field,.searchinput{font-size:16px!important}}
