/* ================================
   GlobPM - Corporate Style Sheet
   Theme: Light Corporate (clean, professional, airy)
   ================================ */

/* === CSS Variables === */
@import url("attachment_and_comments.842393bcdf4b.css");

:root {
    /* Brand Colors - Sophisticated Blue Theme */
    --primary-color: #0f172a;
    /* Slate 900 - Headings, Strong Text */
    --brand-blue: #2563eb;
    /* Blue 600 - Primary Actions */
    --brand-blue-hover: #1d4ed8;
    /* Blue 700 */
    --brand-blue-light: #eff6ff;
    /* Blue 50 - Backgrounds/Accents */

    /* Neutral Palette - Warm Grays for softer look */
    --white: #ffffff;
    --gray-50: #f9fafb;
    /* Page Background */
    --gray-100: #f3f4f6;
    /* Secondary Backgrounds */
    --gray-200: #e5e7eb;
    /* Borders */
    --gray-300: #d1d5db;
    /* Icon colors, Disabled */
    --gray-400: #9ca3af;
    /* Placeholder text */
    --gray-500: #6b7280;
    /* Secondary Text */
    --gray-600: #4b5563;
    /* Body Text */
    --gray-700: #374151;
    /* Strong Body Text */
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success-bg: #dcfce7;
    --success-text: #166534;
    --success-border: #bbf7d0;
    --warning-bg: #fef9c3;
    --warning-text: #854d0e;
    --warning-border: #fde047;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --danger-border: #fecaca;
    --info-bg: #dbeafe;
    --info-text: #1e40af;
    --info-border: #bfdbfe;

    /* Spacing System */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --container-width: 1200px;
    /* Reduced for better readability */

    /* UI Finishes */
    --radius-sm: 0.375rem;
    /* 6px */
    --radius-md: 0.5rem;
    /* 8px */
    --radius-lg: 0.75rem;
    /* 12px */
    --radius-xl: 1rem;
    /* 16px */

    /* Shadows - Soft & Diffused */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-input: 0 1px 2px 0 rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', serif;
}

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

html {
    font-size: 16px;
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    /* 15px */
    line-height: 1.6;
    color: var(--gray-600);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
    /* Tighter headings */
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.125rem;
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-blue-hover);
    text-decoration: underline;
}

/* === Layout & Containers === */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #f8fafc, #e2e8f0);
    padding: var(--spacing-md);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    /* Slightly tighter */
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Cards === */
.auth-card,
.card,
.stat-card,
.dashboard-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    /* Subtle border for definition */
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

a.stat-card {
    text-decoration: none;
    color: inherit;
    display: flex;
}

.auth-card {
    padding: 2.5rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* === Forms & Inputs (Enhanced) === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    /* 14px */
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--gray-900);
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-input);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:hover {
    border-color: var(--gray-400);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    /* Nice focus ring */
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === Buttons (Enhanced) === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
    text-decoration: none !important;
    /* Override underline */
}

.btn-primary {
    background-color: var(--brand-blue);
    color: var(--white);
    box-shadow: 0 1px 2px 0 rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: var(--brand-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background-color: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-outline:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.btn-block {
    width: 100%;
}

/* === Navigation === */
.navbar {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.navbar-leading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.navbar-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    min-width: 0;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-center {
    flex: 1 1 320px;
    display: flex;
    min-width: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
    min-width: 0;
}

.navbar-primary-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar-product-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.navbar-product-logo:hover,
.navbar-product-logo:focus-visible {
    text-decoration: none;
}

.product-logo-img {
    height: 60px;
    width: auto;
    display: block;
}

.product-logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #143c60;
    white-space: nowrap;
}

.product-logo-text span {
    color: #1969b4;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    flex: 0 0 auto;
}

.logo-img {
    height: 55px;
    width: auto;
}

.navbar-mobile-toggle,
.navbar-mobile-links {
    display: none;
}

/* Compact desktop: tighten controls while preserving complete labels. */
@media (max-width: 1399px) {
    .navbar .container {
        gap: 0.375rem;
    }

    .navbar-leading {
        gap: 0.375rem;
    }

    .navbar-menu {
        gap: 0.375rem;
    }

    .product-logo-img {
        height: 46px;
    }

    .search-shortcut {
        display: none;
    }
}

/* When equal center tracks no longer fit, use one collision-free flex flow. */
@media (max-width: 1279px) {
    .navbar .container {
        display: flex;
    }

    .navbar-leading {
        flex: 1 1 auto;
    }

    .navbar-menu {
        flex: 0 0 auto;
    }
}

/* Tablet: selectors stay operable as labelled, accessible icon buttons. */
@media (min-width: 768px) and (max-width: 999px) {
    .navbar-primary-nav .nav-dropdown-btn .dropdown-label {
        display: none;
    }

    .navbar-primary-nav .nav-dropdown-btn {
        gap: 0.25rem;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }

    .navbar-primary-nav .nav-icon {
        margin: 0;
    }
}

.nav-link {
    color: var(--gray-600);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-blue);
    background-color: var(--brand-blue-light);
    text-decoration: none;
}

.main-content {
    flex: 1;
}

.subscription-alert-banner {
    background: linear-gradient(90deg, #fff7ed 0%, #fffbeb 100%);
    border-bottom: 1px solid #fed7aa;
}

.subscription-alert-banner__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.subscription-alert-banner__title {
    color: #9a3412;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.subscription-alert-banner__summary {
    color: #9a3412;
    font-size: 0.9rem;
}

.subscription-alert-banner__items {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.subscription-alert-banner__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #fdba74;
    border-radius: 999px;
    color: #9a3412;
    font-size: 0.8125rem;
    text-decoration: none;
}

.subscription-alert-banner__item:hover {
    color: #7c2d12;
    text-decoration: none;
    background: #ffffff;
}

.subscription-alert-banner__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* === Dashboard Layout === */
.dashboard {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
}

.sidebar-header {
    margin-bottom: var(--spacing-lg);
}

.app-sidebar {
    position: relative;
    transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
}

.app-sidebar-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-sidebar-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.15s ease;
}

.app-sidebar-toggle-row {
    padding: 0 12px 10px;
}

.app-sidebar-inline-toggle {
    width: 100%;
    height: 32px;
    border-radius: 7px;
    border: 1px solid #dbe3ee;
    background: #ffffff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.app-sidebar-inline-toggle:hover {
    background: #f8fafc;
    border-color: #bfdbfe;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.app-sidebar-toggle-symbol {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar.is-collapsed {
    width: 68px !important;
}

.sidebar.app-sidebar.is-collapsed {
    padding-left: 8px;
    padding-right: 8px;
}

.app-sidebar.is-collapsed .app-sidebar-toggle-symbol {
    transform: rotate(180deg);
}

.app-sidebar.is-collapsed .workspace-selector,
.app-sidebar.is-collapsed .sidebar-nav > .nav-dropdown {
    display: none !important;
}

.app-sidebar.is-collapsed .app-sidebar-title,
.app-sidebar.is-collapsed .workspace-selector,
.app-sidebar.is-collapsed .nav-dropdown,
.app-sidebar.is-collapsed .sidebar-footer,
.app-sidebar.is-collapsed .sidebar-link span:not(.nav-icon),
.app-sidebar.is-collapsed .nav-dropdown .dropdown-label,
.app-sidebar.is-collapsed .nav-dropdown .dropdown-arrow {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.app-sidebar.is-collapsed .app-sidebar-header {
    justify-content: center;
}

.app-sidebar.is-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.65rem;
}

.app-sidebar.is-collapsed .app-sidebar-toggle-row {
    padding: 0 0 10px;
}

.app-sidebar-mobile-toggle,
.app-sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .app-sidebar-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 210;
        width: 38px;
        height: 38px;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        background: #ffffff;
        color: #334155;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    }

    .app-sidebar-mobile-toggle svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
    }

    .app-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 205;
        transform: translateX(-100%);
        width: 260px !important;
        box-shadow: 4px 0 16px rgba(15, 23, 42, 0.15);
        overflow-y: auto;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-sidebar.is-collapsed {
        width: 260px !important;
    }

    .app-sidebar.is-collapsed .workspace-selector,
    .app-sidebar.is-collapsed .sidebar-nav > .nav-dropdown {
        display: block !important;
    }

    .app-sidebar.is-collapsed .app-sidebar-title,
    .app-sidebar.is-collapsed .workspace-selector,
    .app-sidebar.is-collapsed .nav-dropdown,
    .app-sidebar.is-collapsed .sidebar-footer,
    .app-sidebar.is-collapsed .sidebar-link span:not(.nav-icon),
    .app-sidebar.is-collapsed .nav-dropdown .dropdown-label,
    .app-sidebar.is-collapsed .nav-dropdown .dropdown-arrow {
        opacity: 1;
        position: static;
        pointer-events: auto;
    }

    .app-sidebar.is-collapsed .app-sidebar-header {
        justify-content: space-between;
    }

    .app-sidebar.is-collapsed .sidebar-link {
        justify-content: flex-start;
        padding: 0.65rem 1rem;
    }

    .app-sidebar-toggle-row {
        display: none;
    }

    .app-sidebar-backdrop.is-visible {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 204;
    }
}

.workspace-selector {
    position: relative;
}

.workspace-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    text-align: left;
    color: var(--gray-900);
}

.workspace-btn:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.workspace-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.workspace-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    color: var(--gray-400);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.workspace-btn:hover .dropdown-arrow {
    color: var(--brand-blue);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: var(--gray-600);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    text-decoration: none;
}

.sidebar-link:hover {
    background-color: var(--gray-100);
    color: var(--gray-800);
    border-color: var(--gray-200);
}

.sidebar-link.active {
    background-color: var(--brand-blue-light);
    border-color: rgba(37, 99, 235, 0.2);
    font-weight: 600;
    color: var(--brand-blue);
    box-shadow: inset 3px 0 0 var(--brand-blue);
}

.nav-icon {
    font-size: 1.125rem;
    color: var(--gray-400);
    transition: color 0.2s;
}

.sidebar-link:hover .nav-icon,
.sidebar-link.active .nav-icon {
    color: var(--brand-blue);
}

.dashboard-main {
    flex: 1;
    padding: var(--spacing-xl);
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-icon {
    background-color: var(--brand-blue-light);
    color: var(--brand-blue);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    line-height: 1;
}

.stat-content p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}

/* === Tables === */
.table-container,
.work-items-table {
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    /* For Rounded Corners on table */
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
}

.table th {
    background-color: var(--gray-50);
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.875rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table td {
    padding: 1rem 1.5rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* === Badges - Refined === */
.badge,
.priority {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

/* Badge colors matching variables */
.badge-todo {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.badge-in_progress {
    background: var(--info-bg);
    color: var(--info-text);
    border: 1px solid var(--info-border);
}

.badge-done {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.priority-high {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.priority-medium {
    background: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid var(--warning-border);
}

.priority-low {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

/* === Footer === */
.footer {
    margin-top: auto;
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* === Utilities === */
.text-muted {
    color: var(--gray-500);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.section-header h2 {
    font-size: 1.125rem;
    color: var(--gray-800);
    margin: 0;
}

/* === Navbar Dropdowns === */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s;
}

.nav-dropdown-btn:hover,
.nav-dropdown-btn.active {
    background-color: var(--gray-50);
    color: var(--brand-blue);
}

.nav-dropdown-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-dropdown-btn .dropdown-label {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    padding: 0.5rem;
    display: none;
    z-index: 100;
    animation: slideDown 0.2s ease-out;
    max-height: 16rem;
    overflow-y: auto;
}

.nav-dropdown-menu.show {
    display: block;
}

/* The profile trigger sits at the right edge of the navbar. */
#profile-dropdown .nav-dropdown-menu {
    left: auto;
    right: 0;
    width: 260px;
    min-width: 0;
    max-width: calc(100vw - 16px);
}

/* Keep group search in place while its results scroll. */
#group-dropdown .nav-dropdown-menu {
    max-height: min(70vh, 28rem);
    overflow: hidden;
}

#group-dropdown .nav-dropdown-menu.show {
    display: flex;
    flex-direction: column;
}

#group-dropdown .group-nav-search {
    flex: 0 0 auto;
    padding: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
}

#group-nav-list {
    min-height: 0;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.1s;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: var(--gray-50);
    color: var(--brand-blue);
    text-decoration: none;
}

.dropdown-item.selected {
    background-color: var(--brand-blue-light);
    color: var(--brand-blue);
    font-weight: 600;
}

.dropdown-loading,
.dropdown-empty {
    padding: 1rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Custom Breadcrumbs - Capsule Style */
.custom-breadcrumb-container {
    margin-bottom: 2rem;
}

/* === Generic Dropdowns === */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    padding: 0.5rem;
    display: none;
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
}

.dropdown-menu.show {
    display: block;
}

.custom-breadcrumb {
    display: inline-flex !important;
    align-items: center;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    list-style: none !important;
    margin: 0 !important;
}

.custom-breadcrumb-item {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.95rem;
}

.custom-breadcrumb-item a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.custom-breadcrumb-item a:hover {
    color: #2563eb;
}

.custom-breadcrumb-item+.custom-breadcrumb-item::before {
    content: "›";
    font-size: 1.25rem;
    margin: 0 0.75rem;
    color: #d1d5db;
    line-height: 1;
    font-family: inherit;
}

.custom-breadcrumb-item.active {
    color: #2563eb;
    font-weight: 600;
}

.custom-breadcrumb-icon {
    font-size: 1.1em;
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 2px;
}

/* === Footer Utilities (User Request) === */
.text-center {
    text-align: center !important;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.float-md-left {
    float: left;
}

@media (max-width: 768px) {
    .float-md-left {
        float: none;
    }

    .text-sm-center {
        text-align: center;
    }
}

/* Colors */
.blue-grey.lighten-2 {
    color: #90a4ae;
    /* Material Blue Grey 300 approx */
}

.grey.darken-2 {
    color: #616161;
    /* Material Grey 700 */
}

/* Typography & Layout */
.text-bold-800 {
    font-weight: 800;
}

.d-block {
    display: block;
}

.d-md-inline-block {
    display: inline-block;
}

@media (max-width: 768px) {
    .d-md-inline-block {
        display: block;
    }
}

.mb-0 {
    margin-bottom: 0 !important;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Adjust footer for height */
.footer {
    padding: 1rem 0;
    height: auto;
    min-height: 60px;
}

/* === View Toggles === */
.view-toggle {
    display: flex;
    gap: 1rem;
}

/* === Global Search === */
.nav-search {
    position: relative;
    width: 100%;
    max-width: 460px;
    flex: 1 1 460px;
    min-width: 0;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
}

.search-input-wrapper:focus-within {
    background: var(--white);
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    font-size: 0.875rem;
    margin-right: 0.5rem;
    color: var(--gray-400);
}

.search-input {
    border: none;
    background: transparent;
    font-size: 0.875rem;
    width: 100%;
    min-width: 0;
    outline: none;
    color: var(--gray-700);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-shortcut {
    font-size: 0.625rem;
    background: var(--gray-200);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    color: var(--gray-500);
    margin-left: 0.5rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 350px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-results-section {
    padding: 0.5rem;
}

.search-results-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    color: var(--gray-700);
    transition: background 0.15s;
}

.search-result-item:hover {
    background: var(--gray-50);
}

.search-result-icon {
    font-size: 1rem;
}

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

.search-result-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--gray-500);
}

.search-loading {
    color: var(--gray-400);
}

/* === Profile Dropdown === */
.profile-btn {
    padding: 0.25rem 0.5rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--brand-blue-light);
    color: var(--brand-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* These overrides follow the base dropdown rules so they win at compact widths. */
@media (max-width: 1399px) {
    .nav-dropdown-btn {
        gap: 0.375rem;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }
}

@media (max-width: 767px) {
    .navbar {
        height: auto;
        min-height: var(--header-height);
    }

    .navbar .container {
        display: grid;
        grid-template-columns: auto minmax(72px, 1fr) auto auto;
        gap: 0.375rem;
        padding: 0.375rem 0.5rem !important;
    }

    .navbar-brand {
        grid-column: 1;
        min-width: 0;
    }

    .logo-img {
        width: clamp(104px, 31vw, 140px);
        height: auto;
        max-height: 46px;
        object-fit: contain;
    }

    .navbar-leading,
    .navbar-menu,
    .navbar-right {
        display: contents;
    }

    .navbar-center {
        grid-column: 2;
        min-width: 0;
    }

    .navbar-product-logo {
        display: none;
    }

    .nav-search {
        max-width: none;
        min-width: 0;
    }

    .search-input-wrapper {
        padding: 0.45rem 0.5rem;
    }

    .search-icon {
        margin-right: 0.25rem;
    }

    .navbar-mobile-toggle {
        grid-column: 3;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        color: var(--gray-700);
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        cursor: pointer;
    }

    .navbar-mobile-toggle:hover,
    .navbar-mobile-toggle[aria-expanded="true"] {
        color: var(--brand-blue);
        background: var(--brand-blue-light);
    }

    #profile-dropdown {
        grid-column: 4;
    }

    #profile-dropdown .profile-btn {
        padding: 0.25rem;
    }

    #profile-dropdown .dropdown-label,
    #profile-dropdown .dropdown-arrow {
        display: none;
    }

    #profile-dropdown .nav-dropdown-menu {
        right: 0;
        left: auto;
    }

    .navbar-primary-nav {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
        padding: 0.5rem;
        background: var(--white);
        border-top: 1px solid var(--gray-200);
    }

    .navbar-primary-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.125rem;
    }

    .navbar-primary-nav .nav-dropdown,
    .navbar-primary-nav .nav-dropdown-btn {
        width: 100%;
    }

    .navbar-primary-nav .nav-dropdown-btn {
        justify-content: flex-start;
        padding: 0.625rem 0.75rem;
    }

    .navbar-primary-nav .nav-dropdown-btn .dropdown-arrow {
        margin-left: auto;
    }

    .navbar-primary-nav .nav-dropdown-menu {
        position: static;
        width: 100%;
        margin: 0.25rem 0 0;
        box-shadow: none;
    }

    .navbar-mobile-links {
        display: grid;
        gap: 0.125rem;
        margin-top: 0.375rem;
        padding-top: 0.375rem;
        border-top: 1px solid var(--gray-200);
    }
}

/* === Password Toggle === */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 10px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--gray-500);
    user-select: none;
}

.password-toggle:hover {
    color: var(--gray-700);
}

/* Ensure modal is above everything */
/* Ensure modal is above everything */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 2000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5);
    /* Black w/ opacity */
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

/* === Modals (New) === */
.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--gray-200);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background-color: var(--gray-50);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.close {
    color: var(--gray-400);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.close:hover,
.close:focus {
    color: var(--danger-text);
    background-color: var(--danger-bg);
}

/* ================================
   Notification Toast Styles
   ================================ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in-out;
    pointer-events: auto;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Success Notification */
.notification-success {
    background-color: var(--success-bg);
    color: var(--success-text);
    border-left: 4px solid #22c55e;
}

/* Error Notification */
.notification-error {
    background-color: var(--danger-bg);
    color: var(--danger-text);
    border-left: 4px solid #ef4444;
}

/* Info Notification */
.notification-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--brand-blue);
}

/* Warning Notification */
.notification-warning {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    border-left: 4px solid #f59e0b;
}

@media (max-width: 768px) {
    .subscription-alert-banner__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .subscription-alert-banner__actions {
        width: 100%;
    }

    .subscription-alert-banner__actions .btn {
        flex: 1 1 auto;
    }
}
