/* ==========================================================================
   Clinic Portal — "Care" theme
   Loaded AFTER Bootstrap 4 (kept only for modals / tabs used by the pages).
   Replaces the old admin theme (style.css + colors/blue.css + theme JS).
   1. Tokens & base   2. App shell   3. Bootstrap re-skin   4. Legacy theme
   classes used by page views   5. Login
   ========================================================================== */

:root {
    --cl-brand: #0d9488;
    --cl-brand-600: #0f766e;
    --cl-brand-700: #115e59;
    --cl-brand-50: #f0fdfa;
    --cl-brand-100: #ccfbf1;
    --cl-brand-200: #99f6e4;
    --cl-accent: #f97316;
    --cl-bg: #f3f6f6;
    --cl-card: #ffffff;
    --cl-border: #e3e9e8;
    --cl-border-strong: #cfd8d6;
    --cl-text: #0f1f1d;
    --cl-body: #3b4a48;
    --cl-muted: #6b7b79;
    --cl-subtle: #f1f5f4;
    --cl-good: #059669; --cl-good-bg: #ecfdf5; --cl-good-bd: #a7f3d0;
    --cl-warn: #b45309; --cl-warn-bg: #fffbeb; --cl-warn-bd: #fde68a;
    --cl-bad:  #dc2626; --cl-bad-bg:  #fef2f2; --cl-bad-bd:  #fecaca;
    --cl-info: #0369a1; --cl-info-bg: #f0f9ff; --cl-info-bd: #bae6fd;
    --cl-shadow: 0 1px 2px rgba(15, 31, 29, .04), 0 2px 6px rgba(15, 31, 29, .04);
    --cl-shadow-lg: 0 18px 40px rgba(15, 31, 29, .14);
    --cl-side-w: 268px;
    --cl-gap: 16px;
    --cl-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- 1. Base ---------- */
body.cl-body {
    margin: 0; background: var(--cl-bg); color: var(--cl-body);
    font-family: var(--cl-font); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
:where(.cl-body) a { color: var(--cl-brand); }
:where(.cl-body) a:hover { color: var(--cl-brand-700); text-decoration: none; }
:where(.cl-body) h1, :where(.cl-body) h2, :where(.cl-body) h3, :where(.cl-body) h4, :where(.cl-body) h5, :where(.cl-body) h6 {
    font-family: var(--cl-font); color: var(--cl-text); font-weight: 700; line-height: 1.3;
}
:where(.cl-body) h3 { font-size: 20px; } :where(.cl-body) h4 { font-size: 17px; } :where(.cl-body) h5 { font-size: 15px; } :where(.cl-body) h6 { font-size: 13.5px; }
.cl-body ::selection { background: var(--cl-brand-100); }

/* ---------- 2. App shell ---------- */
.cl-sidebar {
    position: fixed; z-index: 1040; top: var(--cl-gap); bottom: var(--cl-gap); left: var(--cl-gap);
    width: var(--cl-side-w); display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--cl-border); border-radius: 22px; box-shadow: var(--cl-shadow);
    transition: transform .25s ease;
}
.cl-clinic {
    display: flex; align-items: center; gap: 12px; margin: 14px 14px 6px; padding: 12px;
    border-radius: 16px; background: linear-gradient(135deg, var(--cl-brand-50), #fff 70%); border: 1px solid var(--cl-brand-100);
    text-decoration: none !important;
}
.cl-clinic-logo {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden;
    background: var(--cl-brand); color: #fff; font-weight: 800; font-size: 15px;
}
.cl-clinic-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.cl-clinic-meta { min-width: 0; line-height: 1.25; }
.cl-clinic-meta b { display: block; color: var(--cl-text); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-clinic-meta span { display: inline-flex; align-items: center; gap: 5px; color: var(--cl-brand-600); font-size: 11.5px; font-weight: 600; }
.cl-clinic-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.cl-side-close { display: none; margin-left: auto; border: 0; background: none; color: var(--cl-muted); padding: 4px; border-radius: 8px; cursor: pointer; }

.cl-nav { flex: 1; overflow-y: auto; padding: 8px 14px 14px; }
.cl-nav::-webkit-scrollbar { width: 5px; }
.cl-nav::-webkit-scrollbar-thumb { background: #d5dedc; border-radius: 99px; }
.cl-nav-group { margin-top: 16px; }
.cl-nav-title { padding: 0 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9aa9a7; }
.cl-nav ul { list-style: none; margin: 0; padding: 0; }
.cl-link {
    position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 1px 0;
    border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left;
    color: var(--cl-body) !important; font: 600 13.5px/1.3 var(--cl-font); text-decoration: none !important;
    transition: background .15s, color .15s;
}
.cl-link .cl-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--cl-subtle); color: var(--cl-muted); transition: background .15s, color .15s; }
.cl-link .cl-ico svg { width: 18px; height: 18px; }
.cl-link:hover { background: var(--cl-subtle); color: var(--cl-text) !important; }
.cl-link:hover .cl-ico { background: #fff; color: var(--cl-brand); }
.cl-link.is-active { background: var(--cl-brand-50); color: var(--cl-brand-700) !important; }
.cl-link.is-active .cl-ico { background: var(--cl-brand); color: #fff; box-shadow: 0 6px 14px rgba(13,148,136,.3); }
.cl-link.is-open { color: var(--cl-text) !important; }
.cl-link.is-open .cl-ico { background: var(--cl-brand-100); color: var(--cl-brand-700); }
.cl-link-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-caret { width: 16px; height: 16px; color: #9aa9a7; transition: transform .2s; flex-shrink: 0; }
.cl-link.is-open .cl-caret { transform: rotate(90deg); color: var(--cl-brand); }
.cl-sub { display: none; padding: 2px 0 6px 56px !important; }
.cl-sub.is-open { display: block; }
.cl-sub a {
    position: relative; display: block; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 500;
    color: var(--cl-muted) !important; text-decoration: none !important;
}
.cl-sub a::before { content: ""; position: absolute; left: -14px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #d5dedc; }
.cl-sub a:hover { color: var(--cl-text) !important; background: var(--cl-subtle); }
.cl-sub a.is-active { color: var(--cl-brand-700) !important; font-weight: 700; }
.cl-sub a.is-active::before { background: var(--cl-brand); box-shadow: 0 0 0 3px var(--cl-brand-100); }

.cl-share { margin: 0 14px 14px; padding: 14px; border-radius: 16px; background: linear-gradient(150deg, var(--cl-brand) 0%, var(--cl-brand-700) 100%); color: #e6fffb; }
.cl-share b { display: block; color: #fff; font-size: 13.5px; font-weight: 700; }
.cl-share p { margin: 2px 0 10px; font-size: 12px; color: #b9f3ea; }
.cl-share-row { display: flex; gap: 6px; }
.cl-share-row button, .cl-share-row a {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border-radius: 9px;
    font: 600 12.5px var(--cl-font); border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff !important;
    cursor: pointer; text-decoration: none !important;
}
.cl-share-row button:hover, .cl-share-row a:hover { background: rgba(255,255,255,.22); }

.cl-main { margin-left: calc(var(--cl-side-w) + var(--cl-gap) * 2); min-height: 100vh; display: flex; flex-direction: column; padding-right: var(--cl-gap); }

/* Topbar: greeting on the left, actions on the right */
.cl-topbar {
    position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: 14px;
    padding: var(--cl-gap) 0 12px; background: linear-gradient(var(--cl-bg) 75%, rgba(243,246,246,0));
}
.cl-topbar-inner {
    flex: 1; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 12px 10px 20px;
    background: rgba(255,255,255,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--cl-border); border-radius: 18px; box-shadow: var(--cl-shadow);
}
.cl-hello { min-width: 0; line-height: 1.25; }
.cl-hello b { display: block; color: var(--cl-text); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-hello span { color: var(--cl-muted); font-size: 12.5px; }
.cl-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cl-burger { display: none; }
.cl-icon-btn {
    position: relative; width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0;
    border-radius: 12px; border: 1px solid var(--cl-border); background: #fff; color: var(--cl-body); cursor: pointer;
}
.cl-icon-btn:hover { background: var(--cl-subtle); color: var(--cl-text); }
.cl-badge-dot { position: absolute; top: 7px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--cl-accent); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; line-height: 1; }
.cl-cta {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px;
    background: var(--cl-brand); color: #fff !important; font-weight: 700; font-size: 13.5px; text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(13,148,136,.28); transition: background .15s;
}
.cl-cta:hover { background: var(--cl-brand-600); }

/* Dropdowns */
.cl-dd { position: relative; }
.cl-dd-panel {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 1060; width: 300px; display: none;
    background: #fff; border: 1px solid var(--cl-border); border-radius: 16px; box-shadow: var(--cl-shadow-lg); overflow: hidden;
    animation: clPop .14s ease-out;
}
.cl-dd.is-open .cl-dd-panel { display: block; }
@keyframes clPop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cl-dd-head { padding: 14px 16px; border-bottom: 1px solid var(--cl-border); display: flex; justify-content: space-between; align-items: center; }
.cl-dd-head b { color: var(--cl-text); font-size: 14px; }
.cl-dd-head span { font-size: 12px; color: var(--cl-muted); }
.cl-dd-body { padding: 6px; max-height: 360px; overflow-y: auto; }
.cl-dd-foot { padding: 6px; border-top: 1px solid var(--cl-border); }
.cl-dd-item {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 10px; border: 0; background: none;
    color: var(--cl-body) !important; font: 500 13.5px var(--cl-font); text-align: left; text-decoration: none !important; cursor: pointer;
}
.cl-dd-item:hover { background: var(--cl-subtle); }
.cl-dd-item.cl-danger { color: var(--cl-bad) !important; }
.cl-dd-item.cl-danger:hover { background: var(--cl-bad-bg); }
.cl-dd-item .cl-tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 16px; }
.cl-dd-item .cl-tile svg { width: 18px; height: 18px; }
.cl-dd-item small { display: block; color: var(--cl-muted); font-size: 12px; font-weight: 400; }
.cl-dd-item strong { display: block; color: var(--cl-text); font-weight: 600; }
.cl-tile-teal { background: var(--cl-brand-50); color: var(--cl-brand); }
.cl-tile-blue { background: var(--cl-info-bg); color: var(--cl-info); }
.cl-tile-amber { background: var(--cl-warn-bg); color: var(--cl-warn); }
.cl-tile-violet { background: #f5f3ff; color: #6d28d9; }
.cl-dd-empty { padding: 28px 16px; text-align: center; color: var(--cl-muted); font-size: 13px; }
.cl-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
.cl-quick-grid a {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--cl-border);
    color: var(--cl-text) !important; font-weight: 600; font-size: 13px; text-decoration: none !important;
}
.cl-quick-grid a:hover { border-color: var(--cl-brand-200); background: var(--cl-brand-50); }

.cl-me { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border: 1px solid var(--cl-border); border-radius: 14px; background: #fff; cursor: pointer; }
.cl-me:hover { background: var(--cl-subtle); }
.cl-avatar { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, #14b8a6, #0f766e); }
.cl-me-text { line-height: 1.2; text-align: left; }
.cl-me-text b { display: block; color: var(--cl-text); font-size: 13px; font-weight: 700; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-me-text small { color: var(--cl-muted); font-size: 11.5px; }
.cl-profile-head { display: flex; align-items: center; gap: 12px; padding: 16px; background: linear-gradient(135deg, var(--cl-brand-50), #fff); border-bottom: 1px solid var(--cl-border); }
.cl-profile-head .cl-avatar { width: 46px; height: 46px; border-radius: 14px; font-size: 16px; }
.cl-profile-head b { display: block; color: var(--cl-text); font-size: 14.5px; }
.cl-profile-head span { display: block; color: var(--cl-muted); font-size: 12.5px; }

.cl-content { flex: 1; padding: 8px 0 var(--cl-gap); }
.cl-content > .container-fluid { padding: 0; }
.cl-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 14px 4px 18px; color: var(--cl-muted); font-size: 12.5px; }

.cl-backdrop { position: fixed; inset: 0; z-index: 1035; background: rgba(15,31,29,.45); backdrop-filter: blur(2px); display: none; }
@media (max-width: 991.98px) {
    .cl-sidebar { transform: translateX(calc(-100% - 32px)); }
    .cl-open .cl-sidebar { transform: none; box-shadow: var(--cl-shadow-lg); }
    .cl-open .cl-backdrop { display: block; }
    .cl-side-close { display: block; }
    .cl-main { margin-left: 0; padding: 0 12px; }
    .cl-burger { display: grid; }
}
@media (max-width: 767.98px) {
    .cl-hello span, .cl-me-text, .cl-cta span { display: none; }
    .cl-cta { width: 42px; padding: 0; justify-content: center; }
    .cl-topbar-inner { padding: 8px 8px 8px 10px; gap: 8px; }
    .cl-dd-panel { width: 290px; right: -50px; }
}

/* ---------- 3. Bootstrap re-skin ---------- */
.cl-body .page-titles {
    display: flex; align-items: center; margin: 0 0 20px; padding: 0; background: none; box-shadow: none;
}
.cl-body .page-titles > [class*="col-"] { padding-top: 0; padding-bottom: 0; }
.cl-body .page-titles .text-themecolor, .cl-body .page-titles h3, .cl-body .page-titles h4 {
    margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--cl-text) !important;
}
.cl-body .page-titles .breadcrumb { justify-content: flex-end; }
.cl-body .breadcrumb { margin: 0; padding: 0; background: none; font-size: 13px; align-items: center; }
.cl-body .breadcrumb-item, .cl-body .breadcrumb-item a { color: var(--cl-muted); }
.cl-body .breadcrumb-item a:hover { color: var(--cl-brand); }
.cl-body .breadcrumb-item.active { color: var(--cl-text); font-weight: 600; }
.cl-body .breadcrumb-item + .breadcrumb-item::before { content: "›"; color: #b4c1bf; padding: 0 8px; }
.cl-body .page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.cl-body .page-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 24px; font-weight: 800; color: var(--cl-text); }
.cl-body .page-title .page-title-icon,
.cl-body .page-title .page-title-icon.text-white,
.cl-body .page-title .page-title-icon.bg-gradient-primary { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; margin: 0 !important; background: var(--cl-brand-50) !important; color: var(--cl-brand) !important; }

/* Cards */
.cl-body .card { border: 1px solid var(--cl-border); border-radius: 18px; box-shadow: var(--cl-shadow); margin-bottom: 20px; overflow: hidden; background: var(--cl-card); }
.cl-body .card-body { padding: 22px 24px; }
.cl-body .card-header { background: #fbfcfc; border-bottom: 1px solid var(--cl-border); padding: 14px 24px; font-weight: 700; color: var(--cl-text); }
.cl-body .card-header-tabs { margin: -14px -12px -15px; }
.cl-body .card-footer { background: #fbfcfc; border-top: 1px solid var(--cl-border); padding: 14px 24px; }
.cl-body .card-title { font-size: 16px; font-weight: 700; color: var(--cl-text); margin-bottom: 6px; }
.cl-body .card-subtitle { color: var(--cl-muted); }
.cl-body .card.bg-info { background: linear-gradient(135deg, #0d9488, #0e7490) !important; border: 0; }
.cl-body .card.bg-info .card-title, .cl-body .card.bg-info p { color: #fff !important; }

/* Buttons */
.cl-body .btn { font-family: var(--cl-font); font-weight: 600; font-size: 13.5px; border-radius: 11px; padding: 8px 16px; line-height: 1.4; box-shadow: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.cl-body .btn:focus, .cl-body .btn.focus { box-shadow: 0 0 0 4px rgba(13,148,136,.16); }
.cl-body .btn-sm { padding: 5px 12px; font-size: 12.5px; border-radius: 9px; }
.cl-body .btn-xs { padding: 3px 8px; font-size: 11.5px; border-radius: 7px; }
.cl-body .btn-lg { padding: 11px 22px; font-size: 15px; border-radius: 13px; }
.cl-body .btn i { vertical-align: -1px; }
.cl-body .btn-primary, .cl-body .btn-info, .cl-body .btn-gradient-primary { background: var(--cl-brand); border-color: var(--cl-brand); color: #fff; }
.cl-body .btn-primary:hover, .cl-body .btn-info:hover, .cl-body .btn-gradient-primary:hover,
.cl-body .btn-primary:not(:disabled):not(.disabled):active, .cl-body .btn-info:not(:disabled):not(.disabled):active { background: var(--cl-brand-600); border-color: var(--cl-brand-600); color: #fff; }
.cl-body .btn-success { background: var(--cl-good); border-color: var(--cl-good); }
.cl-body .btn-success:hover { background: #047857; border-color: #047857; }
.cl-body .btn-danger { background: var(--cl-bad); border-color: var(--cl-bad); }
.cl-body .btn-warning { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.cl-body .btn-warning:hover { background: #ffedd5; color: #9a3412; }
.cl-body .btn-secondary, .cl-body .btn-light, .cl-body .btn-default { background: #fff; border-color: var(--cl-border-strong); color: var(--cl-body); }
.cl-body .btn-secondary:hover, .cl-body .btn-light:hover, .cl-body .btn-default:hover { background: var(--cl-subtle); color: var(--cl-text); border-color: var(--cl-border-strong); }
.cl-body .btn-outline-primary, .cl-body .btn-outline-info { color: var(--cl-brand); border-color: var(--cl-brand-200); background: #fff; }
.cl-body .btn-outline-primary:hover, .cl-body .btn-outline-info:hover { background: var(--cl-brand-50); color: var(--cl-brand-700); border-color: var(--cl-brand-200); }
.cl-body .btn-outline-secondary { color: var(--cl-body); border-color: var(--cl-border-strong); background: #fff; }
.cl-body .btn-outline-secondary:hover { background: var(--cl-subtle); color: var(--cl-text); }
.cl-body .btn-outline-danger { color: var(--cl-bad); border-color: var(--cl-bad-bd); background: #fff; }
.cl-body .btn-outline-danger:hover { background: var(--cl-bad-bg); color: var(--cl-bad); }
.cl-body .btn-link { color: var(--cl-brand); }
.cl-body .btn-rounded { border-radius: 99px; }
.cl-body .btn-circle { width: 38px; height: 38px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; }

/* Forms */
.cl-body label, .cl-body .control-label, .cl-body .form-label { font-weight: 600; font-size: 13px; color: var(--cl-text); margin-bottom: 6px; }
.cl-body .form-control, .cl-body .custom-select {
    height: calc(1.5em + 18px + 2px); padding: 9px 13px; font-size: 14px; color: var(--cl-text); font-family: var(--cl-font);
    border: 1px solid var(--cl-border-strong); border-radius: 11px; background-color: #fff; box-shadow: none;
}
.cl-body textarea.form-control, .cl-body select[multiple].form-control { height: auto; }
.cl-body .form-control-lg { height: calc(1.5em + 24px + 2px); font-size: 15px; }
.cl-body .form-control:focus, .cl-body .custom-select:focus { border-color: #5eead4; box-shadow: 0 0 0 4px rgba(13,148,136,.14); }
.cl-body .form-control::placeholder { color: #9aa9a7; }
.cl-body .form-control:disabled, .cl-body .form-control[readonly] { background: var(--cl-subtle); }
.cl-body .form-control.is-invalid { border-color: #f87171; }
.cl-body .invalid-feedback { font-size: 12.5px; }
.cl-body .form-text, .cl-body small.text-muted { font-size: 12.5px; }
.cl-body .input-group-text { background: var(--cl-subtle); border-color: var(--cl-border-strong); border-radius: 11px; color: var(--cl-muted); }
.cl-body .custom-control-input:checked ~ .custom-control-label::before { background: var(--cl-brand); border-color: var(--cl-brand); }
.cl-body .custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 4px rgba(13,148,136,.16); }
.cl-body .custom-control-label { font-weight: 500; }
.cl-body input[type="checkbox"], .cl-body input[type="radio"] { accent-color: var(--cl-brand); }

/* Tables */
.cl-body .table { color: var(--cl-body); margin-bottom: 0; }
.cl-body .table th, .cl-body .table td { padding: 13px 16px; vertical-align: middle; border-top: 1px solid var(--cl-border); }
.cl-body .table thead th { border-top: 0; border-bottom: 1px solid var(--cl-border); background: #f8faf9; color: var(--cl-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.cl-body .table-hover tbody tr:hover { background: #f6faf9; }
.cl-body .table-borderless th, .cl-body .table-borderless td { border: 0; padding: 7px 0; background: none; }
.cl-body .card-body .table-responsive { border: 1px solid var(--cl-border); border-radius: 12px; }
.cl-body .card-body .table-responsive:has(.table-borderless) { border: 0; border-radius: 0; }

/* Badges / alerts */
.cl-body .badge, .cl-body .label { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; line-height: 1.3; background: var(--cl-subtle); color: var(--cl-body); }
.cl-body .badge-lg { padding: 6px 12px; font-size: 12.5px; }
.cl-body .badge-primary, .cl-body .badge-info, .cl-body .label-primary, .cl-body .label-info { background: var(--cl-brand-50); color: var(--cl-brand-700); }
.cl-body .badge-success, .cl-body .label-success { background: var(--cl-good-bg); color: var(--cl-good); }
.cl-body .badge-danger, .cl-body .label-danger { background: var(--cl-bad-bg); color: var(--cl-bad); }
.cl-body .badge-warning, .cl-body .label-warning { background: var(--cl-warn-bg); color: var(--cl-warn); }
.cl-body .badge-secondary, .cl-body .label-secondary, .cl-body .label-default { background: var(--cl-subtle); color: var(--cl-muted); }
.cl-body .badge-dark { background: #1f2a29; color: #fff; }
.cl-body .alert { border-radius: 14px; border: 1px solid transparent; padding: 13px 18px; font-size: 13.5px; }
.cl-body .alert-success { background: var(--cl-good-bg); border-color: var(--cl-good-bd); color: #065f46; }
.cl-body .alert-danger { background: var(--cl-bad-bg); border-color: var(--cl-bad-bd); color: #991b1b; }
.cl-body .alert-warning { background: var(--cl-warn-bg); border-color: var(--cl-warn-bd); color: #92400e; }
.cl-body .alert-info { background: var(--cl-info-bg); border-color: var(--cl-info-bd); color: #075985; }
.cl-body .alert-dismissible .close { padding: 12px 16px; opacity: .55; text-shadow: none; }

/* Tabs, modals, lists, dropdowns, pagination */
.cl-body .nav-tabs { border-bottom: 1px solid var(--cl-border); gap: 4px; }
.cl-body .nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--cl-muted); font-weight: 600; padding: 10px 14px; }
.cl-body .nav-tabs .nav-link:hover { color: var(--cl-text); border-bottom-color: var(--cl-border-strong); }
.cl-body .nav-tabs .nav-link.active { color: var(--cl-brand-700); background: none; border-bottom-color: var(--cl-brand); }
.cl-body .nav-pills .nav-link.active { background: var(--cl-brand); }
.cl-body .modal-content { border: 0; border-radius: 20px; box-shadow: var(--cl-shadow-lg); overflow: hidden; }
.cl-body .modal-header { border-bottom: 1px solid var(--cl-border); padding: 16px 22px; align-items: center; }
.cl-body .modal-title { font-weight: 700; color: var(--cl-text); }
.cl-body .modal-body { padding: 20px 22px; }
.cl-body .modal-footer { border-top: 1px solid var(--cl-border); padding: 14px 22px; background: #fbfcfc; }
.cl-body .modal-backdrop.show { opacity: .45; background: #0f1f1d; }
.cl-body .list-group-item { border-color: var(--cl-border); }
.cl-body .list-group-item.active { background: var(--cl-brand); border-color: var(--cl-brand); }
.cl-body .list-group-item-action:hover { background: var(--cl-subtle); }
.cl-body .dropdown-menu { border: 1px solid var(--cl-border); border-radius: 14px; box-shadow: var(--cl-shadow-lg); padding: 6px; }
.cl-body .dropdown-item { border-radius: 8px; padding: 8px 12px; font-size: 13.5px; }
.cl-body .dropdown-item:active { background: var(--cl-brand); }
.cl-body .page-link { color: var(--cl-body); border-color: var(--cl-border); border-radius: 9px !important; margin: 0 2px; min-width: 36px; text-align: center; }
.cl-body .page-item.active .page-link { background: var(--cl-brand); border-color: var(--cl-brand); }
.cl-body .spinner-border { color: var(--cl-brand); }
.cl-body .bg-primary { background-color: var(--cl-brand) !important; }
.cl-body .text-primary { color: var(--cl-brand) !important; }
.cl-body .border { border-color: var(--cl-border) !important; }
.cl-body .rounded { border-radius: 12px !important; }
.cl-body .img-thumbnail { border-color: var(--cl-border); border-radius: 12px; }

/* Laravel default (Tailwind-markup) pagination */
.cl-content nav[role="navigation"] { display: flex; flex-direction: column; gap: 10px; }
.cl-content nav[role="navigation"] > div:first-child:not(:only-child) { display: none; }
.cl-content nav[role="navigation"] > div:last-child { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cl-content nav[role="navigation"] p { margin: 0; color: var(--cl-muted); font-size: 13px; }
.cl-content nav[role="navigation"] svg { width: 16px; height: 16px; }
.cl-content nav[role="navigation"] > div:last-child > div:last-child > span { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.cl-content nav[role="navigation"] > div:last-child > div:last-child > span > a,
.cl-content nav[role="navigation"] > div:last-child > div:last-child > span > span > span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px;
    border: 1px solid var(--cl-border); border-radius: 9px; background: #fff; color: var(--cl-body); font-size: 13.5px;
}
.cl-content nav[role="navigation"] span[aria-current="page"] > span { background: var(--cl-brand) !important; border-color: var(--cl-brand) !important; color: #fff !important; font-weight: 700; }
.cl-content nav[role="navigation"] span[aria-disabled="true"] > span { color: #b4c1bf !important; background: var(--cl-subtle) !important; }

/* ---------- 4. Legacy admin-theme classes still used by the page views ---------- */
.cl-body .round {
    width: 48px; height: 48px; border-radius: 14px; display: inline-grid; place-items: center; flex-shrink: 0;
    color: #fff; font-size: 20px; line-height: 1;
}
.cl-body .round-lg { width: 52px; height: 52px; font-size: 22px; }
.cl-body .round.bg-info, .cl-body .round.bg-primary { background: var(--cl-brand-50) !important; color: var(--cl-brand) !important; }
.cl-body .round.bg-warning { background: var(--cl-warn-bg) !important; color: #d97706 !important; }
.cl-body .round.bg-success { background: var(--cl-good-bg) !important; color: var(--cl-good) !important; }
.cl-body .round.bg-danger { background: var(--cl-bad-bg) !important; color: var(--cl-bad) !important; }
.cl-body .round.bg-inverse { background: #eef2f2 !important; color: #334155 !important; }
.cl-body .round i, .cl-body .round i.text-white { color: inherit !important; }
.cl-body .bg-inverse { background: #1f2a29 !important; }
.cl-body .m-b-0 { margin-bottom: 0 !important; } .cl-body .m-t-0 { margin-top: 0 !important; }
.cl-body .m-l-5 { margin-left: 5px !important; } .cl-body .m-l-10 { margin-left: 12px !important; } .cl-body .m-r-10 { margin-right: 10px !important; }
.cl-body .m-t-10 { margin-top: 10px !important; } .cl-body .m-t-20 { margin-top: 20px !important; } .cl-body .m-b-10 { margin-bottom: 10px !important; } .cl-body .m-b-20 { margin-bottom: 20px !important; }
.cl-body .p-20 { padding: 20px !important; } .cl-body .p-10 { padding: 10px !important; } .cl-body .p-t-0 { padding-top: 0 !important; }
.cl-body .me-1 { margin-right: .25rem !important; } .cl-body .me-2 { margin-right: .5rem !important; } .cl-body .me-3 { margin-right: 1rem !important; }
.cl-body .ms-1 { margin-left: .25rem !important; } .cl-body .ms-2 { margin-left: .5rem !important; } .cl-body .ms-auto { margin-left: auto !important; }
.cl-body .gap-2 { gap: .5rem !important; } .cl-body .gap-3 { gap: 1rem !important; }
.cl-body .g-2 { margin-left: -4px; margin-right: -4px; } .cl-body .g-2 > * { padding-left: 4px; padding-right: 4px; }
.cl-body .text-end { text-align: right !important; }
.cl-body .fw-bold { font-weight: 700 !important; } .cl-body .fw-semibold { font-weight: 600 !important; }
.cl-body .text-themecolor { color: var(--cl-brand-700) !important; }
.cl-body .bg-gradient-primary { background: linear-gradient(135deg, #14b8a6, #0d9488) !important; }
.cl-body .box-title { font-weight: 700; color: var(--cl-text); }
@media (max-width: 575.98px) { .cl-body .hidden-xs-down { display: none !important; } }
@media (min-width: 576px) { .cl-body .hidden-sm-up { display: none !important; } }
@media (max-width: 767.98px) {
    .cl-body .page-titles { flex-direction: column; align-items: flex-start; gap: 4px; }
    .cl-body .page-titles .breadcrumb { justify-content: flex-start; }
}

/* ---------- 5. Login ---------- */
.cl-auth {
    position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; overflow: hidden;
    background:
        radial-gradient(900px 500px at 10% 10%, rgba(45, 212, 191, .28), transparent 60%),
        radial-gradient(700px 500px at 95% 90%, rgba(14, 116, 144, .22), transparent 60%),
        linear-gradient(180deg, #f0fdfa 0%, #ecfeff 100%);
}
.cl-auth::before {
    content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M26 22h4v4h4v4h-4v4h-4v-4h-4v-4h4z' fill='%230d9488' fill-opacity='.07'/%3E%3C/svg%3E");
}
.cl-auth-wrap { position: relative; z-index: 1; width: 100%; max-width: 440px; }
.cl-auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 22px; }
.cl-auth-mark {
    width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 14px; color: #fff;
    background: linear-gradient(135deg, #14b8a6, #0f766e); box-shadow: 0 14px 30px rgba(13,148,136,.35);
}
.cl-auth-brand h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--cl-text); }
.cl-auth-brand p { margin: 4px 0 0; color: var(--cl-muted); }
.cl-auth-pill { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 4px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--cl-brand-100); color: var(--cl-brand-700); font-size: 12px; font-weight: 700; }
.cl-auth-card { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid #fff; border-radius: 24px; padding: 30px; box-shadow: 0 24px 60px rgba(15, 118, 110, .14); }
.cl-field { position: relative; }
.cl-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9aa9a7; pointer-events: none; }
.cl-field .form-control { height: 48px; padding-left: 44px; border-radius: 13px; background: #fbfdfd; }
.cl-pass-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--cl-muted); font: 600 12px var(--cl-font); padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.cl-pass-toggle:hover { background: var(--cl-subtle); color: var(--cl-text); }
.cl-auth-card .btn-block { height: 50px; border-radius: 14px; font-size: 15px; font-weight: 700; box-shadow: 0 12px 24px rgba(13,148,136,.28); }
.cl-auth-features { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--cl-muted); font-size: 12.5px; }
.cl-auth-features span { display: inline-flex; align-items: center; gap: 6px; }
.cl-auth-features svg { color: var(--cl-brand); }
.cl-auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: #9aa9a7; }

/* Bootstrap .row uses -15px side margins; clip so narrow screens never scroll sideways (clip keeps sticky topbar working) */
.cl-content { overflow-x: clip; padding-left: 2px; padding-right: 2px; }
html, body.cl-body { overflow-x: clip; }

/* Icon names missing from the bundled Material Design Icons v1.8 font -> closest available glyph */
.mdi-doctor::before { content: "\F4D9"; }          /* stethoscope */
.mdi-account-group::before { content: "\F00E"; }   /* account-multiple */
.mdi-card-membership::before { content: "\F586"; } /* wallet-membership */
.mdi-clock-outline::before { content: "\F150"; }   /* clock */
.mdi-cancel::before { content: "\F0AD"; }          /* block-helper */
.mdi-card-plus::before { content: "\F675"; }       /* credit-card-plus */
.mdi-shield-check::before { content: "\F565"; }    /* verified */

/* Plan-limit tiles (Membership page) */
.cl-body .cl-limit {
    height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
    padding: 22px 14px 18px; border: 1px solid var(--cl-border); border-radius: 16px; background: #fff;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cl-body .cl-limit:hover { border-color: var(--cl-brand-200); box-shadow: var(--cl-shadow); transform: translateY(-1px); }
.cl-body .cl-limit-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 6px; }
.cl-body .cl-limit-icon i { font-size: 32px; line-height: 1; }
.cl-body .cl-limit-primary { background: var(--cl-brand-50); color: var(--cl-brand); }
.cl-body .cl-limit-success { background: var(--cl-good-bg); color: var(--cl-good); }
.cl-body .cl-limit-info    { background: var(--cl-info-bg); color: var(--cl-info); }
.cl-body .cl-limit-warning { background: var(--cl-warn-bg); color: #d97706; }
.cl-body .cl-limit-value { margin: 0; font-size: 24px; font-weight: 800; color: var(--cl-text); line-height: 1.1; }
.cl-body .cl-limit small { font-size: 13px; font-weight: 600; }

/* Page-title icon: a little larger */
.cl-body .page-title .page-title-icon { width: 46px !important; height: 46px !important; border-radius: 14px !important; }
.cl-body .page-title .page-title-icon i { font-size: 24px; line-height: 1; }
