/* ================================================
   Penguin Support - Static Site Rebuild
   Colors: Primary #fcb040, Dark #1e1e1e
   Fonts: Oswald (headings), Roboto (body)
   ================================================ */

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #1e1e1e;
    letter-spacing: 0.5px;
    line-height: 1.6;
    background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    letter-spacing: 0.7px;
    margin-bottom: 1rem;
}

a {
    color: #1e1e1e;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fcb040;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1270px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================
   Header Styles
   ================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* When installed as a PWA on iPhone, apple-mobile-web-app-status-bar
     * -style="black-translucent" makes the status bar overlay the page.
     * Without safe-area-inset-top padding, the logo + nav sit under the
     * notch / status bar. Harmless in regular Safari but the manifest
     * opts users into the standalone home-screen experience. */
    padding-top: env(safe-area-inset-top, 0);
}

/* Auto-offset for page content that lives directly under the fixed
 * site-header. Pages whose first content block is a hero / page-header /
 * hub-hero declare their own `margin-top: 92px` (those classes are
 * styled to span the header area visually), so we skip them here. Every
 * other first child of <main> gets the offset auto-applied — fixes the
 * profile / walkthroughs / settings pages that previously rendered their
 * H1 directly behind the fixed header. The :first-of-type fallback
 * handles direct text or unwrapped containers. */
main > :first-child:not(.hero):not(.page-header):not(.hub-hero):not(.welcome) {
    margin-top: 92px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 92px;
}

.site-logo img {
    max-width: 107px;
    height: auto;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    /* Let the nav give up space before the authenticated controls do. */
    min-width: 0;
}

/* Keep the authenticated controls in the header even when a role exposes
 * every desktop link and the nav reaches its container's width. */
.header-inner > .user-menu,
.header-inner > .bell-wrap,
.header-inner > .mobile-menu-toggle {
    flex: 0 0 auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

/* [UPDATED 2026-10-06] Keep the desktop nav compact without forcing long
 * labels into one horizontal row. Multi-word labels are split into two
 * explicit text spans in base.html, so the visual treatment is deterministic
 * and the accessible link name remains the same text. The mobile menu keeps
 * its original single-line labels and is intentionally not affected here.
 */
.nav-menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 92px;
    padding: 0 7px;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #000000;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    transition: all 0.3s ease;
}

.nav-menu .nav-label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-menu .nav-label > span {
    display: block;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #fcb040;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #bcbcbc;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 60%;
}

/* Search Toggle */
.search-toggle {
    padding: 0 15px;
    cursor: pointer;
    font-size: 18px;
    color: #000000;
    transition: color 0.3s ease;
}

.search-toggle:hover {
    color: #fcb040;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #000000;
    /* WCAG 2.5.5 tap-target floor — was a 24x24 hit area, easy to miss
     * on the right edge of a phone topbar. The media query at <=1280
     * flips display to flex (not block) so these flex centering rules
     * take effect when the button becomes visible. */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

/* Header Search */
.header-search {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.header-search.active {
    display: block;
}

.header-search input {
    width: 100%;
    padding: 15px 20px;
    border: 3px solid #232222;
    border-radius: 3px;
    font-size: 17px;
    color: #e40044;
    outline: none;
    transition: border-color 0.3s ease;
}

.header-search input:focus {
    border-color: #fcb040;
}

/* Sticky Header (scrolled) */
.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.site-header.scrolled .header-inner {
    height: 70px;
}

.site-header.scrolled .nav-menu a {
    min-height: 70px;
    height: 70px;
}

/* ================================================
   Hero Section
   ================================================ */
.hero-section {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(12, 12, 12, 0.7), rgba(12, 12, 12, 0.7)),
                url('../images/hero-bg.png') center/cover no-repeat;
    background-color: #1e1e1e;
    margin-top: 92px;
    padding: 60px 20px;
}

.hero-content {
    text-align: center;
    color: #ffffff;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 400;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-divider {
    width: 100px;
    height: 3px;
    background: #fcb040;
    margin: 0 auto 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background-color: #fcb040;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #1e1e1e;
    color: #ffffff;
}

.btn i {
    font-size: 16px;
}

/* ================================================
   Announcements Section
   ================================================ */
.announcements-section {
    background: #f5f5f5;
    padding: 40px 20px;
}

.announcements-section .container {
    max-width: 1000px;
}

.announcements-title {
    font-size: 24px;
    color: #fcb040;
    margin-bottom: 20px;
    text-align: center;
}

.announcement-content {
    background: #ffffff;
    padding: 25px;
    border-left: 4px solid #fcb040;
    border-radius: 3px;
}

.announcement-content p {
    margin-bottom: 15px;
}

.announcement-content p:last-child {
    margin-bottom: 0;
}

/* ================================================
   Categories Grid Section
   ================================================ */
.categories-section {
    padding: 60px 20px;
    background: #ffffff;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.category-card {
    text-align: center;
    padding: 30px 20px;
    background: #ffffff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: #fcb040;
}

.category-icon i {
    font-size: 32px;
    color: #1e1e1e;
    transition: color 0.3s ease;
}

.category-card:hover .category-icon i {
    color: #ffffff;
}

.category-card h3 {
    font-size: 18px;
    margin-bottom: 0;
}

.category-card h3 a {
    color: #1e1e1e;
}

.category-card:hover h3 a {
    color: #fcb040;
}

/* ================================================
   Request Form Section
   ================================================ */
.request-section {
    background: #1e1e1e;
    padding: 60px 20px;
}

.request-section .container {
    max-width: 800px;
}

.request-section h2 {
    color: #ffffff;
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
}

.request-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 15px;
    border: 3px solid #232222;
    border-radius: 3px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    color: #e40044;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #fcb040;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.request-form .btn {
    align-self: flex-start;
}

/* ================================================
   Footer
   ================================================ */
.site-footer {
    background: #ffffff;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    color: #000000;
}

.footer-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.footer-menu a {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    color: #000000;
}

.footer-menu a:hover {
    color: #fcb040;
}

/* ================================================
   Page Header
   ================================================ */
.page-header {
    background: #f5f5f5;
    padding: 40px 20px;
    margin-top: 92px;
    text-align: center;
}

.page-header h1 {
    font-size: 32px;
    color: #161616;
    margin-bottom: 0;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 14px;
    margin-top: 15px;
}

.breadcrumbs a {
    color: #666;
}

.breadcrumbs a:hover {
    color: #fcb040;
}

.breadcrumbs span {
    color: #999;
    margin: 0 10px;
}

/* ================================================
   About Page Styles
   ================================================ */
.about-section {
    padding: 60px 20px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h2 {
    font-size: 28px;
    color: #1e1e1e;
    margin-bottom: 20px;
}

.about-content blockquote {
    border-left: 4px solid #fcb040;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.about-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-image img {
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.partners-section {
    background: #f5f5f5;
    padding: 60px 20px;
    text-align: center;
}

.partners-section h2 {
    font-size: 28px;
    margin-bottom: 40px;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.partners-grid img {
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partners-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ================================================
   Blog Page Styles
   ================================================ */
.blog-section {
    padding: 60px 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.blog-card {
    background: #ffffff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 25px;
}

.blog-card-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.blog-card-meta span {
    margin-right: 15px;
}

.blog-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.blog-card h3 a:hover {
    color: #fcb040;
}

.blog-card p {
    color: #666;
    margin-bottom: 20px;
}

.read-more {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    color: #fcb040;
    font-weight: 500;
}

.read-more:hover {
    color: #1e1e1e;
}

/* Blog Sidebar */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.sidebar {
    padding-top: 0;
}

.sidebar-widget {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.sidebar-widget h4 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fcb040;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.sidebar-widget li:last-child {
    border-bottom: none;
}

.sidebar-widget a {
    color: #666;
}

.sidebar-widget a:hover {
    color: #fcb040;
}

/* ================================================
   IT Support Page Styles
   ================================================ */
.support-section {
    padding: 60px 20px;
}

.support-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.support-form-container {
    background: #ffffff;
}

.support-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.support-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.support-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-form label {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    color: #1e1e1e;
    letter-spacing: 0.5px;
}

.support-form label .required {
    color: #e40044;
}

.support-form input,
.support-form textarea,
.support-form select {
    padding: 12px 15px;
    border: 3px solid #232222;
    border-radius: 3px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    color: #1e1e1e;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

.support-form input:focus,
.support-form textarea:focus,
.support-form select:focus {
    outline: none;
    border-color: #fcb040;
}

.support-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Draft Notice */
.draft-notice {
    background: #d1ecf1;
    color: #0c5460;
    padding: 12px 15px;
    border-radius: 5px;
    border-left: 4px solid #17a2b8;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.draft-notice .draft-clear {
    background: none;
    border: none;
    color: #0c5460;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
    margin-left: auto;
}

.draft-notice .draft-clear:hover {
    color: #1e1e1e;
}

.file-upload {
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: #fcb040;
}

.file-upload i {
    font-size: 32px;
    color: #999;
    margin-bottom: 10px;
}

.file-upload p {
    color: #666;
    font-size: 14px;
}

.file-upload.has-file {
    border-color: #28a745;
    background: #f8fff8;
}

/* Upload Progress Bar */
.upload-progress {
    margin-bottom: 15px;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.upload-progress-fill {
    height: 100%;
    background: #fcb040;
    border-radius: 4px;
    width: 0;
    transition: width 0.2s ease;
}

.upload-progress-text {
    font-size: 13px;
    color: #666;
}

/* ================================================
   Mobile Menu Overlay
   ================================================ */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1099;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: #ffffff;
    z-index: 1100;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav {
    list-style: none;
    padding: 20px;
}

.mobile-nav li {
    border-bottom: 1px solid #eee;
}

.mobile-nav a {
    display: block;
    padding: 15px 0;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    color: #1c1c1c;
}

.mobile-nav a:hover {
    color: #fcb040;
}

/* ================================================
   Bottom Tab Bar (Mobile/Tablet)
   ================================================ */
.bottom-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #eee;
    z-index: 900;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-tab-bar .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0 6px;
    color: #999;
    text-decoration: none;
    font-size: 10px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bottom-tab-bar .tab-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

.bottom-tab-bar .tab-item.active {
    color: #fcb040;
}

.bottom-tab-bar .tab-item:active {
    color: #fcb040;
    background: rgba(252, 176, 64, 0.05);
}

/* ================================================
   Action Drawer (replaces standalone FAB + Penny toggle)
   ================================================ */
.action-drawer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    -webkit-tap-highlight-color: transparent;
}

/* When the More bottom sheet (public site or admin) is open, hide the
 * FAB so it doesn't float over the sheet's lower options. Without this,
 * the FAB at z 1050 sits on top of the sheet (z 960) and steals taps
 * meant for the bottom More menu items. */
body:has(.more-menu.active) .action-drawer,
body:has(.admin-more-menu.active) .action-drawer {
    visibility: hidden;
}

.action-drawer-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #fcb040;
    color: #1e1e1e;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(252, 176, 64, 0.45),
                0 2px 4px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.action-drawer-trigger:hover {
    background: #e89e30;
}

.action-drawer-trigger:active {
    transform: scale(0.94);
}

.action-drawer-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.action-drawer.open .action-drawer-trigger-icon {
    transform: rotate(45deg);
}

/* Drawer items — fan above the trigger with stagger */
.action-drawer-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #1e1e1e;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    transform: translateY(20px) scale(0.6);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-drawer.open .action-drawer-item {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.action-drawer.open .action-drawer-item:nth-child(2) { transition-delay: 0.04s; }
.action-drawer.open .action-drawer-item:nth-child(1) { transition-delay: 0.08s; }

.action-drawer-item:hover {
    background: #fcb040;
    color: #1e1e1e;
}

.action-drawer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-drawer-label {
    position: absolute;
    right: 100%;
    margin-right: 12px;
    background: rgba(20, 20, 20, 0.85);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.action-drawer-item:hover .action-drawer-label,
.action-drawer-item:focus-visible .action-drawer-label {
    opacity: 1;
}

@media (max-width: 768px) {
    .action-drawer {
        bottom: 80px;  /* clear of bottom-tab-bar */
        right: 16px;
    }
}

/* ================================================
   User Menu (avatar + dropdown in top nav)
   ================================================ */
.user-menu {
    position: relative;
    margin-left: 14px;
    display: inline-flex;
    align-items: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: #fcb040;
    color: #1e1e1e;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: border-color 0.15s ease;
}

.user-avatar:hover,
.user-menu[data-open="true"] .user-avatar {
    border-color: #fcb040;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 12px;
    display: none;
    z-index: 1200;
}

.user-menu[data-open="true"] .user-dropdown {
    display: block;
}

.user-dropdown__name {
    font-weight: 600;
    color: #1e1e1e;
    font-size: 14px;
}

.user-dropdown__meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.user-dropdown__role {
    text-transform: capitalize;
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 10px 0;
}

.user-dropdown a,
.user-dropdown button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: none;
    color: #1e1e1e;
    text-align: left;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: #f3f4f6;
}

.user-dropdown__signout {
    margin: 4px 0 0;
}

.user-dropdown__signout button {
    color: #b91c1c;
    font-weight: 600;
}

.user-dropdown__signout button:hover {
    background: #fef2f2;
}

/* Mobile menu / more menu sign-out forms */
.mobile-nav-signout,
.more-menu-signout {
    margin: 0;
}

.mobile-nav-signout button,
.more-menu-signout button {
    display: block;
    width: 100%;
    padding: 12px 0;
    background: none;
    border: none;
    border-top: 1px solid #e5e7eb;
    color: #b91c1c;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
}

.mobile-nav__signed-in {
    padding: 12px 0;
    color: #6b7280;
    font-size: 13px;
    border-top: 1px solid #e5e7eb;
}

/* Admin sidebar logout form (no extra style — inherits sidebar nav style) */
.sidebar-logout-form {
    margin: 0;
}

.sidebar-logout-form button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    width: 100%;
    padding: 0;
}

.user-dropdown-logout {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    width: 100%;
    padding: inherit;
}

/* More Menu (bottom sheet) */
.more-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 950;
}

.more-menu-overlay.active {
    display: block;
}

.more-menu {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    z-index: 960;
    transition: bottom 0.3s ease;
    padding-bottom: env(safe-area-inset-bottom, 0);
    max-height: 70vh;
    overflow-y: auto;
}

.more-menu.active {
    bottom: 0;
}

.more-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #1e1e1e;
}

.more-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.more-menu-list {
    list-style: none;
    padding: 10px 0;
}

.more-menu-list li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: #1e1e1e;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.more-menu-list li a:active {
    background: #f5f5f5;
}

.more-menu-list li a i {
    width: 24px;
    text-align: center;
    color: #666;
    font-size: 18px;
}

/* ================================================
   Hub Dashboard
   ================================================ */

/* Hub Hero / Search */
.hub-hero {
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    padding: 50px 20px 40px;
    margin-top: 92px;
    text-align: center;
    color: #ffffff;
}

.hub-hero h1 {
    font-size: 36px;
    font-weight: 400;
    color: #fcb040;
    margin-bottom: 4px;
}

.hub-subtitle {
    font-size: 15px;
    color: #ccc;
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}

.hub-search-wrap {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.hub-search-form {
    display: flex;
    align-items: center;
    position: relative;
}

.hub-search-icon {
    position: absolute;
    left: 16px;
    color: #999;
    font-size: 16px;
    pointer-events: none;
}

.hub-search-form input {
    width: 100%;
    padding: 14px 18px 14px 44px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    background: #ffffff;
    color: #1e1e1e;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s;
}

.hub-search-form input:focus {
    box-shadow: 0 4px 24px rgba(252, 176, 64, 0.3);
}

.hub-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    max-height: 360px;
    overflow-y: auto;
}

.search-group {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.search-group:last-child {
    border-bottom: none;
}

.search-group-label {
    padding: 8px 16px 4px;
    font-size: 11px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #1e1e1e;
    text-decoration: none;
    transition: background 0.15s;
}

.search-result-item:hover {
    background: #f8f8f8;
    color: #1e1e1e;
}

.search-result-item > i {
    width: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    flex-shrink: 0;
}

.search-result-item div {
    flex: 1;
    min-width: 0;
}

.search-result-item div strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.search-result-item div span {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Hub Quick Actions */
.hub-actions {
    /* [UPDATED 2026-06-15] Was bottom padding 0, and .hub-recent has top 0, so
       the quick-action buttons touched the Open Tickets / My Daily Checklists
       cards. Add bottom breathing room. */
    padding: 24px 20px 24px;
    background: #f8f8f8;
}

.hub-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 560px;
    margin: 0 auto;
}

.hub-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px;
    background: #ffffff;
    border-radius: 12px;
    text-decoration: none;
    color: #1e1e1e;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.hub-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    color: #1e1e1e;
}

.hub-action-card:active {
    transform: scale(0.97);
}

.hub-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
}

.hub-action-card span {
    line-height: 1.2;
}

/* Hub Section Headers */
.hub-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.hub-section-header h2 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub-section-header h2 i {
    color: #fcb040;
    font-size: 16px;
}

.hub-view-all {
    font-size: 13px;
    color: #fcb040;
    font-weight: 500;
    text-decoration: none;
}

.hub-view-all:hover {
    color: #e5a038;
    text-decoration: underline;
}

.hub-edit-favorites {
    font-size: 13px;
    color: #fcb040;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.hub-edit-favorites:hover {
    background: rgba(252, 176, 64, 0.1);
}

/* Hub Favorites */
.hub-favorites {
    padding: 24px 20px 0;
    background: #f8f8f8;
}

.hub-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.hub-fav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 10px;
    color: #1e1e1e;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.hub-fav-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    color: #1e1e1e;
}

.hub-fav-item i:first-child {
    color: #fcb040;
    font-size: 16px;
    flex-shrink: 0;
}

.fav-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e40044;
    color: #ffffff;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.fav-remove:hover {
    background: #c5003a;
}

/* Hub Announcements */
.hub-announcements {
    padding: 24px 20px;
    background: #f8f8f8;
}

/* Hub Recent Tickets + Articles */
.hub-recent {
    padding: 0 20px 24px;
    background: #f8f8f8;
}

.hub-recent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Viewers get one home-workspace panel after the operational ticket panel is
 * gated. Keep that panel full-width at desktop sizes in both UI densities. */
.hub-recent--single .hub-recent-grid {
    grid-template-columns: minmax(0, 1fr);
}

.hub-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Ticket list in hub */
.hub-ticket-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hub-ticket-item {
    border-bottom: 1px solid #f0f0f0;
}

.hub-ticket-item:last-child {
    border-bottom: none;
}

.hub-ticket-item a {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: #1e1e1e;
    transition: background 0.15s;
}

.hub-ticket-item a:hover {
    color: #1e1e1e;
}

.hub-ticket-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.hub-ticket-number {
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #fcb040;
    letter-spacing: 0.5px;
}

.hub-ticket-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hub-badge-low {
    background: #d4edda;
    color: #155724;
}

.hub-badge-medium {
    background: #fff3cd;
    color: #856404;
}

.hub-badge-high {
    background: #f8d7da;
    color: #721c24;
}

.hub-badge-urgent {
    background: #e40044;
    color: #ffffff;
}

.hub-ticket-subject {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.hub-ticket-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #999;
}

.hub-ticket-status {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.hub-status-open {
    background: #d1ecf1;
    color: #0c5460;
}

.hub-status-in_progress,
.hub-status-in-progress {
    background: #fff3cd;
    color: #856404;
}

.hub-status-waiting {
    background: #e2e3e5;
    color: #383d41;
}

.hub-status-resolved {
    background: #d4edda;
    color: #155724;
}

.hub-status-closed {
    background: #f5f5f5;
    color: #999;
}

/* Article list in hub */
.hub-article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hub-article-item {
    border-bottom: 1px solid #f0f0f0;
}

.hub-article-item:last-child {
    border-bottom: none;
}

.hub-article-item a {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: #1e1e1e;
}

.hub-article-item a:hover {
    color: #fcb040;
}

.hub-article-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
}

.hub-article-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
}

/* Empty state */
.hub-empty {
    text-align: center;
    padding: 30px 20px;
    color: #ccc;
}

.hub-empty i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.hub-empty p {
    font-size: 14px;
    color: #999;
}

/* Hub Categories / Resources Grid */
.hub-categories {
    padding: 24px 20px;
    background: #f8f8f8;
}

.hub-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.hub-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 10px;
    background: #ffffff;
    /* Visible border so the card reads as a discrete, tappable tile even on
       touch (where the hover-lift below never fires). Without this the card
       melts into the light page background and looks like static text. */
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    text-decoration: none;
    color: #1e1e1e;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

/* Persistent "this opens" affordance — a small chevron in the corner that
   doesn't depend on hover (touch devices disable the hover transform). Sits
   bottom-right, clear of the top-right favorite star. */
.hub-cat-card::after {
    content: "\203A"; /* › */
    position: absolute;
    right: 12px;
    bottom: 7px;
    font-size: 18px;
    line-height: 1;
    color: rgba(15, 23, 42, 0.30);
    transition: transform 0.15s, color 0.15s;
    pointer-events: none;
}

.hub-cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    border-color: rgba(15, 23, 42, 0.22);
    color: #1e1e1e;
}

.hub-cat-card:hover::after {
    color: #fcb040;
    transform: translateX(2px);
}

.hub-cat-card:focus-visible {
    outline: 2px solid #fcb040;
    outline-offset: 2px;
}

.hub-cat-card:active {
    transform: scale(0.97);
}

.hub-cat-card > i:first-child {
    font-size: 28px;
    color: #fcb040;
}

.hub-cat-card > span {
    line-height: 1.2;
}

/* Favorite toggle star on category cards */
.fav-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #ddd;
    font-size: 14px;
    transition: color 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
    z-index: 2;
}

.fav-toggle:hover {
    color: #fcb040;
    transform: scale(1.2);
}

.fav-toggle.is-fav {
    color: #fcb040;
}

/* Hub CTA (Re-Order Supplies) */
.hub-cta {
    padding: 0 20px 30px;
    background: #f8f8f8;
}

.hub-cta-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #fcb040, #f0a030);
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(252, 176, 64, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.hub-cta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(252, 176, 64, 0.4);
    color: #ffffff;
}

.hub-cta-card:active {
    transform: scale(0.98);
}

.hub-cta-card > i:first-child {
    font-size: 28px;
    flex-shrink: 0;
}

.hub-cta-card div {
    flex: 1;
}

.hub-cta-card div strong {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hub-cta-card div span {
    font-size: 13px;
    opacity: 0.9;
}

.hub-cta-card > i:last-child {
    font-size: 14px;
    opacity: 0.7;
    flex-shrink: 0;
}

/* ================================================
   Scroll to Top Button
   ================================================ */
.scroll-top {
    position: fixed;
    /* Sits above the FAB (60x60 at bottom:24) so the two don't stack
     * on top of each other in the bottom-right corner. The phone-only
     * @media block bumps it higher to clear the bottom-tab-bar too. */
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(20, 20, 20, 0.84);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    font-size: 24px;
    line-height: 1;
}

.scroll-top-arrow {
    display: inline-block;
    line-height: 1;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #fcb040;
}

/* ================================================
   Responsive Styles
   ================================================ */
@media (max-width: 1280px) {
    /* Laptop / tablet: collapse the desktop top nav into the hamburger
     * menu and show the floating new-ticket button. The bottom tab bar
     * stays HIDDEN at this breakpoint — it used to fire here too, which
     * meant 1024-1280px laptops got a phone-style tab bar overlapping
     * page content (e.g. profile EDIT PROFILE row covered up). Phones
     * only — see the @media (max-width: 768px) block below. */
    .nav-menu,
    .search-toggle {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .fab-new-ticket {
        display: flex;
    }

    /* Hub: 3 columns for categories on tablet */
    .hub-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    /* Phone + iPad portrait: the bottom tab bar replaces the FAB +
     * hamburger as the primary nav. Body gets clearance so content
     * doesn't slide under the bar; scroll-to-top sits above it. iPad
     * landscape (1180) and laptops keep the desktop layout. */
    .bottom-tab-bar {
        display: flex;
    }

    body {
        padding-bottom: 60px;
    }

    .scroll-top {
        bottom: 160px;
    }

    .site-footer {
        margin-bottom: 60px;
    }
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .blog-layout,
    .support-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    /* Header shrinks 92 -> 70 at this breakpoint; mirror that on the
     * auto-offset rule for non-hero first-children. */
    main > :first-child:not(.hero):not(.page-header):not(.hub-hero):not(.welcome) {
        margin-top: 70px;
    }

    .hero-section {
        min-height: 300px;
        margin-top: 70px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .site-header .header-inner {
        height: 70px;
    }

    .site-logo img {
        max-width: 150px;
        /* [2026-07-07 Shane] Cap the height so the logo fits inside the 70px
           mobile header — max-width alone let the tall penguin lockup overflow
           and clip at the top of the viewport. height:auto keeps the aspect. */
        max-height: 46px;
        height: auto;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .support-form .form-row {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    /* Hub: adjust hero for mobile header */
    .hub-hero {
        margin-top: 70px;
        padding: 36px 16px 30px;
    }

    .hub-hero h1 {
        font-size: 28px;
    }

    .hub-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    /* Hub: stack recent panels */
    .hub-recent-grid {
        grid-template-columns: 1fr;
    }

    /* Hub: 2 columns for quick actions */
    .hub-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Hub: 2 columns for categories */
    .hub-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    /* Hub: smaller favorites */
    .hub-favorites-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }

    .hub-fav-item {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .site-logo img {
        max-width: 123px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 25px 15px;
    }

    .btn {
        padding: 12px 25px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    /* Hub: compact on small phones */
    .hub-hero {
        padding: 28px 12px 24px;
    }

    .hub-hero h1 {
        font-size: 24px;
    }

    .hub-search-form input {
        padding: 12px 14px 12px 40px;
        /* Stay >=16px — iOS Safari zooms inputs <16px on focus. */
        font-size: 16px;
    }

    .hub-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .hub-action-card {
        padding: 14px 8px;
    }

    .hub-action-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 18px;
    }

    .hub-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .hub-cat-card {
        padding: 16px 8px;
        font-size: 12px;
    }

    .hub-cat-card > i:first-child {
        font-size: 24px;
    }

    .hub-panel {
        padding: 16px;
    }

    .hub-cta-card {
        padding: 16px 18px;
    }

    .hub-section-header h2 {
        font-size: 16px;
    }
}

/* ================================================
   Utility Classes
   ================================================ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ================================================
   Flash Messages
   ================================================ */
.flash-messages {
    position: fixed;
    top: 110px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
}

.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    transition: opacity 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.flash-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    margin-left: 15px;
    /* WCAG tap-target floor — used to be 20x20. */
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.flash-close:hover {
    opacity: 1;
}

/* ================================================
   Pull to Refresh
   ================================================ */
.pull-to-refresh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    z-index: 3000;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.pull-to-refresh i {
    font-size: 16px;
    color: #fcb040;
    transition: transform 0.2s;
}

.pull-to-refresh.ready i {
    color: #28a745;
}

/* ================================================
   Touch Optimizations
   ================================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn, button {
        min-height: 44px;
    }

    .nav-menu a {
        min-height: 44px;
    }

    /* Active press feedback */
    .category-card:active {
        transform: scale(0.97);
    }

    .btn:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    .sidebar-widget a:active {
        background: #eee;
    }

    /* Disable hover effects on touch (they cause sticky states) */
    .category-card:hover {
        transform: none;
        box-shadow: none;
    }

    .blog-card:hover {
        transform: none;
    }

    /* Hub: disable hover transforms on touch, use active press */
    .hub-action-card:hover,
    .hub-cat-card:hover,
    .hub-fav-item:hover,
    .hub-cta-card:hover {
        transform: none;
    }

    .hub-action-card:active,
    .hub-cat-card:active,
    .hub-fav-item:active,
    .hub-cta-card:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    /* Better scroll behavior */
    .mobile-menu,
    .more-menu {
        -webkit-overflow-scrolling: touch;
    }

    .hub-search-results {
        -webkit-overflow-scrolling: touch;
    }
}

/* [ADDED 2026-06-15] Tablet/mobile top-bar grouping. When the desktop nav
   collapses (≤1280px), .header-inner's `justify-content: space-between` spread
   the avatar / bell / hamburger across the freed width (very noticeable on iPad
   portrait). Pull them into a tight, right-aligned cluster: margin-left:auto on
   the first control absorbs the free space to its left, and small gaps separate
   the three. (.bell-wrap is position:fixed only ≤768px, so the margin here only
   affects the 769–1280px range where it's in normal flow — exactly the iPad
   case.) */
@media (max-width: 1280px) {
    .user-menu { margin-left: auto; }
    .bell-wrap { margin-left: 6px; }
    .mobile-menu-toggle { margin-left: 2px; }
}

/* [ADDED 2026-06-15] Super-admin "View as role" debug switch — banner + picker. */
.view-as-banner {
    position: sticky;
    top: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    background: #fcb040;
    color: #1e1e1e;
    padding: 8px 16px;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.view-as-banner__text { line-height: 1.3; }
.view-as-banner form { margin: 0; }
.view-as-banner__exit {
    background: #1e1e1e;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.view-as-banner__exit:hover { background: #000; }

/* Picker inside the account dropdown */
.user-dropdown__viewas { padding: 10px 14px; }
.viewas-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
}
.viewas-option {
    flex: 1 1 calc(50% - 6px);
    background: #f2f2f2;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.viewas-option:hover { background: #e9e9e9; }
.viewas-option.is-active {
    background: #0a2c45;
    border-color: #0a2c45;
    color: #fff;
}
.viewas-exit {
    width: 100%;
    margin-top: 8px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
}
.viewas-exit:hover { border-color: #999; color: #1e1e1e; }

/* [ADDED 2026-06-15] Impersonation ("log in as user") picker + current state. */
.impersonate-form { margin-top: 6px; }
.impersonate-select {
    width: 100%;
    padding: 6px 8px;
    margin-bottom: 6px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 12px;
    color: #333;
    background: #fff;
}
.viewas-current {
    font-size: 12px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 4px 0 8px;
}
/* Impersonation banner is crimson (vs gold role-projection) — you ARE another
   user, a stronger state that should read as clearly distinct. */
.view-as-banner--impersonate {
    background: #b3261e;
    color: #fff;
}
.view-as-banner--impersonate .view-as-banner__exit {
    background: #fff;
    color: #b3261e;
}
.view-as-banner--impersonate .view-as-banner__exit:hover { background: #f3f3f3; }
