/*
 * TuitionXpress front site UI kit
 * ---------------------------------------------------------------
 * One stylesheet for the redesigned front site pages, loaded by both layouts
 * (components/frontsite/layouts/master + components/publicsite/layouts/master).
 * Everything is prefixed with "tx-" so it never touches older page styles.
 *
 * Page shell      .tx-page  (+ .tx-page--offset under the tutor area's fixed nav)
 * Icons           <span class="tx-icon">search</span>   (Material Symbols name)
 * Page header     .tx-head > .tx-head-title (.tx-head-icon, .tx-title, .tx-sub) + .tx-actions
 * Hero banner     .tx-hero > .tx-hero-inner (.tx-eyebrow, .tx-hero-title, .tx-hero-sub) + .tx-tools
 *                 (.tx-hero = brand red; .tx-hero.tx-hero--light = white card)
 * Search box      .tx-search  (+ .tx-search--raised on the hero)
 * Buttons         .tx-btn, .tx-btn-primary, .tx-btn-onbrand (on the hero), .tx-btn-count
 * Tabs            .tx-tabs > .tx-tab (.active) + .tx-tab-count
 * Form card       .tx-form-card (.tx-form-card-head/-icon/-title/-sub/-body), .tx-form-narrow, .tx-field, .tx-input,
 *                 .tx-input-group + .tx-eye, .tx-error, .tx-form-actions, .tx-photo (+ .tx-photo-name)
 * Results bar     .tx-bar > .tx-count + .tx-tags (.tx-tag, .tx-clear)
 * Card grid       .tx-grid > .tx-card (.tx-card-body, .tx-card-top, .tx-id, .tx-posted, .tx-card-title,
 *                 .tx-meta li > .tx-label, .tx-chips/.tx-chip, .tx-card-foot, .tx-price, .tx-note)
 * Empty state     .tx-empty (+ .tx-empty-actions)
 * Pagination      .tx-pager (wraps {{ $paginator->links() }})
 * Modal / forms   .tx-modal (.tx-modal-head, .tx-modal-icon, .tx-modal-sub, .tx-close),
 *                 .tx-fgrid, .tx-flabel, .tx-select  (select2 inside .tx-modal is styled too)
 * Quick links     .tx-links > .tx-link-chip (.is-active)      Info text  .tx-info (+ .tx-info-grid)
 * Tutor shell     .tx-topbar (.tx-topbar-inner/-brand/-logo, .tx-menu-btn),
 *                 .tx-sidebar (.tx-sidebar-profile/-avatar/-name/-id, .tx-side-menu > li > .tx-side-link.is-active)
 */

:root {
    --tx-brand: #D0392C;
    --tx-brand-dark: #a82c21;
    --tx-brand-soft: #fbeceb;
    --tx-brand-line: #f4cdc9;
    --tx-ink: #1f2937;
    --tx-text: #374151;
    --tx-muted: #6b7280;
    --tx-faint: #9ca3af;
    --tx-line: #eceff1;
    --tx-bg: #f7f8fa;
    --tx-font: Poppins, Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --tx-focus: 0 0 0 3px rgba(208, 57, 44, .12);
}

/* ---------- Page shell ---------- */
.tx-page { font-family: var(--tx-font); color: var(--tx-ink); padding-bottom: 48px; }
.tx-page a { text-decoration: none; }
/* margin-top = height of the fixed .tx-topbar (64px); padding-top = gap under it (same 12px as the sidebar card) */
.tx-page--offset { margin-top: 64px; padding: 12px 8px 48px; }

.tx-icon {
    font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal;
    font-size: 20px; line-height: 1; vertical-align: middle; display: inline-block;
    -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
}
/* Preferred on crawlable pages: <span class="tx-icon" data-icon="search" aria-hidden="true"></span>
   draws the icon from the attribute, so the icon name is not part of the page text. */
.tx-icon[data-icon]::before { content: attr(data-icon); }

/* ---------- Page header ---------- */
.tx-head {
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--tx-line); border-radius: 16px; padding: 18px 22px; margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(17, 24, 39, .04);
}
.tx-head-title { display: flex; align-items: center; gap: 14px; }
.tx-head-icon {
    width: 46px; height: 46px; border-radius: 12px; background: var(--tx-brand-soft); color: var(--tx-brand);
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tx-head-icon .tx-icon { font-size: 24px; }
.tx-title { font-size: 20px; font-weight: 700; color: var(--tx-ink); margin: 0; }
.tx-sub { font-size: 13.5px; color: var(--tx-muted); margin: 2px 0 0; }
.tx-sub b { color: var(--tx-brand); }
.tx-actions, .tx-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Hero banner ---------- */
.tx-hero {
    position: relative; overflow: hidden; border-radius: 20px; margin: 20px 0 22px; padding: 34px 32px;
    background: linear-gradient(135deg, var(--tx-brand) 0%, var(--tx-brand-dark) 100%); color: #fff;
    box-shadow: 0 14px 34px rgba(208, 57, 44, .22);
}
.tx-hero::after {
    content: ''; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
    background: rgba(255, 255, 255, .08); pointer-events: none;
}
.tx-hero-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.tx-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; }
.tx-eyebrow .tx-icon { font-size: 16px; }
.tx-hero-title { font-size: 28px; font-weight: 700; margin: 0; line-height: 1.25; color: #fff; }
.tx-hero-sub { font-size: 15px; margin: 6px 0 0; color: rgba(255, 255, 255, .85); }
.tx-hero-sub b { color: #fff; }

/* Light hero: white card, dark text (use with .tx-btn-primary instead of .tx-btn-onbrand) */
.tx-hero--light {
    background: #fff; color: var(--tx-ink); border: 1px solid var(--tx-line);
    box-shadow: 0 1px 3px rgba(17, 24, 39, .04);
}
.tx-hero--light::after { background: var(--tx-brand-soft); opacity: .6; }
.tx-hero--light .tx-eyebrow { background: var(--tx-brand-soft); color: var(--tx-brand); }
.tx-hero--light .tx-hero-title { color: var(--tx-ink); }
.tx-hero--light .tx-hero-sub { color: var(--tx-muted); }
.tx-hero--light .tx-hero-sub b { color: var(--tx-brand); }
.tx-hero--light .tx-search--raised { border: 1px solid var(--tx-line); box-shadow: 0 2px 8px rgba(17, 24, 39, .06); }
.tx-hero--light .tx-search--raised:focus-within { border-color: var(--tx-brand); box-shadow: var(--tx-focus); }
.tx-hero--light .tx-btn { font-size: 15px; padding: 11px 18px; border-radius: 12px; }

/* ---------- Search box ---------- */
.tx-search {
    display: flex; align-items: center; background: var(--tx-bg); border: 1px solid var(--tx-line);
    border-radius: 10px; padding: 0 4px 0 12px; margin: 0; transition: all .15s;
}
.tx-search:focus-within { border-color: var(--tx-brand); background: #fff; box-shadow: var(--tx-focus); }
.tx-search .tx-icon { color: var(--tx-faint); font-size: 19px; }
.tx-search input { flex: 1; min-width: 0; width: 140px; border: 0; background: transparent; outline: none; padding: 9px 8px; font-size: 14px; color: var(--tx-ink); }
.tx-search button { border: 0; background: var(--tx-brand); color: #fff; border-radius: 7px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.tx-search button:hover { background: var(--tx-brand-dark); }

.tx-search--raised { background: #fff; border: 0; border-radius: 12px; padding: 5px 5px 5px 14px; min-width: 300px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.tx-search--raised:focus-within { box-shadow: 0 6px 18px rgba(0, 0, 0, .12), 0 0 0 3px rgba(255, 255, 255, .35); }
.tx-search--raised input { font-size: 15px; padding: 8px 10px; }
.tx-search--raised button { border-radius: 9px; font-size: 14px; padding: 9px 16px; }

/* ---------- Buttons ---------- */
.tx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; padding: 9px 16px;
    font-family: var(--tx-font); font-size: 14px; font-weight: 600; line-height: 1.4;
    border: 1px solid var(--tx-line); background: #fff; color: var(--tx-ink); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.tx-btn .tx-icon { font-size: 18px; }
.tx-btn:hover { border-color: var(--tx-brand); color: var(--tx-brand); }
.tx-btn-primary { background: var(--tx-brand); border-color: var(--tx-brand); color: #fff !important; }
.tx-btn-primary:hover { background: var(--tx-brand-dark); border-color: var(--tx-brand-dark); color: #fff; }
.tx-btn-onbrand { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .12); color: #fff; font-size: 15px; padding: 11px 18px; border-radius: 12px; }
.tx-btn-onbrand:hover { background: #fff; border-color: #fff; color: var(--tx-brand); }
.tx-btn-count { background: #fff; color: var(--tx-brand); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px; }
.tx-btn-onbrand:hover .tx-btn-count { background: var(--tx-brand); color: #fff; }

/* ---------- Tabs (status filters on a page; work with Bootstrap pills: data-bs-toggle="pill") ---------- */
.tx-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; padding: 0; list-style: none; }
.tx-tab {
    display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--tx-line); border-radius: 10px;
    padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--tx-text) !important; text-decoration: none !important;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.tx-tab:hover { border-color: var(--tx-brand); color: var(--tx-brand) !important; }
.tx-tab-count { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--tx-bg); color: var(--tx-muted); }
.tx-tab.active { background: var(--tx-brand); border-color: var(--tx-brand); color: #fff !important; }
.tx-tab.active .tx-tab-count { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- Form card (settings-style pages) ---------- */
.tx-form-card { background: #fff; border: 1px solid var(--tx-line); border-radius: 16px; }
.tx-form-card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--tx-line); }
.tx-form-card-icon {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    background: var(--tx-brand-soft); color: var(--tx-brand);
}
.tx-form-card-title { font-size: 17px; font-weight: 700; color: var(--tx-ink); margin: 0; }
.tx-form-card-sub { font-size: 13px; color: var(--tx-muted); margin: 2px 0 0; }
.tx-form-card-body { padding: 20px 22px 22px; }
.tx-form-narrow { max-width: 460px; }
.tx-field + .tx-field { margin-top: 16px; }
.tx-error { display: block; font-size: 12.5px; color: #c0392b; margin-top: 4px; }

.tx-input {
    width: 100%; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; font-family: var(--tx-font);
    font-size: 14px; padding: 10px 12px; min-height: 44px; color: var(--tx-ink); outline: none; box-shadow: none;
}
.tx-input:focus { border-color: var(--tx-brand); box-shadow: var(--tx-focus); }
.tx-input[readonly] { background: var(--tx-bg); }
.tx-input-group { display: flex; align-items: stretch; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; overflow: hidden; }
.tx-input-group:focus-within { border-color: var(--tx-brand); box-shadow: var(--tx-focus); }
.tx-input-group .tx-input { border: 0; border-radius: 0; box-shadow: none; }
.tx-eye { border: 0; border-left: 1px solid var(--tx-line); background: #fff; color: var(--tx-muted); padding: 0 12px; display: inline-flex; align-items: center; cursor: pointer; }
.tx-eye:hover { color: var(--tx-brand); }
.tx-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--tx-line); }

.tx-photo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.tx-photo img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; background: #f1f3f4; border: 4px solid #fff; box-shadow: 0 0 0 1px var(--tx-line); }
.tx-photo-name { font-size: 13px; font-weight: 600; color: var(--tx-muted); }

/* ---------- Results bar ---------- */
.tx-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tx-count { font-size: 15px; color: var(--tx-muted); margin: 0; }
.tx-count b { color: var(--tx-ink); }
.tx-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tx-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; background: var(--tx-brand-soft); color: var(--tx-brand); border-radius: 999px; padding: 4px 12px; }
.tx-clear { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--tx-muted); padding: 4px 8px; border-radius: 8px; }
.tx-clear:hover { color: var(--tx-brand); background: var(--tx-brand-soft); }
.tx-clear .tx-icon { font-size: 16px; }

/* ---------- Cards ---------- */
.tx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tx-card {
    position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--tx-line);
    border-radius: 16px; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tx-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tx-brand); opacity: 0; transition: opacity .15s; }
.tx-card:hover { transform: translateY(-3px); border-color: var(--tx-brand-line); box-shadow: 0 14px 30px rgba(17, 24, 39, .09); }
.tx-card:hover::before { opacity: 1; }
.tx-card-body { padding: 18px 20px 14px; flex: 1; }
.tx-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tx-id { font-size: 12.5px; font-weight: 700; color: var(--tx-brand); background: var(--tx-brand-soft); border-radius: 7px; padding: 3px 9px; }
.tx-posted { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--tx-faint); }
.tx-posted .tx-icon { font-size: 16px; }
.tx-card-title { font-size: 16.5px; font-weight: 700; line-height: 1.4; margin: 0 0 14px; }
.tx-card-title a { color: var(--tx-ink); }
.tx-card-title a:hover { color: var(--tx-brand); }

.tx-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.tx-meta li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--tx-ink); min-width: 0; }
.tx-meta .tx-icon { color: var(--tx-brand); font-size: 19px; flex-shrink: 0; }
.tx-label { color: var(--tx-muted); margin-right: 4px; }
.tx-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tx-chip { font-size: 12.5px; font-weight: 500; background: #f3f4f6; color: var(--tx-text); border-radius: 6px; padding: 2px 8px; }

.tx-card-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 20px; border-top: 1px solid var(--tx-line); background: #fcfcfd;
}
.tx-price { font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--tx-ink); }
.tx-price small { font-size: 12px; font-weight: 500; color: var(--tx-muted); }
.tx-note { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--tx-muted); margin-top: 2px; }
.tx-note .tx-icon { font-size: 16px; color: var(--tx-brand); }
.tx-note b { color: var(--tx-brand); text-transform: capitalize; }

/* ---------- Empty state ---------- */
.tx-empty { background: #fff; border: 1px dashed #e5e7eb; border-radius: 16px; padding: 56px 20px; text-align: center; }
.tx-empty > .tx-icon { font-size: 46px; color: #d1d5db; }
.tx-empty h3, .tx-empty h5 { font-size: 18px; font-weight: 700; color: var(--tx-ink); margin: 10px 0 4px; }

/* ---------- Section heading / quick links / info content ---------- */
.tx-section-title { font-size: 18px; font-weight: 700; color: var(--tx-ink); margin: 0; }
.tx-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 22px; }
.tx-links-label { font-size: 13.5px; font-weight: 600; color: var(--tx-muted); margin-right: 2px; }
.tx-link-chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--tx-text);
    background: #fff; border: 1px solid var(--tx-line); border-radius: 999px; padding: 5px 12px; transition: all .15s;
}
.tx-link-chip:hover { border-color: var(--tx-brand); color: var(--tx-brand); }
.tx-link-chip.is-active { background: var(--tx-brand); border-color: var(--tx-brand); color: #fff; }
.tx-link-chip.is-active small { color: rgba(255, 255, 255, .8); }
.tx-link-chip small { font-size: 12px; color: var(--tx-faint); }

.tx-info { margin-top: 40px; background: #fff; border: 1px solid var(--tx-line); border-radius: 16px; padding: 26px 28px; }
.tx-info h2 { font-size: 20px; font-weight: 700; color: var(--tx-ink); margin: 0 0 10px; }
.tx-info h3 { font-size: 16px; font-weight: 700; color: var(--tx-ink); margin: 20px 0 8px; }
.tx-info p, .tx-info li { font-size: 14.5px; line-height: 1.7; color: var(--tx-text); }
.tx-info p { margin: 0 0 10px; }
.tx-info ol, .tx-info ul { padding-left: 20px; margin: 0 0 10px; }
.tx-info a { color: var(--tx-brand); font-weight: 600; }
.tx-info a:hover { text-decoration: underline; }
.tx-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
@media (max-width: 767px) { .tx-info { padding: 20px 18px; } .tx-info-grid { grid-template-columns: 1fr; } }
.tx-empty p { color: var(--tx-muted); margin: 0 0 18px; }
.tx-empty-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Pagination ---------- */
.tx-pager { display: flex; justify-content: center; margin-top: 28px; overflow-x: auto; }
.tx-pager .pagination { gap: 4px; margin: 0; flex-wrap: wrap; justify-content: center; }
.tx-pager .page-link {
    border-radius: 8px !important; border: 1px solid var(--tx-line); color: var(--tx-ink) !important;
    font-size: 14px; font-weight: 600; min-width: 38px; text-align: center; box-shadow: none !important;
}
.tx-pager .page-link:hover { background: var(--tx-brand-soft); color: var(--tx-brand) !important; border-color: var(--tx-brand); }
.tx-pager .page-item.active .page-link { background: var(--tx-brand) !important; border-color: var(--tx-brand) !important; color: #fff !important; }
.tx-pager .page-item.disabled .page-link { color: var(--tx-faint) !important; background: #fafafa; }

/* ---------- Modal + form fields ---------- */
.tx-modal { font-family: var(--tx-font); }
.tx-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(17, 24, 39, .18); }
.tx-modal .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--tx-line); }
.tx-modal-head { display: flex; align-items: center; gap: 12px; }
.tx-modal-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--tx-brand-soft); color: var(--tx-brand); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tx-modal .modal-title { font-size: 18px; font-weight: 700; color: var(--tx-ink); margin: 0; }
.tx-modal-sub { font-size: 13px; color: var(--tx-muted); margin: 2px 0 0; }
.tx-close { width: 36px; height: 36px; border: 0; border-radius: 10px; background: #f3f4f6; color: #4b5563; display: inline-flex; align-items: center; justify-content: center; }
.tx-close:hover { background: var(--tx-brand-soft); color: var(--tx-brand); }
.tx-modal .modal-body { padding: 20px 24px 10px; background: var(--tx-bg); }
.tx-modal .modal-footer { display: flex; justify-content: space-between; padding: 14px 24px; border-top: 1px solid var(--tx-line); }

.tx-fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.tx-flabel { display: block; font-size: 13px; font-weight: 600; color: var(--tx-text); margin-bottom: 6px; }
.tx-select {
    width: 100%; border: 1px solid #e5e7eb; border-radius: 10px; background-color: #fff;
    font-size: 14px; padding: 9px 34px 9px 12px; min-height: 42px; color: var(--tx-ink); box-shadow: none !important;
}
.tx-select:focus { border-color: var(--tx-brand); box-shadow: var(--tx-focus) !important; }

/* select2 inside a tx-modal (the dropdown is attached to the modal via dropdownParent) */
.tx-modal .select2-container { width: 100% !important; }
.tx-modal .select2-container--default .select2-selection--single {
    height: 42px; border: 1px solid #e5e7eb !important; border-radius: 10px; background: #fff; box-shadow: none; padding: 0;
}
.tx-modal .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 40px; padding-left: 12px; color: var(--tx-ink); font-size: 14px; }
.tx-modal .select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; right: 8px; }
.tx-modal .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--tx-brand) !important; box-shadow: var(--tx-focus); }
.tx-modal .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: var(--tx-brand); color: #fff; }
.tx-modal .select2-dropdown { border-color: #e5e7eb; border-radius: 10px; overflow: hidden; }
.tx-modal .select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid #e5e7eb !important; border-radius: 8px; }

/* ---------- Tutor area shell: top bar + sidebar (components/frontsite/layouts/partials/nav + sidenav) ---------- */
.tx-topbar {
    height: 64px; padding: 0 !important; background: #fff !important;
    border-bottom: 1px solid var(--tx-line); box-shadow: none !important; font-family: var(--tx-font);
}
.tx-topbar-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 20px; }
.tx-topbar-brand { display: flex; align-items: center; gap: 6px; }
.tx-topbar-logo { height: 44px; width: auto; }
.tx-menu-btn {
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--tx-line); background: #fff; color: var(--tx-ink);
    display: inline-flex; align-items: center; justify-content: center; font-size: 22px; padding: 0;
}
.tx-menu-btn:hover { border-color: var(--tx-brand); color: var(--tx-brand); }

.tx-sidebar {
    background: #fff !important; border-right: 1px solid var(--tx-line); box-shadow: none !important;
    height: 100vh; position: fixed; top: 0; padding: 76px 12px 0 !important; font-family: var(--tx-font);
    display: flex !important; flex-direction: column;
}
.tx-sidebar-profile {
    background: var(--tx-brand-soft); border: 1px solid var(--tx-brand-line); border-radius: 16px;
    padding: 16px 12px 14px; text-align: center; flex-shrink: 0;
}
.tx-sidebar-avatar { position: relative; width: 84px; height: 84px; margin: 0 auto 10px; }
.tx-sidebar-avatar img {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; cursor: pointer;
    border: 3px solid #fff;
}
.tx-sidebar-avatar button {
    position: absolute; right: -2px; bottom: 2px; width: 28px; height: 28px; border-radius: 50%; padding: 0;
    border: 2px solid #fff; background: var(--tx-brand); color: #fff; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.tx-sidebar-avatar button:hover { background: var(--tx-brand-dark); }
.tx-sidebar-name { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 16px; font-weight: 700; color: var(--tx-ink); line-height: 1.3; }
.tx-sidebar-name .bi-patch-check-fill { color: #1d9bf0; font-size: 15px; }
.tx-sidebar-name .bi-star-fill { color: #f5b301; font-size: 14px; }
.tx-sidebar-id { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--tx-brand); background: #fff; border-radius: 999px; padding: 2px 10px; }

.tx-side-menu { list-style: none; margin: 16px 0 0; padding: 0 0 16px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.tx-side-menu li { margin-bottom: 4px; }
.tx-side-link {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 12px;
    font-size: 14.5px; font-weight: 500; color: var(--tx-text) !important; text-decoration: none !important; transition: background .15s, color .15s;
}
.tx-side-link i {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    background: var(--tx-bg); color: var(--tx-muted); font-size: 16px; transition: all .15s;
}
.tx-side-link:hover { background: var(--tx-bg); color: var(--tx-brand) !important; }
.tx-side-link:hover i { background: var(--tx-brand-soft); color: var(--tx-brand); }
.tx-side-link.is-active { background: var(--tx-brand-soft); color: var(--tx-brand) !important; font-weight: 600; }
.tx-side-link.is-active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 4px 4px 0; background: var(--tx-brand); }
.tx-side-link.is-active i { background: var(--tx-brand); color: #fff; }
.tx-side-divider { height: 1px; background: var(--tx-line); margin: 10px 4px; }
.tx-side-link--danger:hover { background: var(--tx-brand-soft); }

/* Phones: the sidebar slides in from the left when the menu button is pressed */
@media (max-width: 767px) {
    body { overflow-x: hidden; }
    .tx-topbar { z-index: 10000; }
    .tx-topbar-inner { padding: 0 12px; }
    .tx-topbar-logo { height: 38px; }
    #sidebarMenu.tx-sidebar {
        width: 0; padding-left: 0 !important; padding-right: 0 !important; overflow: hidden;
        transition: width .3s, padding .3s; z-index: 1050; border-right: 0;
    }
    #sidebarMenu.tx-sidebar.show { width: 260px; padding-left: 12px !important; padding-right: 12px !important; border-right: 1px solid var(--tx-line); }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .tx-grid { grid-template-columns: 1fr; }
    .tx-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx-hero-inner { align-items: stretch; }
}

@media (max-width: 350px) {
    .tx-page--offset { padding: 12px 0 32px; }
    .tx-head { padding: 16px; }
    .tx-hero { padding: 24px 18px; border-radius: 16px; margin-top: 12px; }
    .tx-hero-title { font-size: 22px; }
    .tx-actions, .tx-tools, .tx-search, .tx-search--raised { width: 100%; min-width: 0; }
    .tx-search input { width: auto; }
    .tx-actions .tx-btn, .tx-tools .tx-btn { flex: 1; }
    .tx-fgrid { grid-template-columns: 1fr; }
    .tx-card-body { padding: 16px; }
    .tx-card-foot { padding: 12px 16px; }
    .tx-card-foot .tx-btn { width: 100%; }
}
