/* ── Header ── */
.app-header {
    background: #fff;
    border-bottom: 1px solid var(--pico-muted-border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    height: 65px;
    position: relative;
}

.brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo {
    height: 48px;
    width: auto;
    display: block;
}

/* ── Home / Landing page ── */
.home-hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
    max-width: 680px;
    margin: 0 auto;
}

.hero-logo {
    height: 72px;
    width: auto;
    margin-bottom: 1.5rem;
}

.home-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--pico-muted-color);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.92rem;
    color: var(--pico-muted-color);
    margin: 0;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    position: relative;
}

.header-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: none;
    border: none;
    --pico-color: #111827;
    color: #111827;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    margin: 0;
    transition: background 0.15s;
}

.header-avatar-btn:hover,
.header-avatar-btn:focus,
.header-avatar-btn:active {
    background: #f0f2f5;
    --pico-color: #111827;
    color: #111827;
}

.header-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0172ad;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
}

.header-username {
    font-size: 0.855rem;
    font-weight: 500;
    color: var(--pico-color);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-chevron {
    color: var(--pico-muted-color);
    flex-shrink: 0;
}

.header-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    min-width: 160px;
    z-index: 200;
    overflow: hidden;
}

.header-dropdown form { margin: 0; }

.header-dd-item {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--pico-color);
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    margin: 0;
    transition: background 0.15s;
}

.header-dd-item:hover { background: #f5f7f9; color: var(--pico-color); }

.header-dd-sep {
    height: 1px;
    background: var(--pico-muted-border-color);
}

.header-dd-signout { color: #dc2626; }
.header-dd-signout:hover { background: #fff5f5; color: #dc2626; }

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--pico-color);
    line-height: 1;
}

/* ── Top navigation (public pages) ── */
.top-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.top-nav-link {
    padding: 0.4rem 0.85rem;
    text-decoration: none;
    color: var(--pico-color);
    font-size: 0.92rem;
    border-radius: var(--pico-border-radius);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.top-nav-link:hover {
    background: #f0f2f5;
    color: var(--pico-primary);
}

.top-nav-btn {
    margin-left: 0.5rem;
    padding: 0.4rem 1.1rem;
    font-size: 0.92rem;
    white-space: nowrap;
}

/* Mobile hamburger for public nav */
.mobile-menu-toggle {
    display: none;
    margin-left: auto;
    padding: 0.25rem 0.6rem;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-bottom: 1px solid var(--pico-muted-border-color);
    flex-direction: column;
    padding: 0.5rem 1rem;
    z-index: 99;
}

.mobile-menu.open { display: flex; }

.mobile-menu .top-nav-link {
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.mobile-menu .top-nav-link:last-child { border-bottom: none; }

/* ════════════════════════════════════════════
   LANDING PAGE
   ════════════════════════════════════════════ */

/* Shared section wrapper */
.lp-section {
    padding: 4rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.lp-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.lp-section-header h2 { margin-bottom: 0.4rem; }
.lp-section-header p  { color: var(--pico-muted-color); margin: 0; }

/* ── Hero ── */
.lp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.lp-hero-text h1 {
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.lp-hero-tagline {
    font-size: 1.1rem;
    color: var(--pico-muted-color);
    margin-bottom: 1.75rem;
}

.lp-hero-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.lp-btn-primary  { white-space: nowrap; }
.lp-btn-secondary { white-space: nowrap; }

.lp-note {
    color: var(--pico-muted-color);
    font-size: 0.82rem;
}

.lp-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ── Three selling points ── */
.lp-selling {
    background: #f8f9fa;
    max-width: 100%;
    padding: 4rem 1.5rem;
}

.lp-selling .lp-grid-3 {
    max-width: 1100px;
    margin: 0 auto;
}

.lp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.lp-card {
    padding: 1.75rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--pico-muted-border-color);
}

.lp-card-center { text-align: center; }

.lp-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.lp-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.lp-card p  { color: var(--pico-muted-color); font-size: 0.93rem; margin: 0; }

/* ── Why LinkedPOS ── */
.lp-why-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.lp-why-text h2 { margin-bottom: 0.75rem; }
.lp-why-text p  { color: var(--pico-muted-color); margin-bottom: 1rem; }

.lp-check-list {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.lp-check-list li {
    padding: 0.35rem 0;
    color: var(--pico-muted-color);
    font-size: 0.95rem;
}

.lp-check-list li::before {
    content: "✓ ";
    color: #15803d;
    font-weight: 700;
}

.lp-why-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.lp-badge {
    background: #f8f9fa;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lp-badge-icon { font-size: 1.6rem; }
.lp-badge strong { font-size: 0.95rem; }
.lp-badge small  { color: var(--pico-muted-color); font-size: 0.82rem; }

/* ── Pricing ── */
.lp-pricing-section {
    background: #f8f9fa;
    max-width: 100%;
    padding: 4rem 1.5rem;
}

.lp-pricing-section .lp-section-header,
.lp-pricing-grid {
    max-width: 1100px;
    margin: 0 auto;
}

.lp-pricing-grid { gap: 1.5rem; }

.lp-pricing-card {
    background: #fff;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
}

.lp-pricing-card header { margin-bottom: 1.25rem; }
.lp-pricing-card header h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.lp-pricing-card footer { margin-top: auto; padding-top: 1.25rem; }
.lp-pricing-card footer a { display: block; text-align: center; }

.lp-pricing-featured {
    border: 2px solid var(--pico-primary);
    position: relative;
}

.lp-badge-popular {
    display: inline-block;
    background: var(--pico-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lp-price { margin-bottom: 0.25rem; }
.lp-price-amount { font-size: 2rem; font-weight: 700; }
.lp-price-period { font-size: 0.9rem; color: var(--pico-muted-color); margin-left: 0.2rem; }

.lp-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.lp-feature-list li {
    padding: 0.35rem 0;
    font-size: 0.92rem;
    color: var(--pico-muted-color);
    border-bottom: 1px solid #f0f0f0;
}

.lp-feature-list li:last-child { border-bottom: none; }

/* ── Download CTA ── */
.lp-download-section {
    padding: 4rem 1.5rem;
}

.lp-download-section .lp-section-header { text-align: center; }
.lp-download-section .lp-section-header h2 { margin-bottom: 0.5rem; }
.lp-download-section .lp-section-header p  { color: var(--pico-muted-color); margin-bottom: 1.5rem; }

.lp-download-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.lp-download-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
    background: #fff;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.lp-download-cover {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0;
}

.lp-download-details h3 {
    margin: 0 0 0.5rem;
}

.lp-version {
    font-size: 0.85rem;
    color: var(--pico-muted-color);
    font-weight: normal;
}

.lp-download-meta {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.lp-download-meta li {
    padding: 0.25rem 0;
    font-size: 0.92rem;
}

.lp-download-meta img {
    height: 20px;
    width: auto;
    vertical-align: middle;
    margin: 0 0.25rem;
}

.lp-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.lp-download-section .lp-btn-primary img {
    height: 18px;
    width: auto;
    vertical-align: middle;
    margin-right: 0.35rem;
}

.lp-paypal {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--pico-muted-border-color);
}

.lp-paypal-label {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    margin-bottom: 0.5rem;
}

.lp-download-notice {
    background: #f5f7fb;
    border-left: 4px solid var(--pico-primary, #1095c1);
    padding: 1.5rem 1.75rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.lp-download-notice h3 { margin: 0 0 0.75rem; }
.lp-download-notice p  { color: var(--pico-muted-color); margin: 0 0 0.75rem; }
.lp-download-notice p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
    .lp-download-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .lp-download-cover { max-width: 180px; margin: 0 auto; }
    .lp-download-meta { text-align: left; }
}

/* ── Footer ── */
.lp-footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 0;
}

.lp-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto 2rem;
}

.lp-footer-logo {
    height: 36px;
    width: auto;
    margin-bottom: 1rem;
}

.lp-footer-address {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.lp-footer a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.15s;
}

.lp-footer a:hover { color: #fff; }

.lp-footer strong {
    color: #fff;
    font-size: 0.88rem;
    display: block;
    margin-bottom: 0.5rem;
}

.lp-footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.lp-footer-links li { padding: 0.2rem 0; }

.lp-footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1.25rem;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
}

.lp-footer-bottom small { color: #888; font-size: 0.82rem; }

/* ── Responsive landing page ── */
@media (max-width: 900px) {
    .lp-hero { grid-template-columns: 1fr; text-align: center; }
    .lp-hero-cta { justify-content: center; }
    .lp-hero-image { order: -1; max-width: 480px; margin: 0 auto; }
    .lp-why-inner { grid-template-columns: 1fr; }
    .lp-why-badges { grid-template-columns: 1fr 1fr; }
    .lp-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 600px) {
    .lp-grid-3 { grid-template-columns: 1fr; }
    .lp-pricing-grid { grid-template-columns: 1fr; }
    .lp-why-badges { grid-template-columns: 1fr; }
    .lp-footer-grid { grid-template-columns: 1fr; }
    .lp-hero-text h1 { font-size: 1.75rem; }
}

/* ── App body ── */
.app-body {
    display: flex;
    min-height: calc(100vh - 44px);
}

/* ── Sidebar ── */
.sidebar {
    width: 216px;
    flex-shrink: 0;
    background: #fafafa;
    border-right: 1px solid var(--pico-muted-border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.2s ease;
}

.sidebar-collapsed .sidebar {
    width: 52px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    min-height: 43px;
    flex-shrink: 0;
}

.sidebar-collapsed .sidebar-header {
    justify-content: center;
}

.sidebar-collapse-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-collapse-btn:hover {
    background: #f0f2f5;
    color: #0172ad;
    border-color: #c7d8e8;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0.3rem 0;
    overflow: hidden;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.46rem 0.75rem 0.46rem calc(0.75rem - 3px);
    text-decoration: none;
    color: #444;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-link:hover {
    background: #f0f2f5;
    color: #0172ad;
    border-left-color: #c7d8e8;
}

.nav-link-active,
.nav-link-active:hover {
    background: #eff6ff;
    color: #0172ad;
    border-left-color: #0172ad;
    font-weight: 600;
}

.nav-icon {
    width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.55;
    transition: opacity 0.15s;
}

.nav-link:hover .nav-icon,
.nav-link-active .nav-icon {
    opacity: 1;
}

.nav-label {
    overflow: hidden;
    white-space: nowrap;
}

.nav-section-label {
    display: block;
    padding: 0.85rem 0.75rem 0.2rem calc(0.75rem - 3px);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pico-muted-color);
    white-space: nowrap;
    overflow: hidden;
}

/* Collapsed: icon-rail mode */
.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 0.46rem 0;
    border-left-color: transparent !important;
}

.sidebar-collapsed .nav-link-active {
    background: #eff6ff;
}

.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-section-label {
    display: none;
}

.btn-block { width: 100%; }

/* ── Page content ── */
.page-content {
    flex: 1;
    padding: 1.5rem 2rem;
    min-width: 0;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-header h2 { margin: 0; }

/* ── Auth (unauthenticated) ── */
.main-content {
    padding-top: 2rem;
    min-height: calc(100vh - 52px);
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-card header { text-align: center; margin-bottom: 1.5rem; }
.auth-card header h2 { margin-bottom: 0.25rem; }
.auth-card header p { color: var(--pico-muted-color); margin: 0; }

.auth-card footer {
    text-align: center;
    padding-top: 1rem;
    color: var(--pico-muted-color);
    font-size: 0.9rem;
}

/* ── Alerts ── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--pico-border-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error   { background: #fff2f2; border: 1px solid #fca5a5; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }

/* ── Form: password toggle ── */
.field-error {
    display: block;
    color: #b91c1c;
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.input-group {
    display: flex;
    align-items: stretch;
    border: var(--pico-border-width, 1px) solid var(--pico-form-element-border-color, #bbb);
    border-radius: var(--pico-border-radius, 0.25rem);
    background: var(--pico-form-element-background-color, #fff);
    margin-bottom: var(--pico-spacing, 1rem);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group:focus-within {
    border-color: var(--pico-form-element-active-border-color, #1a73e8);
    box-shadow: 0 0 0 3px var(--pico-form-element-focus-color, rgba(26,115,232,0.2));
}

.input-group input {
    flex: 1 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    min-width: 0;
}

.icon-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-left: var(--pico-border-width, 1px) solid var(--pico-form-element-border-color, #bbb);
    padding: 0 0.75rem;
    margin: 0;
    cursor: pointer;
    color: var(--pico-muted-color, #777);
    font-size: 1rem;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.icon-btn:hover { color: var(--pico-primary); background: transparent; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] { width: auto; margin: 0; }

.captcha-wrapper { margin: 0.75rem 0; }
.captcha-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.captcha-image {
    display: block;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    user-select: none;
    -webkit-user-select: none;
}
.captcha-refresh {
    box-sizing: border-box;
    width: 62px;
    min-width: 62px;
    height: 62px;
    min-height: 62px;
    margin: 0;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.captcha-refresh:hover { background: #f3f4f6; }
.captcha-input-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
}
.captcha-input-label input {
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-error   { background: #fee2e2; color: #b91c1c; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-muted   { background: #f3f4f6; color: #6b7280; }

/* ── Ticket view ── */
.ticket-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.ticket-meta-sep { opacity: 0.4; }

.ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ticket-message {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--pico-muted-border-color);
}

.ticket-message-customer {
    background: #f8f9fa;
}

.ticket-message-staff {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ticket-message-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
}

.ticket-message-body {
    font-size: 0.93rem;
    white-space: pre-wrap;
    line-height: 1.6;
}

.ticket-controls {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
}

.ticket-control-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.ticket-control-form button { margin-bottom: 0; }

.ticket-control-label {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    margin: 0;
}

.ticket-control-select {
    font-size: 0.88rem;
    padding: 0.3rem 0.6rem;
    margin: 0;
    min-width: 140px;
}

.ticket-closed-note {
    margin-top: 0.5rem;
    padding: 0.85rem 1.1rem;
    background: #f3f4f6;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    font-size: 0.92rem;
}

.ticket-reply-form {
    margin-top: 0.5rem;
}

.ticket-reply-form h4 {
    margin-bottom: 1rem;
}

/* ── Misc ── */
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.muted  { color: var(--pico-muted-color); }
.doc-section { margin-bottom: 1.5rem; }
.doc-section h4 { margin-bottom: 0.5rem; }
[asp-validation-summary]:empty { display: none; }

/* ── Dashboard ── */
.dash-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.dash-welcome {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.dash-title {
    margin: 0 0 0.2rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.dash-date {
    margin: 0;
    color: var(--pico-muted-color);
    font-size: 0.9rem;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dash-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-stat-card:hover {
    border-color: #0172ad;
    box-shadow: 0 2px 10px rgba(1, 114, 173, 0.08);
    color: inherit;
}

.dash-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #eff6ff;
    color: #0172ad;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-stat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.dash-stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1;
    color: var(--pico-color);
}

.dash-stat-label {
    font-size: 0.82rem;
    color: var(--pico-muted-color);
}

.dash-stat-arrow {
    color: var(--pico-muted-color);
    flex-shrink: 0;
}

.dash-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pico-muted-color);
    margin: 0 0 0.6rem;
}

.dash-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.dash-action-card:hover {
    border-color: #0172ad;
    background: #f5faff;
    color: inherit;
}

.dash-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-action-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.dash-action-body strong {
    font-size: 0.93rem;
    font-weight: 600;
}

.dash-action-body span {
    font-size: 0.82rem;
    color: var(--pico-muted-color);
}

.dash-action-arrow {
    color: var(--pico-muted-color);
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .dash-title { font-size: 1.2rem; }
    .dash-stat-value { font-size: 1.5rem; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .top-nav { display: none; }
    .mobile-menu-toggle { display: block; }

    .sidebar-toggle { display: block; }
    .header-username, .header-chevron { display: none; }

    /* On mobile, sidebar is always full-width and slides in — ignore collapsed state */
    .sidebar,
    .sidebar-collapsed .sidebar {
        width: 216px;
        position: fixed;
        top: 44px;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 200;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    }

    .sidebar.open { transform: translateX(0); }

    /* Always show labels on mobile */
    .sidebar-collapsed .nav-link {
        justify-content: flex-start;
        padding: 0.46rem 0.75rem 0.46rem calc(0.75rem - 3px);
        border-left-color: transparent;
    }
    .sidebar-collapsed .nav-link-active { border-left-color: #0172ad; }
    .sidebar-collapsed .nav-label,
    .sidebar-collapsed .nav-section-label { display: block; }

    /* Hide the desktop collapse button on mobile */
    .sidebar-collapse-btn { display: none; }

    .page-content { padding: 1rem; }
    .auth-card { box-shadow: none; border: none; padding: 1rem; }
}

/* ── Profile ── */
.prof-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.prof-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 12px;
}

.prof-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #0172ad;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
}

.prof-hero-info { min-width: 0; }

.prof-name {
    margin: 0 0 0.15rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.prof-email {
    margin: 0 0 0.1rem;
    color: var(--pico-muted-color);
    font-size: 0.88rem;
}

.prof-since {
    margin: 0;
    color: var(--pico-muted-color);
    font-size: 0.82rem;
}

.prof-card {
    background: #fff;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 12px;
    overflow: hidden;
}

.prof-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.prof-card-title {
    font-size: 0.88rem;
    font-weight: 600;
}

.prof-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.prof-field {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    min-width: 0;
}

.prof-field:nth-child(odd) { border-right: 1px solid #f3f4f6; }

/* Strip bottom border from the cells on the final row (assuming even count). */
.prof-field:nth-last-child(-n+2) { border-bottom: none; }

.prof-pw-mask {
    letter-spacing: 0.15em;
    margin-right: 0.6rem;
    color: var(--pico-color);
}

.prof-pw-change {
    font-size: 0.82rem;
    text-decoration: none;
}

.prof-pw-change:hover { text-decoration: underline; }

.prof-inline-input {
    width: 100%;
    padding: 0.25rem 0.45rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.2;
    height: auto;
}

.prof-value:has(.prof-inline-input) { width: 100%; }

.prof-form-actions-foot {
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--pico-muted-border-color);
}

.prof-form-actions-foot > button,
.prof-form-actions-foot > a[role="button"] {
    box-sizing: border-box;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    display: inline-block;
    text-align: center;
}

.prof-label {
    font-size: 0.82rem;
    color: var(--pico-muted-color);
    width: 130px;
    flex-shrink: 0;
}

.prof-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pico-color);
    min-width: 0;
    word-break: break-word;
}

.prof-alert {
    margin: 1rem 1.5rem 0;
}

.prof-form {
    padding: 1.25rem 1.5rem 1.5rem;
}

.prof-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
}

.prof-form-field {
    margin-bottom: 1rem;
}

.prof-form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.prof-form-field input,
.prof-form-field select {
    margin-bottom: 0;
}

.prof-form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.25rem;
}

.prof-form-actions button { margin: 0; }

.prof-cancel-link {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    text-decoration: none;
}

.prof-cancel-link:hover { color: var(--pico-color); }

.prof-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.prof-pw-wrap input {
    flex: 1;
    padding-right: 2.4rem;
    margin-bottom: 0;
}

.prof-pw-toggle {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    width: auto;
    color: var(--pico-muted-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    line-height: 1;
}

.prof-pw-toggle:hover { color: var(--pico-color); }

@media (max-width: 720px) {
    .prof-form-grid { grid-template-columns: 1fr; }
    .prof-label { width: 100px; }

    .prof-fields { grid-template-columns: 1fr; }
    .prof-field { border-right: none; }
    .prof-field:nth-last-child(-n+2) { border-bottom: 1px solid #f3f4f6; }
    .prof-field:last-child { border-bottom: none; }
}

/* ── Cookie consent banner ── */
.cookie-banner {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 10000;
    max-width: 360px;
    padding: 1rem 1.1rem;
    background: #ffffff;
    color: var(--pico-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    animation: cookie-banner-in 220ms ease-out;
}

@keyframes cookie-banner-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cookie-toggle {
    display: none;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    background: var(--pico-primary);
    color: #ffffff;
    border: 1px solid var(--pico-primary);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-toggle:hover { filter: brightness(0.95); }

.cookie-toggle-icon { font-size: 1rem; }

.cookie-banner.is-collapsed {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    max-width: none;
    animation: none;
}

.cookie-banner.is-collapsed .cookie-banner-body { display: none; }
.cookie-banner.is-collapsed .cookie-toggle { display: inline-flex; }

.cookie-banner h4 {
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
    font-weight: 700;
}

.cookie-banner p {
    margin: 0 0 0.85rem 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--pico-muted-color);
}

.cookie-banner p a { color: var(--pico-primary); }

.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
}

.cookie-btn {
    flex: 1;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.2;
}

.cookie-btn-accept {
    background: var(--pico-primary);
    color: #ffffff;
    border-color: var(--pico-primary);
}

.cookie-btn-accept:hover { filter: brightness(0.95); }

.cookie-btn-decline {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.cookie-btn-decline:hover { filter: brightness(0.95); }

@media (max-width: 480px) {
    .cookie-banner {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        max-width: none;
    }
}
