/**
 * Consolidated Application CSS - Admissions10
 * =====================================================
 * Single maintainable CSS file with whitelabelling support.
 * Organized by component for easy troubleshooting.
 *
 * NAMING CONVENTION:
 * - sidenav-*    : Admin sidebar navigation
 * - nav-*        : Navigation items within sidenav
 * - public-*     : Public-facing header/nav (HeaderLayout)
 * - header-*     : Header actions, dropdowns
 * - topbar-*     : Admin topbar
 * - cart-*       : Shopping cart
 * - user-*       : User menu/avatar
 * - auth-*       : Authentication buttons
 * - fsh-*        : Custom FSH components
 *
 * Table of Contents:
 * 1. CSS Variables & Theme Foundation
 * 2. Base & Global Styles
 * 3. Layout Components
 * 4. Sidenav Components (Admin Sidebar)
 * 5. Topbar Components (Admin Header)
 * 6. Public Header Components (HeaderLayout)
 * 7. Button Components (FshButton)
 * 8. Form Components
 * 9. Table Components
 * 10. Card Components
 * 11. Badge & Status Components
 * 12. Modal & Dialog Components
 * 13. Animation & Transitions
 * 14. Portal/CMS Components
 * 15. Auth/Login Pages
 * 16. Utility Classes
 * 17. Dark Mode Overrides
 * 18. Responsive/Mobile Styles
 */

/* ============================================
   1. CSS VARIABLES & THEME FOUNDATION
   ============================================ */

:root {
    /* Brand Colors - Primary Palette */
    --theme-primary: #1ab394;
    --theme-primary-rgb: 26, 179, 148;
    --theme-primary-emphasis: #16987e;
    --theme-primary-subtle: rgba(26, 179, 148, 0.1);
    --theme-primary-border: rgba(26, 179, 148, 0.2);
    --theme-primary-light: #20c9a6;
    --theme-primary-950: #0d3d35;
    --theme-primary-900: #0f4f44;
    --theme-primary-800: #14755f;

    /* Secondary Colors */
    --theme-secondary: #1c84c6;
    --theme-secondary-rgb: 28, 132, 198;
    --theme-secondary-emphasis: #1872ab;
    --theme-secondary-subtle: rgba(28, 132, 198, 0.1);

    /* Semantic Colors */
    --theme-success: #1ab394;
    --theme-success-rgb: 26, 179, 148;
    --theme-success-emphasis: #16987e;
    --theme-success-subtle: rgba(26, 179, 148, 0.1);

    --theme-danger: #ed5565;
    --theme-danger-rgb: 237, 85, 101;
    --theme-danger-emphasis: #d64654;
    --theme-danger-subtle: rgba(237, 85, 101, 0.1);

    --theme-warning: #f8ac59;
    --theme-warning-rgb: 248, 172, 89;
    --theme-warning-emphasis: #f69a3a;
    --theme-warning-subtle: rgba(248, 172, 89, 0.1);

    --theme-info: #23c6c8;
    --theme-info-rgb: 35, 198, 200;
    --theme-info-emphasis: #1fb1b3;
    --theme-info-subtle: rgba(35, 198, 200, 0.1);

    --theme-purple: #8b5cf6;
    --theme-purple-emphasis: #7c3aed;
    --theme-teal: var(--theme-primary);

    /* Gray Scale */
    --theme-gray-50: #f9fafb;
    --theme-gray-100: #f3f4f6;
    --theme-gray-200: #e5e7eb;
    --theme-gray-300: #d1d5db;
    --theme-gray-400: #9ca3af;
    --theme-gray-500: #6b7280;
    --theme-gray-600: #4b5563;
    --theme-gray-700: #374151;
    --theme-gray-800: #1f2937;
    --theme-gray-900: #111827;

    /* Background Colors */
    --bg-body: #f8f9fa;
    --bg-surface: #ffffff;
    --bg-tertiary: #f3f4f6;
    --bg-surface-secondary: #f3f4f6;
    --bg-surface-tertiary: #ffffff;
    --bg-card: #ffffff;
    --bg-overlay-dark: rgba(0, 0, 0, 0.7);

    /* Text Colors */
    --text-primary: #2f4050;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-inverse: #ffffff;
    --text-disabled: #c0c0c0;

    /* Border Colors */
    --border-color: #e5e7eb;
    --border-color-dark: #d1d5db;

    /* Sidebar Variables */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --sidebar-mobile-width: 300px;
    --sidebar-bg: #2f4050;
    --sidebar-text: rgba(255, 255, 255, 0.85);
    --sidebar-text-hover: #ffffff;
    --sidebar-text-active: var(--theme-primary);
    --sidebar-icon-color: rgba(255, 255, 255, 0.6);
    --sidebar-icon-hover: rgba(255, 255, 255, 0.85);
    --sidebar-icon-active: var(--theme-primary);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --sidebar-active-bg: rgba(26, 179, 148, 0.15);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-title-color: rgba(255, 255, 255, 0.4);

    /* Layout Variables */
    --topbar-height: 64px;
    --mobile-nav-height: 60px;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;

    /* Typography */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Z-Index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;

    /* Shadows */
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Sidenav Specific */
    --sidenav-width-expanded: 280px;
    --sidenav-width-collapsed: 70px;
    --sidenav-header-height: 64px;
    --sidenav-transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --sidenav-transition-fast: 200ms ease;
    --sidenav-active-indicator-width: 4px;
    --sidenav-item-padding-x: 16px;
    --sidenav-item-padding-y: 10px;
    --sidenav-item-margin: 2px 8px;
    --sidenav-item-radius: 8px;
    --sidenav-item-gap: 12px;
    --sidenav-submenu-indent: 48px;
    --sidenav-icon-size: 22px;
    --sidenav-badge-size: 20px;
    --sidenav-badge-font-size: 11px;
}

/* ============================================
   2. BASE & GLOBAL STYLES
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--theme-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--theme-primary-emphasis);
}

/* ========================================
   BLAZOR ERROR HANDLING
   ======================================== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ============================================
   3. LAYOUT COMPONENTS
   ============================================ */

/* Main Wrapper */
.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-body);
}

/* Content Page */
.content-page {
    margin-left: var(--sidenav-width-expanded);
    margin-top: var(--topbar-height);
    padding: var(--space-6);
    min-height: calc(100vh - var(--topbar-height));
    background-color: var(--bg-body);
    transition: margin-left var(--sidenav-transition);
    width: calc(100% - var(--sidenav-width-expanded));
}

.admin-content-page {
    margin-left: var(--sidenav-width-expanded);
    transition: margin-left var(--sidenav-transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
}

/* Main content area grows to push footer down */
.admin-content-page > .container-fluid:first-child,
.admin-content-page > div:first-child:not(.admin-footer):not(.navigation-loader) {
    flex: 1 0 auto;
}

/* Collapsed Sidebar States */
.sidebar-collapsed .content-page,
.sidebar-collapsed .admin-content-page {
    margin-left: var(--sidenav-width-collapsed);
    width: calc(100% - var(--sidenav-width-collapsed));
}

.sidebar-collapsed .app-topbar,
.sidebar-collapsed .topbar {
    left: var(--sidenav-width-collapsed);
}

/* ============================================
   4. SIDENAV COMPONENTS (Admin Sidebar)
   ============================================ */

/* Main Sidenav Container */
.sidenav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: var(--sidenav-width-expanded);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    z-index: var(--z-fixed);
    display: flex;
    flex-direction: column;
    transition: width var(--sidenav-transition), box-shadow var(--sidenav-transition);
    overflow: hidden;
    will-change: width;
}

/* Collapsed State */
.sidenav.collapsed {
    width: var(--sidenav-width-collapsed);
}

.sidenav.collapsed:hover {
    width: var(--sidenav-width-expanded);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Backdrop Overlay */
.sidenav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: calc(var(--z-fixed) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--sidenav-transition), visibility var(--sidenav-transition);
    cursor: pointer;
}

.sidenav-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* Header Section */
.sidenav-header {
    display: flex;
    align-items: center;
    padding: 0 16px;
    min-height: var(--sidenav-header-height);
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    overflow: hidden;
}

.sidenav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.sidenav-logo:hover {
    text-decoration: none;
}

.sidenav-logo img {
    height: 36px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.sidenav-logo-placeholder {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidenav-logo-text {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-inverse);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
    transition: opacity var(--sidenav-transition);
}

.sidenav.collapsed .sidenav-logo-text {
    opacity: 0;
    width: 0;
}

.sidenav.collapsed:hover .sidenav-logo-text {
    opacity: 1;
    width: auto;
}

/* Mobile Close Button */
.sidenav-mobile-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: var(--text-inverse);
    cursor: pointer;
    z-index: 10;
    transition: all var(--sidenav-transition-fast);
    align-items: center;
    justify-content: center;
}

.sidenav-mobile-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Collapse Toggle Button */
.sidenav-collapse-toggle {
    display: none;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--sidebar-border);
    border-radius: 6px;
    color: var(--sidebar-text);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--sidenav-transition-fast);
    align-items: center;
    justify-content: center;
}

.sidenav-collapse-toggle:hover {
    background: var(--sidebar-hover-bg);
    color: var(--text-inverse);
}

.sidenav-collapse-toggle i {
    transition: transform var(--sidenav-transition);
}

.sidenav.collapsed .sidenav-collapse-toggle i {
    transform: rotate(180deg);
}

/* Search Section */
.sidenav-search-wrapper {
    padding: 12px 16px;
    flex-shrink: 0;
}

.sidenav-search-input {
    position: relative;
}

.sidenav-search-input input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-inverse);
    font-size: 14px;
    transition: all var(--sidenav-transition-fast);
    outline: none;
}

.sidenav-search-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.sidenav-search-input input:focus {
    border-color: var(--theme-primary);
    background: rgba(255, 255, 255, 0.15);
}

.sidenav-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    font-size: 18px;
}

.sidenav-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.sidenav-search-input.has-value .sidenav-search-clear {
    display: flex;
}

/* Collapsed Search */
.sidenav.collapsed .sidenav-search-wrapper {
    padding: 12px 14px;
}

.sidenav.collapsed .sidenav-search-input input {
    width: 42px;
    padding: 0;
    text-indent: -9999px;
    cursor: pointer;
}

.sidenav.collapsed .sidenav-search-icon {
    left: 50%;
    transform: translate(-50%, -50%);
}

.sidenav.collapsed:hover .sidenav-search-wrapper {
    padding: 12px 16px;
}

.sidenav.collapsed:hover .sidenav-search-input input {
    width: 100%;
    padding: 0 12px 0 40px;
    text-indent: 0;
    cursor: text;
}

.sidenav.collapsed:hover .sidenav-search-icon {
    left: 12px;
    transform: translateY(-50%);
}

/* Favorites Section */
.sidenav-favorites {
    padding: 8px 8px 12px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidenav-favorites-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--sidebar-title-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidenav-favorites-header i {
    color: var(--theme-warning);
}

.sidenav-favorites-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Nav Content Scrollable Area */
.sidenav-nav-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
}

.sidenav-nav-content::-webkit-scrollbar {
    width: 4px;
}

.sidenav-nav-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidenav-nav-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Nav Section Title */
.nav-section-title {
    display: flex;
    align-items: center;
    padding: 16px 16px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--sidebar-title-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
}

.sidenav.collapsed .nav-section-title {
    justify-content: center;
    padding: 16px 8px 8px;
}

.sidenav.collapsed .nav-section-title span {
    opacity: 0;
    width: 0;
}

.sidenav.collapsed:hover .nav-section-title {
    justify-content: flex-start;
    padding: 16px 16px 8px;
}

.sidenav.collapsed:hover .nav-section-title span {
    opacity: 1;
    width: auto;
}

.sidenav.collapsed .nav-section-title::before {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sidebar-border);
}

.sidenav.collapsed:hover .nav-section-title::before {
    display: none;
}

/* Section Headers in Submenu */
.section-header-wrapper {
    pointer-events: none;
}

.nav-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 6px;
    margin: 8px 8px 0;
    font-size: 10px;
    font-weight: 700;
    color: var(--sidebar-title-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    overflow: hidden;
    border-top: 1px solid var(--sidebar-border);
}

.nav-section-header:first-child,
.section-header-wrapper:first-child .nav-section-header {
    border-top: none;
    margin-top: 0;
}

.section-header-icon {
    font-size: 14px;
    opacity: 0.7;
}

.section-header-text {
    flex: 1;
    opacity: 1;
    transition: opacity var(--sidenav-transition);
}

/* Nav List */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item-wrapper {
    position: relative;
}

/* Nav Item */
.nav-item {
    display: flex;
    align-items: center;
    gap: var(--sidenav-item-gap);
    padding: var(--sidenav-item-padding-y) var(--sidenav-item-padding-x);
    margin: var(--sidenav-item-margin);
    border-radius: var(--sidenav-item-radius);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--sidenav-transition-fast);
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.nav-item:hover {
    color: var(--sidebar-text-hover);
    background: var(--sidebar-hover-bg);
    text-decoration: none;
}

/* Active State */
.nav-item.active {
    color: var(--sidebar-text-active);
    background: var(--sidebar-active-bg);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: var(--sidenav-active-indicator-width);
    height: 60%;
    background: var(--theme-primary);
    border-radius: 0 4px 4px 0;
}

/* Nav Item Icon */
.nav-item-icon {
    width: var(--sidenav-icon-size);
    height: var(--sidenav-icon-size);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--sidebar-icon-color);
    flex-shrink: 0;
    transition: all var(--sidenav-transition-fast);
}

.nav-item:hover .nav-item-icon {
    color: var(--sidebar-icon-hover);
}

.nav-item.active .nav-item-icon {
    color: var(--sidebar-icon-active);
}

/* Nav Item Text */
.nav-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
    transition: opacity var(--sidenav-transition);
}

.sidenav.collapsed .nav-item-text {
    opacity: 0;
    width: 0;
}

.sidenav.collapsed:hover .nav-item-text {
    opacity: 1;
    width: auto;
}

/* Nav Item Arrow */
.nav-item-arrow {
    font-size: 16px;
    color: var(--sidebar-title-color);
    transition: transform var(--sidenav-transition-fast);
    flex-shrink: 0;
}

.nav-item.expanded .nav-item-arrow {
    transform: rotate(180deg);
}

.sidenav.collapsed .nav-item-arrow {
    opacity: 0;
}

.sidenav.collapsed:hover .nav-item-arrow {
    opacity: 1;
}

/* Nav Item Badge */
.nav-item-badge {
    min-width: var(--sidenav-badge-size);
    height: var(--sidenav-badge-size);
    padding: 0 6px;
    background: var(--theme-primary);
    color: var(--text-inverse);
    font-size: var(--sidenav-badge-font-size);
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-item-badge.badge-success { background: var(--theme-success); }
.nav-item-badge.badge-warning { background: var(--theme-warning); }
.nav-item-badge.badge-danger { background: var(--theme-danger); }

.sidenav.collapsed .nav-item-badge {
    opacity: 0;
    width: 0;
    padding: 0;
    min-width: 0;
}

.sidenav.collapsed:hover .nav-item-badge {
    opacity: 1;
    width: auto;
    padding: 0 6px;
    min-width: var(--sidenav-badge-size);
}

/* Favorite Toggle */
.favorite-toggle {
    opacity: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--sidebar-title-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--sidenav-transition-fast);
}

.nav-item:hover .favorite-toggle {
    opacity: 1;
}

.favorite-toggle:hover {
    background: rgba(251, 191, 36, 0.2);
    color: var(--theme-warning);
}

.favorite-toggle.is-favorite {
    opacity: 1;
    color: var(--theme-warning);
}

.sidenav.collapsed .favorite-toggle {
    display: none;
}

.sidenav.collapsed:hover .favorite-toggle {
    display: flex;
}

/* Submenu */
.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--sidenav-transition);
}

.nav-submenu.expanded {
    max-height: 1000px;
}

.nav-submenu .nav-item {
    padding-left: var(--sidenav-submenu-indent);
    font-size: 13px;
    min-height: 40px;
}

.nav-submenu .nav-item-icon {
    font-size: 18px;
    width: 20px;
    height: 20px;
}

.nav-submenu .nav-submenu .nav-item {
    padding-left: calc(var(--sidenav-submenu-indent) + 16px);
}

.sidenav.collapsed .nav-submenu {
    max-height: 0 !important;
}

.sidenav.collapsed:hover .nav-submenu.expanded {
    max-height: 1000px !important;
}

/* Collapsed Tooltips */
.sidenav.collapsed:not(:hover) .nav-item[data-title]::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--sidenav-transition-fast);
    z-index: 1000;
}

.sidenav.collapsed:not(:hover) .nav-item:hover[data-title]::after {
    opacity: 1;
    visibility: visible;
}

/* Search Highlighting */
.nav-item mark {
    background: rgba(251, 191, 36, 0.3);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* No Results State */
.sidenav-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--sidebar-title-color);
    text-align: center;
}

.sidenav-no-results i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.sidenav-no-results span {
    font-size: 14px;
}

/* Loading State */
.sidenav-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.sidenav-loading .spinner-border {
    width: 24px;
    height: 24px;
    border-width: 2px;
    color: var(--theme-primary);
}

/* ============================================
   5. TOPBAR COMPONENTS (Admin Header)
   ============================================ */

.app-topbar,
.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    margin-left: var(--sidenav-width-expanded);
    height: var(--topbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: margin-left 0.25s ease-in-out;
}

.sidebar-collapsed .app-topbar,
.sidebar-collapsed .topbar {
    margin-left: var(--sidenav-width-collapsed);
}

/* Override container-fluid padding for topbar-menu */
.topbar-menu,
.app-topbar .container-fluid,
.topbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 1.25rem; /* Explicit padding like backup */
    gap: 0.5rem;
}

.topbar-item {
    display: flex;
    align-items: center;
}

/* Header action items inside topbar */
.topbar .header-action-item,
.app-topbar .header-action-item,
.topbar-item .header-action-item {
    display: flex;
    align-items: center;
}

/* Topbar links */
.topbar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
}

.topbar-link:hover {
    color: var(--theme-primary);
    background: var(--bg-tertiary);
}

/* ========================================
   MODERN MENU TOGGLE BUTTON
   Animated hamburger with primary color styling
   ======================================== */

:root {
    --menu-toggle-size: 44px;
    --menu-toggle-bar-width: 22px;
    --menu-toggle-bar-height: 2px;
    --menu-toggle-bar-spacing: 6px;
    --menu-toggle-bar-radius: 2px;
    --menu-toggle-bg: var(--theme-primary);
    --menu-toggle-bg-hover: var(--theme-primary-emphasis);
    --menu-toggle-bg-active: var(--theme-primary-emphasis);
    --menu-toggle-bar-color: #ffffff;
    --menu-toggle-label-color: #ffffff;
    --menu-toggle-shadow: 0 4px 14px 0 rgba(var(--theme-primary-rgb), 0.35);
    --menu-toggle-shadow-hover: 0 6px 20px 0 rgba(var(--theme-primary-rgb), 0.45);
    --menu-toggle-transition: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --menu-toggle-transition-fast: 200ms ease;
}

.menu-toggle {
    appearance: none;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    height: var(--menu-toggle-size);
    min-width: var(--menu-toggle-size);
    background: var(--menu-toggle-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: var(--menu-toggle-shadow);
    transition: all var(--menu-toggle-transition-fast);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.menu-toggle:hover {
    background: var(--menu-toggle-bg-hover);
    box-shadow: var(--menu-toggle-shadow-hover);
    transform: translateY(-2px);
}

.menu-toggle:active {
    background: var(--menu-toggle-bg-active);
    transform: translateY(0) scale(0.98);
    box-shadow: var(--menu-toggle-shadow);
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 3px;
}

.menu-toggle-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--menu-toggle-size);
    height: var(--menu-toggle-size);
    position: relative;
    flex-shrink: 0;
}

.menu-toggle-inner,
.menu-toggle-inner::before,
.menu-toggle-inner::after {
    display: block;
    width: var(--menu-toggle-bar-width);
    height: var(--menu-toggle-bar-height);
    background-color: var(--menu-toggle-bar-color);
    border-radius: var(--menu-toggle-bar-radius);
    position: absolute;
    transition: transform var(--menu-toggle-transition),
                opacity 150ms ease,
                background-color 150ms ease;
}

.menu-toggle-inner {
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle-inner::before,
.menu-toggle-inner::after {
    content: "";
    left: 0;
}

.menu-toggle-inner::before {
    top: calc(-1 * var(--menu-toggle-bar-spacing) - var(--menu-toggle-bar-height));
}

.menu-toggle-inner::after {
    bottom: calc(-1 * var(--menu-toggle-bar-spacing) - var(--menu-toggle-bar-height));
}

/* Active state (X transformation) */
.menu-toggle.is-active .menu-toggle-inner {
    background-color: transparent !important;
}

.menu-toggle.is-active .menu-toggle-inner::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.is-active .menu-toggle-inner::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Active state turns red */
.menu-toggle.is-active {
    background: var(--theme-danger);
    box-shadow: 0 4px 14px 0 rgba(var(--theme-danger-rgb), 0.35);
}

.menu-toggle.is-active:hover {
    background: var(--theme-danger-emphasis);
    box-shadow: 0 6px 20px 0 rgba(var(--theme-danger-rgb), 0.45);
}

.menu-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--menu-toggle-label-color);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding-right: 14px;
    white-space: nowrap;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity var(--menu-toggle-transition-fast),
                max-width var(--menu-toggle-transition-fast),
                padding var(--menu-toggle-transition-fast);
}

/* Show label on hover (desktop only) */
@media (hover: hover) and (min-width: 768px) {
    .menu-toggle:hover .menu-toggle-label {
        opacity: 1;
        max-width: 60px;
    }
}

/* Ripple effect */
.menu-toggle::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: transform 400ms ease, opacity 400ms ease;
    pointer-events: none;
}

.menu-toggle:active::after {
    opacity: 1;
    transform: scale(2);
    transition: transform 0ms, opacity 0ms;
}

/* Mobile optimization */
@media (max-width: 767.98px) {
    .menu-toggle {
        --menu-toggle-size: 40px;
        --menu-toggle-bar-width: 20px;
        --menu-toggle-bar-spacing: 5px;
        border-radius: 10px;
    }

    .menu-toggle-label {
        display: none;
    }
}

/* On mobile, topbar starts at left edge */
@media (max-width: 991.98px) {
    .app-topbar,
    .topbar {
        margin-left: 0;
    }

    .topbar-menu,
    .app-topbar .container-fluid,
    .topbar .container-fluid {
        padding: 0 0.75rem;
    }

    .content-page,
    .admin-content-page {
        margin-left: 0;
    }
}

/* Dark mode adjustments */
[data-bs-theme="dark"] {
    --menu-toggle-shadow: 0 4px 20px 0 rgba(var(--theme-primary-rgb), 0.4);
    --menu-toggle-shadow-hover: 0 6px 28px 0 rgba(var(--theme-primary-rgb), 0.5);
}

/* Header Action Item */
.header-action-item {
    position: relative;
    display: flex;
    align-items: center;
}

/* Header Action Button */
.header-action-btn {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.header-action-btn:hover {
    color: var(--theme-primary);
    background: var(--theme-gray-100);
}

.header-action-btn:active {
    transform: scale(0.95);
}

.header-action-btn:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
}

.header-action-btn i {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-block;
    color: inherit;
}

/* Tabler Icons inside header buttons - ensure visibility */
.header-action-btn i.ti {
    font-family: 'tabler-icons' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Action Badge */
.header-action-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--theme-danger);
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.header-action-btn.has-badge .header-action-badge {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% { box-shadow: 0 0 0 0 rgba(237, 85, 101, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(237, 85, 101, 0); }
    100% { box-shadow: 0 0 0 0 rgba(237, 85, 101, 0); }
}

/* Connection Status */
.header-action-btn.connection-btn.connected { color: var(--theme-success); }
.header-action-btn.connection-btn.connected:hover { background: rgba(10, 207, 151, 0.1); }
.header-action-btn.connection-btn.connecting { color: var(--theme-warning); }
.header-action-btn.connection-btn.disconnected { color: var(--theme-danger); }

/* Theme Toggle - explicit visibility */
.theme-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn i {
    display: inline-block !important;
    font-size: 1.25rem;
}

.header-action-btn.theme-toggle-btn.light i {
    color: var(--theme-warning, #f8ac59);
}

.header-action-btn.theme-toggle-btn.dark i {
    color: var(--theme-purple, #7b70ef);
}

/* Theme toggle hover effects */
.header-action-btn.theme-toggle-btn:hover {
    background: var(--theme-gray-100);
}

.header-action-btn.theme-toggle-btn.dark:hover {
    background: rgba(123, 112, 239, 0.1);
}

/* Avatar Initials */
.avatar-initials {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-emphasis) 100%);
    color: white;
    font-weight: 600;
    font-size: 12px;
    border-radius: var(--radius-full);
}

/* ============================================
   6. PUBLIC HEADER COMPONENTS (HeaderLayout)
   ============================================ */

.public-header {
    background: var(--bg-surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid var(--border-color);
}

.public-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.public-navbar {
    padding: 0.375rem 0;
}

.public-navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Logo */
.public-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.public-logo:hover {
    opacity: 0.85;
}

.public-logo-image {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* Public Navigation */
.public-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.nav-item {
    position: relative;
}

.public-nav-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.public-nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--theme-primary);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.public-nav-link:hover {
    color: var(--theme-primary);
    background: transparent;
}

.public-nav-link:hover::after {
    width: calc(100% - 1rem);
}

.public-nav-link.active {
    color: var(--theme-primary);
    font-weight: 600;
}

.public-nav-link.active::after {
    width: calc(100% - 1rem);
}

.public-nav-icon {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.public-nav-link:hover .public-nav-icon {
    transform: scale(1.1);
}

/* Actions */
.public-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

/* User Button */
.public-user-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--theme-gray-50) 0%, white 100%);
    border: 1.5px solid var(--theme-gray-100);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.public-user-btn:hover {
    border-color: var(--theme-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.public-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar-container {
    position: relative;
}

.public-status {
    width: 10px;
    height: 10px;
    background: var(--theme-success);
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
}

/* Auth Buttons */
.public-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.public-auth-btn.login {
    color: var(--theme-primary);
    background: var(--theme-primary-subtle);
    border: 1.5px solid var(--theme-primary-border);
}

.public-auth-btn.login:hover {
    border-color: var(--theme-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.2);
}

.public-auth-btn.signup {
    color: white;
    background: var(--theme-primary);
    border: 1.5px solid transparent;
    box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb), 0.3);
}

.public-auth-btn.signup:hover {
    background: var(--theme-primary-emphasis);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb), 0.4);
}

.public-auth-btn.apply-now {
    color: white;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1.5px solid transparent;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    font-weight: 600;
}

.public-auth-btn.apply-now:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.public-auth-btn.track {
    color: var(--text-body);
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
}

.public-auth-btn.track:hover {
    color: var(--theme-primary);
    border-color: var(--theme-primary);
    background: rgba(var(--theme-primary-rgb), 0.05);
    transform: translateY(-2px);
}

/* Signup Dropdown */
.signup-btn-group {
    display: flex;
    align-items: stretch;
}

.signup-btn-group .public-auth-btn.signup {
    border-radius: 8px 0 0 8px;
}

.signup-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    background: var(--theme-primary-emphasis);
    border: 1.5px solid transparent;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.signup-toggle-btn:hover {
    background: var(--theme-primary-950);
}

.signup-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal-backdrop);
}

.signup-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 280px;
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    z-index: var(--z-modal);
    animation: slideDown 0.2s ease;
}

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

.signup-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.signup-menu-item:hover {
    background: var(--theme-primary-subtle);
}

.signup-menu-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.25rem;
}

.signup-menu-icon.institution {
    background: rgba(28, 132, 198, 0.1);
    color: var(--theme-secondary);
}

.signup-menu-icon.user {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

.signup-menu-text strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.signup-menu-text span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

/* Dropdown Menus */
.public-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 300px;
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: var(--z-dropdown);
}

.nav-item:hover .public-dropdown,
.header-action-item:hover .public-dropdown,
.public-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.public-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-header-spacer {
    justify-content: space-between;
}

.dropdown-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-title-icon {
    color: var(--theme-primary);
}

.view-all-link {
    font-size: 0.8125rem;
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

.public-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.public-dropdown-user-info h6 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.public-dropdown-user-info p {
    margin: 0.125rem 0 0 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.public-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    font-weight: 500;
}

.public-dropdown-item:hover {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
    padding-left: 1.25rem;
}

.public-dropdown-item i {
    font-size: 1.125rem;
    width: 20px;
}

.public-dropdown-item.logout-link {
    color: var(--theme-danger);
}

.public-dropdown-item.logout-link:hover {
    background: rgba(237, 85, 101, 0.1);
    color: var(--theme-danger);
}

.public-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* Cart Dropdown */
.public-cart-dropdown {
    min-width: 400px;
    max-height: 500px;
    overflow-y: auto;
}

.cart-scroll-container {
    max-height: 300px;
    overflow-y: auto;
}

.public-cart-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.public-cart-item:hover {
    background: var(--theme-gray-50);
}

.public-cart-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.public-cart-info {
    flex: 1;
}

.public-cart-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.public-cart-instructor {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 0.375rem 0;
}

.cart-instructor-icon {
    margin-right: 0.25rem;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-cart-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--theme-primary);
}

.cart-price-original {
    color: var(--text-muted);
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

.public-cart-remove {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--theme-danger);
    background: transparent;
    border: 1px solid var(--theme-danger);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.public-cart-remove:hover {
    background: var(--theme-danger);
    color: white;
}

.public-cart-total {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--theme-gray-50) 0%, white 100%);
    border-radius: 0 0 12px 12px;
}

.public-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cart-subtotal-label, .cart-total-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.cart-subtotal-value {
    font-weight: 600;
    color: var(--text-primary);
}

.cart-total-value {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--theme-primary);
}

.checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.75rem;
    background: var(--theme-primary);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.checkout-btn:hover {
    background: var(--theme-primary-emphasis);
    color: white;
    transform: translateY(-1px);
}

/* Empty State */
.public-empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.public-empty-state i {
    font-size: 3rem;
    color: var(--theme-gray-300);
    margin-bottom: 0.75rem;
    display: block;
}

.public-empty-state p {
    margin: 0;
    font-size: 0.9375rem;
}

/* ============================================
   7. BUTTON COMPONENTS (FshButton)
   ============================================ */

.fsh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

.fsh-btn:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
}

.fsh-btn:active:not(:disabled) {
    transform: scale(0.96);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.fsh-btn:disabled, .fsh-btn.fsh-btn-busy {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* FshButton Variants */
.fsh-btn-primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-emphasis) 100%);
    color: var(--text-inverse);
    border-color: var(--theme-primary);
    box-shadow: 0 2px 4px rgba(26, 179, 148, 0.2);
}

.fsh-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--theme-primary-emphasis) 0%, var(--theme-primary) 100%);
    box-shadow: 0 4px 8px rgba(26, 179, 148, 0.3);
    transform: translateY(-1px);
}

.fsh-btn-secondary {
    background: linear-gradient(135deg, var(--theme-secondary) 0%, var(--theme-secondary-emphasis) 100%);
    color: var(--text-inverse);
    border-color: var(--theme-secondary);
    box-shadow: 0 2px 4px rgba(28, 132, 198, 0.2);
}

.fsh-btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--theme-secondary-emphasis) 0%, var(--theme-secondary) 100%);
    box-shadow: 0 4px 8px rgba(28, 132, 198, 0.3);
    transform: translateY(-1px);
}

.fsh-btn-success {
    background: linear-gradient(135deg, var(--theme-success) 0%, var(--theme-success-emphasis) 100%);
    color: var(--text-inverse);
    border-color: var(--theme-success);
}

.fsh-btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--theme-success-emphasis) 0%, var(--theme-success) 100%);
    transform: translateY(-1px);
}

.fsh-btn-danger {
    background: linear-gradient(135deg, var(--theme-danger) 0%, var(--theme-danger-emphasis) 100%);
    color: var(--text-inverse);
    border-color: var(--theme-danger);
}

.fsh-btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--theme-danger-emphasis) 0%, var(--theme-danger) 100%);
    transform: translateY(-1px);
}

.fsh-btn-warning {
    background: linear-gradient(135deg, var(--theme-warning) 0%, var(--theme-warning-emphasis) 100%);
    color: var(--text-primary);
    border-color: var(--theme-warning);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.fsh-btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--theme-warning-emphasis) 0%, var(--theme-warning) 100%);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

.fsh-btn-info {
    background: linear-gradient(135deg, var(--theme-info) 0%, var(--theme-info-emphasis) 100%);
    color: var(--text-inverse);
    border-color: var(--theme-info);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.fsh-btn-info:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--theme-info-emphasis) 0%, var(--theme-info) 100%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.fsh-btn-light {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.fsh-btn-light:hover:not(:disabled) {
    background: var(--theme-gray-100);
}

.fsh-btn-dark {
    background: var(--theme-gray-800);
    color: var(--text-inverse);
    border-color: var(--theme-gray-800);
}

.fsh-btn-link {
    background: transparent;
    color: var(--theme-primary);
    border-color: transparent;
    box-shadow: none;
}

.fsh-btn-link:hover:not(:disabled) {
    color: var(--theme-primary-emphasis);
    text-decoration: underline;
    transform: none;
}

.fsh-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.fsh-btn-ghost:hover:not(:disabled) {
    background: var(--theme-gray-100);
    color: var(--text-primary);
}

/* Outline Variants */
.fsh-btn-outline-primary {
    background: transparent;
    color: var(--theme-primary);
    border-color: var(--theme-primary);
}

.fsh-btn-outline-primary:hover:not(:disabled) {
    background: var(--theme-primary);
    color: var(--text-inverse);
}

.fsh-btn-outline-secondary {
    background: transparent;
    color: var(--theme-secondary);
    border-color: var(--theme-secondary);
}

.fsh-btn-outline-secondary:hover:not(:disabled) {
    background: var(--theme-secondary);
    color: var(--text-inverse);
}

.fsh-btn-outline-danger {
    background: transparent;
    color: var(--theme-danger);
    border-color: var(--theme-danger);
}

.fsh-btn-outline-danger:hover:not(:disabled) {
    background: var(--theme-danger);
    color: var(--text-inverse);
}

/* Sizes */
.fsh-btn-xs { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.fsh-btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.fsh-btn-lg { padding: 0.625rem 1.25rem; font-size: 1rem; }
.fsh-btn-xl { padding: 0.75rem 1.5rem; font-size: 1.125rem; }

/* Block */
.fsh-btn-block { display: flex; width: 100%; }

/* Icon Only */
.fsh-btn-icon {
    padding: 0.5rem;
    min-width: 38px;
}

/* Spinner */
.fsh-btn-spinner {
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: fsh-btn-spin 0.75s linear infinite;
}

@keyframes fsh-btn-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   7b. FSH TABS COMPONENT
   ============================================ */

.fsh-tabs {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Tab Navigation */
.fsh-tabs-nav {
    display: flex;
    gap: 0;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.fsh-tabs-nav::-webkit-scrollbar {
    display: none;
}

/* Tab Button */
.fsh-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.fsh-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.fsh-tab-btn.active {
    color: var(--theme-primary);
    border-bottom-color: var(--theme-primary);
    background: transparent;
}

.fsh-tab-btn i {
    font-size: 1.125rem;
}

/* Tab Content */
.fsh-tabs-content {
    padding: 1rem 0;
}

.fsh-tab-panel {
    animation: fshTabFadeIn 0.2s ease;
}

@keyframes fshTabFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Variant: Boxed Tabs */
.fsh-tabs.fsh-tabs-boxed .fsh-tabs-nav {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 0.25rem;
    border-bottom: none;
    gap: 0.25rem;
}

.fsh-tabs.fsh-tabs-boxed .fsh-tab-btn {
    border-radius: 6px;
    border-bottom: none;
    margin-bottom: 0;
}

.fsh-tabs.fsh-tabs-boxed .fsh-tab-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Variant: Pills */
.fsh-tabs.fsh-tabs-pills .fsh-tabs-nav {
    background: transparent;
    border-bottom: none;
    gap: 0.5rem;
}

.fsh-tabs.fsh-tabs-pills .fsh-tab-btn {
    border-radius: 20px;
    border-bottom: none;
    margin-bottom: 0;
    padding: 0.5rem 1rem;
}

.fsh-tabs.fsh-tabs-pills .fsh-tab-btn.active {
    background: var(--theme-primary);
    color: white;
}

/* Variant: Underline only */
.fsh-tabs.fsh-tabs-underline .fsh-tabs-nav {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
}

/* FshTabs Dark Mode */
[data-bs-theme="dark"] .fsh-tabs-nav {
    background: #1e293b;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .fsh-tab-btn {
    color: #94a3b8;
}

[data-bs-theme="dark"] .fsh-tab-btn:hover {
    color: #f1f5f9;
    background: #334155;
}

[data-bs-theme="dark"] .fsh-tab-btn.active {
    color: var(--theme-primary, #1ab394);
    border-bottom-color: var(--theme-primary, #1ab394);
    background: transparent;
}

[data-bs-theme="dark"] .fsh-tabs.fsh-tabs-boxed .fsh-tabs-nav {
    background: #272832;
}

[data-bs-theme="dark"] .fsh-tabs.fsh-tabs-boxed .fsh-tab-btn.active {
    background: #1e293b;
    color: #f1f5f9;
}

[data-bs-theme="dark"] .fsh-tabs.fsh-tabs-pills .fsh-tab-btn.active {
    background: var(--theme-primary, #1ab394);
    color: white;
}

[data-bs-theme="dark"] .fsh-tabs-content {
    color: #f1f5f9;
}

/* ============================================
   8. FORM COMPONENTS
   ============================================ */

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--theme-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Filter Components - Shared styles for filter panels */
.filter-card {
    background: var(--bg-surface);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
}

.filter-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.filter-card-title i {
    color: var(--theme-primary);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Unified filter input styles */
.filter-field .rz-datepicker {
    width: 100%;
}

.filter-field .rz-inputtext {
    width: 100%;
    height: 40px;
    padding: 0 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--bg-surface);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-field .rz-dropdown {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--bg-surface);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.filter-field .rz-dropdown .rz-inputtext {
    border: none;
    height: auto;
    background: transparent;
    padding: 0 0.875rem;
    line-height: 1.4;
    text-align: left;
}

.filter-field .rz-dropdown .rz-helper {
    display: flex;
    align-items: center;
    height: 100%;
}

.filter-field .rz-inputtext:focus,
.filter-field .rz-dropdown:focus-within {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.1);
}

.filter-field .rz-inputtext::placeholder,
.filter-field .rz-dropdown .rz-placeholder {
    color: var(--text-muted);
}

/* Dark mode for filter components */
[data-bs-theme="dark"] .filter-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .filter-card-title {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .filter-label {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .filter-field .rz-inputtext,
[data-bs-theme="dark"] .filter-field .rz-dropdown {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .filter-field .rz-inputtext:focus,
[data-bs-theme="dark"] .filter-field .rz-dropdown:focus-within {
    background: var(--bg-card);
}

/* ============================================
   PAGE HEADER - Dark Mode
   ============================================ */

/* Page header with white/light background - used in many pages */
[data-bs-theme="dark"] .page-header {
    background: var(--bg-surface, #1e293b) !important;
    border-color: var(--border-color, #334155) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

[data-bs-theme="dark"] .page-header .page-title,
[data-bs-theme="dark"] .page-header h1,
[data-bs-theme="dark"] .page-header h2,
[data-bs-theme="dark"] .page-header h3 {
    color: var(--text-primary, #f1f5f9) !important;
}

[data-bs-theme="dark"] .page-header p,
[data-bs-theme="dark"] .page-header .text-muted,
[data-bs-theme="dark"] .page-header small {
    color: var(--text-secondary, #94a3b8) !important;
}

/* Page header wrapper (simple variant) */
[data-bs-theme="dark"] .page-header-wrapper {
    background: transparent;
}

[data-bs-theme="dark"] .page-header-title {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .page-header-subtitle {
    color: var(--text-secondary, #94a3b8);
}

/* Header icon wrapper */
[data-bs-theme="dark"] .header-icon-wrapper {
    background: var(--bg-tertiary, #334155);
}

/* Insight items (used in analytics) */
[data-bs-theme="dark"] .insight-item {
    background: var(--bg-tertiary, #334155) !important;
}

[data-bs-theme="dark"] .insight-name {
    color: var(--text-primary, #f1f5f9) !important;
}

[data-bs-theme="dark"] .insight-value {
    color: var(--theme-primary, #1ab394) !important;
}

/* RadzenCard - Dark Mode */
[data-bs-theme="dark"] .rz-card {
    background: var(--bg-card, #1e293b) !important;
    border-color: var(--border-color, #334155) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

[data-bs-theme="dark"] .rz-card h6,
[data-bs-theme="dark"] .rz-card .card-title {
    color: var(--text-primary, #f1f5f9) !important;
}

/* ============================================
   9. TABLE COMPONENTS
   ============================================ */

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    text-align: left;
    background: var(--theme-gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(0, 0, 0, 0.02);
}

/* ============================================
   10. CARD COMPONENTS
   ============================================ */

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-body {
    padding: 1.25rem;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--theme-gray-50);
}

.card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* KPI Metrics */
.kpi-metric {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all 0.2s ease;
}

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

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-2);
}

/* ============================================
   11. BADGE & STATUS COMPONENTS
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.badge-primary { background: var(--theme-primary-subtle); color: var(--theme-primary); }
.badge-success { background: var(--theme-success-subtle); color: var(--theme-success); }
.badge-danger { background: var(--theme-danger-subtle); color: var(--theme-danger); }
.badge-warning { background: var(--theme-warning-subtle); color: var(--theme-warning-emphasis); }
.badge-info { background: var(--theme-info-subtle); color: var(--theme-info); }

/* ============================================
   12. MODAL & DIALOG COMPONENTS
   ============================================ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: var(--z-modal);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ============================================
   13. ANIMATION & TRANSITIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-item:hover .nav-item-icon {
    animation: iconPulse 0.3s ease;
}

/* ============================================
   14. PORTAL/CMS COMPONENTS
   ============================================ */

.portal-hero {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.portal-section {
    padding: 3rem 0;
}

.portal-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* ============================================
   15. AUTH/LOGIN PAGES
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    padding: var(--space-8);
}

.auth-container {
    display: flex;
    background: var(--bg-surface);
    border-radius: var(--radius-2xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
}

.auth-left {
    flex: 1;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-emphasis) 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.auth-right {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    max-height: 48px;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-branding {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.auth-logo-image {
    max-height: 60px;
    max-width: 200px;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.auth-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.auth-check-icon {
    color: rgba(255, 255, 255, 0.8);
}

.login-welcome h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

/* ============================================
   16. UTILITY CLASSES
   ============================================ */

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

*:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
}

/* ============================================
   17. DARK MODE OVERRIDES
   ============================================ */

[data-bs-theme="dark"] {
    /* ========================================
       DARK MODE - Background & Surface Colors
       ======================================== */
    --bg-body: #17181e;
    --bg-surface: #1e1f27;
    --bg-tertiary: #272832;
    --bg-surface-secondary: #272832;
    --bg-surface-tertiary: #1e293b;
    --bg-card: #1e293b;

    /* ========================================
       DARK MODE - Text Colors (brightened for visibility)
       ======================================== */
    --text-primary: #aab8c5;
    --text-secondary: #8391a2;
    --text-muted: #6c757d;
    --text-disabled: #4b5563;

    /* ========================================
       DARK MODE - Border Colors
       ======================================== */
    --border-color: #293036;
    --border-color-dark: #3a4149;
    --border-color-translucent: #3a4149;

    /* ========================================
       DARK MODE - Primary Color Variants (brightened)
       ======================================== */
    --theme-primary-emphasis: #76d1bf;
    --theme-primary-subtle: rgba(26, 179, 148, 0.2);
    --theme-primary-border: #106b59;

    /* ========================================
       DARK MODE - Gray Scale (inverted)
       ======================================== */
    --theme-gray-50: #22232c;
    --theme-gray-100: #272832;
    --theme-gray-200: #2c2d38;
    --theme-gray-300: #3a4149;
    --theme-gray-400: #4b5563;
    --theme-gray-500: #6c757d;
    --theme-gray-600: #8391a2;
    --theme-gray-700: #9ba6b7;
    --theme-gray-800: #aab8c5;
    --theme-gray-900: #dee2e6;

    /* ========================================
       DARK MODE - Shadows (stronger, darker)
       ======================================== */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
    --shadow-base: 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.5);

    /* ========================================
       DARK MODE - Sidebar
       ======================================== */
    --sidebar-bg: #1e1f27;
    --sidebar-header-bg: #1e1f27;
    --sidebar-border-color: #2c2d38;
    --sidebar-text: #8495ab;
    --sidebar-text-hover: #bccee4;
    --sidebar-text-active: #ced6df;
    --sidebar-icon-color: #8495ab;
    --sidebar-icon-hover: #bccee4;
    --sidebar-icon-active: #ced6df;
    --sidebar-item-hover-bg: #2f3742;
    --sidebar-item-active-bg: #22232c;
    --sidebar-submenu-bg: #17181e;
    --sidebar-search-bg: #17181e;
    --sidebar-search-border: #293036;
    --sidebar-glow-color: rgba(118, 209, 191, 0.3);
    --sidebar-scrollbar-thumb: rgba(255, 255, 255, 0.2);
    --sidebar-scrollbar-thumb-hover: rgba(255, 255, 255, 0.3);
    --sidebar-backdrop-color: rgba(0, 0, 0, 0.7);

    /* ========================================
       DARK MODE - Topbar
       ======================================== */
    --topbar-bg: #252630;
    --topbar-text: #adb5bf;
    --topbar-text-hover: #e0eeff;
    --topbar-border: #2c2d38;

    /* ========================================
       DARK MODE - Form Controls
       ======================================== */
    --input-bg: #1e1f27;
    --input-border: #293036;
    --input-focus-border: #76d1bf;
    --input-placeholder: #6c757d;

    /* ========================================
       DARK MODE - Links
       ======================================== */
    --link-color: #76d1bf;
    --link-hover-color: #8bd8c9;
    --focus-ring-color: rgba(118, 209, 191, 0.25);

    /* ========================================
       DARK MODE - Bootstrap Variable Overrides
       ======================================== */
    --bs-body-bg: #17181e;
    --bs-body-color: #aab8c5;
    --bs-border-color: #293036;
    --bs-border-color-translucent: rgba(255, 255, 255, 0.1);
    --bs-card-bg: #1e1f27;
    --bs-card-border-color: #293036;
    --bs-card-cap-bg: #272832;
    --bs-tertiary-bg: #272832;
    --bs-secondary-bg: #1e1f27;
    --bs-emphasis-color: #ffffff;
    --bs-heading-color: #aab8c5;
    --bs-link-color: #76d1bf;
    --bs-link-hover-color: #8bd8c9;
    --bs-code-color: #e685b5;
}

/* Sidenav - comprehensive dark mode */
[data-bs-theme="dark"] .sidenav {
    background: var(--sidebar-bg) !important;
    border-right-color: var(--sidebar-border-color) !important;
}

[data-bs-theme="dark"] .sidenav.collapsed:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .sidenav-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

[data-bs-theme="dark"] .sidenav-header {
    border-bottom-color: var(--sidebar-border-color);
}

[data-bs-theme="dark"] .sidenav-logo-text {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .nav-item {
    color: var(--sidebar-text);
}

[data-bs-theme="dark"] .nav-item:hover {
    background: var(--sidebar-item-hover-bg);
    color: var(--sidebar-text-hover);
}

[data-bs-theme="dark"] .nav-item.active {
    background: var(--sidebar-item-active-bg);
    color: var(--sidebar-text-active);
}

[data-bs-theme="dark"] .nav-item-icon {
    color: var(--sidebar-icon-color);
}

[data-bs-theme="dark"] .nav-item:hover .nav-item-icon {
    color: var(--sidebar-icon-hover);
}

[data-bs-theme="dark"] .nav-item.active .nav-item-icon {
    color: var(--sidebar-icon-active);
}

[data-bs-theme="dark"] .nav-item-text {
    color: inherit;
}

[data-bs-theme="dark"] .nav-section-title {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .sidenav-search-input input {
    background: var(--sidebar-search-bg);
    border-color: var(--sidebar-search-border);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .sidenav-search-input input::placeholder {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .sidenav-favorites {
    background: var(--bg-tertiary);
    border-color: var(--sidebar-border-color);
}

[data-bs-theme="dark"] .sidenav-collapse-toggle {
    color: var(--text-secondary);
    border-color: var(--sidebar-border-color);
}

[data-bs-theme="dark"] .sidenav-mobile-close {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .sidenav-mobile-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .app-topbar,
[data-bs-theme="dark"] .topbar {
    background: var(--bg-surface);
    border-bottom-color: var(--border-color);
}

[data-bs-theme="dark"] .content-page,
[data-bs-theme="dark"] .admin-content-page {
    background: #17181e !important;
    background-color: #17181e !important;
}

/* Cards - comprehensive dark mode */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .ibox {
    background: #1e1f27 !important;
    background-color: #1e1f27 !important;
    border-color: #293036 !important;
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .ibox-title {
    background: transparent;
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .card-body,
[data-bs-theme="dark"] .ibox-content {
    background: transparent;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .card-footer {
    background: var(--bg-tertiary);
    border-top-color: var(--border-color);
}

[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-header h5,
[data-bs-theme="dark"] .card-header h6 {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .card-text,
[data-bs-theme="dark"] .card-subtitle {
    color: var(--text-secondary);
}

/* ============================================
   STATS GRID & STAT CARD - Dark Mode
   ============================================ */

/* Stats Grid Container */
[data-bs-theme="dark"] .stats-grid {
    gap: 1rem;
}

/* Stats Card - Base Dark Mode */
[data-bs-theme="dark"] .stats-card,
[data-bs-theme="dark"] .kpi-card {
    background: var(--bg-surface, #1e293b) !important;
    border-color: var(--border-color, #334155) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

[data-bs-theme="dark"] .stats-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    border-color: var(--theme-primary-subtle, #2d4a5e) !important;
}

/* Stats Card - Values/Numbers */
[data-bs-theme="dark"] .stats-card h2,
[data-bs-theme="dark"] .stats-card h3,
[data-bs-theme="dark"] .kpi-card h2,
[data-bs-theme="dark"] .kpi-card h3,
[data-bs-theme="dark"] .stat-value,
[data-bs-theme="dark"] .stats-value,
[data-bs-theme="dark"] .kpi-value {
    color: var(--text-primary, #f1f5f9) !important;
}

/* Stats Card - Labels */
[data-bs-theme="dark"] .stats-card p,
[data-bs-theme="dark"] .kpi-card p,
[data-bs-theme="dark"] .stat-label,
[data-bs-theme="dark"] .stats-label,
[data-bs-theme="dark"] .kpi-title {
    color: var(--text-secondary, #94a3b8) !important;
}

/* Stat Card - Icons */
[data-bs-theme="dark"] .stat-icon,
[data-bs-theme="dark"] .stats-icon,
[data-bs-theme="dark"] .stats-grid .stat-icon {
    background: var(--bg-tertiary, #334155) !important;
    color: var(--text-primary, #f1f5f9) !important;
}

/* Stat Card - Icon Color Variants in Dark Mode */
[data-bs-theme="dark"] .stat-icon.primary,
[data-bs-theme="dark"] .stat-icon.bg-primary-subtle {
    background: rgba(26, 179, 148, 0.15) !important;
    color: #1ab394 !important;
}

[data-bs-theme="dark"] .stat-icon.success,
[data-bs-theme="dark"] .stat-icon.bg-success-subtle {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
}

[data-bs-theme="dark"] .stat-icon.danger,
[data-bs-theme="dark"] .stat-icon.bg-danger-subtle {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

[data-bs-theme="dark"] .stat-icon.warning,
[data-bs-theme="dark"] .stat-icon.bg-warning-subtle {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
}

[data-bs-theme="dark"] .stat-icon.info,
[data-bs-theme="dark"] .stat-icon.bg-info-subtle {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #3b82f6 !important;
}

[data-bs-theme="dark"] .stat-icon.secondary,
[data-bs-theme="dark"] .stat-icon.bg-secondary-subtle {
    background: rgba(100, 116, 139, 0.15) !important;
    color: #94a3b8 !important;
}

/* Stat Card - Trend Indicators */
[data-bs-theme="dark"] .stat-trend,
[data-bs-theme="dark"] .stats-trend {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .stat-trend.positive,
[data-bs-theme="dark"] .stats-trend.positive {
    color: #10b981 !important;
}

[data-bs-theme="dark"] .stat-trend.negative,
[data-bs-theme="dark"] .stats-trend.negative {
    color: #ef4444 !important;
}

/* ============================================
   TENANT MANAGEMENT PAGE STYLES
   ============================================ */

.tenant-management {
    padding: 1.5rem;
}

.page-header .header-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.1) 0%, rgba(var(--theme-primary-rgb), 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nav Tabs */
.nav-tabs-custom {
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
}

.nav-tabs-custom .nav-link {
    border: none;
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
}

.nav-tabs-custom .nav-link:hover {
    color: var(--text-primary);
}

.nav-tabs-custom .nav-link.active {
    color: var(--theme-primary);
    border-bottom-color: var(--theme-primary);
}

/* Summary Cards */
.summary-card {
    background: var(--bg-card, #ffffff);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.summary-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.summary-card.total .card-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.summary-card.revenue .card-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.summary-card.pending .card-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.summary-card.expiring .card-icon { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.summary-card.active-card .card-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.summary-card.inactive-card .card-icon { background: rgba(107, 114, 128, 0.1); color: #6b7280; }

.summary-card .card-label { font-size: 0.875rem; color: var(--text-muted); }
.summary-card .card-value { font-size: 1.75rem; font-weight: 700; margin: 0.25rem 0; color: var(--text-primary); }
.summary-card .card-breakdown { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.summary-card .card-trend { display: flex; align-items: center; gap: 0.25rem; font-size: 0.8rem; }
.summary-card .card-trend.positive { color: #10b981; }
.summary-card .card-trend.negative { color: #ef4444; }
.summary-card .card-amount, .summary-card .card-subtitle { font-size: 0.8rem; color: var(--text-muted); }

/* Filter Tabs */
.filter-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.filter-tab:hover { background: var(--bg-body); }
.filter-tab.active { background: var(--theme-primary); color: white; border-color: var(--theme-primary); }
.filter-tab .count { padding: 0.125rem 0.5rem; border-radius: 10px; font-size: 0.75rem; background: rgba(255, 255, 255, 0.2); }
.filter-tab:not(.active) .count { background: var(--bg-body); }

/* Search Box */
.search-box { position: relative; display: flex; align-items: center; }
.search-box i { position: absolute; left: 12px; color: var(--text-muted); }
.search-box .search-input { padding-left: 36px; min-width: 250px; }

/* Bulk Actions Bar */
.bulk-actions-bar { background: var(--theme-primary); color: white; padding: 0.75rem 1rem; border-radius: 8px; }
.bulk-actions-bar .selected-count { font-weight: 600; }
.bulk-actions-bar .action-buttons { display: flex; gap: 0.5rem; }

/* Tenant Name Cell */
.tenant-name-cell { display: flex; align-items: center; gap: 0.75rem; }
.tenant-name-cell.clickable { cursor: pointer; }
.tenant-name-cell.clickable:hover .tenant-name { color: var(--theme-primary); }

.tenant-avatar {
    width: 40px; height: 40px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 1rem; color: white;
}
.tenant-avatar.small { width: 32px; height: 32px; font-size: 0.875rem; }
.tenant-avatar.large { width: 64px; height: 64px; font-size: 1.5rem; }
.tenant-avatar.color-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.tenant-avatar.color-green { background: linear-gradient(135deg, #10b981, #059669); }
.tenant-avatar.color-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.tenant-avatar.color-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.tenant-avatar.color-pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.tenant-avatar.color-cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }

.tenant-info { display: flex; flex-direction: column; }
.tenant-info .tenant-name { font-weight: 600; color: var(--text-primary); transition: color 0.2s ease; }
.tenant-info .tenant-id { font-size: 0.75rem; color: var(--text-muted); font-family: monospace; }

/* Package Badge */
.package-badge { padding: 0.25rem 0.75rem; border-radius: 6px; font-size: 0.8rem; font-weight: 500; }
.package-badge.free { background: #e5e7eb; color: #374151; }
.package-badge.starter { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.package-badge.professional { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.package-badge.enterprise { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

/* Status Badge */
.status-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.8rem; font-weight: 500; }
.status-badge.active { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-badge.inactive { background: rgba(107, 114, 128, 0.1); color: #6b7280; }
.status-badge.trial { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.status-badge.expiring { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-badge.suspended { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Subscription Date */
.subscription-date { display: flex; flex-direction: column; }
.subscription-date .date { font-size: 0.875rem; }
.subscription-date .days-remaining { font-size: 0.75rem; }
.subscription-date .days-remaining.warning { color: #f59e0b; }
.subscription-date .days-remaining.expired { color: #ef4444; }

/* Usage Metrics */
.usage-metrics { display: flex; flex-direction: column; gap: 0.375rem; }
.usage-item { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; }
.usage-item i { color: var(--text-muted); font-size: 0.875rem; }
.mini-progress { width: 40px; height: 4px; background: var(--bg-body); border-radius: 2px; overflow: hidden; }
.mini-progress-bar { height: 100%; border-radius: 2px; transition: width 0.3s ease; }
.mini-progress-bar.usage-low { background: #10b981; }
.mini-progress-bar.usage-medium { background: #f59e0b; }
.mini-progress-bar.usage-high { background: #ef4444; }
.usage-text { color: var(--text-muted); min-width: 45px; }

/* Last Activity */
.last-activity { font-size: 0.875rem; }
.last-activity.recent { color: #10b981; }
.last-activity.moderate { color: var(--text-secondary); }
.last-activity.stale { color: #f59e0b; }
.last-activity.inactive { color: #ef4444; }

/* Empty State */
.empty-state-container { padding: 3rem; }
.empty-state .empty-icon { font-size: 4rem; color: var(--text-muted); opacity: 0.5; }

/* Details Panel */
.details-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 1040; }
.details-panel {
    position: fixed; top: 0; right: -450px; width: 450px; height: 100vh;
    background: var(--bg-surface, #ffffff); z-index: 1050; transition: right 0.3s ease;
    display: flex; flex-direction: column; box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
}
.details-panel.open { right: 0; }
.panel-header { padding: 1.5rem; border-bottom: 1px solid var(--border-color, #e5e7eb); display: flex; justify-content: space-between; align-items: center; }
.panel-header h4 { margin: 0; font-weight: 600; color: var(--text-primary, #1f2937); }
.panel-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.tenant-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.tenant-main-info h3 { margin: 0; font-weight: 600; color: var(--text-primary, #1f2937); }
.tenant-main-info .tenant-key { font-size: 0.875rem; color: var(--text-secondary, #6b7280); font-family: monospace; }

.details-section { margin-bottom: 1.5rem; }
.section-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color, #e5e7eb); }
.section-header h6 { font-weight: 600; color: var(--text-primary, #1f2937); }
.info-grid { display: grid; gap: 1rem; }
.info-item { display: flex; flex-direction: column; gap: 0.25rem; }
.info-item.full-width { grid-column: 1 / -1; }
.info-label { font-size: 0.75rem; color: var(--text-secondary, #6b7280); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.info-value { font-weight: 500; word-break: break-all; color: var(--text-primary, #1f2937); }
.info-value.muted { color: var(--text-secondary, #6b7280); }
.connection-string { font-family: monospace; font-size: 0.8rem; }
.panel-actions { padding-top: 1rem; border-top: 1px solid var(--border-color, #e5e7eb); }

/* Progress bars for usage */
.progress-bar.bg-success { background-color: #10b981 !important; }
.progress-bar.bg-warning { background-color: #f59e0b !important; }
.progress-bar.bg-danger { background-color: #ef4444 !important; }

/* Data Grid Customization */
.tenants-grid { border: none; }
.tenants-grid .rz-datatable-thead > tr > th {
    background: var(--bg-body); border-bottom: 2px solid var(--border-color);
    padding: 1rem; font-weight: 600; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary);
}
.tenants-grid .rz-datatable-data > tr > td { padding: 1rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.tenants-grid .rz-datatable-data > tr:hover { background: var(--bg-body); }

/* ============================================
   TENANT MANAGEMENT - DARK MODE
   ============================================ */

[data-bs-theme="dark"] .tenant-management {
    background: var(--bg-body);
}

/* Card containers in tenant management */
[data-bs-theme="dark"] .tenant-management .card,
[data-bs-theme="dark"] .page-layout .card {
    background: var(--bg-surface-tertiary, #1e293b) !important;
    border-color: var(--border-color, #334155) !important;
}

[data-bs-theme="dark"] .tenant-management .card-body,
[data-bs-theme="dark"] .page-layout .card-body {
    background: var(--bg-surface-tertiary, #1e293b) !important;
}

[data-bs-theme="dark"] .filter-tabs .filter-tab {
    background: var(--bg-surface-tertiary, #1e293b);
    border-color: var(--border-color, #334155);
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .filter-tabs .filter-tab:hover {
    background: var(--bg-surface-secondary, #334155);
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .filter-tabs .filter-tab.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
}

[data-bs-theme="dark"] .filter-tabs .filter-tab:not(.active) .count {
    background: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .nav-tabs-custom {
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .nav-tabs-custom .nav-link {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .nav-tabs-custom .nav-link:hover {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .nav-tabs-custom .nav-link.active {
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .search-box .search-input {
    background: var(--bg-surface-tertiary, #1e293b);
    border-color: var(--border-color, #334155);
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .search-box .search-input::placeholder {
    color: var(--text-muted, #64748b);
}

[data-bs-theme="dark"] .details-panel {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .panel-header {
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .panel-header h4 {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .section-header {
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .section-header h6 {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .info-label {
    color: var(--text-muted, #64748b);
}

[data-bs-theme="dark"] .info-value {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .tenant-main-info h3 {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .tenant-main-info .tenant-key {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .panel-actions {
    border-top-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .tenants-grid .rz-datatable-thead > tr > th {
    background: var(--bg-surface-tertiary, #1e293b);
    border-bottom-color: var(--border-color, #334155);
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .tenants-grid .rz-datatable-data > tr > td {
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .tenants-grid .rz-datatable-data > tr:hover {
    background: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .tenant-info .tenant-name {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .tenant-info .tenant-id {
    color: var(--text-muted, #64748b);
}

/* ============================================
   TENANT OVERVIEW PAGE - LIGHT MODE BASE STYLES
   ============================================ */

.tenant-overview-page .overview-header {
    background: var(--bg-surface, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tenant-overview-page .tenant-nav-tabs {
    background: var(--bg-surface, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tenant-overview-page .nav-tab {
    color: var(--text-secondary, #6b7280);
}

.tenant-overview-page .nav-tab:hover {
    background: var(--bg-body, #f8f9fa);
    color: var(--text-primary, #1f2937);
}

.tenant-overview-page .nav-tab.active {
    background: var(--theme-primary, #1ab394);
    color: white;
}

/* ============================================
   TENANT OVERVIEW PAGE - DARK MODE
   ============================================ */

[data-bs-theme="dark"] .tenant-overview-page {
    background: #17181e !important;
    background-color: #17181e !important;
}

[data-bs-theme="dark"] .tenant-overview-page .overview-header {
    background: #1e293b !important;
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .tenant-name {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .tenant-id {
    color: var(--text-muted, #64748b);
}

[data-bs-theme="dark"] .tenant-overview-page .btn-back {
    color: var(--text-secondary, #94a3b8);
    background: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .tenant-overview-page .btn-back:hover {
    color: var(--text-primary, #f1f5f9);
    background: var(--bg-surface, #475569);
}

[data-bs-theme="dark"] .tenant-overview-page .tenant-nav-tabs {
    background: #1e293b !important;
    background-color: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .tenant-overview-page .nav-tab {
    color: #94a3b8 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .tenant-overview-page .nav-tab:hover {
    color: #f1f5f9 !important;
    background: #334155 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .nav-tab.active {
    color: white !important;
    background: var(--theme-primary, #1ab394) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .card {
    background: var(--bg-surface-tertiary, #1e293b) !important;
    border-color: var(--border-color, #334155) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .card {
    background: #1e293b !important;
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .card-header {
    background: transparent !important;
    background-color: transparent !important;
    border-bottom-color: #334155 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .card-header h5 {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .card-body {
    background: #1e293b !important;
    background-color: #1e293b !important;
}

[data-bs-theme="dark"] .tenant-overview-page .info-item .info-label {
    color: #64748b !important;
}

[data-bs-theme="dark"] .tenant-overview-page .info-item .info-value {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .tenant-overview-page .loading-container {
    background: var(--bg-body);
}

[data-bs-theme="dark"] .tenant-overview-page .loading-text {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .tenant-overview-page .content-container {
    background: var(--bg-body);
}

[data-bs-theme="dark"] .tenant-overview-page .tenant-status {
    background: var(--bg-surface-secondary, #334155);
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .tenant-overview-page .tenant-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

[data-bs-theme="dark"] .tenant-overview-page .tenant-status.inactive {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

/* Header - stronger overrides for scoped CSS */
[data-bs-theme="dark"] .tenant-overview-page .overview-header {
    background: var(--bg-surface-tertiary, #1e293b) !important;
    border-color: var(--border-color, #334155) !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .tenant-overview-page .header-left,
[data-bs-theme="dark"] .tenant-overview-page .header-right,
[data-bs-theme="dark"] .tenant-overview-page .tenant-identity,
[data-bs-theme="dark"] .tenant-overview-page .tenant-info {
    background: transparent !important;
}

/* Navigation Tabs - explicit colors for dark mode */
[data-bs-theme="dark"] .tenant-overview-page .tenant-nav-tabs {
    background: #1e293b !important;
    background-color: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .tenant-overview-page .nav-tab {
    color: #94a3b8 !important;
    background: transparent !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .tenant-overview-page .nav-tab:hover {
    color: #f1f5f9 !important;
    background: #334155 !important;
    background-color: #334155 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .nav-tab.active {
    color: white !important;
    background: var(--theme-primary, #1ab394) !important;
    background-color: var(--theme-primary, #1ab394) !important;
}

/* RadzenTabs Dark Mode */
[data-bs-theme="dark"] .tenant-overview-page .rz-tabview {
    background: transparent !important;
}

/* RadzenTabs - explicit colors for dark mode */
[data-bs-theme="dark"] .tenant-overview-page .rz-tabview-nav,
[data-bs-theme="dark"] .rz-tabview-nav {
    background: #272832 !important;
    background-color: #272832 !important;
    border-color: #334155 !important;
    border-bottom: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .rz-tabview-nav li,
[data-bs-theme="dark"] .rz-tabview-nav li {
    background: transparent !important;
}

[data-bs-theme="dark"] .tenant-overview-page .rz-tabview-nav li a.rz-tabview-nav-link,
[data-bs-theme="dark"] .rz-tabview-nav li a.rz-tabview-nav-link {
    color: #94a3b8 !important;
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .tenant-overview-page .rz-tabview-nav li a.rz-tabview-nav-link:hover,
[data-bs-theme="dark"] .rz-tabview-nav li a.rz-tabview-nav-link:hover {
    color: #f1f5f9 !important;
    background: #1e293b !important;
    background-color: #1e293b !important;
}

[data-bs-theme="dark"] .tenant-overview-page .rz-tabview-nav li.rz-tabview-selected a.rz-tabview-nav-link,
[data-bs-theme="dark"] .tenant-overview-page .rz-tabview-nav li a.rz-tabview-nav-link.rz-state-active,
[data-bs-theme="dark"] .rz-tabview-nav li.rz-tabview-selected a.rz-tabview-nav-link,
[data-bs-theme="dark"] .rz-tabview-nav li a.rz-tabview-nav-link.rz-state-active {
    color: var(--theme-primary, #1ab394) !important;
    background: transparent !important;
    background-color: transparent !important;
    border-bottom: 2px solid var(--theme-primary, #1ab394) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .rz-tabview-panels,
[data-bs-theme="dark"] .tenant-overview-page .rz-tabview-panel,
[data-bs-theme="dark"] .rz-tabview-panels,
[data-bs-theme="dark"] .rz-tabview-panel {
    background: transparent !important;
    background-color: transparent !important;
    color: #f1f5f9 !important;
}

/* Chart container dark mode */
[data-bs-theme="dark"] .tenant-overview-page .chart-container {
    background: transparent !important;
}

/* Radzen Charts dark mode */
[data-bs-theme="dark"] .tenant-overview-page .rz-chart {
    background: transparent !important;
}

[data-bs-theme="dark"] .tenant-overview-page .rz-chart-axis-label,
[data-bs-theme="dark"] .tenant-overview-page .rz-chart-title {
    fill: var(--text-secondary, #94a3b8) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .rz-chart-gridlines line {
    stroke: var(--border-color, #334155) !important;
}

/* Activity list dark mode */
[data-bs-theme="dark"] .tenant-overview-page .activity-list {
    background: transparent !important;
}

[data-bs-theme="dark"] .tenant-overview-page .activity-item {
    border-color: var(--border-color, #334155) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .activity-description {
    color: var(--text-primary, #f1f5f9) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .activity-time {
    color: var(--text-muted, #64748b) !important;
}

/* Subscription details dark mode */
[data-bs-theme="dark"] .tenant-overview-page .subscription-details .detail-row {
    border-color: var(--border-color, #334155) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .subscription-details .label {
    color: var(--text-secondary, #94a3b8) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .subscription-details .value {
    color: var(--text-primary, #f1f5f9) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .plan-price .price {
    color: var(--text-primary, #f1f5f9) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .plan-price .period {
    color: var(--text-muted, #64748b) !important;
}

/* Quota items dark mode */
[data-bs-theme="dark"] .tenant-overview-page .quota-item {
    border-color: var(--border-color, #334155) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .quota-label {
    color: var(--text-secondary, #94a3b8) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .quota-value {
    color: var(--text-primary, #f1f5f9) !important;
}

/* Quick action buttons dark mode */
[data-bs-theme="dark"] .tenant-overview-page .quick-action-btn {
    background: var(--bg-surface-secondary, #334155) !important;
    color: var(--text-primary, #f1f5f9) !important;
    border-color: var(--border-color, #334155) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .quick-action-btn:hover {
    background: var(--bg-surface, #475569) !important;
    border-color: var(--theme-primary) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .quick-action-btn.warning {
    color: var(--theme-warning) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .quick-action-btn.danger {
    color: var(--theme-danger) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .quick-action-btn.success {
    color: var(--theme-success) !important;
}

/* Card action buttons dark mode */
[data-bs-theme="dark"] .tenant-overview-page .btn-card-action {
    background: var(--bg-surface-secondary, #334155) !important;
    color: var(--text-primary, #f1f5f9) !important;
    border-color: var(--border-color, #334155) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .btn-card-action:hover {
    background: var(--bg-surface, #475569) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .btn-card-action.primary {
    background: var(--theme-primary) !important;
    color: white !important;
    border-color: var(--theme-primary) !important;
}

/* Payment grid dark mode */
[data-bs-theme="dark"] .tenant-overview-page .payment-grid {
    background: transparent !important;
}

[data-bs-theme="dark"] .tenant-overview-page .payment-amount {
    color: var(--text-primary, #f1f5f9) !important;
}

/* Summary Cards Dark Mode */
[data-bs-theme="dark"] .summary-card {
    background: var(--bg-surface, #1e293b) !important;
    border-color: var(--border-color, #334155) !important;
}

[data-bs-theme="dark"] .summary-card .card-value,
[data-bs-theme="dark"] .summary-card h2 {
    color: var(--text-primary, #f1f5f9) !important;
}

[data-bs-theme="dark"] .summary-card .card-label {
    color: var(--text-secondary, #94a3b8) !important;
}

[data-bs-theme="dark"] .header-action-btn {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .header-action-btn:hover {
    color: var(--theme-primary);
    background: var(--bg-tertiary);
}

[data-bs-theme="dark"] .public-header {
    background: var(--bg-surface);
    border-bottom-color: var(--border-color);
}

[data-bs-theme="dark"] .public-nav-link {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .public-nav-link:hover,
[data-bs-theme="dark"] .public-nav-link.active {
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .public-dropdown {
    background: var(--bg-surface);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .public-dropdown-item {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .public-dropdown-item:hover {
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .public-auth-btn.login {
    color: var(--theme-primary);
    background: var(--theme-primary-subtle);
}

[data-bs-theme="dark"] .signup-menu {
    background: var(--bg-surface);
}

/* Public Header - user button & dropdowns */
[data-bs-theme="dark"] .public-user-btn {
    background: var(--bg-surface-secondary);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .public-user-btn:hover {
    border-color: var(--theme-primary);
}

[data-bs-theme="dark"] .public-avatar {
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .public-status {
    border-color: var(--bg-surface);
}

[data-bs-theme="dark"] .public-dropdown-header {
    border-bottom-color: var(--border-color);
}

[data-bs-theme="dark"] .public-dropdown-divider {
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .public-cart-title {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .public-cart-instructor {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .public-cart-item {
    border-bottom-color: var(--border-color);
}

[data-bs-theme="dark"] .public-cart-total {
    border-top-color: var(--border-color);
    background: var(--bg-surface-tertiary);
}

[data-bs-theme="dark"] .public-empty-state {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .header-action-btn:hover {
    background: var(--bg-surface-secondary);
}

[data-bs-theme="dark"] .header-action-badge {
    box-shadow: 0 0 0 2px var(--bg-surface);
}

/* ============================================
   PORTAL SECTION DARK MODE
   ============================================ */

/* Portal variables - override fallback borders that use rgba(0,0,0,...) */
[data-bs-theme="dark"] .portal-features,
[data-bs-theme="dark"] .portal-testimonials,
[data-bs-theme="dark"] .portal-contact {
    background: var(--bg-body);
}

[data-bs-theme="dark"] .portal-feature-card,
[data-bs-theme="dark"] .portal-testimonial-card,
[data-bs-theme="dark"] .portal-contact-card,
[data-bs-theme="dark"] .portal-program-card,
[data-bs-theme="dark"] .portal-blog-card {
    background: var(--bg-surface);
    border-color: var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .portal-feature-card:hover,
[data-bs-theme="dark"] .portal-testimonial-card:hover,
[data-bs-theme="dark"] .portal-program-card:hover,
[data-bs-theme="dark"] .portal-blog-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .portal-feature-description,
[data-bs-theme="dark"] .portal-testimonial-author-title,
[data-bs-theme="dark"] .portal-program-description,
[data-bs-theme="dark"] .portal-blog-excerpt {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .portal-testimonial-quote,
[data-bs-theme="dark"] .portal-testimonial-author-name,
[data-bs-theme="dark"] .portal-program-title,
[data-bs-theme="dark"] .portal-blog-title {
    color: var(--text-primary);
}

/* Portal contact form container */
[data-bs-theme="dark"] .portal-contact-card {
    border-color: var(--border-color);
}

/* Timeline section */
[data-bs-theme="dark"] .portal-timeline-item {
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .portal-timeline-content {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* RichText section */
[data-bs-theme="dark"] .portal-richtext {
    color: var(--text-primary);
}

/* Image Gallery */
[data-bs-theme="dark"] .portal-gallery-item {
    border-color: var(--border-color);
}

/* Share section / portal link box */
[data-bs-theme="dark"] .portal-share-box,
[data-bs-theme="dark"] .share-url-box {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* KPI Metric - comprehensive dark mode */
[data-bs-theme="dark"] .kpi-metric {
    background: var(--bg-surface) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .kpi-metric:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .kpi-metric .kpi-title {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .kpi-metric .kpi-value {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .kpi-metric .kpi-trend {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .kpi-metric .kpi-trend.positive {
    background: rgba(10, 207, 151, 0.15);
    color: var(--theme-success);
}

[data-bs-theme="dark"] .kpi-metric .kpi-trend.negative {
    background: rgba(237, 85, 101, 0.15);
    color: var(--theme-danger);
}

[data-bs-theme="dark"] .kpi-metric .kpi-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .auth-page {
    background: linear-gradient(135deg, #0f1114 0%, #1a1d24 50%, #0f1114 100%);
}

[data-bs-theme="dark"] .auth-container {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .auth-right {
    background: var(--bg-surface);
}

/* ========================================
   DARK MODE - Tables
   ======================================== */
[data-bs-theme="dark"] .table {
    --bs-table-bg: var(--bg-surface);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
    --bs-table-striped-bg: var(--bg-tertiary);
    --bs-table-hover-bg: var(--bg-tertiary);
}

[data-bs-theme="dark"] .table th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .table td {
    border-color: var(--border-color);
}

/* ========================================
   DARK MODE - Forms
   ======================================== */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--input-focus-border);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem var(--focus-ring-color);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--input-placeholder);
}

[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .input-group-text {
    background-color: var(--bg-tertiary);
    border-color: var(--input-border);
    color: var(--text-secondary);
}

/* ========================================
   DARK MODE - Dropdowns
   ======================================== */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: var(--bg-tertiary);
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .dropdown-header {
    color: var(--text-muted);
}

/* ========================================
   DARK MODE - Modals
   ======================================== */
[data-bs-theme="dark"] .modal-content {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color);
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: var(--border-color);
}

[data-bs-theme="dark"] .modal-title {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ========================================
   DARK MODE - List Groups
   ======================================== */
[data-bs-theme="dark"] .list-group-item {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .list-group-item:hover {
    background-color: var(--bg-tertiary);
}

/* ========================================
   DARK MODE - Badges & Pills
   ======================================== */
[data-bs-theme="dark"] .badge.bg-light {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* ========================================
   DARK MODE - Alerts
   ======================================== */
[data-bs-theme="dark"] .alert {
    border-color: var(--border-color);
}

/* ========================================
   DARK MODE - Breadcrumbs
   ======================================== */
[data-bs-theme="dark"] .breadcrumb {
    background-color: transparent;
}

[data-bs-theme="dark"] .breadcrumb-item a {
    color: var(--link-color);
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: var(--text-muted);
}

/* ========================================
   DARK MODE - Pagination
   ======================================== */
[data-bs-theme="dark"] .page-link {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .page-link:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
}

[data-bs-theme="dark"] .page-item.disabled .page-link {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
}

/* ========================================
   DARK MODE - Navigation Tabs
   ======================================== */
[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: var(--border-color);
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: var(--border-color);
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--bg-surface);
    border-color: var(--border-color) var(--border-color) var(--bg-surface);
    color: var(--theme-primary);
}

/* ========================================
   DARK MODE - Progress Bars
   ======================================== */
[data-bs-theme="dark"] .progress {
    background-color: var(--bg-tertiary);
}

/* ========================================
   DARK MODE - Tooltips
   ======================================== */
[data-bs-theme="dark"] .tooltip-inner {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ========================================
   DARK MODE - Text Colors
   ======================================== */
[data-bs-theme="dark"] .text-body {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3, [data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .h1, [data-bs-theme="dark"] .h2,
[data-bs-theme="dark"] .h3, [data-bs-theme="dark"] .h4,
[data-bs-theme="dark"] .h5, [data-bs-theme="dark"] .h6 {
    color: var(--text-primary);
}

[data-bs-theme="dark"] p {
    color: var(--text-secondary);
}

/* ========================================
   DARK MODE - Radzen Component Overrides
   ======================================== */
[data-bs-theme="dark"] .rz-datatable {
    background: var(--bg-surface);
}

[data-bs-theme="dark"] .rz-datatable-thead {
    background: var(--bg-tertiary);
}

[data-bs-theme="dark"] .rz-grid-table td {
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .rz-dropdown {
    background-color: var(--input-bg);
    border-color: var(--input-border);
}

[data-bs-theme="dark"] .rz-dropdown-panel {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
}

/* RadzenTabs Dark Mode - Global */
[data-bs-theme="dark"] .rz-tabview {
    background: transparent;
}

[data-bs-theme="dark"] .rz-tabview-nav {
    background: var(--bg-surface-secondary, #334155);
    border-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .rz-tabview-nav li {
    background: transparent;
}

[data-bs-theme="dark"] .rz-tabview-nav li a.rz-tabview-nav-link {
    color: var(--text-secondary, #94a3b8);
    background: transparent;
    border-color: transparent;
}

[data-bs-theme="dark"] .rz-tabview-nav li a.rz-tabview-nav-link:hover {
    color: var(--text-primary, #f1f5f9);
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .rz-tabview-nav li.rz-tabview-selected a.rz-tabview-nav-link,
[data-bs-theme="dark"] .rz-tabview-nav li a.rz-tabview-nav-link.rz-state-active {
    color: var(--theme-primary);
    background: transparent;
    border-bottom-color: var(--theme-primary);
}

[data-bs-theme="dark"] .rz-tabview-panels,
[data-bs-theme="dark"] .rz-tabview-panel {
    background: transparent;
    color: var(--text-primary, #f1f5f9);
}

/* RadzenChart Dark Mode - Global */
[data-bs-theme="dark"] .rz-chart {
    background: transparent;
}

[data-bs-theme="dark"] .rz-chart-axis-label,
[data-bs-theme="dark"] .rz-chart-title {
    fill: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .rz-chart-gridlines line {
    stroke: var(--border-color, #334155);
}

/* RadzenProgressBar Dark Mode - Global */
[data-bs-theme="dark"] .rz-progressbar {
    background: var(--bg-surface-secondary, #334155);
}

/* ============================================
   18. RESPONSIVE/MOBILE STYLES
   ============================================ */

/* Desktop collapse toggle */
@media (min-width: 768px) {
    .sidenav-collapse-toggle {
        display: flex;
    }
}

/* Mobile Sidenav */
@media (max-width: 767.98px) {
    .sidenav {
        width: var(--sidebar-mobile-width);
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform var(--sidenav-transition);
        box-shadow: none;
    }

    .sidenav.mobile-open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
    }

    .sidenav.collapsed,
    .sidenav.collapsed:hover {
        width: var(--sidebar-mobile-width);
        max-width: 85vw;
    }

    .sidenav-mobile-close {
        display: flex;
    }

    .content-page,
    .admin-content-page {
        margin-left: 0;
        width: 100%;
    }

    .app-topbar,
    .topbar {
        left: 0;
    }

    .header-action-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .header-action-btn i {
        font-size: 1.125rem;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .content-page,
    .admin-content-page {
        padding: var(--space-4);
        margin-bottom: var(--mobile-nav-height);
    }
}

/* Mobile Navigation Hidden */
@media (max-width: 991px) {
    .public-nav {
        display: none;
    }
}

@media (min-width: 992px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 768px) {
    .public-navbar-container {
        gap: 1rem;
    }

    .public-cart-dropdown {
        min-width: 320px;
    }

    .public-dropdown {
        min-width: 260px;
    }

    .kpi-metric {
        padding: var(--space-4);
    }

    .kpi-value {
        font-size: 1.5rem;
    }

    .auth-left {
        display: none !important;
    }

    .auth-right {
        flex: 1;
        padding: var(--space-8);
    }

    .auth-container {
        max-width: 600px;
    }
}

@media (max-width: 576px) {
    .auth-page {
        padding: var(--space-5) var(--space-3);
    }

    .auth-right {
        padding: var(--space-6) var(--space-5);
    }

    .auth-container {
        border-radius: var(--radius-2xl);
    }

    .fsh-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Mobile Bottom Navigation */
@media (max-width: 1024px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--mobile-nav-height);
        background: var(--bg-surface);
        border-top: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: var(--z-fixed);
        padding: 0 var(--space-2);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: var(--space-2);
        color: var(--text-secondary);
        text-decoration: none;
        font-size: var(--text-xs);
        transition: color 0.2s ease;
    }

    .mobile-nav-item.active {
        color: var(--theme-primary);
    }

    .mobile-nav-item i {
        font-size: 1.25rem;
        margin-bottom: 2px;
    }
}

@media (min-width: 1025px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* Print Styles */
@media print {
    .sidenav,
    .sidenav-backdrop,
    .app-topbar,
    .topbar,
    .mobile-bottom-nav {
        display: none !important;
    }

    .content-page,
    .admin-content-page {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .sidenav,
    .sidenav-backdrop,
    .nav-item,
    .nav-submenu,
    .fsh-btn {
        transition-duration: 0.01ms !important;
    }

    .nav-item:hover .nav-item-icon {
        animation: none;
    }
}

/* ============================================
   19. PORTAL/CMS COMPONENTS
   ============================================ */

/* Portal CSS Variables */
:root {
    --portal-primary: var(--theme-primary, #1ab394);
    --portal-secondary: var(--theme-secondary, #1c84c6);
    --portal-background: var(--bg-body, #F8FAFC);
    --portal-surface: var(--bg-surface, #FFFFFF);
    --portal-text: var(--text-primary, #1f2937);
    --portal-text-muted: var(--text-secondary, #6b7280);
    --portal-border-radius: 8px;
}

[data-bs-theme="dark"] {
    --portal-background: var(--bg-body, #212529);
    --portal-surface: var(--bg-surface, #2b3035);
    --portal-text: var(--text-primary, #dee2e6);
    --portal-text-muted: var(--text-secondary, #adb5bd);
}

/* Portal Base */
.portal-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.portal-section {
    margin-bottom: 0;
}

.portal-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.portal-section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--portal-text);
    margin-bottom: 0.75rem;
}

.portal-section-subtitle {
    font-size: 1.125rem;
    color: var(--portal-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Portal Grid */
.portal-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.portal-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.portal-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 992px) {
    .portal-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .portal-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .portal-grid-4,
    .portal-grid-3,
    .portal-grid-2 { grid-template-columns: 1fr; }
}

/* Hero Section */
.portal-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-secondary) 100%);
    overflow: hidden;
}

.portal-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.portal-hero-bg-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.portal-hero-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s ease-in-out infinite;
}

.portal-hero-circle-1 { width: 400px; height: 400px; top: -100px; right: -100px; }
.portal-hero-circle-2 { width: 300px; height: 300px; bottom: -50px; left: -50px; animation-delay: -5s; }
.portal-hero-circle-3 { width: 200px; height: 200px; top: 50%; left: 50%; animation-delay: -10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.portal-hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1280px;
    padding: 2rem;
}

.portal-hero-content {
    text-align: center;
    color: white;
}

.portal-hero-title {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.portal-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.portal-hero-cta-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.portal-cta-primary,
.portal-cta-secondary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: var(--portal-border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.portal-cta-primary {
    background: white;
    color: var(--portal-primary);
}

.portal-cta-primary:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.portal-cta-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.portal-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Feature Cards */
.portal-features {
    padding: 5rem 0;
    background: var(--portal-background);
}

.portal-features-grid {
    display: grid;
    gap: 1.5rem;
}

.portal-feature-card {
    display: block;
    background: var(--portal-surface);
    border-radius: var(--portal-border-radius);
    padding: 2rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.portal-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.portal-feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-secondary));
    border-radius: 50%;
    color: white;
    font-size: 2rem;
}

.portal-feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--portal-primary);
    margin-bottom: 0.75rem;
}

.portal-feature-description {
    color: var(--portal-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Statistics Section */
.portal-statistics {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-secondary) 100%);
    color: white;
}

.portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .portal-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .portal-stats-grid { grid-template-columns: 1fr; }
}

.portal-stat-item {
    text-align: center;
}

.portal-stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.5rem;
}

.portal-stat-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.portal-stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Testimonials */
.portal-testimonials {
    padding: 5rem 0;
    background: var(--portal-background);
}

.portal-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .portal-testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .portal-testimonials-grid { grid-template-columns: 1fr; }
}

.portal-testimonial-card {
    background: var(--portal-surface);
    border-radius: var(--portal-border-radius);
    padding: 2rem;
    position: relative;
}

.portal-testimonial-quote {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--portal-text);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.portal-testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal-testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.portal-testimonial-author-name {
    display: block;
    font-weight: 600;
    color: var(--portal-text);
}

.portal-testimonial-author-title {
    display: block;
    font-size: 0.875rem;
    color: var(--portal-text-muted);
}

/* CTA Section */
.portal-cta-section {
    position: relative;
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--portal-secondary) 0%, var(--portal-primary) 100%);
    overflow: hidden;
    text-align: center;
    color: white;
}

.portal-cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.portal-cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.portal-cta-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.portal-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.portal-cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: white;
    color: var(--portal-primary);
    border-radius: var(--portal-border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.portal-cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Contact Section */
.portal-contact {
    padding: 5rem 0;
    background: var(--portal-background);
}

.portal-contact-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.portal-contact-card {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    background: var(--portal-surface);
    border-radius: var(--portal-border-radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.portal-contact-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--portal-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
}

.portal-contact-icon-alt {
    background: var(--portal-secondary);
}

.portal-contact-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--portal-text);
    margin: 0 0 0.25rem 0;
}

.portal-contact-value {
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    margin: 0;
    word-break: break-word;
}

.portal-contact-card-alt {
    border-color: rgba(0, 0, 0, 0.08);
}

/* Contact Form Container */
.portal-contact-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.portal-form-container {
    background: var(--portal-surface);
    border-radius: var(--portal-border-radius);
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Form Grid Layouts */
.portal-form-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.portal-form-grid.portal-form-two-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.portal-form-grid.portal-form-side-by-side {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .portal-form-grid.portal-form-two-column,
    .portal-form-grid.portal-form-side-by-side {
        grid-template-columns: 1fr;
    }
}

/* Form Group */
.portal-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.portal-form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--portal-text);
}

.portal-form-label i {
    font-size: 1rem;
    color: var(--portal-primary);
}

/* Form Inputs */
.portal-form-input,
.portal-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--portal-text);
    background: var(--portal-background);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-family: inherit;
}

.portal-form-input::placeholder,
.portal-form-textarea::placeholder {
    color: var(--portal-text-muted);
    opacity: 0.7;
}

.portal-form-input:focus,
.portal-form-textarea:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 15%, transparent);
}

.portal-form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Validation Messages */
.portal-form-group .validation-message {
    font-size: 0.8125rem;
    color: var(--theme-danger, #dc3545);
}

/* Submit Button */
.portal-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-secondary) 100%);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.portal-form-submit:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--portal-primary) 35%, transparent);
}

.portal-form-submit:active:not(:disabled) {
    transform: translateY(0);
}

.portal-form-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.portal-form-submit i {
    font-size: 1.125rem;
}

/* Dark Mode Overrides */
[data-bs-theme="dark"] .portal-contact-card {
    background: var(--bg-surface, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .portal-contact-title {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .portal-contact-value {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .portal-form-container {
    background: var(--bg-surface, #1e293b);
    border-color: var(--border-color, #334155);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .portal-form-input,
[data-bs-theme="dark"] .portal-form-textarea {
    background: var(--bg-surface-tertiary, #0f172a);
    border-color: var(--border-color, #334155);
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .portal-form-input::placeholder,
[data-bs-theme="dark"] .portal-form-textarea::placeholder {
    color: #64748b;
}

[data-bs-theme="dark"] .portal-form-label {
    color: var(--text-primary, #f1f5f9);
}

/* Programs & Blog */
.portal-programs,
.portal-blog {
    padding: 5rem 0;
    background: var(--portal-background);
}

.portal-program-card,
.portal-blog-card {
    background: var(--portal-surface);
    border-radius: var(--portal-border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.portal-program-card:hover,
.portal-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.portal-program-content,
.portal-blog-content {
    padding: 1.5rem;
}

.portal-program-title,
.portal-blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--portal-text);
    margin-bottom: 0.5rem;
}

.portal-program-description,
.portal-blog-excerpt {
    color: var(--portal-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.portal-program-link,
.portal-blog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--portal-primary);
    font-weight: 500;
    text-decoration: none;
}

/* ============================================
   20. PUBLIC FOOTER
   ============================================ */

.public-footer {
    background: var(--theme-gray-900);
    color: white;
}

.footer-main {
    padding: 4rem 0 2rem;
}

.footer-widget {
    margin-bottom: 2rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    max-height: 50px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--theme-primary);
    transform: translateY(-3px);
}

.footer-widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--theme-primary);
    padding-left: 5px;
}

.footer-newsletter-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.newsletter-input-group {
    display: flex;
    gap: 0;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px 0 0 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0 8px 8px 0;
    background: var(--theme-primary);
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-btn:hover {
    background: var(--theme-primary-emphasis);
}

.footer-contact-info {
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.contact-item i {
    color: var(--theme-primary);
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: var(--theme-primary);
}

.footer-bottom-links .separator {
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   21. SIDENAV LIGHT MODE SUPPORT
   ============================================ */

/* Light mode sidenav - when body doesn't have dark theme */
:root {
    --sidebar-bg-light: #ffffff;
    --sidebar-text-light: #2f4050;
    --sidebar-text-hover-light: var(--theme-primary);
    --sidebar-border-light: #e5e7eb;
    --sidebar-active-bg-light: var(--theme-primary-subtle);
}

/* Light Theme Sidenav */
[data-bs-theme="light"] .sidenav,
body:not([data-bs-theme="dark"]) .sidenav {
    background: var(--sidebar-bg-light);
    border-right-color: var(--sidebar-border-light);
}

[data-bs-theme="light"] .sidenav-header,
body:not([data-bs-theme="dark"]) .sidenav-header {
    border-bottom-color: var(--sidebar-border-light);
}

[data-bs-theme="light"] .sidenav-logo-text,
body:not([data-bs-theme="dark"]) .sidenav-logo-text {
    color: var(--sidebar-text-light);
}

[data-bs-theme="light"] .nav-item,
body:not([data-bs-theme="dark"]) .nav-item {
    color: var(--sidebar-text-light);
}

[data-bs-theme="light"] .nav-item:hover,
body:not([data-bs-theme="dark"]) .nav-item:hover {
    background: var(--sidebar-active-bg-light);
    color: var(--sidebar-text-hover-light);
}

[data-bs-theme="light"] .nav-item.active,
body:not([data-bs-theme="dark"]) .nav-item.active {
    background: var(--sidebar-active-bg-light);
    color: var(--theme-primary);
}

[data-bs-theme="light"] .nav-item-icon,
body:not([data-bs-theme="dark"]) .nav-item-icon {
    color: var(--text-secondary);
}

[data-bs-theme="light"] .nav-item:hover .nav-item-icon,
[data-bs-theme="light"] .nav-item.active .nav-item-icon,
body:not([data-bs-theme="dark"]) .nav-item:hover .nav-item-icon,
body:not([data-bs-theme="dark"]) .nav-item.active .nav-item-icon {
    color: var(--theme-primary);
}

[data-bs-theme="light"] .nav-item-text,
body:not([data-bs-theme="dark"]) .nav-item-text {
    color: var(--sidebar-text-light);
}

[data-bs-theme="light"] .nav-section-title,
body:not([data-bs-theme="dark"]) .nav-section-title {
    color: #4b5563;
    font-weight: 700;
}

[data-bs-theme="light"] .sidenav-collapse-toggle,
body:not([data-bs-theme="dark"]) .sidenav-collapse-toggle {
    color: var(--sidebar-text-light);
    border-color: var(--sidebar-border-light);
}

[data-bs-theme="light"] .sidenav-mobile-close,
body:not([data-bs-theme="dark"]) .sidenav-mobile-close {
    color: var(--sidebar-text-light);
    background: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .sidenav-mobile-close:hover,
body:not([data-bs-theme="dark"]) .sidenav-mobile-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .nav-submenu,
body:not([data-bs-theme="dark"]) .nav-submenu {
    background: var(--theme-gray-50);
}

[data-bs-theme="light"] .sidenav-search-input input,
body:not([data-bs-theme="dark"]) .sidenav-search-input input {
    background: var(--theme-gray-100);
    color: var(--sidebar-text-light);
    border-color: var(--sidebar-border-light);
}

[data-bs-theme="light"] .sidenav-search-input input::placeholder,
body:not([data-bs-theme="dark"]) .sidenav-search-input input::placeholder {
    color: var(--text-muted);
}

[data-bs-theme="light"] .sidenav-search-icon,
body:not([data-bs-theme="dark"]) .sidenav-search-icon {
    color: var(--text-muted);
}

[data-bs-theme="light"] .sidenav-search-clear,
body:not([data-bs-theme="dark"]) .sidenav-search-clear {
    color: var(--text-muted);
}

[data-bs-theme="light"] .sidenav-search-clear:hover,
body:not([data-bs-theme="dark"]) .sidenav-search-clear:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .sidenav-favorites,
body:not([data-bs-theme="dark"]) .sidenav-favorites {
    background: var(--theme-gray-50);
    border-color: var(--sidebar-border-light);
}

/* ============================================
   22. CURRENCY SELECTOR FIX
   ============================================ */

.topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topbar-link:hover {
    color: var(--theme-primary);
    border-color: var(--theme-primary);
    background: var(--theme-primary-subtle);
}

.currency-symbol {
    font-size: 0.9rem;
    min-width: 24px;
    display: inline-block;
    text-align: center;
    font-weight: 600;
}

.currency-item-symbol {
    min-width: 28px;
    display: inline-block;
    font-weight: 600;
}

/* ============================================
   FSH SPLIT BUTTON - DataGrid Overflow Fix
   ============================================ */

/* Allow dropdown to overflow table cells */
.rz-grid-table td:has(.fsh-split-btn-container),
.rz-data-cell:has(.fsh-split-btn-container),
td:has(.fsh-split-btn-container) {
    overflow: visible !important;
}

.rz-data-row:has(.fsh-split-btn-container.open) {
    overflow: visible !important;
    z-index: 100;
}

/* Ensure split button container can overflow */
.fsh-split-btn-container {
    position: relative;
    overflow: visible !important;
}

.fsh-split-btn-container.open {
    z-index: 1001;
}

/* Dropdown menu positioning */
.fsh-split-btn-menu {
    position: absolute;
    z-index: 99999 !important;
}

/* ============================================
   PLATFORM PAGES - CENTRALIZED STYLES
   Migrated from scoped CSS for dark mode support
   ============================================ */

/* ============================================
   TENANT DETAILS PAGE
   ============================================ */

/* Tenant Avatar Badge for PageLayout header */
.tenant-avatar-badge {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark, var(--theme-primary)));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* Error State */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.error-container i {
    font-size: 4rem;
    color: var(--theme-danger);
    margin-bottom: 1rem;
}

.error-container h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Large Avatar Variant */
.tenant-avatar.large {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    border-radius: 14px;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quick-stats .stat-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.quick-stats .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-stats .stat-icon i {
    font-size: 1.5rem;
}

.quick-stats .stat-icon.users {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

.quick-stats .stat-icon.package {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.quick-stats .stat-icon.calendar {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.quick-stats .stat-icon.time {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Info Cards */
.info-card {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.info-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-surface-secondary);
    border-bottom: 1px solid var(--border-color);
}

.info-card .card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.info-card .card-title i {
    color: var(--theme-primary);
}

.info-card .card-body {
    padding: 1.25rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.info-value.monospace {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--theme-primary);
}

.info-value.warning {
    color: var(--theme-warning);
}

.info-value .expired {
    color: var(--theme-danger);
}

.connection-string {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
    max-width: 250px;
}

/* Actions Card */
.actions-card .card-body {
    padding: 1.25rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* Metrics Section */
.metrics-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metrics-card,
.activity-card,
.payment-card {
    min-height: 300px;
}

/* Loading and Empty States */
.loading-placeholder,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-secondary);
    min-height: 200px;
}

.empty-state i {
    font-size: 2.5rem;
    opacity: 0.5;
}

/* Usage Metrics */
.usage-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.usage-metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon i {
    font-size: 1.125rem;
}

.metric-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.metric-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.metric-values {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.metric-percent {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-success);
}

.metric-percent.warning {
    color: var(--theme-warning);
}

.metric-progress {
    height: 6px;
    background: var(--bg-surface-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.metric-progress .progress-bar {
    height: 100%;
    background: var(--theme-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.metric-progress .progress-bar.warning {
    background: var(--theme-warning);
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon i {
    font-size: 0.875rem;
}

.activity-icon.success {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.activity-icon.primary {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

.activity-icon.warning {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.activity-icon.danger {
    background: var(--theme-danger-subtle);
    color: var(--theme-danger);
}

.activity-icon.info {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.activity-icon.secondary {
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
}

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

.activity-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.activity-type {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-plan {
    font-size: 0.75rem;
    color: var(--theme-primary);
    background: var(--theme-primary-subtle);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.activity-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.activity-reason {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.activity-price {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.activity-user {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Payment History */
.payments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-surface-secondary);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.payment-item:hover {
    background: var(--theme-primary-subtle);
}

.payment-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-icon i {
    font-size: 1.125rem;
    color: var(--theme-primary);
}

.payment-info {
    flex: 1;
    min-width: 0;
}

.payment-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.payment-amount {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-status {
    font-size: 0.65rem;
    padding: 0.125rem 0.5rem;
}

.payment-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.payment-method {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.payment-invoice {
    font-size: 0.7rem;
    color: var(--theme-primary);
    font-weight: 500;
}

.payment-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.payment-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.payment-ref {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.more-payments {
    text-align: center;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    margin-top: 0.5rem;
}

.more-payments span {
    font-size: 0.75rem;
    color: var(--theme-primary);
    cursor: pointer;
}

/* ============================================
   TENANT USERS PAGE
   ============================================ */

.tenant-users-page .nav-tabs-container {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.tenant-users-page .users-grid-card {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* ============================================
   BILLING INVOICING PAGE
   ============================================ */

.billing-page .billing-overview {
    margin-bottom: 1.5rem;
}

.billing-page .overview-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.billing-page .overview-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.billing-page .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.billing-page .card-icon i {
    font-size: 1.5rem;
    color: white;
}

.billing-page .card-icon.revenue {
    background: linear-gradient(135deg, var(--theme-success), var(--theme-success-emphasis));
}

.billing-page .card-icon.pending {
    background: linear-gradient(135deg, var(--theme-warning), var(--theme-warning-emphasis));
}

.billing-page .card-icon.overdue {
    background: linear-gradient(135deg, var(--theme-danger), var(--theme-danger-emphasis));
}

.billing-page .card-icon.invoices {
    background: linear-gradient(135deg, var(--theme-info), var(--theme-info-emphasis));
}

.billing-page .payment-methods {
    margin-bottom: 1.5rem;
}

.billing-page .usage-section {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   RESOURCE QUOTAS PAGE
   ============================================ */

.quotas-page .quota-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.quotas-page .quota-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quotas-page .quota-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quotas-page .quota-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.quotas-page .quota-icon i {
    font-size: 1.5rem;
}

.quotas-page .quota-icon.users {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

.quotas-page .quota-icon.storage {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.quotas-page .quota-icon.api {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.quotas-page .quota-icon.apps {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.quotas-page .quota-progress {
    height: 8px;
    background: var(--bg-surface-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.quotas-page .quota-progress .progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quotas-page .quota-progress .progress-bar.normal {
    background: var(--theme-success);
}

.quotas-page .quota-progress .progress-bar.warning {
    background: var(--theme-warning);
}

.quotas-page .quota-progress .progress-bar.danger {
    background: var(--theme-danger);
}

.quotas-page .trends-section {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   MIGRATIONS PAGE
   ============================================ */

.migrations-page {
    padding-bottom: 2rem;
}

.migrations-page .summary-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
    background: var(--bg-surface);
}

.migrations-page .summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.migrations-page .summary-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.migrations-page .summary-card-total .summary-icon {
    background-color: color-mix(in srgb, var(--theme-info) 10%, transparent);
    color: var(--theme-info);
}

.migrations-page .summary-card-success .summary-icon {
    background-color: color-mix(in srgb, var(--theme-success) 10%, transparent);
    color: var(--theme-success);
}

.migrations-page .summary-card-warning .summary-icon {
    background-color: color-mix(in srgb, var(--theme-warning) 10%, transparent);
    color: var(--theme-warning);
}

.migrations-page .summary-card-danger .summary-icon {
    background-color: color-mix(in srgb, var(--theme-danger) 10%, transparent);
    color: var(--theme-danger);
}

.migrations-page .migrations-grid {
    border-radius: 0 0 12px 12px;
}

.migrations-page .row-error {
    background-color: color-mix(in srgb, var(--theme-danger) 5%, transparent) !important;
    border-left: 4px solid var(--theme-danger);
}

.migrations-page .row-error:hover {
    background-color: color-mix(in srgb, var(--theme-danger) 10%, transparent) !important;
}

.migrations-page .row-pending {
    background-color: color-mix(in srgb, var(--theme-warning) 5%, transparent) !important;
    border-left: 4px solid var(--theme-warning);
}

.migrations-page .row-pending:hover {
    background-color: color-mix(in srgb, var(--theme-warning) 10%, transparent) !important;
}

.migrations-page .row-uptodate {
    background-color: color-mix(in srgb, var(--theme-success) 2%, transparent) !important;
    border-left: 4px solid var(--theme-success);
}

.migrations-page .row-uptodate:hover {
    background-color: color-mix(in srgb, var(--theme-success) 5%, transparent) !important;
}

.tenant-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.migration-name {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: var(--bg-body);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-uptodate {
    background-color: color-mix(in srgb, var(--theme-success) 15%, transparent);
    color: var(--theme-success);
}

.status-pending {
    background-color: color-mix(in srgb, var(--theme-warning) 15%, transparent);
    color: var(--theme-warning);
}

.status-error {
    background-color: color-mix(in srgb, var(--theme-danger) 15%, transparent);
    color: var(--theme-danger);
}

.expansion-content {
    background-color: var(--bg-body);
    border-top: 1px solid var(--border-color);
}

.pending-migrations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pending-migration-badge {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    padding: 6px 10px;
}

/* ============================================
   PROVISIONING STATUS PAGE
   ============================================ */

.provisioning-page {
    padding: 0 1rem;
}

.provisioning-page .toolbar-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.provisioning-page .toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.provisioning-page .toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.provisioning-page .auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-body);
    border-radius: 8px;
}

.provisioning-page .toggle-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.provisioning-page .refresh-indicator {
    color: var(--theme-primary);
}

.provisioning-page .summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.provisioning-page .summary-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.provisioning-page .summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.provisioning-page .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.provisioning-page .card-icon i {
    font-size: 1.5rem;
    color: white;
}

.provisioning-page .total-card .card-icon {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
}

.provisioning-page .provisioned-card .card-icon {
    background: linear-gradient(135deg, var(--theme-success) 0%, var(--theme-success-emphasis) 100%);
}

.provisioning-page .in-progress-card .card-icon {
    background: linear-gradient(135deg, var(--theme-info) 0%, var(--theme-primary) 100%);
}

.provisioning-page .failed-card .card-icon {
    background: linear-gradient(135deg, var(--theme-danger) 0%, var(--theme-rose-emphasis) 100%);
}

.provisioning-page .card-content {
    flex: 1;
}

.provisioning-page .card-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
}

.provisioning-page .card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.provisioning-page .filter-section {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.provisioning-page .filter-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.provisioning-page .status-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.provisioning-page .filter-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.provisioning-page .data-grid-section {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.provisioning-page .expanded-content {
    padding: 1.5rem;
    background: var(--bg-body);
    border-top: 1px solid var(--border-color);
}

.provisioning-page .steps-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.provisioning-page .steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.provisioning-page .step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface);
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
}

.provisioning-page .step-item.step-completed {
    border-left-color: var(--theme-success);
}

.provisioning-page .step-item.step-in-progress {
    border-left-color: var(--theme-info);
}

.provisioning-page .step-item.step-failed {
    border-left-color: var(--theme-danger);
}

.provisioning-page .step-item.step-pending {
    border-left-color: var(--text-muted);
}

.provisioning-page .step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.provisioning-page .step-completed .step-indicator {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.provisioning-page .step-in-progress .step-indicator {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.provisioning-page .step-failed .step-indicator {
    background: color-mix(in srgb, var(--theme-danger) 15%, transparent);
    color: var(--theme-danger);
}

.provisioning-page .step-pending .step-indicator {
    background: var(--theme-gray-100);
    color: var(--text-secondary);
}

.provisioning-page .legend-section {
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.provisioning-page .legend-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

.provisioning-page .legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.provisioning-page .legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.provisioning-page .legend-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.provisioning-page .legend-badge.completed {
    background-color: var(--theme-success-subtle);
    color: var(--theme-success);
}

.provisioning-page .legend-badge.in-progress {
    background-color: var(--theme-info-subtle);
    color: var(--theme-info);
}

.provisioning-page .legend-badge.failed {
    background-color: color-mix(in srgb, var(--theme-danger) 15%, transparent);
    color: var(--theme-danger);
}

.provisioning-page .legend-badge.pending {
    background-color: var(--theme-gray-100);
    color: var(--text-secondary);
}

/* ============================================
   BILLING ADJUSTMENTS PAGE
   ============================================ */

.billing-adjustments-page {
    padding: 1.5rem;
}

.billing-adjustments-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.billing-adjustments-page .page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.billing-adjustments-page .header-subtitle {
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
}

.billing-adjustments-page .header-actions {
    display: flex;
    gap: 0.75rem;
}

.billing-adjustments-page .tabs-container {
    margin-bottom: 1.5rem;
}

.billing-adjustments-page .custom-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
}

.billing-adjustments-page .tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.billing-adjustments-page .tab-btn:hover {
    color: var(--theme-primary);
}

.billing-adjustments-page .tab-btn.active {
    color: var(--theme-primary);
    border-bottom-color: var(--theme-primary);
}

.billing-adjustments-page .tab-btn i {
    font-size: 1.125rem;
}

.billing-adjustments-page .filters-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.billing-adjustments-page .filter-item {
    display: flex;
    align-items: center;
}

.billing-adjustments-page .data-table-container {
    background: var(--bg-surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.billing-adjustments-page .invoice-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.billing-adjustments-page .invoice-number .number {
    font-weight: 500;
    color: var(--text-primary);
}

.billing-adjustments-page .invoice-number .badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
}

.billing-adjustments-page .invoice-number .badge.credit {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.billing-adjustments-page .invoice-number .badge.debit {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.billing-adjustments-page .description-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.billing-adjustments-page .description-cell .description {
    color: var(--text-primary);
}

.billing-adjustments-page .description-cell .reason {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.billing-adjustments-page .amount {
    font-weight: 600;
}

.billing-adjustments-page .amount.positive {
    color: var(--text-primary);
}

.billing-adjustments-page .amount.negative {
    color: var(--theme-success);
}

.billing-adjustments-page .type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--theme-gray-100);
    color: var(--text-secondary);
}

.billing-adjustments-page .type-badge.creditnote {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.billing-adjustments-page .type-badge.debitnote {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

/* ============================================
   PLATFORM PAYMENT GATEWAYS PAGE
   ============================================ */

.gateway-card {
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.gateway-card:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.gateway-card.inactive {
    opacity: 0.6;
}

.gateway-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    border-radius: 0.5rem;
}

.gateway-suggestion {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px dashed var(--border-color);
    background: var(--bg-surface);
}

.gateway-suggestion:hover {
    border-color: var(--theme-primary);
    background: var(--bg-body);
}

/* ============================================
   CONFIGURATION SETTINGS PAGE
   ============================================ */

.configuration-settings-page .feature-toggle-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s ease;
}

.configuration-settings-page .feature-toggle-card:hover {
    box-shadow: var(--shadow-md);
}

.configuration-settings-page .section-title {
    font-weight: 600;
    color: var(--text-primary);
}

.configuration-settings-page .subsection-title {
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* ============================================
   TENANT SECURITY SETTINGS PAGE
   ============================================ */

.security-settings-page .security-section {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.security-settings-page .section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.security-settings-page .section-header i {
    font-size: 1.25rem;
    color: var(--theme-primary);
}

.security-settings-page .section-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   MODALS AND DIALOGS
   ============================================ */

/* Create Tenant Modal */
.create-tenant-modal {
    min-width: 500px;
    max-width: 600px;
}

.create-tenant-modal .modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-tenant-modal .modal-icon i {
    font-size: 1.5rem;
}

.create-tenant-modal .summary-card {
    background: var(--bg-surface-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.create-tenant-modal .summary-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-purple) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.create-tenant-modal .advanced-options {
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Upgrade Subscription Modal */
.upgrade-subscription-modal {
    padding: 0;
}

.upgrade-subscription-modal .modal-header-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--theme-indigo, #667eea) 0%, var(--theme-purple, #764ba2) 100%);
    color: white;
}

.upgrade-subscription-modal .header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.upgrade-subscription-modal .header-icon i {
    font-size: 1.5rem;
}

.upgrade-subscription-modal .header-content h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.upgrade-subscription-modal .header-content p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.upgrade-subscription-modal .modal-body-section {
    padding: 1.5rem;
}

.upgrade-subscription-modal .tenant-info-card {
    padding: 1rem;
    background: var(--bg-body);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.upgrade-subscription-modal .quick-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.upgrade-subscription-modal .quick-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-subscription-modal .quick-option:hover {
    border-color: var(--theme-gray-400);
    background: var(--bg-body);
}

.upgrade-subscription-modal .quick-option.selected {
    border-color: var(--theme-indigo, #667eea);
    background: var(--theme-primary-subtle);
}

.upgrade-subscription-modal .option-duration {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upgrade-subscription-modal .quick-option.selected .option-duration {
    color: var(--theme-indigo, #667eea);
}

.upgrade-subscription-modal .option-date {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.upgrade-subscription-modal .extension-summary {
    padding: 1rem;
    background: var(--theme-success-subtle);
    border: 1px solid var(--theme-success-border, #bbf7d0);
    border-radius: 8px;
}

.upgrade-subscription-modal .modal-footer-section {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-body);
    border-top: 1px solid var(--border-color);
}

/* Invoice Details Dialog */
.invoice-dialog {
    padding: 0;
    background: var(--bg-surface);
}

.invoice-dialog .invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-purple) 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.invoice-dialog .invoice-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

.invoice-dialog .invoice-brand i {
    font-size: 1.25rem;
}

.invoice-dialog .invoice-number-display {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.invoice-dialog .invoice-body {
    padding: 1.5rem;
}

.invoice-dialog .invoice-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-surface-tertiary);
    border-radius: 8px;
}

.invoice-dialog .items-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-dialog .items-table th {
    padding: 0.75rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.invoice-dialog .items-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.invoice-dialog .item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.invoice-dialog .item-detail {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.invoice-dialog .invoice-totals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-surface-tertiary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.invoice-dialog .totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.invoice-dialog .totals-row.total {
    padding-top: 0.75rem;
    border-top: 2px solid var(--border-color);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.invoice-dialog .status-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
}

.invoice-dialog .status-alert i {
    font-size: 1.25rem;
}

.invoice-dialog .status-alert.success {
    background: var(--theme-success-subtle);
    color: var(--theme-success-emphasis);
}

.invoice-dialog .status-alert.warning {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning-emphasis);
}

.invoice-dialog .status-alert.danger {
    background: var(--theme-danger-subtle);
    color: var(--theme-danger);
}

.invoice-dialog .status-alert.info {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.invoice-dialog .invoice-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-surface-tertiary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
}

.invoice-dialog .footer-info small {
    color: var(--text-muted);
}

.invoice-dialog .footer-actions {
    display: flex;
    gap: 0.5rem;
}

/* General Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    backdrop-filter: blur(2px);
}

.modal-dialog {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

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

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* Dialog Form Styles */
.dialog-form {
    padding: 1rem;
}

.dialog-form .form-group {
    margin-bottom: 1rem;
}

.dialog-form .form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.dialog-form .form-group .required {
    color: var(--theme-danger);
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Void Dialog */
.void-dialog {
    padding: 1rem;
    text-align: center;
}

.void-dialog .warning-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: var(--theme-warning-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.void-dialog .warning-icon i {
    font-size: 2rem;
    color: var(--theme-warning);
}

.void-dialog p {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.void-dialog .warning-text {
    color: var(--theme-danger);
    font-size: 0.875rem;
}

.void-dialog .form-group {
    margin-top: 1.5rem;
    text-align: left;
}

.void-dialog .form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   PLATFORM PAGES - DARK MODE OVERRIDES
   ============================================ */

[data-bs-theme="dark"] .error-container {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .error-container h3 {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .error-container p {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .quick-stats .stat-card {
    background: var(--bg-surface-tertiary, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .stat-value {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .stat-label {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .info-card {
    background: var(--bg-surface-tertiary, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .info-card .card-header {
    background: var(--bg-surface-secondary, #334155);
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .info-card .card-title {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .info-row {
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .info-label {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .info-value {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .activity-item {
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .activity-type {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .activity-reason,
[data-bs-theme="dark"] .activity-time,
[data-bs-theme="dark"] .activity-user {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .payment-item {
    background: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .payment-item:hover {
    background: color-mix(in srgb, var(--theme-primary) 15%, var(--bg-surface-secondary));
}

[data-bs-theme="dark"] .payment-icon {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .payment-amount {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .payment-method,
[data-bs-theme="dark"] .payment-date,
[data-bs-theme="dark"] .payment-ref {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .more-payments {
    border-top-color: var(--border-color, #334155);
}

/* Migrations Page Dark Mode */
[data-bs-theme="dark"] .migrations-page .summary-card {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .migration-name {
    background-color: var(--bg-surface-secondary, #334155);
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .expansion-content {
    background-color: var(--bg-surface-secondary, #334155);
    border-top-color: var(--border-color, #334155);
}

/* Provisioning Page Dark Mode */
[data-bs-theme="dark"] .provisioning-page .toolbar-section,
[data-bs-theme="dark"] .provisioning-page .filter-section,
[data-bs-theme="dark"] .provisioning-page .data-grid-section,
[data-bs-theme="dark"] .provisioning-page .legend-section {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .provisioning-page .auto-refresh-toggle {
    background-color: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .provisioning-page .summary-card {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .provisioning-page .card-value {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .provisioning-page .card-label {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .provisioning-page .expanded-content {
    background: var(--bg-surface-secondary, #334155);
    border-top-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .provisioning-page .step-item {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .provisioning-page .steps-title {
    color: var(--text-primary, #f1f5f9);
}

/* Billing Adjustments Dark Mode */
[data-bs-theme="dark"] .billing-adjustments-page .page-header h1 {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .billing-adjustments-page .header-subtitle {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .billing-adjustments-page .custom-tabs {
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .billing-adjustments-page .tab-btn {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .billing-adjustments-page .tab-btn:hover,
[data-bs-theme="dark"] .billing-adjustments-page .tab-btn.active {
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .billing-adjustments-page .data-table-container {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .billing-adjustments-page .invoice-number .number {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .billing-adjustments-page .description-cell .description {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .billing-adjustments-page .description-cell .reason {
    color: var(--text-muted, #64748b);
}

/* Gateway Card Dark Mode */
[data-bs-theme="dark"] .gateway-card {
    background: var(--bg-surface-tertiary, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .gateway-icon {
    background: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .gateway-suggestion {
    background: var(--bg-surface-tertiary, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .gateway-suggestion:hover {
    background: var(--bg-surface-secondary, #334155);
}

/* Configuration Settings Dark Mode */
[data-bs-theme="dark"] .configuration-settings-page .feature-toggle-card {
    background: var(--bg-surface-tertiary, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .configuration-settings-page .section-title {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .configuration-settings-page .subsection-title {
    color: var(--text-secondary, #94a3b8);
    border-bottom-color: var(--border-color, #334155);
}

/* Security Settings Dark Mode */
[data-bs-theme="dark"] .security-settings-page .security-section {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .security-settings-page .section-header h3 {
    color: var(--text-primary, #f1f5f9);
}

/* Quotas Page Dark Mode */
[data-bs-theme="dark"] .quotas-page .quota-card {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .quotas-page .trends-section {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .quotas-page .quota-progress {
    background: var(--bg-surface-secondary, #334155);
}

/* Billing Page Dark Mode */
[data-bs-theme="dark"] .billing-page .overview-card {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .billing-page .usage-section {
    background: var(--bg-surface-tertiary, #1e293b);
}

/* Tenant Users Dark Mode */
[data-bs-theme="dark"] .tenant-users-page .nav-tabs-container {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .tenant-users-page .users-grid-card {
    background: var(--bg-surface-tertiary, #1e293b);
}

/* Modal/Dialog Dark Mode */
[data-bs-theme="dark"] .modal-dialog {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .modal-header h3 {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .close-btn {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .close-btn:hover {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .dialog-form .form-group label {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .dialog-buttons {
    border-top-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .void-dialog p {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .void-dialog .form-group label {
    color: var(--text-primary, #f1f5f9);
}

/* Create Tenant Modal Dark Mode */
[data-bs-theme="dark"] .create-tenant-modal .summary-card {
    background: var(--bg-surface-secondary, #334155);
    border-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .create-tenant-modal .advanced-options {
    border-color: var(--border-color, #334155);
}

/* Upgrade Subscription Modal Dark Mode */
[data-bs-theme="dark"] .upgrade-subscription-modal .modal-body-section {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .upgrade-subscription-modal .tenant-info-card {
    background: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .upgrade-subscription-modal .info-value {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .upgrade-subscription-modal .info-label {
    color: var(--text-muted, #64748b);
}

[data-bs-theme="dark"] .upgrade-subscription-modal .quick-option {
    border-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .upgrade-subscription-modal .quick-option:hover {
    background: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .upgrade-subscription-modal .option-duration {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .upgrade-subscription-modal .option-date {
    color: var(--text-muted, #64748b);
}

[data-bs-theme="dark"] .upgrade-subscription-modal .modal-footer-section {
    background: var(--bg-surface-secondary, #334155);
    border-top-color: var(--border-color, #334155);
}

/* Invoice Dialog Dark Mode */
[data-bs-theme="dark"] .invoice-dialog {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .invoice-dialog .invoice-body {
    background: var(--bg-surface-tertiary, #1e293b);
}

[data-bs-theme="dark"] .invoice-dialog .invoice-info-grid {
    background: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .invoice-dialog .info-value {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .invoice-dialog .info-label {
    color: var(--text-muted, #64748b);
}

[data-bs-theme="dark"] .invoice-dialog .items-table th {
    color: var(--text-muted, #64748b);
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .invoice-dialog .items-table td {
    border-bottom-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .invoice-dialog .item-name {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .invoice-dialog .item-detail {
    color: var(--text-muted, #64748b);
}

[data-bs-theme="dark"] .invoice-dialog .invoice-totals {
    background: var(--bg-surface-secondary, #334155);
}

[data-bs-theme="dark"] .invoice-dialog .totals-row {
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .invoice-dialog .totals-row.total {
    color: var(--text-primary, #f1f5f9);
    border-top-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .invoice-dialog .invoice-footer {
    background: var(--bg-surface-secondary, #334155);
    border-top-color: var(--border-color, #334155);
}

[data-bs-theme="dark"] .invoice-dialog .footer-info small {
    color: var(--text-muted, #64748b);
}

/* ============================================
   PLATFORM PAGES - RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .metrics-section {
        grid-template-columns: 1fr;
    }

    .provisioning-page .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .billing-page .overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .quick-stats {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .provisioning-page .summary-cards {
        grid-template-columns: 1fr;
    }

    .provisioning-page .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .billing-adjustments-page .page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .billing-adjustments-page .header-actions {
        width: 100%;
    }

    .billing-adjustments-page .filters-row {
        flex-direction: column;
    }

    .billing-page .overview-cards {
        grid-template-columns: 1fr;
    }

    .upgrade-subscription-modal .quick-options {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============================================================================
   ACCOUNT PAGES
   Styles for Account section: Billing, Team, Organization, Branding
   Migrated from scoped .razor.css files to centralized app.css
   ============================================================================ */

/* --- Account: Billing Portal (2370 lines) --- */

/* Billing Portal Styles */
/* Note: Page header is now handled by the shared PageLayout component */

/* No Subscription State */
.no-subscription-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 3rem;
}

.no-subscription-content {
    text-align: center;
    max-width: 500px;
}

.no-subscription-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) 0%, rgba(var(--bs-primary-rgb, 59, 130, 246), 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-subscription-icon i {
    font-size: 3rem;
    color: var(--bs-primary, #3b82f6);
    opacity: 0.8;
}

.no-subscription-content h3 {
    color: var(--text-heading, #1e293b);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.no-subscription-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.no-subscription-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.no-subscription-help {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

/* Content wrapper */
.billing-portal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Sections */
.portal-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    margin: 0;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
}

.section-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-badge.active {
    background: #dcfce7;
    color: #15803d;
}

.status-badge.trial {
    background: #fef3c7;
    color: #b45309;
}

.status-badge.suspended, .status-badge.cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.status-badge.expired {
    background: #f3f4f6;
    color: #6b7280;
}

/* Subscription Card */
.subscription-card {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
}

.plan-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--theme-primary, #1ab394) 0%, var(--theme-primary-emphasis, #16987e) 100%);
    color: white;
    flex-wrap: wrap;
    gap: 1rem;
}

.plan-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.plan-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plan-icon i {
    font-size: 1.5rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.plan-code {
    margin: 0.25rem 0 0;
    opacity: 0.8;
    font-size: 0.875rem;
}

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

.price-current {
    display: flex;
    align-items: baseline;
    gap: 0.125rem;
}

.price-current .currency {
    font-size: 1.25rem;
    font-weight: 600;
}

.price-current .amount {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.price-current .period {
    font-size: 1rem;
    opacity: 0.8;
}

.discount-info {
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.original-price {
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 0.5rem;
}

.discount-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.subscription-details {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
}

.detail-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.detail-value.warning {
    color: #b45309;
}

/* Pending Change Notice */
.pending-change-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 1rem 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 10px;
    position: relative;
}

.pending-change-notice .notice-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f59e0b;
    border-radius: 10px;
    color: white;
    font-size: 1.25rem;
}

.pending-change-notice .notice-content {
    flex: 1;
}

.pending-change-notice .notice-content h4 {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #92400e;
}

.pending-change-notice .notice-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #78350f;
    line-height: 1.5;
}

.pending-change-notice .notice-content .notice-hint {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #a16207;
}

.pending-change-notice .btn-cancel-change {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #d97706;
    border-radius: 6px;
    color: #92400e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pending-change-notice .btn-cancel-change:hover {
    background: #fbbf24;
    border-color: #f59e0b;
    color: #78350f;
}

.subscription-actions {
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-action.primary {
    background: var(--theme-primary, #1ab394);
    color: white;
}

.btn-action.primary:hover {
    background: var(--theme-primary-emphasis, #16987e);
}

.btn-action.secondary {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-heading, #1e293b);
}

.btn-action.secondary:hover {
    background: var(--bg-tertiary, #e2e8f0);
}

.btn-action.outline {
    background: transparent;
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-body, #334155);
}

.btn-action.outline:hover {
    background: var(--bg-secondary, #f1f5f9);
}

.btn-action.danger {
    background: #dc2626;
    color: white;
}

.btn-action.danger:hover {
    background: #b91c1c;
}

.btn-action.danger-outline {
    background: transparent;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.btn-action.danger-outline:hover {
    background: #fef2f2;
}

.btn-action.small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-link {
    background: none;
    border: none;
    color: var(--theme-primary, #1ab394);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 0.875rem;
}

.btn-link:hover {
    text-decoration: underline;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-body, #334155);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-tertiary, #e2e8f0);
}

.icon-btn.primary {
    background: var(--theme-primary, #1ab394);
    color: white;
}

.icon-btn.danger {
    color: #dc2626;
}

.icon-btn.danger:hover {
    background: #fef2f2;
}

.icon-btn.success {
    color: #16a34a;
}

.icon-btn.success:hover {
    background: #f0fdf4;
}

.icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty States */
.empty-subscription, .empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted, #64748b);
}

.empty-subscription i, .empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 1rem;
}

.empty-subscription h3, .empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-heading, #1e293b);
    margin: 0 0 0.5rem;
}

.empty-subscription p, .empty-state p {
    margin: 0 0 1.5rem;
}

.empty-state.small {
    padding: 2rem 1rem;
}

.empty-state.small i {
    font-size: 2rem;
}

/* Usage Section */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.usage-card {
    background: var(--bg-secondary, #f8fafc);
    border-radius: 10px;
    padding: 1.25rem;
}

.usage-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.usage-icon.users { background: #dbeafe; color: #2563eb; }
.usage-icon.students { background: #dcfce7; color: #16a34a; }
.usage-icon.storage { background: #fef3c7; color: #d97706; }
.usage-icon.api { background: #f3e8ff; color: #9333ea; }

.usage-label {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    display: block;
}

.usage-values {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin-top: 0.25rem;
}

.usage-values .current {
    color: var(--theme-primary, #1ab394);
}

.usage-values .separator {
    color: var(--text-muted, #64748b);
    margin: 0 0.25rem;
}

.usage-bar-container {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.usage-bar {
    height: 100%;
    background: var(--theme-primary, #1ab394);
    border-radius: 3px;
    transition: width 0.3s;
}

.usage-bar.warning { background: #f59e0b; }
.usage-bar.critical { background: #dc2626; }

.usage-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 8px;
    margin-top: 1rem;
    color: #92400e;
    font-size: 0.875rem;
}

.usage-alert i {
    font-size: 1.25rem;
}

/* Invoices Table */
.invoices-table {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}

.table-header, .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 100px;
    align-items: center;
    padding: 0.875rem 1rem;
}

.table-header {
    background: var(--bg-secondary, #f8fafc);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-row {
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.table-row:hover {
    background: var(--bg-secondary, #f8fafc);
}

.invoice-number {
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    display: block;
}

.invoice-desc {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
}

.status-pill {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill.paid { background: #dcfce7; color: #15803d; }
.status-pill.pending { background: #fef3c7; color: #b45309; }
.status-pill.overdue { background: #fee2e2; color: #b91c1c; }

.td.actions {
    display: flex;
    gap: 0.375rem;
}

.view-all-link {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.view-all-link a {
    color: var(--theme-primary, #1ab394);
    font-weight: 600;
    text-decoration: none;
}

.view-all-link a:hover {
    text-decoration: underline;
}

/* Payments Table */
.payments-table {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}

.payments-table .table-header,
.payments-table .table-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1fr 0.8fr 100px;
    align-items: center;
    padding: 0.875rem 1rem;
}

.payment-ref {
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    display: block;
    font-family: monospace;
    font-size: 0.8125rem;
}

.payment-desc {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    display: block;
    margin-top: 0.125rem;
}

/* Payment Method Badges */
.method-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.method-badge.mtn {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.method-badge.airtel {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.method-badge.bank {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.method-badge.card {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.method-badge.default {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-body, #334155);
}

.method-badge i {
    font-size: 0.875rem;
}

/* Payment Status Pills */
.status-pill.completed, .status-pill.success {
    background: #dcfce7;
    color: #15803d;
}

.status-pill.failed {
    background: #fee2e2;
    color: #b91c1c;
}

.status-pill.processing {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pill.refunded {
    background: #f3e8ff;
    color: #7c3aed;
}

/* Payments Section Header */
.payments-section .section-header {
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

/* Filter */
.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

/* Payment Methods */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.payment-method-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    transition: all 0.2s;
}

.payment-method-card:hover {
    border-color: var(--theme-primary, #1ab394);
}

.payment-method-card.default {
    border-color: var(--theme-primary, #1ab394);
    background: #f5f3ff;
}

.payment-method-card .card-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-heading, #1e293b);
}

.payment-method-card .card-info {
    flex: 1;
}

.card-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.type-name {
    font-weight: 600;
    color: var(--text-heading, #1e293b);
}

.default-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--theme-primary, #1ab394);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.card-number {
    font-size: 0.9375rem;
    color: var(--text-body, #334155);
    font-family: monospace;
}

.card-expiry {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
}

.card-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.card-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.card-action-btn:hover {
    background: var(--theme-primary);
    color: white;
    transform: translateY(-1px);
}

.card-action-btn.delete:hover {
    background: var(--theme-danger, #ef4444);
    color: white;
}

[data-bs-theme="dark"] .card-action-btn {
    background: var(--bg-surface-tertiary, #1e293b);
    color: var(--text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .card-action-btn:hover {
    background: var(--theme-primary);
    color: white;
}

/* Billing History Timeline */
.history-timeline {
    position: relative;
    padding-left: 2rem;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: var(--border-color, #e2e8f0);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    border: 2px solid white;
    z-index: 1;
}

.timeline-item.payment .timeline-icon {
    background: #dcfce7;
    color: #16a34a;
}

.timeline-item.refund .timeline-icon {
    background: #fef3c7;
    color: #d97706;
}

.timeline-content {
    background: var(--bg-secondary, #f8fafc);
    padding: 1rem;
    border-radius: 8px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.transaction-type {
    font-weight: 600;
    color: var(--text-heading, #1e293b);
}

.transaction-amount {
    font-weight: 700;
}

.transaction-amount.positive { color: #16a34a; }
.transaction-amount.negative { color: #dc2626; }

.transaction-desc {
    font-size: 0.875rem;
    color: var(--text-body, #334155);
    margin: 0 0 0.5rem;
}

.transaction-date {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

/* Help Section */
.help-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    flex-wrap: wrap;
}

.help-icon {
    width: 60px;
    height: 60px;
    background: var(--theme-primary, #1ab394);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.help-content {
    flex: 1;
    min-width: 200px;
}

.help-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-heading, #1e293b);
}

.help-content p {
    margin: 0;
    color: var(--text-muted, #64748b);
    font-size: 0.9375rem;
}

.help-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Modal Styles - Using bp- prefix to avoid Bootstrap conflicts */
.bp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.bp-modal-dialog {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: bpModalSlideIn 0.2s ease-out;
    pointer-events: auto;
}

@keyframes bpModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bp-modal-dialog.large {
    max-width: 800px;
}

.bp-modal-dialog.small {
    max-width: 400px;
}

.bp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.bp-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bp-modal-header.danger h3 {
    color: #dc2626;
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
}

.close-btn:hover {
    background: var(--bg-tertiary, #e2e8f0);
}

.bp-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.bp-modal-description {
    color: var(--text-muted, #64748b);
    margin: 0 0 1.5rem;
}

.bp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-secondary, #f8fafc);
}

/* Email Summary */
.email-summary {
    background: var(--bg-secondary, #f8fafc);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.email-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.email-summary .summary-row:last-child {
    border-bottom: none;
}

.email-summary .label {
    color: var(--text-muted, #64748b);
    font-size: 0.875rem;
}

.email-summary .value {
    font-weight: 500;
    color: var(--text-heading, #1e293b);
}

.email-summary .value.amount {
    font-weight: 700;
    font-size: 1.125rem;
}

/* Billing Toggle */
.billing-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
}

.billing-toggle-wrapper .toggle-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    transition: color 0.2s;
}

.billing-toggle-wrapper .toggle-label.active {
    color: var(--text-heading, #1e293b);
    font-weight: 600;
}

.billing-toggle-wrapper .save-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 10px;
    margin-left: 0.25rem;
}

.billing-toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.billing-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.billing-toggle-switch .toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: all 0.3s;
}

.billing-toggle-switch .toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.billing-toggle-switch input:checked + .toggle-slider {
    background: var(--theme-primary, #1ab394);
}

.billing-toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* Plans Selection Grid */
.plans-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.plan-select-card {
    position: relative;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.plan-select-card:hover:not(.current) {
    border-color: var(--theme-primary, #1ab394);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.plan-select-card.current {
    border-color: #16a34a;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    cursor: default;
}

.plan-select-card.recommended {
    border-color: var(--theme-primary, #1ab394);
}

.plan-select-card.selected {
    border-color: var(--theme-primary, #1ab394);
    background: #f5f3ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.plan-badge.recommended {
    background: var(--theme-primary, #1ab394);
    color: white;
}

.plan-badge.current {
    background: #16a34a;
    color: white;
}

.plan-select-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
}

.plan-select-header h4 {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
}

.plan-select-header .plan-desc {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
}

.plan-select-price {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.plan-select-price .price-free {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-heading, #1e293b);
}

.plan-select-price .currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.plan-select-price .amount {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-heading, #1e293b);
}

.plan-select-price .period {
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
}

.annual-savings {
    text-align: center;
    font-size: 0.75rem;
    color: #16a34a;
    margin-top: -0.75rem;
    margin-bottom: 0.75rem;
}

.annual-savings .original {
    text-decoration: line-through;
    color: var(--text-muted, #94a3b8);
    margin-right: 0.25rem;
}

.plan-select-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    flex: 1;
}

.plan-select-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-body, #334155);
    padding: 0.375rem 0;
}

.plan-select-features li i {
    color: var(--theme-primary, #1ab394);
    font-size: 0.875rem;
}

.plan-select-action {
    text-align: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.plan-select-action span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.plan-select-action .current-label {
    background: #dcfce7;
    color: #16a34a;
}

.plan-select-action .upgrade-label {
    background: #dbeafe;
    color: #2563eb;
}

.plan-select-action .downgrade-label {
    background: #fef3c7;
    color: #b45309;
}

.plan-select-action .select-label {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-body, #334155);
}

/* Plan Change Summary */
.plan-change-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.plan-change-summary .plan-from,
.plan-change-summary .plan-to {
    text-align: center;
    flex: 1;
}

.plan-change-summary .label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.plan-change-summary .name {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin-bottom: 0.25rem;
}

.plan-change-summary .price {
    display: block;
    font-size: 0.875rem;
    color: var(--text-body, #334155);
}

.plan-change-summary .plan-arrow {
    color: var(--text-muted, #94a3b8);
    font-size: 1.5rem;
}

/* Plan Info Box */
.plan-info-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.plan-info-box.info {
    background: #dbeafe;
    border: 1px solid #3b82f6;
}

.plan-info-box.info > i {
    color: #2563eb;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.plan-info-box.warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
}

.plan-info-box.warning > i {
    color: #d97706;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.plan-info-box strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    color: var(--text-heading, #1e293b);
}

.plan-info-box p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-body, #334155);
    line-height: 1.5;
}

/* Plan Acknowledge Check */
.plan-acknowledge-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 8px;
    cursor: pointer;
}

.plan-acknowledge-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--theme-primary, #1ab394);
}

.plan-acknowledge-check span {
    font-size: 0.9375rem;
    color: var(--text-body, #334155);
}

.upgrade-plan-card .plan-price {
    margin-bottom: 1rem;
}

.upgrade-plan-card .plan-price .amount {
    font-size: 1.75rem;
    font-weight: 800;
}

.upgrade-plan-card .plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upgrade-plan-card .plan-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-body, #334155);
    padding: 0.375rem 0;
}

.upgrade-plan-card .plan-features i {
    color: #16a34a;
}

/* Warning Message */
.warning-message {
    background: #fef2f2;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.warning-message p {
    margin: 0 0 1rem;
    font-weight: 500;
    color: #991b1b;
}

.consequences-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-body, #334155);
    font-size: 0.875rem;
}

.consequences-list li {
    margin-bottom: 0.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-heading, #1e293b);
    margin-bottom: 0.375rem;
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--text-heading, #1e293b);
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--theme-primary, #1ab394);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

/* Payment Type Selector */
.payment-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.type-option:hover {
    border-color: var(--theme-primary, #1ab394);
}

.type-option.active {
    border-color: var(--theme-primary, #1ab394);
    background: #f5f3ff;
}

.type-option i {
    font-size: 1.5rem;
    color: var(--text-heading, #1e293b);
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 8px;
}

.feature-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.feature-item i.included {
    color: #16a34a;
}

.feature-item i.not-included {
    color: #9ca3af;
}

.feature-item span {
    font-size: 0.875rem;
    color: var(--text-body, #334155);
}

.feature-item.included span {
    font-weight: 500;
}

.feature-item.not-included span {
    color: var(--text-muted, #94a3b8);
}

/* Responsive */
@media (max-width: 768px) {
    .portal-header {
        padding: 1rem;
    }

    .portal-content {
        padding: 0 1rem 2rem;
    }

    .plan-info {
        flex-direction: column;
        text-align: center;
    }

    .plan-pricing {
        text-align: center;
    }

    .subscription-actions {
        justify-content: center;
    }

    .table-header, .table-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .table-header .th:nth-child(2),
    .table-header .th:nth-child(4),
    .table-row .td:nth-child(2),
    .table-row .td:nth-child(4) {
        display: none;
    }

    .help-card {
        flex-direction: column;
        text-align: center;
    }

    .help-actions {
        justify-content: center;
    }

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

    /* Payments table responsive */
    .payments-table .table-header,
    .payments-table .table-row {
        grid-template-columns: 1.5fr 1fr 1fr;
    }

    .payments-table .th.date,
    .payments-table .th.method,
    .payments-table .th.actions,
    .payments-table .td.date,
    .payments-table .td.method,
    .payments-table .td.actions {
        display: none;
    }
}

/* Billing Cycle Dialog Styles */
.current-billing-info {
    background: var(--bg-muted, #f8fafc);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.current-billing-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.current-billing-info .info-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.current-billing-info .label {
    color: var(--text-muted, #64748b);
    font-size: 0.875rem;
}

.current-billing-info .value {
    color: var(--text-heading, #1e293b);
    font-weight: 600;
}

.billing-cycle-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cycle-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.cycle-option:hover {
    border-color: var(--theme-primary-light, #47c9ab);
    background: var(--bg-muted, #f8fafc);
}

.cycle-option.selected {
    border-color: var(--theme-primary, #1ab394);
    background: rgba(79, 70, 229, 0.04);
}

.cycle-option.current {
    background: var(--bg-muted, #f8fafc);
}

.cycle-radio {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cycle-radio input {
    opacity: 0;
    position: absolute;
}

.cycle-radio .radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cycle-option.selected .radio-mark {
    border-color: var(--theme-primary, #1ab394);
    background: var(--theme-primary, #1ab394);
    box-shadow: inset 0 0 0 4px white;
}

.cycle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cycle-name {
    font-weight: 600;
    color: var(--text-heading, #1e293b);
}

.cycle-desc {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
}

.current-badge {
    padding: 0.25rem 0.625rem;
    background: var(--bg-muted, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted, #64748b);
}

.save-badge {
    padding: 0.25rem 0.625rem;
    background: #dcfce7;
    color: #15803d;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.new-price-preview {
    background: linear-gradient(135deg, var(--theme-primary, #1ab394) 0%, var(--theme-primary-emphasis, #16987e) 100%);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.new-price-preview .preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
}

.new-price-preview .preview-content {
    padding: 1rem;
}

.new-price-preview .preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.new-price-preview .preview-row:not(:last-child) {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.new-price-preview .preview-row .label {
    opacity: 0.8;
    font-size: 0.875rem;
}

.new-price-preview .preview-row .value {
    font-weight: 600;
}

.new-price-preview .preview-row .value.price {
    font-size: 1.25rem;
}

/* Enhanced Payment Methods Section */
.payment-method-card {
    position: relative;
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s ease;
}

.payment-method-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.payment-method-card.default {
    border-color: var(--theme-primary, #1ab394);
    background: rgba(79, 70, 229, 0.02);
}

.payment-method-card.mtn {
    border-left: 4px solid #ffcc00;
}

.payment-method-card.airtel {
    border-left: 4px solid #e51c23;
}

.default-ribbon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--theme-primary, #1ab394);
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.expired-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.payment-method-card .card-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-muted, #f1f5f9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-method-card .card-icon i {
    font-size: 1.5rem;
    color: var(--theme-primary, #1ab394);
}

.payment-method-card.mtn .card-icon {
    background: #fff9e6;
}

.payment-method-card.mtn .card-icon i {
    color: #d4a800;
}

.payment-method-card.airtel .card-icon {
    background: #fce8e8;
}

.payment-method-card.airtel .card-icon i {
    color: #e51c23;
}

.payment-method-card .card-info {
    flex: 1;
    min-width: 0;
}

.payment-method-card .card-type {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.payment-method-card .type-name {
    font-weight: 600;
    color: var(--text-heading, #1e293b);
}

.payment-method-card .card-details,
.payment-method-card .mobile-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.payment-method-card .card-number,
.payment-method-card .phone-number {
    color: var(--text-heading, #1e293b);
    font-family: monospace;
}

.payment-method-card .card-expiry,
.payment-method-card .cardholder,
.payment-method-card .account-name {
    color: var(--text-muted, #64748b);
    font-size: 0.8125rem;
}

.payment-method-card .card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}

/* Loading Gateways */
.loading-gateways {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-muted, #64748b);
}

/* Gateway Selector Enhancements */
.gateway-default-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: var(--theme-primary, #1ab394);
    color: white;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.no-gateways-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    color: #b45309;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Card Input Wrapper */
.card-input-wrapper {
    position: relative;
}

.card-input-wrapper i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--text-muted, #64748b);
}

.card-input-wrapper .card-input {
    padding-left: 2.75rem;
}

/* Phone Input Wrapper */
.phone-input-wrapper {
    display: flex;
    align-items: center;
}

.phone-input-wrapper .country-code {
    padding: 0.625rem 0.75rem;
    background: var(--bg-muted, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--text-muted, #64748b);
    font-size: 0.875rem;
}

.phone-input-wrapper .phone-input {
    border-radius: 0 8px 8px 0;
    flex: 1;
}

/* Mobile Provider Badge */
.mobile-provider-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-muted, #f1f5f9);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.mobile-provider-badge.mtn {
    background: #fff9e6;
    color: #b45309;
}

.mobile-provider-badge.airtel {
    background: #fce8e8;
    color: #b91c1c;
}

/* Other Payment Info */
.other-payment-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-muted, #f1f5f9);
    border-radius: 10px;
    text-align: left;
}

.other-payment-info i {
    font-size: 2rem;
    color: var(--theme-primary, #1ab394);
}

.other-payment-info .info-text h4 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.other-payment-info .info-text p {
    margin: 0;
    color: var(--text-muted, #64748b);
    font-size: 0.875rem;
}

/* Form Error */
.form-error {
    display: block;
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

/* Form Section */
.form-section {
    margin-top: 1rem;
}

/* Wide Modal */
.bp-modal-dialog.wide {
    width: 500px;
    max-width: 95vw;
}

/* Required indicator */
.required {
    color: #dc2626;
}

/* ========================================
   Add-On Modules Section
   ======================================== */

.addons-section {
    margin-bottom: 2rem;
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.addon-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.addon-card:hover {
    border-color: var(--theme-primary, #1ab394);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.addon-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.addon-icon i {
    font-size: 1.5rem;
    color: var(--theme-primary, #1ab394);
}

.addon-info {
    flex: 1;
    min-width: 0;
}

.addon-name {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
}

.addon-description {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.addon-dependencies {
    margin-top: 0.5rem;
}

.addon-dependencies small {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.addon-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

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

.addon-price .price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
}

.addon-price .price.free {
    color: #16a34a;
}

.addon-price .period {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

/* Purchased Add-Ons Section */
.purchased-addons-section {
    margin-bottom: 2rem;
}

.purchased-addons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.purchased-addon-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 10px;
}

.purchased-addon-item .addon-icon {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
}

.purchased-addon-item .addon-icon i {
    font-size: 1rem;
    color: #16a34a;
}

.purchased-addon-item .addon-code {
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    font-size: 0.875rem;
}

.purchased-addon-item .btn-outline-danger {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Responsive adjustments for add-ons */
@media (max-width: 768px) {
    .addons-grid {
        grid-template-columns: 1fr;
    }

    .addon-card {
        flex-direction: column;
        text-align: center;
    }

    .addon-action {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

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

/* --- Account: Invoice Center (818 lines) --- */

/* Invoice Center Page Styles */

/* No Subscription State */
.no-subscription-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 3rem;
}

.no-subscription-content {
    text-align: center;
    max-width: 450px;
}

.no-subscription-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) 0%, rgba(var(--bs-primary-rgb, 59, 130, 246), 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-subscription-icon i {
    font-size: 2.5rem;
    color: var(--bs-primary, #3b82f6);
    opacity: 0.8;
}

.no-subscription-content h3 {
    color: var(--text-heading, #1e293b);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.no-subscription-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.no-subscription-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Platform variant for root tenant */
.no-subscription-icon.platform {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.no-subscription-icon.platform i {
    color: #2563eb;
}

.invoice-center-page {
    min-height: 100vh;
    background: var(--bg-body, #f8f9fa);
}

/* Page Header */
.page-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.back-link:hover {
    color: var(--theme-primary, #4f46e5);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    color: var(--theme-primary, #4f46e5);
}

.page-subtitle {
    color: var(--text-muted, #64748b);
    margin: 0.25rem 0 0;
    font-size: 0.9375rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Content */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.total {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.paid {
    background: #dcfce7;
    color: #16a34a;
}

.stat-icon.pending {
    background: #fef3c7;
    color: #d97706;
}

.stat-icon.overdue {
    background: #fee2e2;
    color: #dc2626;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

/* Filters */
.filters-section {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.filter-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted, #64748b);
}

.filter-group.search {
    flex: 1;
    min-width: 200px;
}

.filter-select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    min-width: 150px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--theme-primary, #4f46e5);
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #94a3b8);
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--theme-primary, #4f46e5);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

/* Invoice List */
.invoices-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.invoice-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--border-color, #e2e8f0);
    transition: all 0.2s;
    flex-wrap: wrap;
}

.invoice-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.invoice-card.paid {
    border-left-color: #16a34a;
}

.invoice-card.pending {
    border-left-color: #d97706;
}

.invoice-card.overdue {
    border-left-color: #dc2626;
}

.invoice-main {
    flex: 1;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.invoice-number-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.invoice-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
}

.invoice-amount .amount {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
}

.invoice-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.detail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
}

.detail-item i {
    font-size: 1rem;
}

.detail-item.overdue {
    color: #dc2626;
}

.detail-item.description {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill.large {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

.status-pill.paid {
    background: #dcfce7;
    color: #15803d;
}

.status-pill.pending {
    background: #fef3c7;
    color: #b45309;
}

.status-pill.overdue {
    background: #fee2e2;
    color: #dc2626;
}

.status-pill.draft {
    background: #f3f4f6;
    color: #6b7280;
}

.status-pill.cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    background: white;
    border-radius: 12px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 2.5rem;
    color: var(--text-muted, #94a3b8);
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-heading, #1e293b);
    margin: 0 0 0.5rem;
}

.empty-state p {
    color: var(--text-muted, #64748b);
    margin: 0 0 1.5rem;
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-action.primary {
    background: var(--theme-primary, #4f46e5);
    color: white;
}

.btn-action.primary:hover {
    background: var(--theme-primary-emphasis, #3730a3);
}

.btn-action.secondary {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-heading, #1e293b);
}

.btn-action.secondary:hover {
    background: var(--bg-tertiary, #e2e8f0);
}

.btn-action.outline {
    background: transparent;
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-body, #334155);
}

.btn-action.outline:hover {
    background: var(--bg-secondary, #f1f5f9);
}

.btn-action.small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner Small */
.spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color, #e2e8f0);
    border-top-color: var(--text-heading, #1e293b);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-dialog {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-dialog.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
}

.close-btn:hover {
    background: var(--bg-tertiary, #e2e8f0);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-secondary, #f8fafc);
}

/* Invoice Preview */
.invoice-preview {
    background: white;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
    margin-bottom: 1.5rem;
}

.company-info h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-heading, #1e293b);
    margin: 0;
}

.company-info .invoice-num {
    font-size: 0.9375rem;
    color: var(--text-muted, #64748b);
}

.preview-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.meta-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem;
}

.meta-section p {
    margin: 0;
    color: var(--text-heading, #1e293b);
    font-weight: 500;
}

.meta-section.dates {
    text-align: right;
}

.date-item {
    margin-bottom: 0.5rem;
}

.date-item .label {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    display: block;
}

.date-item .value {
    font-weight: 500;
    color: var(--text-heading, #1e293b);
}

/* Items Table */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.items-table th,
.items-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.items-table th {
    background: var(--bg-secondary, #f8fafc);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.items-table td {
    font-size: 0.9375rem;
}

.items-table .qty,
.items-table .price,
.items-table .total {
    text-align: right;
    white-space: nowrap;
}

.item-name {
    font-weight: 500;
    color: var(--text-heading, #1e293b);
    display: block;
}

.item-period {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
}

/* Totals */
.preview-totals {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.totals-grid {
    width: 280px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
}

.total-row.subtotal {
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.total-row.discount span:last-child {
    color: #16a34a;
}

.total-row.grand-total {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    border-top: 2px solid var(--border-color, #e2e8f0);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

.total-row.paid span:last-child {
    color: #16a34a;
}

.total-row.balance-due {
    font-weight: 600;
    color: var(--theme-primary, #4f46e5);
}

/* Notes */
.preview-notes {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.preview-notes h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    margin: 0 0 0.5rem;
}

.preview-notes p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-body, #334155);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .page-content {
        padding: 0 1rem 2rem;
    }

    .filters-section {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .invoice-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .invoice-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .preview-meta {
        flex-direction: column;
    }

    .meta-section.dates {
        text-align: left;
    }

    .items-table .qty,
    .items-table .price {
        display: none;
    }
}

/* --- Account: Invoice Detail (734 lines) --- */

.invoice-detail-page {
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content {
    flex: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.25rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 100;
    padding: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-light);
}

.dropdown-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pill.large {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.status-pill.paid {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-pill.pending {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

.status-pill.overdue {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-pill.cancelled {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Invoice Document */
.invoice-document {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 1rem;
}

@media print {
    .invoice-document {
        box-shadow: none;
        padding: 0;
    }

    .page-header,
    .action-bar,
    .header-actions {
        display: none !important;
    }
}

/* Invoice Header Section */
.invoice-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.company-branding .company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.company-branding .invoice-label {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: 0.1em;
}

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

.invoice-meta .meta-item {
    margin-bottom: 0.5rem;
}

.invoice-meta .meta-item:last-child {
    margin-bottom: 0;
}

.invoice-meta .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-meta .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.invoice-meta .meta-item.overdue .value {
    color: #dc2626;
}

/* Billing Info Section */
.billing-info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.billing-info-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
}

.billing-info-section p {
    margin: 0;
    color: var(--text-primary);
}

.billing-info-section .customer-name {
    font-weight: 600;
    font-size: 1rem;
}

.billing-info-section .customer-email {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Line Items Section */
.line-items-section {
    margin-bottom: 1.25rem;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-table th {
    background: var(--bg-light);
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.invoice-table th.qty,
.invoice-table th.unit-price,
.invoice-table th.total {
    text-align: right;
}

.invoice-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.invoice-table td.qty,
.invoice-table td.unit-price,
.invoice-table td.total {
    text-align: right;
    white-space: nowrap;
}

.invoice-table .item-name {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
}

.invoice-table .item-period {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Totals Section */
.totals-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}

.totals-table {
    width: 300px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.total-row .label {
    color: var(--text-muted);
}

.total-row .value {
    font-weight: 500;
    color: var(--text-primary);
}

.total-row.discount .value {
    color: #16a34a;
}

.total-row.grand-total {
    border-bottom: 2px solid var(--border-color);
}

.total-row.grand-total .label,
.total-row.grand-total .value {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.total-row.paid .value {
    color: #16a34a;
}

.total-row.balance-due {
    border-bottom: none;
    padding-top: 1rem;
}

.total-row.balance-due .label,
.total-row.balance-due .value {
    font-weight: 700;
    font-size: 1.25rem;
}

.total-row.balance-due.outstanding .value {
    color: #dc2626;
}

/* Notes Section */
.notes-section {
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
}

.notes-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.notes-section p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Payment Info Section */
.payment-info-section {
    text-align: center;
    padding: 1.25rem;
    background: rgba(34, 197, 94, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.paid-stamp {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #16a34a;
    font-size: 1.5rem;
    font-weight: 700;
}

.paid-stamp i {
    font-size: 1.75rem;
}

.paid-date {
    margin: 0.5rem 0 0 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Invoice Footer */
.invoice-footer {
    text-align: center;
    padding: 1rem 0 0 0;
    border-top: 1px solid var(--border-color);
}

.invoice-footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.invoice-footer .generated-date {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Action Bar */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
}

.action-bar .balance-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-bar .balance-info .label {
    color: var(--text-muted);
}

.action-bar .balance-info .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #dc2626;
}

.action-bar .btn-action.large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.empty-icon i {
    font-size: 2.5rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
}

/* Modal Styles - Using id- prefix to avoid Bootstrap conflicts */
.id-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.id-modal-dialog {
    background: white;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: idModalSlideIn 0.2s ease-out;
    pointer-events: auto;
}

@keyframes idModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.id-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.id-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.id-modal-body {
    padding: 1.5rem;
}

.id-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action.primary {
    background: var(--primary);
    color: white;
}

.btn-action.primary:hover {
    background: var(--primary-dark);
}

.btn-action.secondary {
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn-action.secondary:hover {
    background: var(--border-color);
}

.btn-action.outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-action.outline:hover {
    background: var(--bg-light);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .invoice-detail-page {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .invoice-document {
        padding: 1.5rem;
    }

    .invoice-header-section {
        flex-direction: column;
        gap: 1.5rem;
    }

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

    .billing-info-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .invoice-table th,
    .invoice-table td {
        padding: 0.75rem 0.5rem;
    }

    .totals-section {
        justify-content: stretch;
    }

    .totals-table {
        width: 100%;
    }

    .action-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .action-bar .btn-action.large {
        width: 100%;
    }
}

/* --- Account: Invoice Payment (859 lines) --- */

.invoice-payment-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
}

/* Error Container */
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.error-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 500px;
}

.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.error-icon i {
    font-size: 2.5rem;
    color: #d97706;
}

.error-card h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.error-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Payment Container */
.payment-container {
    max-width: 1200px;
    margin: 0 auto;
}

.payment-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #4f46e5;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    color: #1e293b;
    margin: 0;
}

.page-title i {
    color: #4f46e5;
}

/* Payment Layout */
.payment-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 968px) {
    .payment-layout {
        grid-template-columns: 1fr;
    }
}

/* Invoice Card */
.invoice-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.invoice-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.invoice-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.invoice-title h2 {
    margin: 0;
    font-size: 1.25rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.paid {
    background: #d1fae5;
    color: #059669;
}

.status-badge.overdue {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.cancelled {
    background: #f1f5f9;
    color: #64748b;
}

.invoice-date {
    font-size: 0.875rem;
    opacity: 0.8;
}

.invoice-body {
    padding: 2rem;
}

/* Due Date Alert */
.due-date-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    background: #f0fdf4;
    color: #15803d;
    margin-bottom: 1.5rem;
}

.due-date-alert.warning {
    background: #fef3c7;
    color: #b45309;
}

.due-date-alert.overdue {
    background: #fee2e2;
    color: #dc2626;
}

.due-date-alert i {
    font-size: 1.25rem;
}

/* Billing Period */
.billing-period {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.billing-period .label {
    color: #64748b;
    font-size: 0.875rem;
}

.billing-period .value {
    font-weight: 500;
    color: #1e293b;
}

/* Invoice Description */
.invoice-description {
    margin-bottom: 1.5rem;
}

.invoice-description h4 {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.invoice-description p {
    color: #1e293b;
    margin: 0;
}

/* Line Items */
.line-items {
    margin-bottom: 1.5rem;
}

.line-items h4 {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    font-weight: 500;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table th {
    text-align: left;
    padding: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.items-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

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

/* Invoice Totals */
.invoice-totals {
    border-top: 2px solid #e2e8f0;
    padding-top: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.total-row .label {
    color: #64748b;
}

.total-row .value {
    font-weight: 500;
    color: #1e293b;
}

.total-row.discount .value {
    color: #059669;
}

.total-row.grand-total {
    border-top: 2px solid #e2e8f0;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.total-row.grand-total .label,
.total-row.grand-total .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.total-row.paid .value {
    color: #059669;
}

.total-row.balance {
    background: #fef3c7;
    margin: 0.5rem -2rem -2rem;
    padding: 1rem 2rem;
}

.total-row.balance .label,
.total-row.balance .value {
    font-weight: 600;
    color: #b45309;
}

/* Invoice Actions */
.invoice-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Payment Card */
.payment-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

.payment-amount-display {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.amount-label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.amount-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.amount-currency {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.payment-cta {
    margin-bottom: 1.5rem;
}

.btn-pay {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

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

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.75rem;
}

.secure-note i {
    color: #10b981;
}

.payment-methods-preview {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.methods-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.methods-icons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.method-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.method-icon.mtn {
    background: #ffcc00;
    color: #1e293b;
}

.method-icon.airtel {
    background: #e60000;
    color: white;
}

.method-icon.bank {
    background: #1e40af;
    color: white;
}

/* Paid/Cancelled Status */
.paid-status,
.cancelled-status {
    text-align: center;
    padding: 2rem 0;
}

.paid-icon,
.cancelled-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.paid-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.paid-icon i {
    font-size: 2.5rem;
    color: #059669;
}

.cancelled-icon {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.cancelled-icon i {
    font-size: 2.5rem;
    color: #64748b;
}

.paid-status h3,
.cancelled-status h3 {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.paid-status p,
.cancelled-status p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-action.primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.btn-action.primary:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-action.secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-action.secondary:hover {
    background: #e2e8f0;
}

.btn-action.outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.btn-action.outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Payment History Section */
.payment-history-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.payment-history-section h4 {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    font-weight: 500;
}

.payment-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #94a3b8;
}

.payment-history-item.completed {
    border-left-color: #10b981;
}

.payment-history-item.pending,
.payment-history-item.processing,
.payment-history-item.initiated {
    border-left-color: #f59e0b;
}

.payment-history-item.failed {
    border-left-color: #ef4444;
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.payment-date {
    font-size: 0.875rem;
    color: #1e293b;
}

.payment-method {
    font-size: 0.75rem;
    color: #64748b;
}

.payment-amount-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.payment-amount {
    font-weight: 600;
    color: #1e293b;
}

.payment-status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.payment-status.completed {
    background: #d1fae5;
    color: #059669;
}

.payment-status.pending,
.payment-status.processing,
.payment-status.initiated {
    background: #fef3c7;
    color: #d97706;
}

.payment-status.failed {
    background: #fee2e2;
    color: #dc2626;
}

/* Pending Payment Alert */
.pending-payment-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.pending-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(217, 119, 6, 0.3);
    border-top-color: #d97706;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.pending-info strong {
    display: block;
    color: #92400e;
    font-size: 0.875rem;
}

.pending-info p {
    margin: 0;
    font-size: 0.75rem;
    color: #b45309;
}

/* Partial Payment Section */
.partial-payment-section {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.partial-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.partial-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4f46e5;
}

.toggle-label {
    font-size: 0.875rem;
    color: #334155;
}

.partial-amount-input {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.partial-amount-input label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-weight: 500;
    color: #475569;
}

.amount-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
}

.amount-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.amount-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Print Styles */
@media print {
    .payment-header .back-link,
    .invoice-actions,
    .payment-card,
    .pending-payment-alert,
    .partial-payment-section {
        display: none !important;
    }

    .invoice-payment-page {
        background: white !important;
        padding: 0 !important;
    }

    .payment-layout {
        display: block !important;
    }

    .invoice-card {
        box-shadow: none !important;
        border: 1px solid #e2e8f0;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .invoice-payment-page {
        padding: 1rem;
    }

    .invoice-header {
        padding: 1rem 1.5rem;
    }

    .invoice-body {
        padding: 1.5rem;
    }

    .payment-card {
        padding: 1.5rem;
    }

    .amount-value {
        font-size: 2rem;
    }

    .total-row.balance {
        margin: 0.5rem -1.5rem -1.5rem;
        padding: 1rem 1.5rem;
    }

    .payment-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .payment-amount-status {
        align-items: flex-start;
        flex-direction: row;
        gap: 0.75rem;
    }
}

/* --- Account: Payment History (834 lines) --- */

/**
 * Payment History Page Styles
 * Uses CSS variables for theme consistency - no hardcoded colors.
 * NOTE: Uses PageLayout component for header and stats grid.
 * NOTE: Uses centrally managed CSS variables from theme-core.css
 */

/* Content wrapper inside PageLayout */
.payment-history-content {
    /* No extra wrapper styles needed - PageLayout handles content area */
}

/* Stat Icon Colors - PageLayout provides base stat-card styles */
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.total {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

.stat-icon.paid {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.stat-icon.pending {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.stat-icon.overdue {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

/* Filters Section */
.filters-section {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 10%, transparent);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Payments Table */
.payments-table-container {
    background: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.payments-table-full {
    width: 100%;
    border-collapse: collapse;
}

.payments-table-full thead {
    background: var(--bg-surface-secondary);
}

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

.payments-table-full td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.payments-table-full tbody tr:hover {
    background: var(--bg-surface-secondary);
}

.payments-table-full tbody tr.expanded {
    background: var(--theme-primary-subtle);
}

/* Column Widths */
.col-reference { width: 25%; }
.col-date { width: 15%; }
.col-method { width: 15%; }
.col-amount { width: 15%; text-align: right; }
.col-status { width: 12%; }
.col-actions { width: 18%; }

/* Reference Cell */
.reference-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.payment-ref {
    font-family: monospace;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.external-ref {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Date Cell */
.date-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.date-primary {
    font-weight: 500;
    color: var(--text-primary);
}

.date-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Amount */
.amount-value {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* Method Badge */
.method-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.method-badge.mtn {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.method-badge.airtel {
    background: var(--theme-danger-subtle);
    color: var(--theme-danger);
}

.method-badge.bank {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.method-badge.card {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.method-badge.default {
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
}

/* Status Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill i {
    font-size: 0.875rem;
}

.status-pill.completed, .status-pill.success {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.status-pill.pending {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.status-pill.processing {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.status-pill.failed {
    background: var(--theme-danger-subtle);
    color: var(--theme-danger);
}

.status-pill.refunded {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.375rem;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-surface-tertiary);
}

.icon-btn.primary {
    background: var(--theme-primary);
    color: white;
}

.icon-btn.primary:hover {
    filter: brightness(0.9);
}

.icon-btn.danger {
    color: var(--theme-danger);
}

.icon-btn.danger:hover {
    background: var(--theme-danger-subtle);
}

.icon-btn.success {
    color: var(--theme-success);
}

.icon-btn.success:hover {
    background: var(--theme-success-subtle);
}

.icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Details Row */
.details-row td {
    background: var(--theme-primary-subtle);
    padding: 0;
}

.payment-details {
    padding: 1.25rem 1.5rem;
    border-left: 3px solid var(--theme-primary);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.detail-value.receipt {
    font-family: monospace;
    font-weight: 600;
    color: var(--theme-primary);
}

.detail-value.error {
    color: var(--theme-danger);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
}

.page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-surface-secondary);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.page-btn.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    margin-left: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-surface-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.empty-icon i {
    font-size: 2.5rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-action.primary {
    background: var(--theme-primary);
    color: white;
}

.btn-action.primary:hover {
    filter: brightness(0.9);
}

.btn-action.secondary {
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
}

.btn-action.secondary:hover {
    background: var(--bg-surface-tertiary);
}

.btn-action.outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-action.outline:hover {
    background: var(--bg-surface-secondary);
}

.btn-action.danger {
    background: var(--theme-danger);
    color: white;
}

.btn-action.danger:hover {
    filter: brightness(0.9);
}

.btn-action.small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal Styles - Prefixed to avoid Bootstrap conflicts */
.ph-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.ph-modal-dialog {
    background: var(--bg-surface);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    box-shadow: var(--shadow-xl);
    animation: phModalSlideIn 0.2s ease-out;
}

@keyframes phModalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ph-modal-dialog.small {
    max-width: 400px;
}

.ph-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.ph-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.ph-modal-header .close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-surface-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.ph-modal-header .close-btn:hover {
    background: var(--bg-surface-tertiary);
}

.ph-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.ph-modal-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.ph-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface-secondary);
}

/* Refund Summary */
.refund-summary,
.email-summary {
    background: var(--bg-surface-secondary);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row .label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.summary-row .value {
    font-weight: 500;
    color: var(--text-primary);
}

.summary-row .value.amount {
    font-weight: 700;
    font-size: 1.125rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.form-group .required {
    color: var(--theme-danger);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 80px;
    background: var(--bg-surface);
    color: var(--text-primary);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 10%, transparent);
}

/* Refund Notice */
.refund-notice {
    display: flex;
    gap: 0.75rem;
    background: var(--theme-info-subtle);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.refund-notice i {
    color: var(--theme-info);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.refund-notice p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--theme-info);
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Subscription State */
.no-subscription-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.no-subscription-content {
    text-align: center;
    max-width: 400px;
}

.no-subscription-icon {
    width: 100px;
    height: 100px;
    background: var(--theme-warning-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.no-subscription-icon i {
    font-size: 3rem;
    color: var(--theme-warning);
}

.no-subscription-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.no-subscription-content .text-muted {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.no-subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.no-subscription-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--theme-primary);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.no-subscription-actions .btn-primary:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .filters-section {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .filter-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    /* Hide some columns on mobile */
    .col-date,
    .col-method {
        display: none;
    }

    .col-reference { width: 40%; }
    .col-amount { width: 25%; }
    .col-status { width: 20%; }
    .col-actions { width: 15%; }

    .payments-table-full th.col-date,
    .payments-table-full th.col-method,
    .payments-table-full td.col-date,
    .payments-table-full td.col-method {
        display: none;
    }

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

    .pagination {
        flex-wrap: wrap;
    }

    .page-info {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0 0;
    }
}

/* --- Account: Payment Methods (779 lines) --- */

/* Payment Methods Page Styles */

.payment-methods-page {
    min-height: 100vh;
    background: var(--bg-body, #f8f9fa);
}

/* Page Header */
.page-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.back-link:hover {
    color: var(--theme-primary, #4f46e5);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    color: var(--theme-primary, #4f46e5);
}

.page-subtitle {
    color: var(--text-muted, #64748b);
    margin: 0.25rem 0 0;
    font-size: 0.9375rem;
}

/* Content */
.page-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* Methods Grid */
.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Method Card */
.method-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    border: 2px solid var(--border-color, #e2e8f0);
    transition: all 0.2s;
}

.method-card:hover {
    border-color: var(--theme-primary, #4f46e5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.method-card.default {
    border-color: var(--theme-primary, #4f46e5);
    background: #f5f3ff;
}

.default-ribbon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--theme-primary, #4f46e5);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.method-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.method-card.card .method-icon-wrapper {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.method-card.mtn .method-icon-wrapper {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.method-card.airtel .method-icon-wrapper {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.method-details {
    margin-bottom: 1.25rem;
}

.method-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.type-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
}

.expired-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    background: #fee2e2;
    color: #dc2626;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.card-info,
.mobile-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.card-number,
.phone-number {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    font-family: monospace;
    letter-spacing: 0.05em;
}

.card-expiry,
.cardholder,
.account-name {
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
}

.method-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--theme-primary, #4f46e5);
    flex-shrink: 0;
}

.info-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    margin: 0 0 0.375rem;
}

.info-content p {
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    margin: 0;
    line-height: 1.5;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 2.5rem;
    color: var(--text-muted, #94a3b8);
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-heading, #1e293b);
    margin: 0 0 0.5rem;
}

.empty-state p {
    color: var(--text-muted, #64748b);
    margin: 0 0 1.5rem;
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-action.primary {
    background: var(--theme-primary, #4f46e5);
    color: white;
}

.btn-action.primary:hover {
    background: var(--theme-primary-emphasis, #3730a3);
}

.btn-action.secondary {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-heading, #1e293b);
}

.btn-action.secondary:hover {
    background: var(--bg-tertiary, #e2e8f0);
}

.btn-action.outline {
    background: transparent;
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-body, #334155);
}

.btn-action.outline:hover {
    background: var(--bg-secondary, #f1f5f9);
}

.btn-action.danger-outline {
    background: transparent;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.btn-action.danger-outline:hover {
    background: #fef2f2;
}

.btn-action.small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal Styles - Prefixed to avoid Bootstrap conflicts */
.pm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Higher than Radzen components */
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.pm-modal-dialog {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: pmModalSlideIn 0.2s ease-out;
}

@keyframes pmModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.pm-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pm-modal-header .close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
}

.pm-modal-header .close-btn:hover {
    background: var(--bg-tertiary, #e2e8f0);
}

.pm-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.pm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-secondary, #f8fafc);
}

/* Payment Type Selector */
.payment-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 120px;
    position: relative;
}

.type-option:hover {
    border-color: var(--theme-primary, #4f46e5);
}

.type-option.active {
    border-color: var(--theme-primary, #4f46e5);
    background: #f5f3ff;
}

.type-option i {
    font-size: 1.5rem;
    color: var(--text-heading, #1e293b);
}

.type-option span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-body, #334155);
}

.type-option.default-gateway {
    border-color: var(--success-color, #10b981);
}

.default-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--success-color, #10b981);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 8px;
    text-transform: uppercase;
}

.loading-gateways {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-muted, #64748b);
}

.no-gateways-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.no-gateways-warning i {
    font-size: 1.25rem;
}

.other-payment-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.other-payment-info i {
    font-size: 2.5rem;
    color: var(--theme-primary, #4f46e5);
}

.other-payment-info .info-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    margin: 0 0 0.25rem;
}

.other-payment-info .info-text p {
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    margin: 0;
}

/* Form Section */
.form-section {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-heading, #1e293b);
    margin-bottom: 0.375rem;
}

.form-group label .required {
    color: #dc2626;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--text-heading, #1e293b);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--theme-primary, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-error {
    display: block;
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* Card Input */
.card-input-wrapper {
    position: relative;
}

.card-input-wrapper i {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--text-muted, #64748b);
}

.card-input {
    padding-right: 2.5rem;
    font-family: monospace;
    letter-spacing: 0.1em;
}

/* Phone Input */
.phone-input-wrapper {
    display: flex;
    gap: 0;
}

.country-code {
    display: flex;
    align-items: center;
    padding: 0 0.875rem;
    background: var(--bg-secondary, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 0.9375rem;
    color: var(--text-muted, #64748b);
}

.phone-input {
    border-radius: 0 8px 8px 0;
}

/* Mobile Provider Badge */
.mobile-provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.mobile-provider-badge.mtn {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.mobile-provider-badge.airtel {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.mobile-provider-badge i {
    font-size: 1.25rem;
}

/* Checkbox */
.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.form-group.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--theme-primary, #4f46e5);
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .page-content {
        padding: 0 1rem 2rem;
    }

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

    .payment-type-selector {
        grid-template-columns: 1fr;
    }

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

/* No Subscription State */
.no-subscription-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 2rem;
}

.no-subscription-content {
    text-align: center;
    max-width: 400px;
}

.no-subscription-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.no-subscription-icon i {
    font-size: 3rem;
    color: #d97706;
}

.no-subscription-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin: 0 0 0.75rem;
}

.no-subscription-content .text-muted {
    color: var(--text-muted, #64748b);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.no-subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.no-subscription-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--primary-color, #4f46e5);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.no-subscription-actions .btn-primary:hover {
    background: var(--primary-dark, #3730a3);
    transform: translateY(-1px);
}

/* Platform icon variant for empty state */
.empty-icon.platform {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.empty-icon.platform i {
    color: #2563eb;
}

/* --- Account: Usage Analytics (653 lines) --- */

/**
 * Usage Analytics Page Styles
 * Uses CSS variables for theme consistency - no hardcoded colors.
 * Dark mode handled automatically via CSS variables from theme-core.css
 */

/* Content wrapper inside PageLayout */
.usage-analytics-content {
    /* No extra wrapper styles needed - PageLayout handles content area */
}

/* Period Selector in Header */
.period-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.25rem;
}

.period-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn:hover {
    color: white;
}

.period-btn.active {
    background: white;
    color: var(--theme-primary);
    box-shadow: var(--shadow-sm);
}

/* Summary Section */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
}

.summary-card.warning {
    border-color: var(--theme-warning);
    background: linear-gradient(to bottom, var(--theme-warning-subtle), var(--bg-surface));
}

.summary-card.critical {
    border-color: var(--theme-danger);
    background: linear-gradient(to bottom, color-mix(in srgb, var(--theme-danger) 10%, transparent), var(--bg-surface));
}

.summary-card .card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-icon.users {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.card-icon.storage {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.card-icon.api {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

.card-icon.students {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.summary-card .card-title {
    flex: 1;
}

.summary-card .card-title h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.trend.up {
    color: var(--theme-success);
}

.trend.down {
    color: var(--theme-danger);
}

.trend.neutral {
    color: var(--text-muted);
}

.card-stats {
    margin-bottom: 0.75rem;
}

.stat-main {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-main .current {
    color: var(--theme-primary);
}

.stat-main .separator {
    color: var(--text-muted);
    margin: 0 0.25rem;
}

.stat-main .limit {
    color: var(--text-primary);
}

.card-stats .percent {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--theme-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.warning {
    background: var(--theme-warning);
}

.progress-fill.critical {
    background: var(--theme-danger);
}

.reset-info {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Charts Section */
.charts-section {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-item.users .legend-dot {
    background: var(--theme-info);
}

.legend-item.storage .legend-dot {
    background: var(--theme-warning);
}

.legend-item.api .legend-dot {
    background: var(--theme-primary);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.chart-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    background: var(--bg-surface);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-title i {
    color: var(--text-muted);
}

.chart-container {
    height: 200px;
}

/* Breakdown Section */
.breakdown-section {
    margin-bottom: 2rem;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.breakdown-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.breakdown-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.breakdown-item .period {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.breakdown-item .value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.breakdown-item.average {
    background: var(--theme-info-subtle);
}

.breakdown-item.average .period {
    font-weight: 500;
}

/* Forecast */
.forecast-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.forecast-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.forecast-icon {
    font-size: 1.5rem;
    color: var(--theme-primary);
}

.forecast-details {
    flex: 1;
}

.forecast-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: block;
}

.forecast-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.forecast-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.forecast-warning {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--theme-danger);
    background: color-mix(in srgb, var(--theme-danger) 15%, transparent);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
}

/* Alerts Section */
.alerts-section {
    margin-bottom: 2rem;
}

.alerts-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.alerts-description {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

.alert-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.alert-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-info > i {
    font-size: 1.5rem;
    color: var(--theme-primary);
}

.alert-text {
    display: flex;
    flex-direction: column;
}

.alert-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--bg-surface);
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--theme-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-action.primary {
    background: var(--theme-primary);
    color: white;
}

.btn-action.primary:hover {
    background: var(--theme-primary-dark, var(--theme-primary));
    filter: brightness(0.9);
}

.btn-action.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-action.secondary:hover {
    background: var(--bg-tertiary, var(--border-color));
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

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

    .chart-card.full-width {
        grid-column: auto;
    }

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

    .alert-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* No Subscription State */
.no-subscription-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.no-subscription-content {
    text-align: center;
    max-width: 400px;
}

.no-subscription-icon {
    width: 100px;
    height: 100px;
    background: var(--theme-warning-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.no-subscription-icon i {
    font-size: 3rem;
    color: var(--theme-warning);
}

.no-subscription-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.no-subscription-content .text-muted {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.no-subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.no-subscription-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--theme-primary);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.no-subscription-actions .btn-primary:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}

/* --- Account: Pricing (491 lines) --- */

/* Pricing Page Styles */

.pricing-page {
    min-height: 100vh;
    background: var(--bg-body, #f8f9fa);
}

/* Hero Section */
.pricing-hero {
    background: linear-gradient(135deg, var(--primary-color, #4f46e5) 0%, var(--primary-dark, #3730a3) 100%);
    padding: 4rem 1rem 6rem;
    color: white;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Billing Toggle */
.billing-toggle {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.toggle-label {
    font-size: 0.9375rem;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-label.active {
    opacity: 1;
}

.save-badge {
    background: #10b981;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 20px;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(255, 255, 255, 0.5);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Pricing Cards Section */
.pricing-cards-section {
    margin-top: -3rem;
    padding: 0 1rem 4rem;
}

.pricing-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Pricing Card */
.pricing-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.pricing-card.recommended {
    border-color: var(--primary-color, #4f46e5);
    transform: scale(1.02);
}

.pricing-card.recommended:hover {
    transform: scale(1.02) translateY(-4px);
}

.pricing-card.free-tier {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color, #4f46e5);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.recommended-badge i {
    font-size: 0.875rem;
}

/* Card Header - Pricing Card specific */
.pricing-card .card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pricing-card .plan-name,
.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin: 0 0 0.5rem;
}

.plan-description {
    font-size: 0.9375rem;
    color: var(--text-muted, #64748b);
    margin: 0;
    line-height: 1.5;
}

/* Card Pricing */
.card-pricing {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color, #e2e8f0);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 1.5rem;
}

.price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
}

.price-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-heading, #1e293b);
    line-height: 1;
}

.price-period {
    font-size: 1rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

.price-note {
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    margin: 0.5rem 0 0;
}

.original-price {
    text-decoration: line-through;
    margin-right: 0.5rem;
    opacity: 0.7;
}

/* Card CTA */
.card-cta {
    margin-bottom: 1.5rem;
}

.btn-cta {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-cta.primary {
    background: var(--primary-color, #4f46e5);
    color: white;
}

.btn-cta.primary:hover {
    background: var(--primary-dark, #3730a3);
    transform: translateY(-2px);
}

.btn-cta.secondary {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-heading, #1e293b);
    border: 1px solid var(--border-color, #e2e8f0);
}

.btn-cta.secondary:hover {
    background: var(--bg-tertiary, #e2e8f0);
    transform: translateY(-2px);
}

/* Card Features */
.card-features {
    flex: 1;
}

.features-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-body, #334155);
}

.feature-item.highlight {
    font-weight: 500;
}

.feature-icon {
    font-size: 1.125rem;
    color: var(--primary-color, #4f46e5);
    width: 20px;
    text-align: center;
}

/* No Packages */
.no-packages {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    color: var(--text-muted, #64748b);
}

.no-packages i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

/* Enterprise CTA */
.enterprise-cta {
    background: var(--bg-secondary, #f1f5f9);
    padding: 4rem 1rem;
}

.cta-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin: 0 0 0.5rem;
}

.cta-text p {
    color: var(--text-muted, #64748b);
    margin: 0;
    max-width: 500px;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-actions .btn-cta {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* FAQ Section */
.pricing-faq {
    padding: 4rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin-bottom: 3rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.faq-item h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    margin: 0 0 0.75rem;
}

.faq-item p {
    font-size: 0.9375rem;
    color: var(--text-muted, #64748b);
    margin: 0;
    line-height: 1.6;
}

/* Trust Section */
.trust-section {
    padding: 3rem 1rem;
    background: var(--bg-secondary, #f1f5f9);
}

.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem 3rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted, #64748b);
    font-size: 0.9375rem;
    font-weight: 500;
}

.trust-item i {
    font-size: 1.25rem;
    color: var(--primary-color, #4f46e5);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .pricing-cards-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .pricing-card.recommended {
        transform: none;
    }

    .pricing-card.recommended:hover {
        transform: translateY(-4px);
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-text p {
        max-width: none;
    }

    .cta-actions {
        width: 100%;
        justify-content: center;
    }

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

@media (min-width: 1200px) {
    .pricing-cards-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* --- Account: Company Signup (1214 lines) --- */

/* Company Signup Page Styles */
:root {
    --signup-primary: #6366f1;
    --signup-primary-dark: #4f46e5;
    --signup-secondary: #8b5cf6;
    --signup-success: #10b981;
    --signup-warning: #f59e0b;
    --signup-danger: #ef4444;
    --signup-gray-50: #f9fafb;
    --signup-gray-100: #f3f4f6;
    --signup-gray-200: #e5e7eb;
    --signup-gray-300: #d1d5db;
    --signup-gray-500: #6b7280;
    --signup-gray-600: #4b5563;
    --signup-gray-700: #374151;
    --signup-gray-800: #1f2937;
    --signup-gray-900: #111827;
}

.company-signup-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Hero Section */
.signup-hero {
    padding: 4rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    color: white;
    padding-right: 3rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.trial-features {
    display: grid;
    gap: 1rem;
}

.trial-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trial-feature .feature-icon {
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
}

.trial-feature span {
    font-size: 1rem;
}

/* Signup Card */
.signup-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.signup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--signup-primary), var(--signup-secondary));
}

/* Step Progress */
.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--signup-gray-200);
    color: var(--signup-gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: var(--signup-primary);
    color: white;
}

.step-item.completed .step-number {
    background: var(--signup-success);
    color: white;
}

.step-label {
    font-size: 0.75rem;
    color: var(--signup-gray-500);
    font-weight: 500;
}

.step-item.active .step-label {
    color: var(--signup-primary);
    font-weight: 600;
}

.step-line {
    width: 60px;
    height: 3px;
    background: var(--signup-gray-200);
    margin: 0 0.5rem;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.step-line.active {
    background: var(--signup-success);
}

/* Step Content */
.step-content {
    margin-bottom: 2rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--signup-gray-800);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.step-description {
    color: var(--signup-gray-500);
    margin-bottom: 1.5rem;
}

/* Form Styles */
.form-section {
    margin-bottom: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--signup-gray-700);
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--signup-danger);
}

.form-control,
.form-select {
    border: 2px solid var(--signup-gray-200);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--signup-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-control-lg,
.form-select-lg {
    padding: 1rem 1rem;
}

.validation-message {
    color: var(--signup-danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Company Size Options */
.size-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.size-option {
    background: var(--signup-gray-50);
    border: 2px solid var(--signup-gray-200);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-option:hover {
    border-color: var(--signup-primary);
    background: rgba(99, 102, 241, 0.05);
}

.size-option.selected {
    border-color: var(--signup-primary);
    background: rgba(99, 102, 241, 0.1);
}

.size-option i {
    font-size: 1.5rem;
    color: var(--signup-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.size-label {
    font-weight: 600;
    color: var(--signup-gray-800);
    display: block;
}

.size-range {
    font-size: 0.75rem;
    color: var(--signup-gray-500);
}

/* Plan Options */
.plan-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.plan-option {
    background: var(--signup-gray-50);
    border: 2px solid var(--signup-gray-200);
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.plan-option:hover {
    border-color: var(--signup-primary);
    transform: translateY(-2px);
}

.plan-option.selected {
    border-color: var(--signup-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
}

.plan-option.trial-plan .plan-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, var(--signup-success), #059669);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.plan-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--signup-gray-800);
    margin-bottom: 0.5rem;
}

.plan-price {
    margin-bottom: 0.75rem;
}

.plan-price .currency {
    font-size: 0.875rem;
    color: var(--signup-gray-600);
}

.plan-price .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--signup-primary);
}

.plan-price .period {
    font-size: 0.875rem;
    color: var(--signup-gray-500);
}

.plan-price .trial-price {
    display: block;
    font-size: 0.75rem;
    color: var(--signup-success);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.plan-desc {
    font-size: 0.8rem;
    color: var(--signup-gray-500);
    margin-bottom: 0.75rem;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--signup-gray-600);
    margin-bottom: 0.25rem;
}

.plan-features li i {
    color: var(--signup-success);
}

/* Pre-selected Plan Summary */
.selected-plan-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));
    border: 2px solid var(--signup-primary);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.selected-plan-info {
    flex: 1;
}

.selected-plan-info .plan-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.selected-plan-info .plan-name {
    margin: 0;
    font-size: 1.1rem;
}

.selected-plan-info .plan-price-display {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.selected-plan-info .plan-price-display .currency {
    font-size: 0.875rem;
    color: var(--signup-gray-600);
}

.selected-plan-info .plan-price-display .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--signup-primary);
}

.selected-plan-info .plan-price-display .period {
    font-size: 0.875rem;
    color: var(--signup-gray-500);
}

/* Verification Section */
.verification-sent-message,
.verification-intro {
    text-align: center;
    padding: 2rem;
}

.sent-icon,
.intro-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--signup-primary), var(--signup-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.sent-icon i,
.intro-icon i {
    font-size: 2.5rem;
    color: white;
}

.verification-sent-message h4,
.verification-intro h4 {
    font-size: 1.25rem;
    color: var(--signup-gray-800);
    margin-bottom: 0.5rem;
}

.verification-sent-message p,
.verification-intro p {
    color: var(--signup-gray-500);
}

.otp-input-container {
    max-width: 200px;
    margin: 0 auto;
}

.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0;
    border: 2px solid var(--border-color, #d1d5db);
    border-radius: 10px;
    background: var(--bg-surface, #fff);
    color: var(--text-primary, #111827);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    caret-color: var(--theme-primary, #10b981);
}

.otp-input:focus {
    outline: none;
    border-color: var(--theme-primary, #10b981);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.otp-input::placeholder {
    color: var(--text-muted, #9ca3af);
    font-weight: 400;
}

@media (max-width: 400px) {
    .otp-input-group {
        gap: 0.375rem;
    }

    .otp-input {
        width: 40px;
        height: 48px;
        font-size: 1.25rem;
    }
}

.resend-section {
    text-align: center;
    margin-top: 1rem;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--signup-gray-200);
}

/* Terms Notice */
.terms-notice {
    text-align: center;
    margin-top: 1.5rem;
}

.terms-notice a {
    color: var(--signup-primary);
    text-decoration: none;
}

.terms-notice a:hover {
    text-decoration: underline;
}

/* Registration Complete */
.registration-complete {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--signup-success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    font-size: 3rem;
    color: white;
}

.registration-complete h3 {
    font-size: 1.75rem;
    color: var(--signup-gray-800);
    margin-bottom: 0.5rem;
}

.registration-complete > p {
    color: var(--signup-gray-500);
    margin-bottom: 2rem;
}

.credentials-card {
    background: var(--signup-gray-50);
    border: 1px solid var(--signup-gray-200);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.credentials-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--signup-gray-800);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--signup-gray-200);
}

.credential-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.credential-label {
    color: var(--signup-gray-500);
    font-size: 0.875rem;
}

.credential-value {
    font-weight: 600;
    color: var(--signup-gray-800);
    font-family: monospace;
}

.trial-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1rem;
    color: var(--signup-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Login Link */
.login-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--signup-gray-200);
    color: var(--signup-gray-500);
}

.login-link a {
    color: var(--signup-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

/* Responsive */
@media (max-width: 992px) {
    .signup-hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .signup-card {
        padding: 1.5rem;
    }

    .size-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .step-progress {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .step-line {
        display: none;
    }

    .size-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .plan-options {
        grid-template-columns: 1fr;
    }

    .verification-method-selector {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group-half {
        width: 100%;
    }
}

/* Verification Method Selector */
.verification-method-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.method-option {
    flex: 1;
    padding: 1.25rem 1rem;
    border: 2px solid var(--signup-gray-200);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    background: white;
}

.method-option:hover {
    border-color: var(--signup-primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.method-option.selected {
    border-color: var(--signup-primary);
    background-color: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.method-option i {
    font-size: 2rem;
    color: var(--signup-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.method-option .method-label {
    display: block;
    font-weight: 600;
    color: var(--signup-gray-800);
    margin-bottom: 0.25rem;
}

.method-option .method-value {
    display: block;
    font-size: 0.875rem;
    color: var(--signup-gray-500);
}

/* Verification Success */
.verification-success {
    text-align: center;
    padding: 2rem;
}

.verification-success .success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--signup-success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.verification-success .success-icon i {
    font-size: 2.5rem;
    color: white;
}

.verification-success h4 {
    color: var(--signup-gray-800);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.verification-success p {
    color: var(--signup-gray-500);
}

/* Registration Progress UI */
.registration-progress-container {
    padding: 1rem;
    animation: progressContainerFadeIn 0.4s ease-out;
}

@keyframes progressContainerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.registration-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* Registration Step Item */
.reg-step-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    position: relative;
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: regStepSlideIn 0.4s ease-out;
    animation-fill-mode: backwards;
}

.reg-step-item:nth-child(1) { animation-delay: 0.1s; }
.reg-step-item:nth-child(2) { animation-delay: 0.2s; }
.reg-step-item:nth-child(3) { animation-delay: 0.3s; }
.reg-step-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes regStepSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.reg-step-item.in-progress {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.reg-step-item.completed {
    background: rgba(16, 185, 129, 0.05);
}

.reg-step-item.failed {
    background: rgba(239, 68, 68, 0.05);
}

/* Registration Step Indicator */
.reg-step-indicator {
    flex-shrink: 0;
    margin-right: 1rem;
    position: relative;
    z-index: 1;
}

/* Connector line between steps */
.reg-step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1rem;
    top: 3.5rem;
    width: 2px;
    height: calc(100% - 1rem);
    margin-left: 15px;
    background: var(--signup-gray-200);
    transition: background 0.3s ease;
}

.reg-step-item.completed:not(:last-child)::after {
    background: linear-gradient(180deg, var(--signup-success), var(--signup-success));
}

/* Registration Step Icon */
.reg-step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reg-step-icon i {
    font-size: 1rem;
}

.reg-step-icon.pending {
    background: var(--signup-gray-100);
    color: var(--signup-gray-400);
    border: 2px dashed var(--signup-gray-300);
}

.reg-step-icon.in-progress {
    background: linear-gradient(135deg, var(--signup-primary), var(--signup-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    animation: regIconPulse 2s infinite;
}

@keyframes regIconPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.reg-step-icon.in-progress .spinner-border {
    width: 1.125rem;
    height: 1.125rem;
    border-width: 2px;
    color: white;
}

.reg-step-icon.completed {
    background: linear-gradient(135deg, var(--signup-success), #059669);
    color: white;
    animation: regIconComplete 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes regIconComplete {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.reg-step-icon.failed {
    background: linear-gradient(135deg, var(--signup-danger), #dc2626);
    color: white;
    animation: regIconShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes regIconShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

/* Registration Step Content */
.reg-step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 36px;
}

.reg-step-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--signup-gray-700);
    transition: color 0.3s ease;
}

.reg-step-item.pending .reg-step-label {
    color: var(--signup-gray-500);
}

.reg-step-item.in-progress .reg-step-label {
    color: var(--signup-primary);
}

.reg-step-item.completed .reg-step-label {
    color: var(--signup-success);
}

.reg-step-item.failed .reg-step-label {
    color: var(--signup-danger);
}

.reg-step-status {
    font-size: 0.75rem;
    color: var(--signup-gray-500);
    margin-top: 0.125rem;
    opacity: 0;
    animation: regStatusFadeIn 0.3s ease-out 0.2s forwards;
}

@keyframes regStatusFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reg-step-item.in-progress .reg-step-status {
    color: var(--signup-primary);
    font-style: italic;
}

/* Overall Progress */
.registration-overall-progress {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--signup-gray-200);
}

.registration-overall-progress .progress {
    background: var(--signup-gray-100);
    border-radius: 8px;
    overflow: hidden;
}

.registration-overall-progress .progress-bar {
    background: linear-gradient(90deg, var(--signup-primary), var(--signup-secondary));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive adjustments for registration progress */
@media (max-width: 576px) {
    .registration-progress-container {
        padding: 0.5rem;
    }

    .reg-step-item {
        padding: 0.75rem;
    }

    .reg-step-icon {
        width: 32px;
        height: 32px;
    }

    .reg-step-icon i {
        font-size: 0.875rem;
    }

    .reg-step-item:not(:last-child)::after {
        left: 0.75rem;
        margin-left: 13px;
    }
}

/* ============================================
   STEP 4: SETUP FEE PAYMENT STYLES
   ============================================ */

/* Payment Summary Card */
.payment-summary {
    background: linear-gradient(135deg, var(--signup-gray-50), #f8fafc);
    border: 1px solid var(--signup-gray-200);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.payment-summary .summary-header {
    font-weight: 600;
    color: var(--signup-gray-700);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--signup-gray-200);
    display: flex;
    align-items: center;
}

.payment-summary .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--signup-gray-600);
}

.payment-summary .summary-item .price {
    font-weight: 500;
    color: var(--signup-gray-700);
}

.payment-summary .summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 2px solid var(--signup-gray-200);
    font-weight: 600;
}

.payment-summary .summary-total .total-price {
    font-size: 1.5rem;
    color: var(--signup-primary);
}

.payment-summary .credit-notice {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
}

/* Payment Methods Grid */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.payment-method-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 2px solid var(--signup-gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    min-height: 80px;
}

.payment-method-option:hover {
    border-color: var(--signup-primary);
    background: rgba(99, 102, 241, 0.05);
}

.payment-method-option.selected {
    border-color: var(--signup-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.payment-method-option i {
    font-size: 1.5rem;
    color: var(--signup-gray-500);
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.payment-method-option.selected i {
    color: var(--signup-primary);
}

.payment-method-option span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--signup-gray-600);
    text-align: center;
}

.payment-method-option.selected span {
    color: var(--signup-primary);
}

/* Payment Waiting/Polling State */
.payment-waiting {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.03));
    border-radius: 12px;
    margin: 1.5rem 0;
}

.payment-waiting .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

.payment-waiting p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--signup-gray-700);
    margin-bottom: 0.5rem;
}

.payment-waiting small {
    color: var(--signup-gray-500);
}

/* Payment Error Alert */
.payment-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.payment-error i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Responsive adjustments for payment UI */
@media (max-width: 576px) {
    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-method-option {
        padding: 0.75rem;
        min-height: 70px;
    }

    .payment-method-option i {
        font-size: 1.25rem;
    }

    .payment-summary .summary-total .total-price {
        font-size: 1.25rem;
    }
}

/* --- Account: Complete Registration (509 lines) --- */

/* Complete Registration Page Styles */
/* Inherits most styles from CompanySignup.razor.css */

:root {
    --signup-primary: #6366f1;
    --signup-primary-dark: #4f46e5;
    --signup-secondary: #8b5cf6;
    --signup-success: #10b981;
    --signup-warning: #f59e0b;
    --signup-danger: #ef4444;
    --signup-gray-50: #f9fafb;
    --signup-gray-100: #f3f4f6;
    --signup-gray-200: #e5e7eb;
    --signup-gray-300: #d1d5db;
    --signup-gray-500: #6b7280;
    --signup-gray-600: #4b5563;
    --signup-gray-700: #374151;
    --signup-gray-800: #1f2937;
    --signup-gray-900: #111827;
}

.company-signup-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Hero Section */
.signup-hero {
    padding: 4rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    color: white;
    padding-right: 3rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.trial-features {
    display: grid;
    gap: 1rem;
}

.trial-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trial-feature .feature-icon {
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
}

.trial-feature .feature-icon.pending {
    background: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.trial-feature span {
    font-size: 1rem;
}

/* Signup Card */
.signup-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.signup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--signup-primary), var(--signup-secondary));
}

/* Step Content */
.step-content {
    margin-bottom: 2rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--signup-gray-800);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.step-description {
    color: var(--signup-gray-500);
    margin-bottom: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--signup-gray-700);
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--signup-danger);
}

.form-control,
.form-select {
    border: 2px solid var(--signup-gray-200);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--signup-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-control-lg,
.form-select-lg {
    padding: 1rem 1rem;
}

/* Registration Details Card */
.registration-details {
    margin-bottom: 1.5rem;
}

.detail-card {
    background: var(--signup-gray-50);
    border: 1px solid var(--signup-gray-200);
    border-radius: 12px;
    padding: 1rem;
}

.detail-header {
    font-weight: 600;
    color: var(--signup-gray-700);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--signup-gray-200);
    display: flex;
    align-items: center;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
}

.detail-label {
    color: var(--signup-gray-500);
    font-size: 0.875rem;
}

.detail-value {
    font-weight: 500;
    color: var(--signup-gray-800);
}

/* Payment Summary */
.payment-summary {
    background: linear-gradient(135deg, var(--signup-gray-50), #f8fafc);
    border: 1px solid var(--signup-gray-200);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.payment-summary .summary-header {
    font-weight: 600;
    color: var(--signup-gray-700);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--signup-gray-200);
    display: flex;
    align-items: center;
}

.payment-summary .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--signup-gray-600);
}

.payment-summary .summary-item .price {
    font-weight: 500;
    color: var(--signup-gray-700);
}

.payment-summary .summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 2px solid var(--signup-gray-200);
    font-weight: 600;
}

.payment-summary .summary-total .total-price {
    font-size: 1.5rem;
    color: var(--signup-primary);
}

.payment-summary .credit-notice {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.payment-method-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 2px solid var(--signup-gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    min-height: 80px;
}

.payment-method-option:hover {
    border-color: var(--signup-primary);
    background: rgba(99, 102, 241, 0.05);
}

.payment-method-option.selected {
    border-color: var(--signup-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.payment-method-option i {
    font-size: 1.5rem;
    color: var(--signup-gray-500);
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.payment-method-option.selected i {
    color: var(--signup-primary);
}

.payment-method-option span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--signup-gray-600);
    text-align: center;
}

.payment-method-option.selected span {
    color: var(--signup-primary);
}

/* Payment Waiting */
.payment-waiting {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.03));
    border-radius: 12px;
    margin: 1.5rem 0;
}

.payment-waiting .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

.payment-waiting p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--signup-gray-700);
    margin-bottom: 0.5rem;
}

.payment-waiting small {
    color: var(--signup-gray-500);
}

/* Step Navigation */
.step-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--signup-gray-200);
}

.step-actions {
    margin-top: 1.5rem;
}

/* Registration Complete */
.registration-complete {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--signup-success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    font-size: 3rem;
    color: white;
}

.registration-complete h3 {
    font-size: 1.75rem;
    color: var(--signup-gray-800);
    margin-bottom: 0.5rem;
}

.registration-complete > p {
    color: var(--signup-gray-500);
    margin-bottom: 2rem;
}

.credentials-card {
    background: var(--signup-gray-50);
    border: 1px solid var(--signup-gray-200);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.credentials-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--signup-gray-800);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--signup-gray-200);
}

.credential-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.credential-label {
    color: var(--signup-gray-500);
    font-size: 0.875rem;
}

.credential-value {
    font-weight: 600;
    color: var(--signup-gray-800);
    font-family: monospace;
}

/* Login Link */
.login-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--signup-gray-200);
    color: var(--signup-gray-500);
}

.login-link a {
    color: var(--signup-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

/* Responsive */
@media (max-width: 992px) {
    .signup-hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .signup-card {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-method-option {
        padding: 0.75rem;
        min-height: 70px;
    }

    .payment-method-option i {
        font-size: 1.25rem;
    }

    .payment-summary .summary-total .total-price {
        font-size: 1.25rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* --- Account: Register Institution (484 lines) --- */

/* Register Institution Marketing Page Styles */

.register-institution-page {
    --primary-color: #2563EB;
    --secondary-color: #7C3AED;
    --success-color: #10B981;
    --bg-light: #F8FAFC;
    --bg-dark: #1E293B;
    --text-dark: #1E293B;
    --text-muted: #64748B;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 6rem 0;
    color: white;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(90deg, #FDE68A, #FCA5A5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-actions .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 10px;
}

.hero-actions .btn-primary {
    background: white;
    color: var(--primary-color);
    border: none;
}

.hero-actions .btn-primary:hover {
    background: #F1F5F9;
    transform: translateY(-2px);
}

.hero-actions .btn-outline-light {
    border-width: 2px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-image-wrapper {
    position: relative;
    padding: 2rem;
}

.hero-image-decoration {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transform: rotate(3deg);
}

.hero-image {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Section Common Styles */
.section-header {
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: var(--bg-light);
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.75rem;
    color: white;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--text-muted);
    margin: 0;
}

/* Pricing Section */
.pricing-section {
    padding: 6rem 0;
}

.pricing-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.pricing-card.recommended {
    border-color: var(--primary-color);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E2E8F0;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.plan-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.pricing-body {
    text-align: center;
    padding: 1.5rem 0;
}

.price-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
}

.currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.price {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.period {
    font-size: 1rem;
    color: var(--text-muted);
    align-self: flex-end;
    margin-bottom: 0.5rem;
}

.setup-fee-info {
    display: inline-flex;
    align-items: center;
    background: #FEF3C7;
    color: #92400E;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-top: 0.75rem;
}

.trial-badge {
    display: inline-flex;
    align-items: center;
    background: #D1FAE5;
    color: #065F46;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-top: 0.75rem;
}

.pricing-features {
    flex: 1;
    padding: 1rem 0;
}

.pricing-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.pricing-features li i {
    font-size: 1.125rem;
}

.pricing-footer {
    padding-top: 1.5rem;
}

.pricing-footer .btn {
    width: 100%;
    padding: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
}

/* FAQ Section */
.faq-section {
    padding: 6rem 0;
    background: var(--bg-light);
}

.accordion-item {
    background: white;
    border: none !important;
    border-radius: 12px !important;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.accordion-button {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    background: white;
}

.accordion-button:not(.collapsed) {
    background: white;
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-body {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
}

.cta-wrapper {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 24px;
    padding: 4rem;
    color: white;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    opacity: 0.9;
    margin: 0;
}

.cta-section .btn-light {
    background: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 12px;
}

.cta-section .btn-light:hover {
    background: #F1F5F9;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 991px) {
    .hero-section {
        padding: 4rem 0;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image-wrapper {
        margin-top: 3rem;
    }

    .cta-wrapper {
        padding: 2rem;
        text-align: center;
    }

    .cta-section .text-lg-end {
        margin-top: 1.5rem;
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .pricing-card {
        padding: 1.5rem;
    }

    .price {
        font-size: 2.5rem;
    }
}

/* --- Account: Company List (340 lines) --- */

/**
 * CompanyList - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 * Dark mode handled automatically via CSS variables from theme-core.css
 */

/* Content Area - for scoped PageLoader */
.content-area {
    position: relative;
    min-height: 400px;
}

/* ========================================
   SETTINGS ICON WRAPPER
   ======================================== */

.settings-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg, 12px);
    background: var(--gradient-primary-subtle, linear-gradient(135deg, var(--theme-primary-subtle) 0%, var(--theme-info-subtle) 100%));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state .empty-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full, 50%);
    background: var(--bg-surface-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.empty-state .empty-icon i {
    font-size: 2.5rem;
    color: var(--text-secondary);
}

/* ========================================
   COMPANY GRID
   ======================================== */

.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ========================================
   COMPANY CARD
   ======================================== */

.company-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl, 12px);
    overflow: hidden;
    transition: all var(--transition-base, 0.2s ease);
    cursor: pointer;
}

.company-card:hover {
    border-color: var(--theme-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.company-card-header {
    position: relative;
    padding: 1.5rem;
    background: var(--gradient-primary-subtle, linear-gradient(135deg, var(--theme-primary-subtle) 0%, var(--theme-info-subtle) 100%));
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-xl, 12px);
    overflow: hidden;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-tertiary);
}

.logo-placeholder i {
    font-size: 2rem;
    color: var(--text-secondary);
}

.company-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.company-card-body {
    padding: 1.25rem;
}

.company-name {
    font-size: 1.125rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.company-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.detail-item i {
    font-size: 1rem;
    width: 1.25rem;
    flex-shrink: 0;
}

.detail-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface-tertiary);
}

.company-card-footer .btn {
    border-radius: var(--radius-lg, 8px);
    font-weight: var(--font-medium, 500);
}

.company-card:hover .company-card-footer .btn {
    background: var(--theme-primary);
    color: white;
    border-color: var(--theme-primary);
}

/* ========================================
   TAB CONTENT
   ======================================== */

.tab-content-wrapper {
    padding: 1.5rem 0;
}

/* ========================================
   SETTINGS SECTION
   ======================================== */

.settings-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl, 12px);
    overflow: hidden;
    transition: all var(--transition-base, 0.2s ease);
}

.settings-section:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 1px var(--theme-primary-subtle);
}

.section-header {
    padding: 1rem 1.25rem;
    background: var(--bg-surface-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h6 {
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary);
}

.section-body {
    padding: 1.25rem;
}

/* ========================================
   TOGGLE LIST
   ======================================== */

.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-surface-tertiary);
    border-radius: var(--radius-lg, 8px);
    transition: all var(--transition-base, 0.2s ease);
}

.toggle-item:hover {
    background: var(--bg-surface-secondary);
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-info i {
    font-size: 1.25rem;
}

.toggle-label {
    font-weight: var(--font-medium, 500);
    color: var(--text-primary);
}

/* ========================================
   SMTP HELP
   ======================================== */

.smtp-help {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.smtp-provider {
    padding: 0.75rem;
    background: var(--bg-surface-tertiary);
    border-radius: var(--radius-base, 6px);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    transition: all var(--transition-base, 0.2s ease);
}

.smtp-provider:hover {
    background: var(--bg-surface-secondary);
    transform: translateX(4px);
}

.smtp-provider strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.smtp-provider small {
    color: var(--text-secondary);
    font-family: var(--font-monospace, var(--bs-font-monospace, monospace));
    font-size: 0.75rem;
}

/* ========================================
   TAB STYLING ENHANCEMENTS
   ======================================== */

.rz-tabview-nav {
    border-bottom: 2px solid var(--border-color);
    gap: 0.5rem;
}

.rz-tabview-nav-link {
    border: none !important;
    border-radius: var(--radius-lg, 8px) var(--radius-lg, 8px) 0 0 !important;
    padding: 0.75rem 1.25rem !important;
    font-weight: var(--font-medium, 500);
    transition: all var(--transition-base, 0.2s ease);
    color: var(--text-secondary);
}

.rz-tabview-nav-link:hover {
    background: var(--bg-surface-tertiary);
}

.rz-state-active .rz-tabview-nav-link {
    background: var(--theme-primary) !important;
    color: white !important;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .company-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Account: Branding Settings Tab (211 lines) --- */

/* BrandingSettingsTab.razor.css */

.branding-settings-tab {
    padding: 0.5rem 0;
}

/* Color Picker Group */
.color-picker-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-color);
    border-radius: 6px;
}

.color-picker-wrapper .rz-colorpicker {
    border: none;
}

.color-input {
    flex: 1;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
}

/* Upload Group */
.upload-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.upload-preview-wrapper {
    background: var(--rz-base-background-color);
    border: 2px dashed var(--rz-border-color);
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.upload-preview-wrapper:hover {
    border-color: var(--rz-primary);
}

.upload-preview-wrapper.dark-preview {
    background: #1f2937;
}

.upload-preview-wrapper.favicon-preview {
    min-height: 80px;
}

.preview-container {
    position: relative;
    padding: 0.75rem;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

.preview-image.favicon {
    max-height: 48px;
    max-width: 48px;
}

.remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--rz-text-secondary-color);
    font-size: 0.8rem;
}

.upload-placeholder i {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Preview Panel */
.preview-panel {
    margin-top: 0;
}

.preview-mode-toggle {
    display: flex;
    gap: 0.25rem;
}

.theme-preview-container {
    transition: background 0.3s ease;
}

/* Preview Header */
.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-logo {
    max-height: 28px;
    max-width: 100px;
    object-fit: contain;
}

.preview-logo-placeholder {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 6px 10px;
    background: color-mix(in srgb, currentColor 10%, transparent);
    border-radius: 4px;
}

/* Preview Content */
.preview-content h6 {
    margin-bottom: 0.25rem;
}

.preview-content p {
    margin-bottom: 0.75rem;
}

/* Preview Buttons */
.preview-buttons {
    display: flex;
    gap: 0.5rem;
}

.preview-btn {
    transition: all 0.2s ease;
}

.preview-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .preview-panel {
        margin-top: 1.5rem;
    }

    .preview-panel.sticky-top {
        position: relative !important;
        top: auto !important;
    }
}

@media (max-width: 767.98px) {
    .color-picker-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Radzen component overrides */
.rz-colorpicker-value {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.rz-slider {
    margin-top: 0.25rem;
}

/* Tab styling */
.rz-tabview-nav {
    border-bottom: 1px solid var(--rz-border-color);
}

.rz-tabview-nav-link.rz-tabview-selected {
    border-bottom-color: var(--rz-primary);
}

/* Form label styling */
.form-label {
    font-weight: 500;
    color: var(--rz-text-color);
    margin-bottom: 0.25rem;
}

/* --- Account: Payment Gateways Config (82 lines) --- */

/**
 * PaymentGatewaysConfig - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 */

/* ========================================
   GATEWAY CARD
   ======================================== */

.gateway-card {
    transition: all var(--transition-base, 0.2s ease);
    border: 1px solid var(--border-color, var(--bs-border-color, #e5e7eb));
}

.gateway-card:hover {
    box-shadow: var(--card-shadow-hover, 0 4px 12px rgba(0, 0, 0, 0.1));
}

.gateway-card.inactive {
    opacity: 0.6;
}

/* ========================================
   GATEWAY ICON
   ======================================== */

.gateway-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary-subtle, linear-gradient(135deg, var(--bs-primary-bg-subtle, #eef2ff), var(--bs-secondary-bg-subtle, #f8fafc)));
    border-radius: var(--radius-xl, 12px);
}

/* ========================================
   GATEWAY SUGGESTION
   ======================================== */

.gateway-suggestion {
    cursor: pointer;
    transition: all var(--transition-base, 0.2s ease);
    border: 2px dashed var(--border-color, var(--bs-border-color, #e5e7eb));
}

.gateway-suggestion:hover {
    border-color: var(--theme-primary, var(--bs-primary, #4f46e5));
    background-color: var(--theme-primary-subtle, var(--bs-primary-bg-subtle, #eef2ff));
}

/* ========================================
   MODAL OVERLAY
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    backdrop-filter: blur(2px);
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow: auto;
}

.modal-dialog.modal-lg {
    width: 800px;
    max-width: 90vw;
}

/* --- Account: Website List (199 lines) --- */

/**
 * WebsiteList - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 */

/* Content Area - for scoped PageLoader */
.content-area {
    position: relative;
    min-height: 400px;
}

/* ========================================
   SETTINGS ICON WRAPPER
   ======================================== */

.settings-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg, 12px);
    background: var(--gradient-primary-subtle, linear-gradient(135deg, var(--bs-primary-bg-subtle, #eef2ff) 0%, var(--bs-info-bg-subtle, #e0f2fe) 100%));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   TAB CONTENT
   ======================================== */

.tab-content-wrapper {
    padding: 1.5rem 0;
}

/* ========================================
   SETTINGS SECTION
   ======================================== */

.settings-section {
    background: var(--bg-body, var(--bs-body-bg, #ffffff));
    border: 1px solid var(--border-color, var(--bs-border-color, #e5e7eb));
    border-radius: var(--radius-xl, 12px);
    overflow: hidden;
    transition: all var(--transition-base, 0.2s ease);
}

.settings-section:hover {
    border-color: var(--theme-primary, var(--bs-primary, #4f46e5));
    box-shadow: 0 0 0 1px var(--theme-primary-subtle, var(--bs-primary-bg-subtle, #eef2ff));
}

.settings-section.active {
    border-color: var(--theme-success, var(--bs-success, #10b981));
    box-shadow: 0 0 0 1px var(--theme-success-subtle, var(--bs-success-bg-subtle, #dcfce7));
}

.section-header {
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary, var(--bs-tertiary-bg, #f8fafc));
    border-bottom: 1px solid var(--border-color, var(--bs-border-color, #e5e7eb));
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h6 {
    font-weight: var(--font-semibold, 600);
    color: var(--text-heading, var(--bs-heading-color, #1f2937));
}

.section-body {
    padding: 1.25rem;
}

/* ========================================
   TOGGLE LIST
   ======================================== */

.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary, var(--bs-tertiary-bg, #f8fafc));
    border-radius: var(--radius-lg, 8px);
    transition: all var(--transition-base, 0.2s ease);
}

.toggle-item:hover {
    background: var(--bg-secondary, var(--bs-secondary-bg, #f1f5f9));
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-info i {
    font-size: 1.25rem;
}

.toggle-label {
    font-weight: var(--font-medium, 500);
    color: var(--text-heading, var(--bs-heading-color, #1f2937));
}

/* ========================================
   SMTP HELP
   ======================================== */

.smtp-help {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.smtp-provider {
    padding: 0.75rem;
    background: var(--bg-tertiary, var(--bs-tertiary-bg, #f8fafc));
    border-radius: var(--radius-base, 6px);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    transition: all var(--transition-base, 0.2s ease);
}

.smtp-provider:hover {
    background: var(--bg-secondary, var(--bs-secondary-bg, #f1f5f9));
    transform: translateX(4px);
}

.smtp-provider strong {
    font-size: 0.875rem;
    color: var(--text-heading, var(--bs-heading-color, #1f2937));
}

.smtp-provider small {
    color: var(--text-secondary, var(--bs-secondary-color, #6b7280));
    font-family: var(--font-monospace, var(--bs-font-monospace, monospace));
    font-size: 0.75rem;
}

/* ========================================
   HELP STEPS
   ======================================== */

.help-steps {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.help-steps li {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-primary, var(--bs-body-color, #374151));
}

.help-steps a {
    color: var(--theme-primary, var(--bs-primary, #4f46e5));
    text-decoration: none;
}

.help-steps a:hover {
    text-decoration: underline;
}

/* ========================================
   TAB STYLING ENHANCEMENTS
   ======================================== */

.rz-tabview-nav {
    border-bottom: 2px solid var(--border-color, var(--bs-border-color, #e5e7eb));
    gap: 0.5rem;
}

.rz-tabview-nav-link {
    border: none !important;
    border-radius: var(--radius-lg, 8px) var(--radius-lg, 8px) 0 0 !important;
    padding: 0.75rem 1.25rem !important;
    font-weight: var(--font-medium, 500);
    transition: all var(--transition-base, 0.2s ease);
}

.rz-tabview-nav-link:hover {
    background: var(--bg-tertiary, var(--bs-tertiary-bg, #f8fafc));
}

.rz-state-active .rz-tabview-nav-link {
    background: var(--theme-primary, var(--bs-primary, #4f46e5)) !important;
    color: white !important;
}


/* ============================================================================
   MULTITENANCY PAGES
   Styles for Multitenancy section: Tenants, Billing, Provisioning, Modals
   Migrated from scoped .razor.css and embedded <style> blocks
   ============================================================================ */

/* --- Multitenancy: Tenant Details (662 lines) --- */

/* Tenant Details Page - Modern Styling - Using Theme Variables */
/* NOTE: Header, nav-tabs, loading, tenant-identity styles are in theme-core.css SECTION 30 */

/* Tenant Avatar Badge for PageLayout header */
.tenant-avatar-badge {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark, var(--theme-primary)));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* Error State */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.error-container i {
    font-size: 4rem;
    color: var(--theme-danger);
    margin-bottom: 1rem;
}

.error-container h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Large Avatar Variant */
.tenant-avatar.large {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    border-radius: 14px;
}

.status-badge {
    font-size: 0.8rem;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.5rem;
}

.stat-icon.users {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

.stat-icon.package {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.stat-icon.calendar {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.stat-icon.time {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Info Cards */
.info-card {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.info-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-surface-secondary);
    border-bottom: 1px solid var(--border-color);
}

.info-card .card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.info-card .card-title i {
    color: var(--theme-primary);
}

.info-card .card-body {
    padding: 1.25rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.info-value.monospace {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--theme-primary);
}

.info-value.warning {
    color: var(--theme-warning);
}

.info-value .expired {
    color: var(--theme-danger);
}

.connection-string {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
    max-width: 250px;
}

.toggle-btn {
    padding: 0.125rem 0.25rem !important;
    flex-shrink: 0;
}

/* Actions Card */
.actions-card .card-body {
    padding: 1.25rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.action-btn {
    width: 100%;
    justify-content: center;
    border-radius: 8px !important;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* Metrics Section */
.metrics-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metrics-card,
.activity-card,
.payment-card {
    min-height: 300px;
}

/* Loading and Empty States */
.loading-placeholder,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-secondary);
    min-height: 200px;
}

.empty-state i {
    font-size: 2.5rem;
    opacity: 0.5;
}

/* Usage Metrics */
.usage-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.usage-metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon i {
    font-size: 1.125rem;
}

.metric-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.metric-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.metric-values {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.metric-percent {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-success);
}

.metric-percent.warning {
    color: var(--theme-warning);
}

.metric-progress {
    height: 6px;
    background: var(--bg-surface-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.metric-progress .progress-bar {
    height: 100%;
    background: var(--theme-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.metric-progress .progress-bar.warning {
    background: var(--theme-warning);
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon i {
    font-size: 0.875rem;
}

.activity-icon.success {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.activity-icon.primary {
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

.activity-icon.warning {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.activity-icon.danger {
    background: var(--theme-danger-subtle);
    color: var(--theme-danger);
}

.activity-icon.info {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.activity-icon.secondary {
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
}

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

.activity-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.activity-type {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-plan {
    font-size: 0.75rem;
    color: var(--theme-primary);
    background: var(--theme-primary-subtle);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.activity-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.activity-reason {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.activity-price {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.activity-user {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Payment History */
.payments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-surface-secondary);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.payment-item:hover {
    background: var(--theme-primary-subtle);
}

.payment-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-icon i {
    font-size: 1.125rem;
    color: var(--theme-primary);
}

.payment-info {
    flex: 1;
    min-width: 0;
}

.payment-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.payment-amount {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-status {
    font-size: 0.65rem;
    padding: 0.125rem 0.5rem;
}

.payment-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.payment-method {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.payment-invoice {
    font-size: 0.7rem;
    color: var(--theme-primary);
    font-weight: 500;
}

.payment-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.payment-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.payment-ref {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.more-payments {
    text-align: center;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    margin-top: 0.5rem;
}

.more-payments span {
    font-size: 0.75rem;
    color: var(--theme-primary);
    cursor: pointer;
}

/* Responsive Adjustments */
@media (max-width: 1400px) {
    .metrics-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .details-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .header-left {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        justify-content: flex-end;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .nav-tab {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .tenant-name {
        font-size: 1.25rem;
    }

    .metrics-section {
        grid-template-columns: 1fr;
    }
}

/* --- Multitenancy: Provisioning Status (564 lines) --- */

/* Provisioning Status Page Styles - Using Theme Variables */
/* NOTE: Uses centrally managed CSS variables from theme-core.css */

.provisioning-page {
    padding: 0 1rem;
}

/* Toolbar Section */
.toolbar-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-body);
    border-radius: 8px;
}

.toggle-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.refresh-indicator {
    color: var(--theme-primary);
}

/* Loading Container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-secondary);
}

/* Summary Cards Section */
.summary-section {
    margin-bottom: 2rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
}

.summary-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.card-icon i {
    font-size: 1.5rem;
    color: white;
}

.total-card .card-icon {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
}

.provisioned-card .card-icon {
    background: linear-gradient(135deg, var(--theme-success) 0%, var(--theme-success-emphasis) 100%);
}

.in-progress-card .card-icon {
    background: linear-gradient(135deg, var(--theme-info) 0%, var(--theme-primary) 100%);
}

.failed-card .card-icon {
    background: linear-gradient(135deg, var(--theme-danger) 0%, var(--theme-rose-emphasis) 100%);
}

.card-content {
    flex: 1;
}

.card-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
}

.card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Filter Section */
.filter-section {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.status-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-dropdown {
    min-width: 180px;
}

.search-filter {
    flex: 1;
    max-width: 300px;
}

.search-input {
    width: 100%;
}

/* Data Grid Section */
.data-grid-section {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.provisioning-grid {
    border: none;
}

.provisioning-grid .rz-datatable-thead th {
    background: var(--bg-body);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.provisioning-grid .rz-datatable-data tr:hover {
    background-color: var(--bg-body);
}

/* Tenant Info Cell */
.tenant-info {
    display: flex;
    flex-direction: column;
}

.tenant-name {
    font-weight: 600;
    color: var(--text-primary);
}

.tenant-id {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.completed {
    background-color: var(--theme-success-subtle);
    color: var(--theme-success);
}

.status-badge.in-progress {
    background-color: var(--theme-info-subtle);
    color: var(--theme-info);
}

.status-badge.failed {
    background-color: color-mix(in srgb, var(--theme-danger) 15%, transparent);
    color: var(--theme-danger);
}

.status-badge.pending {
    background-color: var(--theme-gray-100);
    color: var(--text-secondary);
}

.status-badge.unknown {
    background-color: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

/* Current Step */
.current-step {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--theme-gray-100);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.no-step, .no-time, .no-error {
    color: var(--text-muted);
}

.time-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Error Cell */
.error-cell {
    max-width: 200px;
}

.error-text {
    color: var(--theme-danger);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.action-btn {
    padding: 0.25rem 0.5rem;
}

.retry-btn:not(:disabled):hover {
    background-color: var(--theme-warning);
}

/* Expanded Content */
.expanded-content {
    padding: 1.5rem;
    background: var(--bg-body);
    border-top: 1px solid var(--border-color);
}

.steps-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface);
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
}

.step-item.step-completed {
    border-left-color: var(--theme-success);
}

.step-item.step-in-progress {
    border-left-color: var(--theme-info);
}

.step-item.step-failed {
    border-left-color: var(--theme-danger);
}

.step-item.step-pending {
    border-left-color: var(--text-muted);
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-completed .step-indicator {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.step-in-progress .step-indicator {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.step-failed .step-indicator {
    background: color-mix(in srgb, var(--theme-danger) 15%, transparent);
    color: var(--theme-danger);
}

.step-pending .step-indicator {
    background: var(--theme-gray-100);
    color: var(--text-secondary);
}

.step-content {
    flex: 1;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.step-name {
    font-weight: 600;
    color: var(--text-primary);
}

.step-status-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
}

.step-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.step-time {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-time i {
    width: 14px;
    color: var(--text-muted);
}

.step-error {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: color-mix(in srgb, var(--theme-danger) 10%, transparent);
    border-radius: 4px;
    margin-top: 0.5rem;
}

.step-error i {
    color: var(--theme-danger);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.step-error span {
    color: var(--theme-danger);
    font-size: 0.875rem;
}

.no-steps-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Legend Section */
.legend-section {
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.legend-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.legend-badge.completed {
    background-color: var(--theme-success-subtle);
    color: var(--theme-success);
}

.legend-badge.in-progress {
    background-color: var(--theme-info-subtle);
    color: var(--theme-info);
}

.legend-badge.failed {
    background-color: color-mix(in srgb, var(--theme-danger) 15%, transparent);
    color: var(--theme-danger);
}

.legend-badge.pending {
    background-color: var(--theme-gray-100);
    color: var(--text-secondary);
}

.legend-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .provisioning-page {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filter {
        max-width: none;
    }

    .legend-items {
        flex-direction: column;
        gap: 0.75rem;
    }

    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* --- Multitenancy: Billing & Invoicing (542 lines) --- */

/* Billing Page - Modern Styling - Using Theme Variables */
/* NOTE: Header, nav-tabs, loading, tenant-identity styles are in theme-core.css SECTION 30 */
/* Dark mode handled automatically via CSS variables from theme-core.css */

.billing-page {
    padding: 0 1rem;
}

/* Tenant Selector (page-specific) */
.tenant-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tenant-dropdown {
    min-width: 200px;
}

/* Billing Overview Section */
.billing-overview {
    padding: 0 2rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.overview-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
}

.overview-card:hover {
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.plan-card .card-icon {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: white;
}

.invoice-card .card-icon {
    background: linear-gradient(135deg, var(--theme-warning) 0%, var(--theme-warning-emphasis) 100%);
    color: white;
}

.payment-card .card-icon {
    background: linear-gradient(135deg, var(--theme-success) 0%, var(--theme-success-emphasis) 100%);
    color: white;
}

.card-icon i {
    font-size: 1.25rem;
}

.card-content {
    flex: 1;
}

.card-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.25rem 0 0.5rem;
}

.card-value.no-method {
    color: var(--text-muted);
    font-style: italic;
}

.plan-details,
.invoice-details,
.payment-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.plan-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-primary);
}

.plan-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.plan-cycle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.due-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.card-number,
.card-expiry {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.card-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.card-action {
    margin-top: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.active {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.status-badge.paid {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.status-badge.pending {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.status-badge.overdue {
    background: var(--theme-danger-subtle);
    color: var(--theme-danger);
}

/* Main Content Grid */
.billing-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    padding: 0 2rem;
    margin-bottom: 1.5rem;
}

.content-section {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header .section-title {
    margin-bottom: 0;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-input {
    min-width: 200px;
}

/* Invoices Grid */
.invoices-grid {
    border: none;
}

.invoice-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--theme-primary);
}

.invoice-date {
    color: var(--text-secondary);
}

.invoice-amount {
    font-weight: 600;
    color: var(--text-primary);
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.action-btn {
    padding: 0.375rem !important;
}

/* Payment Methods Section */
.payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-method-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.payment-method-item:hover {
    border-color: var(--text-muted);
}

.payment-method-item.default {
    border-color: var(--theme-primary);
    background: var(--theme-primary-subtle);
}

.payment-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.payment-icon i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.payment-info {
    flex: 1;
}

.payment-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.type-name {
    font-weight: 600;
    color: var(--text-primary);
}

.default-badge {
    display: inline-flex;
    padding: 0.125rem 0.375rem;
    background: var(--theme-primary);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.payment-number {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.payment-expiry {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.payment-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* Upgrade Section */
.upgrade-section {
    padding: 0 2rem;
    margin-bottom: 1.5rem;
}

.upgrade-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-radius: 12px;
    color: white;
}

.upgrade-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.upgrade-info p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.upgrade-btn {
    background: var(--bg-surface) !important;
    color: var(--theme-primary) !important;
    font-weight: 600 !important;
}

/* Usage Section */
.usage-section {
    padding: 0 2rem 2rem;
}

.usage-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.usage-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.usage-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.usage-value {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.usage-bar {
    margin-bottom: 0.5rem;
}

.usage-percent {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .overview-cards .overview-card:last-child {
        grid-column: span 2;
    }

    .billing-content {
        grid-template-columns: 1fr;
    }

    .usage-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .usage-cards .usage-card:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .billing-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
    }

    .header-left {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        justify-content: flex-end;
    }

    .tenant-selector {
        width: 100%;
    }

    .tenant-dropdown {
        width: 100%;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .nav-tab {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }

    .billing-overview,
    .billing-content,
    .upgrade-section,
    .usage-section {
        padding: 0 1rem;
    }

    .overview-cards {
        grid-template-columns: 1fr;
    }

    .overview-cards .overview-card:last-child {
        grid-column: auto;
    }

    .upgrade-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .usage-cards {
        grid-template-columns: 1fr;
    }

    .usage-cards .usage-card:last-child {
        grid-column: auto;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .section-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .search-input {
        min-width: auto;
        flex: 1;
    }
}

/* --- Multitenancy: Resource Quotas (409 lines) --- */

/* ResourceQuotas.razor.css - Modern Quota Management Styles Using Theme Variables */
/* NOTE: Header, nav-tabs, loading, tenant-identity styles are in theme-core.css SECTION 30 */
/* Dark mode handled automatically via CSS variables from theme-core.css */

/* Page Container */
.quotas-page {
    padding: 0 1rem;
}

/* Empty State */
.empty-quota-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 2rem;
}

.empty-quota-state .empty-state-content {
    text-align: center;
    max-width: 500px;
}

.empty-quota-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-quota-state h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-quota-state p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.empty-quota-state ul {
    text-align: left;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Warning Banner */
.warning-banner {
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.warning-banner.warning {
    background: var(--theme-warning-subtle);
    border: 1px solid var(--theme-warning);
}

.warning-banner.critical {
    background: var(--theme-danger-subtle);
    border: 1px solid var(--theme-danger);
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.warning-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.warning-banner.warning .warning-icon {
    background: color-mix(in srgb, var(--theme-warning) 20%, transparent);
    color: var(--theme-warning);
}

.warning-banner.critical .warning-icon {
    background: color-mix(in srgb, var(--theme-danger) 20%, transparent);
    color: var(--theme-danger);
}

.warning-icon i {
    font-size: 1.25rem;
}

.warning-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.warning-text strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.warning-text span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Quota Cards Grid */
.quota-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Quota Card */
.quota-card {
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.quota-card.status-healthy {
    border-top: 4px solid var(--theme-success);
}

.quota-card.status-moderate {
    border-top: 4px solid var(--theme-warning);
}

.quota-card.status-warning {
    border-top: 4px solid var(--theme-orange, #f97316);
}

.quota-card.status-critical {
    border-top: 4px solid var(--theme-danger);
}

.quota-card .card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon i {
    font-size: 1.25rem;
    color: white;
}

.card-icon.users {
    background: linear-gradient(135deg, var(--theme-info) 0%, var(--theme-primary) 100%);
}

.card-icon.storage {
    background: linear-gradient(135deg, var(--theme-success) 0%, var(--theme-green) 100%);
}

.card-icon.api {
    background: linear-gradient(135deg, var(--theme-warning) 0%, var(--theme-orange, #d97706) 100%);
}

.card-title {
    flex: 1;
    min-width: 0;
}

.card-title h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-title .last-updated {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
}

.warning-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--theme-warning-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.warning-badge i {
    font-size: 0.875rem;
    color: var(--theme-warning);
}

.quota-card .card-body {
    padding: 1.25rem 1.5rem;
}

.usage-display {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.usage-display .current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.usage-display .separator {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin: 0 0.25rem;
}

.usage-display .limit {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.usage-display .period {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* Custom Progress Bar */
.progress-container {
    height: 8px;
    background: var(--bg-surface-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-bar.progress-healthy {
    background: linear-gradient(90deg, var(--theme-success) 0%, var(--theme-green) 100%);
}

.progress-bar.progress-moderate {
    background: linear-gradient(90deg, var(--theme-warning) 0%, color-mix(in srgb, var(--theme-warning) 80%, white) 100%);
}

.progress-bar.progress-warning {
    background: linear-gradient(90deg, var(--theme-orange, #f97316) 0%, color-mix(in srgb, var(--theme-orange, #f97316) 80%, white) 100%);
}

.progress-bar.progress-critical {
    background: linear-gradient(90deg, var(--theme-danger) 0%, color-mix(in srgb, var(--theme-danger) 70%, white) 100%);
}

.usage-percent {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

.quota-card .card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-surface-tertiary);
    border-top: 1px solid var(--border-color);
}

/* Trends Section */
.trends-section {
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.trends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.trend-card {
    background: var(--bg-surface-tertiary);
    border-radius: 12px;
    padding: 1.25rem;
}

.trend-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .quotas-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
    }

    .header-left {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        justify-content: flex-end;
    }

    .tenant-name {
        font-size: 1.25rem;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .nav-tab {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }

    .quota-cards-grid {
        grid-template-columns: 1fr;
    }

    .warning-content {
        flex-wrap: wrap;
    }

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

    .trend-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .usage-display .current {
        font-size: 1.5rem;
    }

    .usage-display .limit {
        font-size: 1rem;
    }

    .quota-card .card-header,
    .quota-card .card-body,
    .quota-card .card-footer {
        padding: 1rem;
    }
}

/* --- Multitenancy: Upgrade Plan Dialog (scoped) (334 lines) --- */

/**
 * UpgradePlanDialog - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 * Dark mode handled automatically via CSS variables from theme-core.css
 */

/* ========================================
   DIALOG CONTAINER
   ======================================== */

.upgrade-dialog {
    padding: 0;
    max-height: 80vh;
    overflow-y: auto;
}

/* ========================================
   CURRENT PLAN BANNER
   ======================================== */

.current-plan-banner,
.upgrade-current-plan-banner {
    padding: 0.75rem 1.5rem;
    background: var(--theme-info-subtle);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.banner-content,
.upgrade-current-plan-banner .banner-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--theme-info-emphasis);
    font-size: 0.875rem;
}

/* ========================================
   PLANS GRID
   ======================================== */

.plans-grid,
.upgrade-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

/* ========================================
   PLAN CARD
   ======================================== */

.plan-card,
.upgrade-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-surface);
    transition: all 0.2s ease;
}

.plan-card:hover,
.upgrade-plan-card:hover {
    border-color: var(--text-muted);
    box-shadow: var(--shadow-md);
}

.plan-card.recommended,
.upgrade-plan-card.recommended {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.plan-card.current,
.upgrade-plan-card.current {
    background: var(--bg-body);
}

.plan-card.selected,
.upgrade-plan-card.selected {
    border-color: var(--theme-primary);
    background: var(--theme-purple-subtle);
}

/* ========================================
   BADGES
   ======================================== */

.recommended-badge,
.upgrade-recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-purple) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    white-space: nowrap;
}

.recommended-badge i,
.upgrade-recommended-badge i {
    font-size: 0.625rem;
}

.current-badge,
.upgrade-current-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--theme-info-subtle);
    color: var(--theme-info-emphasis);
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ========================================
   PLAN HEADER
   ======================================== */

.plan-header,
.upgrade-plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.plan-name,
.upgrade-plan-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.plan-price,
.upgrade-plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.125rem;
}

.plan-price .currency,
.upgrade-plan-price .currency {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-muted);
}

.plan-price .amount,
.upgrade-plan-price .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.plan-price .period,
.upgrade-plan-price .period {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.annual-discount,
.upgrade-annual-discount {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--theme-success-emphasis);
    font-weight: 500;
}

/* ========================================
   PLAN FEATURES
   ======================================== */

.plan-features,
.upgrade-plan-features {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.feature-item,
.upgrade-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.feature-item i,
.upgrade-feature-item i {
    color: var(--theme-success);
    font-size: 0.75rem;
}

.plan-footer,
.upgrade-plan-footer {
    margin-top: auto;
}

/* ========================================
   BILLING TOGGLE
   ======================================== */

.billing-toggle,
.upgrade-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-surface-tertiary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.billing-toggle span,
.upgrade-billing-toggle span {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.billing-toggle span.active,
.upgrade-billing-toggle span.active {
    color: var(--text-primary);
    font-weight: 600;
}

.discount-badge,
.upgrade-discount-badge {
    display: inline-flex;
    padding: 0.125rem 0.375rem;
    background: var(--theme-success-subtle);
    color: var(--theme-success-emphasis);
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 0.25rem;
}

/* ========================================
   COMPARISON TOGGLE
   ======================================== */

.comparison-toggle,
.upgrade-comparison-toggle {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
}

/* ========================================
   COMPARISON TABLE
   ======================================== */

.comparison-table,
.upgrade-comparison-table {
    padding: 0 1.5rem 1.5rem;
    overflow-x: auto;
}

.comparison-table table,
.upgrade-comparison-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.comparison-table th,
.comparison-table td,
.upgrade-comparison-table th,
.upgrade-comparison-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th:first-child,
.comparison-table td:first-child,
.upgrade-comparison-table th:first-child,
.upgrade-comparison-table td:first-child {
    text-align: left;
}

.comparison-table th,
.upgrade-comparison-table th {
    background: var(--bg-surface-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table th.recommended,
.comparison-table td.recommended,
.upgrade-comparison-table th.recommended,
.upgrade-comparison-table td.recommended {
    background: var(--theme-purple-subtle);
}

.comparison-table td,
.upgrade-comparison-table td {
    color: var(--text-secondary);
}

/* ========================================
   INFO NOTICE
   ======================================== */

.info-notice,
.upgrade-info-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1.5rem 1rem;
    padding: 0.75rem;
    background: var(--theme-warning-subtle);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--theme-warning-emphasis);
}

.info-notice i,
.upgrade-info-notice i {
    flex-shrink: 0;
}

/* ========================================
   DIALOG ACTIONS
   ======================================== */

.dialog-actions,
.upgrade-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface-tertiary);
}

/* ========================================
   UPGRADE LOADING STATE
   ======================================== */

.upgrade-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.w-100 {
    width: 100%;
}

.text-success {
    color: var(--theme-success);
}

.text-muted {
    color: var(--text-muted);
}

/* --- Multitenancy: Tenant Users (333 lines) --- */

/* TenantUsers Page Styles - Using Theme Variables */
/* NOTE: Uses centrally managed CSS variables from theme-core.css */

/* Page Container */
.tenant-users-page {
    padding-top: 1rem;
}

/* Header Card */
.tenant-users-header {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    background: var(--bg-surface);
}

.tenant-users-header .card-body {
    padding: 1.25rem 1.5rem;
}

/* Navigation Tabs */
.nav-tabs-container {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-surface);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.nav-tab-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.nav-tab-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-tab-item.active {
    background: var(--theme-primary);
    color: white;
}

.nav-tab-item i {
    font-size: 1.125rem;
}

@media (max-width: 768px) {
    .nav-tabs-container {
        flex-wrap: wrap;
    }

    .nav-tab-item {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }
}

/* Users Grid Card */
.users-grid-card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    background: var(--bg-surface);
    overflow: hidden;
}

.users-grid-card .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

/* Search Box */
.search-box .rz-textbox {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box .rz-textbox:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-primary-subtle);
}

/* Data Grid Enhancements */
.users-data-grid {
    border: none !important;
}

.users-data-grid .rz-datatable-thead {
    background-color: var(--bg-body);
}

.users-data-grid .rz-datatable-thead th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1rem;
    border-bottom: 2px solid var(--border-color);
}

.users-data-grid .rz-datatable-data tr {
    transition: background-color 0.15s ease;
}

.users-data-grid .rz-datatable-data tr:hover {
    background-color: var(--bg-hover);
}

.users-data-grid .rz-datatable-data td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

/* User Avatar */
.user-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

/* User Email */
.user-email {
    color: var(--text-secondary);
}

/* Role Badges */
.role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.role-badges .rz-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.action-buttons .rz-button {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Empty State */
.empty-state {
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
}

.empty-icon i {
    font-size: 4rem;
}

/* Pagination Enhancements */
.users-data-grid .rz-pager {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-body);
}

.users-data-grid .rz-pager-page {
    border-radius: 6px;
    margin: 0 2px;
    color: var(--text-secondary);
}

.users-data-grid .rz-state-active {
    background-color: var(--theme-primary) !important;
    color: white !important;
}

/* Loading State */
.rz-progressbar-circular {
    color: var(--theme-primary);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .search-box .rz-textbox {
        width: 100% !important;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-icon i {
        font-size: 1.25rem;
    }

    .users-data-grid .rz-datatable-data td {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    .tenant-users-header .card-body {
        padding: 1rem;
    }

    .users-grid-card .card-header {
        padding: 1rem;
    }

    .users-grid-card .card-header > div {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .search-box {
        width: 100%;
        margin-top: 0.75rem;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.users-grid-card {
    animation: fadeIn 0.3s ease-out;
    animation-delay: 0.3s;
}

/* --- Multitenancy: Add Payment Method Dialog (268 lines) --- */

/**
 * AddPaymentMethodDialog - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 * Dark mode handled automatically via CSS variables from theme-core.css
 */

/* ========================================
   DIALOG CONTAINER
   ======================================== */

.payment-dialog {
    padding: 1.5rem;
}

/* ========================================
   CARD TYPE SELECTOR
   ======================================== */

.card-type-selector {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.card-type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-surface);
}

.card-type-option:hover {
    border-color: var(--text-muted);
    background: var(--bg-surface-tertiary);
}

.card-type-option.selected {
    border-color: var(--theme-primary);
    background: var(--theme-primary-subtle);
}

.card-type-option i {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.card-type-option.selected i {
    color: var(--theme-primary);
}

.card-type-option span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ========================================
   PAYMENT FORM
   ======================================== */

.payment-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
    z-index: 1;
}

.input-with-icon .form-input {
    width: 100%;
    padding-left: 2.5rem !important;
}

.form-input {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.flex-1 {
    flex: 1;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.error-text {
    font-size: 0.75rem;
    color: var(--theme-danger);
    margin-top: 0.25rem;
}

/* ========================================
   SECURITY NOTICE
   ======================================== */

.security-notice {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--theme-info-subtle);
    border-radius: 8px;
    margin-top: 1rem;
}

.security-notice i {
    font-size: 1.25rem;
    color: var(--theme-info);
    flex-shrink: 0;
}

.notice-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.notice-content strong {
    font-size: 0.875rem;
    color: var(--theme-info-emphasis);
}

.notice-content span {
    font-size: 0.8125rem;
    color: var(--theme-info);
    line-height: 1.4;
}

/* ========================================
   CARD PREVIEW
   ======================================== */

.card-preview {
    margin-bottom: 1.5rem;
}

.credit-card {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 16px;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-purple) 100%);
    color: white;
    overflow: hidden;
}

.credit-card.mastercard {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.credit-card.american-express {
    background: linear-gradient(135deg, #006fcf 0%, #0052a4 100%);
}

.credit-card.discover {
    background: linear-gradient(135deg, #ff6000 0%, #ff8c00 100%);
}

.credit-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.card-chip {
    width: 45px;
    height: 35px;
    background: linear-gradient(135deg, #c9b037 0%, #dccc64 50%, #9e7c0c 100%);
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.card-number {
    font-size: 1.25rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.card-details {
    display: flex;
    justify-content: space-between;
}

.card-holder, .card-expiry {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.card-holder .label, .card-expiry .label {
    font-size: 0.625rem;
    opacity: 0.7;
    letter-spacing: 0.1em;
}

.card-holder .value, .card-expiry .value {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.card-brand {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    opacity: 0.9;
}

/* ========================================
   DIALOG ACTIONS
   ======================================== */

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* --- Multitenancy: Upgrade Subscription Modal (284 lines) --- */

/**
 * UpgradeSubscriptionModal - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 */

/* ========================================
   MODAL CONTAINER
   ======================================== */

.upgrade-subscription-modal {
    padding: 0;
}

/* ========================================
   MODAL HEADER SECTION
   ======================================== */

.modal-header-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gradient-primary, linear-gradient(135deg, var(--theme-indigo, #667eea) 0%, var(--theme-purple, #764ba2) 100%));
    color: white;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg, 12px);
}

.header-icon i {
    font-size: 1.5rem;
}

.header-content h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: var(--font-semibold, 600);
}

.header-content p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ========================================
   MODAL BODY SECTION
   ======================================== */

.modal-body-section {
    padding: 1.5rem;
}

/* ========================================
   TENANT INFO CARD
   ======================================== */

.tenant-info-card {
    padding: 1rem;
    background: var(--bg-body, #f8fafc);
    border-radius: var(--radius-lg, 8px);
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    gap: 1.5rem;
}

.info-row + .info-row {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.info-item {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 0.9375rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #1e293b);
}

.info-value.tenant-id {
    font-family: var(--font-monospace, 'Courier New', monospace);
    color: var(--theme-primary, #6366f1);
}

.info-value-with-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   STATUS BADGES
   ======================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full, 50px);
    font-size: 0.6875rem;
    font-weight: var(--font-semibold, 600);
    text-transform: uppercase;
}

.status-badge.active {
    background: var(--theme-success-subtle, #dcfce7);
    color: var(--theme-success-dark, #15803d);
}

.status-badge.expiring-soon {
    background: var(--theme-warning-subtle, #fef3c7);
    color: var(--theme-warning-dark, #b45309);
}

.status-badge.expired {
    background: var(--theme-danger-subtle, #fee2e2);
    color: var(--theme-danger, #dc2626);
}

/* ========================================
   EXTENSION SECTION
   ======================================== */

.extension-section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 0.875rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-secondary, #475569);
    margin-bottom: 0.75rem;
}

/* ========================================
   QUICK OPTIONS
   ======================================== */

.quick-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.quick-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 8px);
    cursor: pointer;
    transition: all var(--transition-base, 0.2s ease);
}

.quick-option:hover {
    border-color: var(--theme-gray-400, #94a3b8);
    background: var(--bg-body, #f8fafc);
}

.quick-option.selected {
    border-color: var(--theme-indigo, #667eea);
    background: var(--theme-primary-subtle, #eef2ff);
}

.option-duration {
    font-size: 0.875rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #1e293b);
}

.quick-option.selected .option-duration {
    color: var(--theme-indigo, #667eea);
}

.option-date {
    font-size: 0.6875rem;
    color: var(--text-muted, #64748b);
}

/* ========================================
   CUSTOM DATE SECTION
   ======================================== */

.custom-date-section {
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color, #e2e8f0);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: var(--font-medium, 500);
    color: var(--text-secondary, #475569);
    margin-bottom: 0.375rem;
}

.date-picker-wrapper {
    width: 100%;
}

.custom-date-picker {
    width: 100%;
}

/* ========================================
   EXTENSION SUMMARY
   ======================================== */

.extension-summary {
    padding: 1rem;
    background: var(--theme-success-subtle, #f0fdf4);
    border: 1px solid var(--theme-success-border, #bbf7d0);
    border-radius: var(--radius-lg, 8px);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-row + .summary-row {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--theme-success-border, #bbf7d0);
}

.summary-label {
    font-size: 0.875rem;
    color: var(--theme-success-dark, #166534);
}

.summary-value {
    font-size: 0.875rem;
    font-weight: var(--font-medium, 500);
    color: var(--theme-success-dark, #166534);
}

.summary-value.highlight {
    font-size: 1rem;
    font-weight: var(--font-bold, 700);
    color: var(--theme-success-darker, #15803d);
}

/* ========================================
   MODAL FOOTER SECTION
   ======================================== */

.modal-footer-section {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-body, #f8fafc);
    border-top: 1px solid var(--border-color, #e2e8f0);
}

/* Dark mode styles are handled centrally in bootstrap-theme.css */

/* --- Multitenancy: Migrations (273 lines) --- */

/* Migrations Page Styles - Using Theme Variables */

.migrations-page {
    padding-bottom: 2rem;
}

/* Summary Cards */
.summary-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}

.summary-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.summary-card-total .summary-icon {
    background-color: color-mix(in srgb, var(--theme-info) 10%, transparent);
    color: var(--theme-info);
}

.summary-card-success .summary-icon {
    background-color: color-mix(in srgb, var(--theme-success) 10%, transparent);
    color: var(--theme-success);
}

.summary-card-warning .summary-icon {
    background-color: color-mix(in srgb, var(--theme-warning) 10%, transparent);
    color: var(--theme-warning);
}

.summary-card-danger .summary-icon {
    background-color: color-mix(in srgb, var(--theme-danger) 10%, transparent);
    color: var(--theme-danger);
}

/* DataGrid Styles */
.migrations-grid {
    border-radius: 0 0 12px 12px;
}

.migrations-grid .rz-datatable-thead th {
    background-color: var(--bg-body);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.migrations-grid .rz-datatable-data tr {
    transition: background-color 0.15s ease;
}

.migrations-grid .rz-datatable-data tr:hover {
    background-color: var(--bg-body);
}

/* Row Status Colors */
.row-error {
    background-color: color-mix(in srgb, var(--theme-danger) 5%, transparent) !important;
    border-left: 4px solid var(--theme-danger);
}

.row-error:hover {
    background-color: color-mix(in srgb, var(--theme-danger) 10%, transparent) !important;
}

.row-pending {
    background-color: color-mix(in srgb, var(--theme-warning) 5%, transparent) !important;
    border-left: 4px solid var(--theme-warning);
}

.row-pending:hover {
    background-color: color-mix(in srgb, var(--theme-warning) 10%, transparent) !important;
}

.row-uptodate {
    background-color: color-mix(in srgb, var(--theme-success) 2%, transparent) !important;
    border-left: 4px solid var(--theme-success);
}

.row-uptodate:hover {
    background-color: color-mix(in srgb, var(--theme-success) 5%, transparent) !important;
}

/* Tenant Icon */
.tenant-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

/* Migration Name */
.migration-name {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: var(--bg-body);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
}

.status-uptodate {
    background-color: color-mix(in srgb, var(--theme-success) 15%, transparent);
    color: var(--theme-success);
}

.status-pending {
    background-color: color-mix(in srgb, var(--theme-warning) 15%, transparent);
    color: var(--theme-warning);
}

.status-error {
    background-color: color-mix(in srgb, var(--theme-danger) 15%, transparent);
    color: var(--theme-danger);
}

/* Error and Success Indicators */
.error-indicator,
.success-indicator {
    font-size: 1.25rem;
    cursor: help;
}

/* Expansion Content */
.expansion-content {
    background-color: var(--bg-body);
    border-top: 1px solid var(--border-color);
}

.pending-migrations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pending-migration-badge {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    padding: 6px 10px;
}

.error-details .alert {
    font-size: 0.85rem;
}

.error-details code {
    word-break: break-all;
    white-space: pre-wrap;
}

/* Filter Buttons */
.rz-button.rz-button-sm {
    border-radius: 6px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .summary-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .summary-card h2 {
        font-size: 1.5rem;
    }

    .migration-name {
        max-width: 150px;
    }

    .migrations-grid .rz-datatable-data td {
        font-size: 0.85rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .summary-card {
        background-color: var(--bg-surface);
    }

    .migrations-grid .rz-datatable-thead th {
        background-color: var(--bg-surface);
        color: var(--text-primary);
        border-bottom-color: var(--border-color);
    }

    .migration-name {
        background-color: var(--theme-gray-700);
        color: var(--text-secondary);
    }

    .expansion-content {
        background-color: var(--bg-surface);
        border-top-color: var(--border-color);
    }

    .tenant-icon {
        background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    }
}

/* Badge Overrides for Radzen */
.rz-badge.rz-badge-success {
    background-color: var(--theme-success) !important;
}

.rz-badge.rz-badge-warning {
    background-color: var(--theme-warning) !important;
}

.rz-badge.rz-badge-danger {
    background-color: var(--theme-danger) !important;
}

.rz-badge.rz-badge-secondary {
    background-color: var(--theme-gray-600) !important;
}

/* Loading State */
.migrations-page .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Card Headers */
.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
}

/* Bootstrap utility overrides for warning subtle */
.bg-warning-subtle {
    background-color: color-mix(in srgb, var(--theme-warning) 15%, transparent) !important;
}

.text-warning {
    color: var(--theme-warning) !important;
}

/* --- Multitenancy: Invoice Details Dialog (288 lines) --- */

/**
 * InvoiceDetailsDialog - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 * Dark mode handled automatically via CSS variables from theme-core.css
 */

/* ========================================
   DIALOG CONTAINER
   ======================================== */

.invoice-dialog {
    padding: 0;
    background: var(--bg-surface);
}

/* ========================================
   INVOICE HEADER
   ======================================== */

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-purple) 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.invoice-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

.invoice-brand i {
    font-size: 1.25rem;
}

.invoice-number-display {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* ========================================
   STATUS BADGES
   ======================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.paid {
    background: rgba(16, 185, 129, 0.2);
    color: var(--theme-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--theme-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.overdue {
    background: rgba(239, 68, 68, 0.2);
    color: var(--theme-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.upcoming {
    background: rgba(59, 130, 246, 0.2);
    color: var(--theme-info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ========================================
   PREVIEW BANNER
   ======================================== */

.preview-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--theme-warning-subtle);
    color: var(--theme-warning-emphasis);
    font-size: 0.875rem;
}

/* ========================================
   INVOICE BODY
   ======================================== */

.invoice-body {
    padding: 1.5rem;
}

.invoice-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-surface-tertiary);
    border-radius: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   INVOICE ITEMS TABLE
   ======================================== */

.invoice-items {
    margin-bottom: 1.5rem;
}

.items-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table th {
    padding: 0.75rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.items-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.item-detail {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ========================================
   INVOICE TOTALS
   ======================================== */

.invoice-totals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-surface-tertiary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.totals-row.total {
    padding-top: 0.75rem;
    border-top: 2px solid var(--border-color);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ========================================
   STATUS ALERTS
   ======================================== */

.status-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
}

.status-alert i {
    font-size: 1.25rem;
}

.status-alert.success {
    background: var(--theme-success-subtle);
    color: var(--theme-success-emphasis);
}

.status-alert.warning {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning-emphasis);
}

.status-alert.danger {
    background: var(--theme-danger-subtle);
    color: var(--theme-danger);
}

.status-alert.info {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.alert-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.alert-content strong {
    font-size: 0.875rem;
}

.alert-content span {
    font-size: 0.8125rem;
    opacity: 0.85;
}

/* ========================================
   INVOICE FOOTER
   ======================================== */

.invoice-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-surface-tertiary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
}

.footer-info small {
    color: var(--text-muted);
}

.footer-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Multitenancy: Adjust Quota Dialog (160 lines) --- */

/**
 * AdjustQuotaDialog - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 * Dark mode handled automatically via CSS variables from theme-core.css
 */

/* ========================================
   DIALOG CONTAINER
   ======================================== */

.adjust-quota-dialog {
    padding: 1.5rem;
}

/* ========================================
   CURRENT USAGE SECTION
   ======================================== */

.current-usage-section {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: var(--bg-surface-tertiary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.usage-info {
    flex: 1;
    text-align: center;
}

.usage-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.usage-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.usage-value.usage-healthy {
    color: var(--theme-success);
}

.usage-value.usage-moderate {
    color: var(--theme-warning);
}

.usage-value.usage-warning {
    color: var(--theme-danger);
}

/* ========================================
   DIVIDER
   ======================================== */

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* ========================================
   NEW LIMIT SECTION
   ======================================== */

.new-limit-section {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.storage-input {
    display: flex;
    gap: 0.5rem;
}

.limit-input {
    flex: 1;
}

.unit-dropdown {
    width: 80px;
}

/* ========================================
   PRESET OPTIONS
   ======================================== */

.preset-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.preset-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.preset-btn {
    font-size: 0.75rem !important;
}

/* ========================================
   INFO ALERT
   ======================================== */

.info-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--theme-info-subtle);
    border: 1px solid var(--theme-info);
    border-radius: 6px;
    color: var(--theme-info-emphasis);
    font-size: 0.875rem;
    margin: 1.5rem 0;
}

.info-alert i {
    flex-shrink: 0;
}

/* ========================================
   DIALOG ACTIONS
   ======================================== */

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ========================================
   TEXT MUTED
   ======================================== */

.text-muted {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* --- Multitenancy: Tenant Security Settings (84 lines) --- */

/* Tenant Security Settings Page - Using Theme Variables
   Dark mode handled automatically via CSS variables from theme-core.css
   NOTE: Header, nav-tabs, loading, tenant-identity styles are in theme-core.css SECTION 30 */

.tenant-details-page {
    padding: 0 1rem;
}

/* Error State */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--border-color);
}

.error-container i {
    font-size: 4rem;
    color: var(--theme-danger);
    margin-bottom: 1rem;
}

.error-container h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Large Avatar Variant */
.tenant-avatar.large {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    border-radius: 14px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Security Settings Specific Styles */
.security-section {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.security-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-section h4 i {
    color: var(--theme-primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tenant-name {
        font-size: 1.25rem;
    }
}

/* --- Multitenancy: Create Tenant Modal (87 lines) --- */

/**
 * CreateTenantModal - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 * Dark mode handled automatically via CSS variables from theme-core.css
 */

/* ========================================
   MODAL CONTAINER
   ======================================== */

.create-tenant-modal {
    min-width: 500px;
    max-width: 600px;
}

/* ========================================
   MODAL ICON
   ======================================== */

.modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon i {
    font-size: 1.5rem;
}

/* ========================================
   SUMMARY CARD
   ======================================== */

.summary-card {
    background: var(--bg-surface-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.summary-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-purple) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

/* ========================================
   ADVANCED OPTIONS
   ======================================== */

.advanced-options {
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.advanced-options .rz-fieldset-legend {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0 0.5rem;
}

/* ========================================
   FORM LABELS
   ======================================== */

.form-label {
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

small.text-muted {
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
}

/* --- Multitenancy: Configuration Settings (37 lines) --- */

/**
 * ConfigurationSettings - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 */

/* ========================================
   FEATURE TOGGLE CARD
   ======================================== */

.configuration-settings-page .feature-toggle-card {
    background: var(--bg-surface, var(--rz-base-100, #ffffff));
    border: 1px solid var(--border-color, var(--rz-border-color, #e5e7eb));
    border-radius: var(--radius-lg, 8px);
    padding: 1rem;
    transition: box-shadow var(--transition-base, 0.2s ease);
}

.configuration-settings-page .feature-toggle-card:hover {
    box-shadow: var(--card-shadow-hover, 0 2px 8px rgba(0, 0, 0, 0.1));
}

/* ========================================
   SECTION TITLES
   ======================================== */

.configuration-settings-page .section-title {
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, var(--rz-text-color, #1f2937));
}

.configuration-settings-page .subsection-title {
    font-weight: var(--font-medium, 500);
    color: var(--text-secondary, var(--rz-text-secondary-color, #6b7280));
    border-bottom: 1px solid var(--border-color, var(--rz-border-color, #e5e7eb));
    padding-bottom: 0.5rem;
}

/* --- Multitenancy: Add Tenant User Modal (48 lines) --- */

/**
 * AddTenantUserModal - Scoped Styles
 * Uses CSS variables for theme consistency and whitelabeling support.
 * Dark mode handled automatically via CSS variables from theme-core.css
 */

/* ========================================
   MODAL CONTAINER
   ======================================== */

.add-tenant-user-modal {
    min-width: 400px;
}

/* ========================================
   MODAL ICON
   ======================================== */

.modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon i {
    font-size: 1.5rem;
}

/* ========================================
   ROLE SELECTION
   ======================================== */

.role-selection {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.75rem;
    background: var(--bg-surface-tertiary);
    border-radius: 8px;
}

.role-checkbox .form-check-input:checked {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
}

/* --- Multitenancy: Tenant Domain Page (embedded) (99 lines) --- */

/* TenantDomainPage - Page-specific styles only */
    /* NOTE: Header, nav-tabs, loading styles are in theme-core.css SECTION 30 */

    .tenant-domain-page {
        padding: 1.5rem;
    }

    .page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .header-info {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
    }

    .page-title {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0;
        color: var(--text-primary);
    }

    .tenant-name {
        font-size: 0.875rem;
        color: var(--text-muted);
    }

    /* Help Card - Page-specific */
    .help-section {
        margin-bottom: 0;
    }

    .help-section h6 {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }

    .example-url {
        background: var(--bg-body);
        padding: 0.5rem 0.75rem;
        border-radius: 6px;
        font-size: 0.8rem;
    }

    .example-url code {
        color: var(--theme-primary);
    }

    /* Dark Mode Overrides */
    [data-bs-theme="dark"] .page-title {
        color: #f1f5f9;
    }

    [data-bs-theme="dark"] .tenant-name {
        color: #94a3b8;
    }

    [data-bs-theme="dark"] .help-section h6 {
        color: #f1f5f9;
    }

    [data-bs-theme="dark"] .example-url {
        background: rgba(255, 255, 255, 0.05);
    }

    [data-bs-theme="dark"] .example-url code {
        color: #2dd4a8;
    }

    [data-bs-theme="dark"] .card {
        background: #1e293b;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-bs-theme="dark"] .card-header {
        background: transparent;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    [data-bs-theme="dark"] .card-header h5 {
        color: #f1f5f9;
    }

    [data-bs-theme="dark"] .text-muted {
        color: #94a3b8 !important;
    }

/* --- Multitenancy: Upgrade Plan Dialog (embedded) (270 lines) --- */

.upgrade-dialog {
        padding: 1rem;
        max-width: 900px;
    }

    .loading-state, .empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        padding: 3rem;
        color: var(--text-muted);
    }

    .empty-state i {
        font-size: 3rem;
        opacity: 0.5;
    }

    .current-plan-banner {
        background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.1) 0%, rgba(var(--theme-primary-rgb), 0.05) 100%);
        border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
        border-radius: 8px;
        padding: 0.75rem 1rem;
        margin-bottom: 1.5rem;
    }

    .current-plan-banner .banner-content {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--theme-primary);
    }

    .billing-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
        padding: 0.75rem;
        background: var(--bg-body);
        border-radius: 8px;
    }

    .billing-toggle span {
        color: var(--text-muted);
        font-weight: 500;
        transition: color 0.2s ease;
    }

    .billing-toggle span.active {
        color: var(--theme-primary);
    }

    .discount-badge {
        background: rgba(16, 185, 129, 0.1);
        color: #10b981;
        padding: 0.125rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .plans-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .plan-card {
        background: var(--bg-card);
        border: 2px solid var(--border-color);
        border-radius: 12px;
        padding: 1.25rem;
        position: relative;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .plan-card:hover {
        border-color: var(--theme-primary);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }

    .plan-card.selected {
        border-color: var(--theme-primary);
        background: rgba(var(--theme-primary-rgb), 0.02);
    }

    .plan-card.recommended {
        border-color: var(--theme-primary);
    }

    .plan-card.current {
        opacity: 0.7;
        cursor: default;
    }

    .plan-card.current:hover {
        transform: none;
    }

    .recommended-badge {
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--theme-primary);
        color: white;
        padding: 0.25rem 0.75rem;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        white-space: nowrap;
    }

    .current-badge {
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--text-muted);
        color: white;
        padding: 0.25rem 0.75rem;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 600;
    }

    .plan-header {
        text-align: center;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .plan-name {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0 0 0.5rem 0;
    }

    .plan-price {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 0.125rem;
    }

    .plan-price .currency {
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-secondary);
    }

    .plan-price .amount {
        font-size: 2rem;
        font-weight: 700;
        color: var(--text-primary);
    }

    .plan-price .period {
        font-size: 0.875rem;
        color: var(--text-muted);
    }

    .annual-discount {
        font-size: 0.75rem;
        color: #10b981;
        margin-top: 0.25rem;
    }

    .plan-features {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1rem;
        min-height: 180px;
    }

    .feature-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.85rem;
        color: var(--text-secondary);
    }

    .feature-item i {
        color: var(--text-muted);
        font-size: 1rem;
    }

    .feature-item.highlight i {
        color: var(--theme-primary);
    }

    .plan-footer {
        margin-top: auto;
    }

    .comparison-toggle {
        text-align: center;
        margin-bottom: 1rem;
    }

    .comparison-table {
        overflow-x: auto;
        margin-bottom: 1.5rem;
    }

    .comparison-table table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.85rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .comparison-table th {
        background: var(--bg-body);
        font-weight: 600;
    }

    .comparison-table th:first-child,
    .comparison-table td:first-child {
        text-align: left;
        font-weight: 500;
    }

    .comparison-table th.recommended,
    .comparison-table td.recommended {
        background: rgba(var(--theme-primary-rgb), 0.05);
    }

    .info-notice {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        background: rgba(245, 158, 11, 0.1);
        border: 1px solid rgba(245, 158, 11, 0.2);
        border-radius: 8px;
        color: #b45309;
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .dialog-actions {
        display: flex;
        justify-content: flex-end;
        gap: 0.75rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .upgrade-admin-options {
        background: rgba(var(--theme-primary-rgb), 0.05);
        border: 1px solid rgba(var(--theme-primary-rgb), 0.15);
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .upgrade-admin-options .admin-options-title {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--theme-primary);
        margin-bottom: 0.75rem;
    }

    .upgrade-admin-options .admin-options-row {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    [data-bs-theme="dark"] .upgrade-admin-options {
        background: rgba(var(--theme-primary-rgb), 0.08);
        border-color: rgba(var(--theme-primary-rgb), 0.2);
    }

    .text-success { color: #10b981; }
    .text-muted { color: var(--text-muted); }

/* --- Multitenancy: Platform Portal Settings (embedded) (43 lines) --- */

.section-list {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .section-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        background: var(--bs-light);
        border-radius: 0.5rem;
        transition: all 0.2s ease;
    }

    .section-item:hover {
        background: var(--bs-gray-200);
    }

    .section-disabled {
        opacity: 0.6;
    }

    .section-drag-handle {
        cursor: grab;
        color: var(--bs-gray-500);
    }

    .section-info {
        flex: 1;
    }

    .section-type-badge {
        font-weight: 600;
        color: var(--bs-primary);
    }

    .section-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }


/* ============================================================================
   SHARED SAAS PAGE HEADERS
   Used by: BillingInvoicing, ResourceQuotas, TenantSecuritySettings, TenantDomain
   ============================================================================ */

.billing-header,
.quotas-header,
.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    border-radius: 8px !important;
}

/* Dark mode for shared headers */
[data-bs-theme="dark"] .billing-header,
[data-bs-theme="dark"] .quotas-header,
[data-bs-theme="dark"] .details-header {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .billing-header,
    .quotas-header,
    .details-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    .header-left {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-right {
        justify-content: flex-end;
    }
}

/* ============================================================================
   GLOBAL NAVIGATION TABS (TenantNavigationTabs)
   Used across: TenantDetails, Billing, Quotas, Users, Security, Domain pages
   ============================================================================ */

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-surface);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    background: var(--bg-body);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-tab.active {
    background: var(--theme-primary);
    color: white;
}

.nav-tab i {
    font-size: 1.125rem;
}

/* Dark mode */
[data-bs-theme="dark"] .nav-tabs {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .nav-tab {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .nav-tab:hover {
    background: var(--bg-surface-tertiary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .nav-tab.active {
    background: var(--theme-primary);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: wrap;
    }
    .nav-tab {
        flex: 1;
        justify-content: center;
        min-width: 80px;
    }
    .nav-tab span {
        display: none;
    }
}

/* ============================================================================
   SUPERADMIN: TENANT OVERVIEW
   Styles for TenantOverview page (scoped + embedded, centralized)
   ============================================================================ */

/* --- Tenant Overview: Scoped Layout & Components --- */

/* Page Container */
.tenant-overview-page {
    padding: 0;
}

/* Header Section */
.tenant-overview-page .overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.tenant-overview-page .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tenant-overview-page .tenant-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tenant-overview-page .tenant-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

/* Avatar color classes */
.tenant-overview-page .tenant-avatar.avatar-primary {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark, var(--theme-primary)));
}

.tenant-overview-page .tenant-avatar.avatar-success {
    background: linear-gradient(135deg, var(--theme-success), #059669);
}

.tenant-overview-page .tenant-avatar.avatar-warning {
    background: linear-gradient(135deg, var(--theme-warning), #d97706);
}

.tenant-overview-page .tenant-avatar.avatar-info {
    background: linear-gradient(135deg, var(--theme-info), #0284c7);
}

.tenant-overview-page .tenant-avatar.avatar-danger {
    background: linear-gradient(135deg, var(--theme-danger), #dc2626);
}

.tenant-overview-page .tenant-avatar.avatar-secondary {
    background: linear-gradient(135deg, var(--theme-secondary), #4b5563);
}

.tenant-overview-page .tenant-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.tenant-overview-page .tenant-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.tenant-overview-page .tenant-id {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.tenant-overview-page .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tenant-overview-page .tenant-status {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tenant-overview-page .tenant-status.active {
    background: color-mix(in srgb, var(--theme-success) 15%, transparent);
    color: var(--theme-success);
}

.tenant-overview-page .tenant-status.inactive {
    background: color-mix(in srgb, var(--theme-danger) 15%, transparent);
    color: var(--theme-danger);
}

/* Navigation Tabs - Matching TenantDetails.razor.css */
.tenant-overview-page .nav-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-surface);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.tenant-overview-page .nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tenant-overview-page .nav-tab:hover {
    background: var(--bg-body);
    color: var(--text-primary);
    text-decoration: none;
}

.tenant-overview-page .nav-tab.active {
    background: var(--theme-primary);
    color: white;
}

.tenant-overview-page .nav-tab i {
    font-size: 1.125rem;
}

/* Loading State */
.tenant-overview-page .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.tenant-overview-page .loading-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Content Container */
.tenant-overview-page .content-container {
    padding: 0;
}

/* Info Items */
.tenant-overview-page .info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bg-body);
}

.tenant-overview-page .info-item:last-child {
    border-bottom: none;
}

.tenant-overview-page .info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tenant-overview-page .info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Cards */
.tenant-overview-page .card {
    border-radius: 12px;
}

.tenant-overview-page .card-header {
    border-radius: 12px 12px 0 0;
}

/* Action Buttons Grid */
.tenant-overview-page .action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.tenant-overview-page .action-btn {
    width: 100%;
    justify-content: center;
    border-radius: 8px !important;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .tenant-overview-page .overview-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .tenant-overview-page .header-left {
        flex-direction: column;
        align-items: flex-start;
    }

    .tenant-overview-page .header-right {
        justify-content: flex-end;
    }

    .tenant-overview-page .nav-tabs {
        flex-wrap: wrap;
    }

    .tenant-overview-page .nav-tab {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .tenant-overview-page .tenant-name {
        font-size: 1.25rem;
    }

    .tenant-overview-page .nav-tab span {
        display: none;
    }

    .tenant-overview-page .nav-tab {
        padding: 0.625rem 0.875rem;
    }

    .tenant-overview-page .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Dark mode styles are handled centrally in bootstrap-theme.css */


/* --- Tenant Overview: Component Styles (from embedded <style>) --- */

/* Tenant Avatar Color Classes - Keep in inline styles for dynamic class binding */
.tenant-avatar.color-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.tenant-avatar.color-green { background: linear-gradient(135deg, #10b981, #059669); }
.tenant-avatar.color-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.tenant-avatar.color-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.tenant-avatar.color-pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.tenant-avatar.color-cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }

/* Plan Badge Variants */
.plan-badge.free, .plan-badge.trial { background: rgba(107, 114, 128, 0.1); color: #6b7280; }
.plan-badge.starter { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.plan-badge.professional { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.plan-badge.enterprise { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.plan-badge.standard { background: rgba(16, 185, 129, 0.1); color: #10b981; }

/* Subscription Card Styles */
.subscription-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.plan-price .price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-price .period {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.subscription-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.subscription-details .detail-row:last-child {
    border-bottom: none;
}

.subscription-details .label {
    color: var(--text-muted);
}

.subscription-details .value {
    font-weight: 500;
    color: var(--text-primary);
}

/* Quota Items */
.quota-item {
    margin-bottom: 1rem;
}

.quota-item:last-child {
    margin-bottom: 0;
}

.quota-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.quota-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.quota-value {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quota-progress {
    height: 8px;
}

/* Quick Actions */
.quick-actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.quick-action-btn:hover {
    background: var(--bg-card);
    color: var(--theme-primary);
    border-color: var(--theme-primary);
}

.quick-action-btn.warning:hover {
    color: #f59e0b;
    border-color: #f59e0b;
}

.quick-action-btn.danger:hover {
    color: #ef4444;
    border-color: #ef4444;
}

.quick-action-btn.success:hover {
    color: #10b981;
    border-color: #10b981;
}

/* Activity List */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-icon.login { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.activity-icon.user { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.activity-icon.payment { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.activity-icon.setting { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.activity-icon.security { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.activity-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.activity-description {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Payment Grid */
.payment-grid .payment-amount {
    font-weight: 600;
    color: var(--text-primary);
}

.payment-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.payment-status.paid { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.payment-status.pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.payment-status.failed { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Chart Container */
.chart-container {
    padding: 1rem 0;
}

/* Empty State */
.empty-state-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state-small i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-state-small p {
    margin: 0;
    font-size: 0.875rem;
}

/* Dark Mode Overrides for inline components */
[data-bs-theme="dark"] .plan-badge.free,
[data-bs-theme="dark"] .plan-badge.trial {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

[data-bs-theme="dark"] .plan-badge.starter {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-bs-theme="dark"] .plan-badge.professional {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

[data-bs-theme="dark"] .plan-badge.enterprise {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-bs-theme="dark"] .plan-badge.standard {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

[data-bs-theme="dark"] .plan-price .price {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .subscription-details .detail-row {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .subscription-details .value {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .quick-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

[data-bs-theme="dark"] .quick-action-btn:hover {
    background: rgba(26, 179, 148, 0.1);
    color: #2dd4a8;
    border-color: rgba(26, 179, 148, 0.3);
}

[data-bs-theme="dark"] .quick-action-btn.warning:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

[data-bs-theme="dark"] .quick-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

[data-bs-theme="dark"] .quick-action-btn.success:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

[data-bs-theme="dark"] .activity-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .activity-description {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .activity-time {
    color: #64748b;
}

[data-bs-theme="dark"] .activity-icon.login { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
[data-bs-theme="dark"] .activity-icon.user { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
[data-bs-theme="dark"] .activity-icon.payment { background: rgba(16, 185, 129, 0.15); color: #34d399; }
[data-bs-theme="dark"] .activity-icon.setting { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
[data-bs-theme="dark"] .activity-icon.security { background: rgba(239, 68, 68, 0.15); color: #f87171; }

[data-bs-theme="dark"] .payment-status.paid { background: rgba(16, 185, 129, 0.15); color: #34d399; }
[data-bs-theme="dark"] .payment-status.pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
[data-bs-theme="dark"] .payment-status.failed { background: rgba(239, 68, 68, 0.15); color: #f87171; }

/* NOTE: All TenantOverview styles (scoped + embedded) are now centralized above.
   Dark mode for stat-card, nav-tabs, cards handled by bootstrap-theme.css */


/* =============================================
   SEARCH & FILTER BAR (Shared Pattern)
   Used by: VacancyList, and other pages with search/filter UI
   ============================================= */

.search-filter-bar {
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.625rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-section {
    width: 280px;
    min-width: 220px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1.125rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.25rem 2rem 0.25rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px var(--theme-primary-subtle);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: var(--bg-surface-tertiary);
    color: var(--text-primary);
}

.filter-pills {
    display: flex;
    gap: 0.375rem;
    flex: 1;
}

.filter-pill {
    padding: 0.2rem 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    line-height: 1.4;
}

.filter-pill:hover {
    background: var(--bg-surface-tertiary);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.filter-pill.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
}

.filter-pill.active.success {
    background: var(--theme-success);
    border-color: var(--theme-success);
}

.filter-pill.active.warning {
    background: var(--theme-warning);
    border-color: var(--theme-warning);
}

.filter-pill.active.secondary {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}

.view-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.view-toggle .view-btn {
    padding: 0.25rem 0.5rem;
    background: var(--bg-surface);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle .view-btn:first-child {
    border-right: 1px solid var(--border-color);
}

.view-toggle .view-btn:hover {
    background: var(--bg-surface-tertiary);
    color: var(--text-primary);
}

.view-toggle .view-btn.active {
    background: var(--theme-primary);
    color: white;
}

/* Results Summary */
.results-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.625rem;
    background: var(--theme-primary-subtle);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.search-term {
    color: var(--theme-primary);
    font-weight: 500;
}

.btn-clear-filters {
    margin-left: auto;
    padding: 0.375rem 0.75rem;
    border: none;
    background: none;
    color: var(--theme-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-clear-filters:hover {
    background: var(--theme-primary-subtle);
}

/* Search & Filter Bar Responsive */
@media (max-width: 768px) {
    .search-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-section {
        width: 100%;
        min-width: 100%;
    }

    .filter-pills {
        flex-wrap: wrap;
    }

    .view-toggle {
        align-self: flex-start;
    }

    .filter-pill {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}


/* =============================================
   FSH MODAL COMPONENT
   Base styles for the FshModal Blazor component.
   Dark mode overrides in bootstrap-theme.css.
   ============================================= */

/* Lock body scroll when modal is open */
body:has(.fsh-modal-backdrop) {
    overflow: hidden !important;
}

/* Backdrop */
.fsh-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
    overflow-y: auto;
    animation: fsh-modal-fade-in 0.2s ease-out;
}

.fsh-modal-backdrop.fsh-modal-closing {
    animation: fsh-modal-fade-out 0.2s ease-out;
}

/* Modal Container */
.fsh-modal {
    background: var(--bg-surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    animation: fsh-modal-slide-in 0.2s ease-out;
}

.fsh-modal.fsh-modal-closing {
    animation: fsh-modal-slide-out 0.2s ease-out;
}

/* Size Variants */
.fsh-modal.fsh-modal-sm {
    max-width: 350px;
}

.fsh-modal.fsh-modal-lg {
    max-width: 700px;
}

.fsh-modal.fsh-modal-xl {
    max-width: 900px;
}

.fsh-modal.fsh-modal-fullscreen {
    max-width: none;
    width: calc(100% - 2rem);
    height: calc(100% - 2rem);
    max-height: none;
    border-radius: 0.5rem;
}

/* Scrollable */
.fsh-modal.fsh-modal-scrollable {
    max-height: calc(100vh - 2rem);
}

.fsh-modal.fsh-modal-scrollable .fsh-modal-body {
    overflow-y: auto;
}

/* Header */
.fsh-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.fsh-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

.fsh-modal-icon i {
    font-size: 1.25rem;
}

.fsh-modal-title {
    flex: 1;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.fsh-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.fsh-modal-close:hover {
    background: var(--bg-surface-tertiary);
    color: var(--text-primary);
}

.fsh-modal-close i {
    font-size: 1.25rem;
}

/* Header Variants */
.fsh-modal-header-danger .fsh-modal-icon {
    background: var(--theme-danger-subtle);
    color: var(--theme-danger);
}

.fsh-modal-header-warning .fsh-modal-icon {
    background: var(--theme-warning-subtle);
    color: var(--theme-warning);
}

.fsh-modal-header-success .fsh-modal-icon {
    background: var(--theme-success-subtle);
    color: var(--theme-success);
}

.fsh-modal-header-info .fsh-modal-icon {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

/* Body */
.fsh-modal-body {
    padding: 1.25rem;
    flex: 1;
    min-height: 0;
}

/* Footer */
.fsh-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Animations */
@keyframes fsh-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fsh-modal-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fsh-modal-slide-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fsh-modal-slide-out {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .fsh-modal-backdrop {
        padding: 0.5rem;
    }

    .fsh-modal {
        max-width: none;
        max-height: calc(100vh - 1rem);
    }

    .fsh-modal-header {
        padding: 0.875rem 1rem;
    }

    .fsh-modal-body {
        padding: 1rem;
    }

    .fsh-modal-footer {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
    }

    .fsh-modal-footer > * {
        flex: 1;
    }
}


/* =============================================
   OFFER LIST PAGE (/available-offers)
   Structural styles in scoped OfferList.razor.css
   (Blazor isolation prevents Bootstrap collisions).
   Dark mode overrides here because [data-bs-theme]
   is on <html> — outside the component scope.
   ============================================= */

[data-bs-theme="dark"] .offer-list-page {
    background: #0f172a;
}

[data-bs-theme="dark"] .offer-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d1b69 100%);
}

[data-bs-theme="dark"] .tenant-banner {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .banner-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .banner-subtitle {
    color: #94a3b8;
}

/* Search & Filters */
[data-bs-theme="dark"] .offer-list-page .search-box input {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

[data-bs-theme="dark"] .offer-list-page .search-box input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

[data-bs-theme="dark"] .offer-list-page .search-box input::placeholder {
    color: #64748b;
}

[data-bs-theme="dark"] .offer-list-page .search-box i {
    color: #64748b;
}

[data-bs-theme="dark"] .offer-list-page .chip {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-bs-theme="dark"] .offer-list-page .chip:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    background: rgba(99, 102, 241, 0.1);
}

[data-bs-theme="dark"] .offer-list-page .chip.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
}

/* Offer Cards */
[data-bs-theme="dark"] .offer-card {
    background: #1e293b !important;
    border-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .offer-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--theme-primary);
}

[data-bs-theme="dark"] .offer-card .card-status {
    border-bottom-color: #334155;
}

/* Card internals: use !important to override bootstrap-theme.css
   global .card-body/.card-footer !important rules */

[data-bs-theme="dark"] .offer-card .card-header {
    background: transparent !important;
}

[data-bs-theme="dark"] .offer-card .card-body {
    background: transparent !important;
}

[data-bs-theme="dark"] .offer-card .card-logo {
    background: #334155;
}

[data-bs-theme="dark"] .offer-card .card-logo i {
    color: #94a3b8;
}

[data-bs-theme="dark"] .offer-card .card-fees {
    background: #0f172a !important;
}

[data-bs-theme="dark"] .offer-card .card-footer {
    background: #0f172a !important;
    border-top-color: #334155 !important;
}

/* Detail Modal Content */
[data-bs-theme="dark"] .detail-section .section-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .detail-section .section-content {
    color: #94a3b8;
}

[data-bs-theme="dark"] .date-item {
    background: #0f172a;
}

[data-bs-theme="dark"] .date-label {
    color: #64748b;
}

[data-bs-theme="dark"] .date-value {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .fees-info-text {
    background: #0f172a;
    color: #94a3b8;
}

[data-bs-theme="dark"] .school-info {
    background: #0f172a;
}

[data-bs-theme="dark"] .school-name {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .school-detail {
    color: #94a3b8;
}

[data-bs-theme="dark"] .school-detail i {
    color: #64748b;
}


/* =============================================
   APPLY PAGE
   Page header, completion progress, form fields, tooltips,
   upload sections, file preview, submit card, success overlay
   ============================================= */

.apply-page {
    min-height: 100vh;
    background: var(--bg-surface-tertiary);
    padding-bottom: 3rem;
}

/* Apply Page Header */
.apply-page .page-header {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.apply-page .page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.apply-page .header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.header-icon i {
    font-size: 1.75rem;
    color: white;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.header-text p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.header-badge i {
    font-size: 1rem;
}

.header-badge.draft {
    background: rgba(255, 193, 7, 0.3);
}

.header-badge .save-status {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

/* Auto-save indicator */
.auto-save-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    background: var(--theme-warning-subtle);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.auto-save-indicator i.spin {
    animation: spin 1s linear infinite;
}

/* Completion Progress Indicator (Sticky) */
.completion-card {
    max-width: 1400px;
    margin: 0 auto 0.75rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.completion-inner {
    background: var(--bg-surface);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.completion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.875rem;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: white;
}

.completion-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    font-size: 0.8125rem;
}

.completion-title i {
    font-size: 1rem;
}

.completion-stats {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.completion-percentage {
    font-size: 1.125rem;
    font-weight: 700;
}

.completion-count {
    font-size: 0.6875rem;
    opacity: 0.85;
}

.completion-bar {
    height: 4px;
    background: var(--bg-surface-tertiary);
    position: relative;
}

.completion-fill {
    height: 100%;
    background: var(--theme-success);
    transition: width 0.5s ease, background-color 0.3s ease;
    position: relative;
}

.completion-fill.starting {
    background: var(--theme-warning);
}

.completion-fill.progress {
    background: var(--theme-info);
}

.completion-fill.complete {
    background: var(--theme-success);
}

.completion-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.completion-checklist {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.875rem;
    background: var(--bg-surface);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.completion-checklist::-webkit-scrollbar {
    display: none;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: var(--bg-surface-tertiary);
    border-radius: 9999px;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    flex-shrink: 0;
}

.check-item i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.check-item.completed {
    background: var(--theme-success-subtle);
    border-color: var(--theme-success);
    color: var(--theme-success);
}

.check-item.completed i {
    color: var(--theme-success);
}

/* Field Tooltip - Click to Toggle (Mobile-friendly) */
.field-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
}

.field-tooltip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.field-tooltip-btn i {
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.field-tooltip-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.field-tooltip-btn:hover i {
    color: white;
    transform: scale(1.1);
}

.field-tooltip-btn:focus {
    outline: none;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.field-tooltip-btn:focus i {
    color: white;
}

.field-tooltip-content {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.875rem 1rem;
    background: var(--bg-tooltip, #1e293b);
    color: var(--text-tooltip, white);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 10px;
    white-space: normal;
    width: max-content;
    max-width: 300px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

.field-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--bg-tooltip, #1e293b);
}

.field-tooltip-btn:focus + .field-tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

.field-tooltip:hover .field-tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

.field-tooltip-content::before {
    content: none;
}

/* Content Grid */
.apply-page .content-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    align-items: start;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 1.5rem;
}

/* Content Cards */
.content-card {
    background: var(--bg-surface);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: visible;
}

.content-card .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--bg-surface-tertiary) 0%, var(--bg-surface) 100%);
    text-align: left;
}

.header-icon-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-emphasis) 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-icon-small i {
    font-size: 1.25rem;
    color: white;
}

.header-icon-small.family {
    background: linear-gradient(135deg, var(--theme-pink) 0%, #db2777 100%);
}

.header-icon-small.contact {
    background: linear-gradient(135deg, var(--theme-success) 0%, var(--theme-success-emphasis) 100%);
}

.header-icon-small.documents {
    background: linear-gradient(135deg, var(--theme-warning) 0%, var(--theme-warning-emphasis) 100%);
}

.header-icon-small.tips {
    background: linear-gradient(135deg, var(--theme-purple) 0%, var(--theme-purple-emphasis) 100%);
}

.content-card .card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.content-card .card-header p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0.125rem 0 0 0;
}

.card-content {
    padding: 1.5rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.apply-page .form-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.apply-page .form-label.required::after {
    content: '*';
    color: var(--theme-danger);
    margin-left: 0.25rem;
}

.apply-page .form-control,
.apply-page .form-select {
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.apply-page .form-control:focus,
.apply-page .form-select:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-primary-subtle);
    outline: none;
}

.apply-page .form-control::placeholder {
    color: var(--text-muted);
}

.apply-page textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

.required-mark {
    color: var(--theme-danger);
    font-weight: 600;
}

.validation-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--theme-danger);
}

/* Upload Section */
.upload-section {
    margin-bottom: 1.25rem;
}

.upload-section:last-child {
    margin-bottom: 0;
}

.upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.upload-label i {
    font-size: 1rem;
    color: var(--text-muted);
}

.upload-label.required::after {
    content: '*';
    color: var(--theme-danger);
    margin-left: 0.25rem;
}

.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    background: var(--bg-surface-tertiary);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.upload-dropzone:hover {
    border-color: var(--theme-primary);
    background: var(--theme-primary-subtle);
}

.dropzone-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--theme-primary-subtle) 0%, var(--theme-info-subtle) 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.dropzone-icon i {
    font-size: 1.5rem;
    color: var(--theme-primary);
}

.dropzone-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.25rem 0;
}

.dropzone-text strong {
    color: var(--theme-primary);
}

.dropzone-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Inline Upload Progress */
.upload-dropzone.uploading {
    border-color: var(--theme-primary);
    background: var(--theme-primary-subtle);
    cursor: default;
}

.upload-progress-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.upload-status-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.upload-progress-inline .cancel-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.upload-progress-inline .cancel-btn i {
    font-size: 0.875rem;
}

/* File Preview */
.file-preview {
    border: 1.5px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.file-preview.photo-preview {
    flex-direction: column;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.preview-icon {
    width: 40px;
    height: 40px;
    background: var(--theme-primary-subtle);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-icon i {
    font-size: 1.25rem;
    color: var(--theme-primary);
}

.preview-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.preview-actions {
    display: flex;
    gap: 0.5rem;
}

.preview-btn {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-btn.view {
    background: var(--theme-info-subtle);
    color: var(--theme-info);
}

.preview-btn.view:hover {
    background: var(--theme-info);
    color: white;
}

.preview-btn.delete {
    background: var(--theme-danger-subtle);
    color: var(--theme-danger);
}

.preview-btn.delete:hover {
    background: var(--theme-danger);
    color: white;
}

.preview-btn i {
    font-size: 1.125rem;
}

.photo-image {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Upload Progress */
.upload-progress {
    margin-bottom: 1rem;
}

.apply-page .progress-bar {
    height: 8px;
    background: var(--bg-surface-tertiary);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.apply-page .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-radius: 9999px;
    transition: width 0.3s ease;
    position: relative;
}

.apply-page .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    display: block;
}

/* Alert Boxes */
.alert-box {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-box.info {
    background: var(--theme-info-subtle);
    border-left: 3px solid var(--theme-info);
    color: var(--theme-info-emphasis);
}

.alert-box.success {
    background: var(--theme-success-subtle);
    border-left: 3px solid var(--theme-success);
    color: var(--theme-success-emphasis);
}

.alert-box.warning {
    background: var(--theme-warning-subtle);
    border-left: 3px solid var(--theme-warning);
    color: var(--theme-warning-emphasis);
}

.alert-box.danger {
    background: var(--theme-danger-subtle);
    border-left: 3px solid var(--theme-danger);
    color: var(--theme-danger-emphasis);
}

/* Tips Card */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.tip-item i {
    font-size: 1rem;
    color: var(--theme-success);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Submit Card */
.submit-card {
    background: var(--bg-surface);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--theme-primary);
    overflow: hidden;
}

.submit-content {
    padding: 1.5rem;
}

.submit-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.submit-info > i {
    font-size: 2rem;
    color: var(--theme-primary);
}

.submit-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.submit-info p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0.125rem 0 0 0;
}

.submit-buttons {
    display: flex;
    gap: 0.75rem;
}

.submit-buttons .fsh-btn {
    flex: 1 1 0;
}

.submit-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.submit-hint i {
    color: var(--theme-warning);
}

/* Success Overlay */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.success-card {
    background: var(--bg-surface);
    border-radius: 1rem;
    padding: 3rem;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--theme-success) 0%, var(--theme-success-emphasis) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-icon i {
    font-size: 2.5rem;
    color: white;
}

.success-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.success-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
}

.success-redirect {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.success-redirect i {
    font-size: 1.125rem;
    animation: spin 1s linear infinite;
}

/* Guest Tracking Instructions in Success Overlay */
.guest-tracking-instructions {
    margin-top: 1.5rem;
    text-align: left;
}

.tracking-info-card {
    background: rgba(var(--theme-primary-rgb), 0.08);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.tracking-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--theme-primary);
    margin-bottom: 0.75rem;
}

.tracking-header i {
    font-size: 1.25rem;
}

.tracking-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.tracking-description strong {
    color: var(--text-heading);
}

.tracking-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tracking-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-body);
}

.tracking-step .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--theme-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.track-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--theme-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.track-now-btn:hover {
    background: var(--theme-primary-emphasis);
    color: white;
    transform: translateY(-1px);
}

.track-now-btn i {
    font-size: 1.125rem;
}

/* Dark mode */
[data-bs-theme="dark"] .tracking-info-card {
    background: rgba(var(--theme-primary-rgb), 0.12);
    border-color: rgba(var(--theme-primary-rgb), 0.25);
}

/* Duplicate Application Modal */
.duplicate-card {
    border-top: 4px solid var(--theme-warning, #f59e0b);
}

.duplicate-icon {
    background: linear-gradient(135deg, var(--theme-warning, #f59e0b) 0%, #d97706 100%) !important;
}

.duplicate-message {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.duplicate-info-card {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.duplicate-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--theme-warning, #f59e0b);
    margin-bottom: 0.75rem;
}

.duplicate-info-header i {
    font-size: 1.25rem;
}

.duplicate-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.duplicate-options li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-body);
    padding: 0.5rem 0;
}

.duplicate-options li i {
    color: var(--theme-warning, #f59e0b);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.duplicate-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.duplicate-actions .fsh-btn {
    min-width: 140px;
}

[data-bs-theme="dark"] .duplicate-info-card {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

@media (max-width: 480px) {
    .duplicate-actions {
        flex-direction: column;
    }

    .duplicate-actions .fsh-btn {
        width: 100%;
    }
}

/* Apply Page Responsive */
@media (max-width: 1024px) {
    .apply-page .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-column {
        position: static;
    }
}

@media (max-width: 768px) {
    .apply-page .page-header {
        padding: 1.25rem 1rem;
    }

    .apply-page .header-content {
        flex-wrap: wrap;
    }

    .header-text h1 {
        font-size: 1.25rem;
    }

    .header-badge {
        display: none;
    }

    .apply-page .content-grid {
        padding: 0 1rem;
    }

    .completion-card {
        position: fixed;
        top: var(--topbar-height, 64px);
        left: 0;
        right: 0;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        z-index: 1000;
        overflow: hidden;
        box-sizing: border-box;
    }

    .completion-inner {
        border-radius: 0;
        border: none;
    }

    .completion-header {
        padding: 0.25rem 0.75rem;
    }

    .completion-title {
        font-size: 0.75rem;
    }

    .completion-title i {
        font-size: 0.875rem;
    }

    .completion-percentage {
        font-size: 0.9375rem;
    }

    .completion-count {
        display: none;
    }

    .completion-checklist {
        padding: 0.2rem 0.5rem;
        gap: 0.2rem;
        flex-wrap: wrap;
        overflow-x: visible;
        justify-content: center;
    }

    .check-item {
        padding: 0.0625rem 0.375rem;
        font-size: 0.625rem;
        flex-shrink: 1;
    }

    .check-item i {
        font-size: 0.625rem;
    }

    .apply-page .main-content-flow {
        padding-top: 52px;
    }

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

    .card-content {
        padding: 1.25rem;
    }

    .success-card {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }

    .field-tooltip-content {
        bottom: auto;
        top: calc(100% + 10px);
        left: -10px;
        right: auto;
        transform: none !important;
        max-width: min(280px, calc(100vw - 2rem));
    }

    .field-tooltip-btn:focus + .field-tooltip-content,
    .field-tooltip:hover .field-tooltip-content {
        transform: translateY(4px) !important;
    }

    .field-tooltip-content::after {
        top: auto;
        bottom: 100%;
        left: 18px;
        right: auto;
        border-top-color: transparent;
        border-bottom-color: var(--bg-tooltip, #1e293b);
    }

    .field-tooltip-content::before {
        content: 'Tap anywhere to close';
        display: block;
        font-size: 0.6875rem;
        color: rgba(255, 255, 255, 0.6);
        margin-bottom: 0.375rem;
        font-style: italic;
    }
}

@media (max-width: 480px) {
    .header-icon {
        width: 48px;
        height: 48px;
    }

    .header-icon i {
        font-size: 1.5rem;
    }

    .file-preview {
        flex-direction: column;
        text-align: center;
    }

    .preview-header {
        flex-direction: column;
    }
}

/* =============================================
   UPLOAD / DROPZONE / FILE PREVIEW - DARK MODE
   ============================================= */

[data-bs-theme="dark"] .upload-dropzone {
    background: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .upload-dropzone:hover {
    border-color: var(--theme-primary) !important;
    background: rgba(26, 179, 148, 0.1) !important;
}

[data-bs-theme="dark"] .dropzone-text {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .dropzone-hint {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .upload-label {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .upload-hint {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .upload-dropzone.uploading {
    border-color: var(--theme-primary) !important;
    background: rgba(26, 179, 148, 0.15) !important;
}

[data-bs-theme="dark"] .upload-status-text {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .file-preview {
    background: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .file-name {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .file-size {
    color: #6c757d !important;
}

/* =============================================
   APPLY PAGE - DARK MODE
   ============================================= */

[data-bs-theme="dark"] .apply-page {
    background: #212529 !important;
}

[data-bs-theme="dark"] .apply-page .content-card {
    background: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .apply-page .card-header-section {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .completion-inner {
    background: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .completion-bar {
    background: #343a40 !important;
}

[data-bs-theme="dark"] .completion-header span {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .submit-card {
    background: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .alert-box {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .alert-box.info {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

[data-bs-theme="dark"] .alert-box.warning {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}

[data-bs-theme="dark"] .tip-item {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .field-tooltip-content {
    background: #1e293b !important;
    color: #f8f9fa !important;
}

/* =============================================
   SEARCH FILTER BAR - DARK MODE
   ============================================= */

[data-bs-theme="dark"] .search-filter-bar {
    background: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .search-input {
    background: #343a40 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .search-input::placeholder {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .filter-pill {
    background: #343a40 !important;
    border-color: #495057 !important;
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .filter-pill:hover {
    border-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

[data-bs-theme="dark"] .filter-pill.active {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .view-toggle {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .view-toggle .view-btn {
    background: #343a40 !important;
    color: #6c757d !important;
}

[data-bs-theme="dark"] .view-toggle .view-btn:first-child {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .view-toggle .view-btn:hover {
    background: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .view-toggle .view-btn.active {
    background: var(--theme-primary) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .results-summary {
    background: rgba(26, 179, 148, 0.1) !important;
    color: #adb5bd !important;
}

/* ═══════════════════════════════════════════════════════════════
   ELIGIBILITY CRITERIA SETTINGS
   ═══════════════════════════════════════════════════════════════ */

.settings-section-card {
    margin-bottom: 1.25rem;
}

.settings-section-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.eligibility-factor-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.eligibility-factor-row:last-of-type {
    border-bottom: none;
}

.eligibility-factor-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.eligibility-factor-label {
    flex: 1;
    min-width: 0;
}

.eligibility-factor-label .factor-name {
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    font-size: 0.9rem;
}

.eligibility-factor-label small {
    display: block;
    margin-top: 0.125rem;
}

.eligibility-factor-weight {
    flex-shrink: 0;
    width: 110px;
}

.weight-total-bar {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-surface-secondary, #f9fafb);
    transition: all 0.2s ease;
}

.weight-total-bar.valid {
    border-color: var(--theme-success, #10b981);
    background: rgba(16, 185, 129, 0.05);
}

.weight-total-bar.invalid {
    border-color: var(--theme-danger, #ef4444);
    background: rgba(239, 68, 68, 0.05);
}

.weight-total-label {
    font-size: 0.9rem;
    color: var(--text-primary, #1f2937);
}

.weight-remaining {
    font-size: 0.85rem;
    color: var(--theme-danger, #ef4444);
    font-weight: 500;
}

.weight-balanced {
    font-size: 0.85rem;
    color: var(--theme-success, #10b981);
    font-weight: 500;
}

/* Dark mode overrides for eligibility criteria */
[data-bs-theme="dark"] .eligibility-factor-row {
    border-bottom-color: var(--border-color, #374151);
}

[data-bs-theme="dark"] .eligibility-factor-label .factor-name {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .weight-total-bar {
    background: var(--bg-surface-tertiary, #1e293b);
    border-color: var(--border-color, #374151);
}

[data-bs-theme="dark"] .weight-total-bar.valid {
    border-color: var(--theme-success, #10b981);
    background: rgba(16, 185, 129, 0.1);
}

[data-bs-theme="dark"] .weight-total-bar.invalid {
    border-color: var(--theme-danger, #ef4444);
    background: rgba(239, 68, 68, 0.1);
}

[data-bs-theme="dark"] .weight-total-label {
    color: var(--text-primary, #f1f5f9);
}

/* ============================================
   FSH CHECKBOX COMPONENT
   Global styles for FshCheckBox.razor
   ============================================ */

.fsh-checkbox-wrapper {
    display: inline-flex;
    align-items: center;
}

.fsh-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    color: var(--text-primary, #1e293b);
    line-height: 1;
    margin: 0;
}

.fsh-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.fsh-checkbox-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--border-color, #d1d5db);
    border-radius: 4px;
    background: var(--bg-body, #fff);
    transition: all 0.15s ease;
    color: white;
    flex-shrink: 0;
}

.fsh-checkbox-mark svg {
    width: 12px;
    height: 12px;
    display: block;
}

/* Checked state */
.fsh-checkbox input[type="checkbox"]:checked + .fsh-checkbox-mark {
    background: var(--theme-primary, #4f46e5);
    border-color: var(--theme-primary, #4f46e5);
    color: #fff;
}

/* Hover */
.fsh-checkbox:hover .fsh-checkbox-mark {
    border-color: var(--theme-primary, #4f46e5);
}

/* Focus visible */
.fsh-checkbox input[type="checkbox"]:focus-visible + .fsh-checkbox-mark {
    outline: 2px solid var(--theme-primary, #4f46e5);
    outline-offset: 2px;
}

/* Indeterminate */
.fsh-checkbox-mark.fsh-checkbox-indeterminate {
    background: var(--theme-primary, #4f46e5);
    border-color: var(--theme-primary, #4f46e5);
    color: #fff;
}

/* Disabled */
.fsh-checkbox-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Label */
.fsh-checkbox-label {
    font-size: inherit;
    color: inherit;
    line-height: 1.3;
}

/* Size variants */
.fsh-checkbox-xs .fsh-checkbox-mark {
    width: 14px;
    height: 14px;
    min-width: 14px;
    border-radius: 3px;
}

.fsh-checkbox-xs .fsh-checkbox-mark svg {
    width: 10px;
    height: 10px;
}

.fsh-checkbox-xs {
    font-size: 0.75rem;
    gap: 0.375rem;
}

.fsh-checkbox-sm .fsh-checkbox-mark {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 3px;
}

.fsh-checkbox-sm .fsh-checkbox-mark svg {
    width: 11px;
    height: 11px;
}

.fsh-checkbox-sm {
    font-size: 0.8125rem;
    gap: 0.375rem;
}

.fsh-checkbox-lg .fsh-checkbox-mark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 5px;
}

.fsh-checkbox-lg .fsh-checkbox-mark svg {
    width: 14px;
    height: 14px;
}

.fsh-checkbox-lg {
    font-size: 1rem;
    gap: 0.625rem;
}

/* Dark mode */
[data-bs-theme="dark"] .fsh-checkbox-mark {
    background: var(--bg-surface, #1e293b);
    border-color: var(--border-color, #475569);
}

[data-bs-theme="dark"] .fsh-checkbox input[type="checkbox"]:checked + .fsh-checkbox-mark {
    background: var(--theme-primary, #6366f1);
    border-color: var(--theme-primary, #6366f1);
}

[data-bs-theme="dark"] .fsh-checkbox:hover .fsh-checkbox-mark {
    border-color: var(--theme-primary, #6366f1);
}

/* ==============================================
   Guest Apply Page Styles
   ============================================== */

/* Tenant Banner for Apply Page */
.apply-tenant-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.08) 0%, rgba(var(--theme-primary-rgb), 0.04) 100%);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.apply-tenant-banner > i {
    font-size: 1.5rem;
    color: var(--theme-primary);
}

.apply-tenant-banner .label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.apply-tenant-banner .tenant-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .apply-tenant-banner {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.15) 0%, rgba(var(--theme-primary-rgb), 0.08) 100%);
    border-color: rgba(var(--theme-primary-rgb), 0.3);
}

.guest-apply-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-surface-tertiary) 100%);
    padding: 2rem 1rem 4rem;
}

.apply-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Hero Section */
.apply-hero {
    text-align: center;
    padding: 3rem 1rem;
}

.hero-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
}

.hero-icon-wrapper i {
    font-size: 2.5rem;
    color: white;
}

.apply-hero .hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 0.75rem;
}

.apply-hero .hero-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Options Section */
.apply-options {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.options-divider {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}

.options-divider span {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.option-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.option-card.registered {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 20px rgba(var(--theme-primary-rgb), 0.15);
}

.option-badge {
    position: absolute;
    top: -10px;
    right: 1.5rem;
    background: var(--theme-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.option-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.option-card.guest .option-icon {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.option-card.registered .option-icon {
    background: rgba(var(--theme-primary-rgb), 0.1);
    color: var(--theme-primary);
}

.option-icon i {
    font-size: 1.75rem;
}

.option-content {
    flex: 1;
}

.option-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 0.5rem;
}

.option-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.option-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.option-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-body);
    padding: 0.375rem 0;
}

.option-features li i {
    font-size: 1rem;
    color: #10b981;
}

.option-features li i.text-warning {
    color: #f59e0b;
}

.option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.option-btn.guest-btn {
    background: var(--bg-surface-tertiary);
    color: var(--text-body);
    border: 1px solid var(--border-color);
}

.option-btn.guest-btn:hover {
    background: var(--bg-surface-secondary);
    border-color: var(--text-tertiary);
}

.option-btn.register-btn {
    background: var(--theme-primary);
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb), 0.3);
}

.option-btn.register-btn:hover {
    background: var(--theme-primary-emphasis);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.4);
    transform: translateY(-1px);
}

/* Info Section */
.apply-info {
    margin-bottom: 2rem;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(var(--theme-primary-rgb), 0.05);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.15);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.info-card > i {
    font-size: 1.25rem;
    color: var(--theme-primary);
    margin-top: 0.125rem;
}

.info-content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 0.25rem;
}

.info-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.info-content a {
    color: var(--theme-primary);
    font-weight: 500;
}

.info-content a:hover {
    text-decoration: underline;
}

/* Requirements Section */
.requirements-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
}

.requirements-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 1.25rem;
}

.requirements-section .section-title i {
    color: var(--theme-primary);
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-surface);
    border-radius: 0.5rem;
}

.req-icon {
    width: 36px;
    height: 36px;
    background: rgba(var(--theme-primary-rgb), 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.req-icon i {
    font-size: 1.125rem;
    color: var(--theme-primary);
}

.requirement-item span {
    font-size: 0.8125rem;
    color: var(--text-body);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .apply-options {
        flex-direction: column;
    }

    .options-divider {
        justify-content: center;
        padding: 0.5rem 0;
    }

    .apply-hero .hero-title {
        font-size: 1.5rem;
    }

    .option-card {
        padding: 1.5rem;
    }

    .requirements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark mode */
[data-bs-theme="dark"] .guest-apply-page {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

[data-bs-theme="dark"] .option-card {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .option-card:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .option-card.guest .option-icon {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

[data-bs-theme="dark"] .option-btn.guest-btn {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .option-btn.guest-btn:hover {
    background: #3f4e63;
}

[data-bs-theme="dark"] .info-card {
    background: rgba(var(--theme-primary-rgb), 0.08);
    border-color: rgba(var(--theme-primary-rgb), 0.2);
}

[data-bs-theme="dark"] .requirements-section {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .requirement-item {
    background: #0f172a;
}

/* Track Application Section */
.track-application-section {
    margin-bottom: 2rem;
}

.track-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.08) 0%, rgba(var(--theme-primary-rgb), 0.03) 100%);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
    border-radius: 1rem;
    transition: all 0.2s ease;
}

.track-card:hover {
    border-color: rgba(var(--theme-primary-rgb), 0.4);
    box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb), 0.1);
}

.track-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(var(--theme-primary-rgb), 0.15);
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.track-icon i {
    font-size: 1.5rem;
    color: var(--theme-primary);
}

.track-content {
    flex: 1;
}

.track-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 0.25rem 0;
}

.track-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.track-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--theme-primary);
    color: white;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.track-btn:hover {
    background: var(--theme-primary-dark, var(--theme-primary));
    color: white;
    transform: translateX(4px);
}

.track-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.track-btn:hover i {
    transform: translateX(2px);
}

/* Dark mode */
[data-bs-theme="dark"] .track-card {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.12) 0%, rgba(var(--theme-primary-rgb), 0.05) 100%);
    border-color: rgba(var(--theme-primary-rgb), 0.25);
}

[data-bs-theme="dark"] .track-icon {
    background: rgba(var(--theme-primary-rgb), 0.2);
}

/* Mobile responsive */
@media (max-width: 576px) {
    .track-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .track-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 160px;
}

.quick-action-btn i {
    font-size: 1.5rem;
}

.quick-action-btn span {
    font-weight: 600;
    font-size: 0.9375rem;
}

.quick-action-btn small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.quick-action-btn.primary {
    background: var(--theme-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.3);
}

.quick-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--theme-primary-rgb), 0.4);
}

.quick-action-btn.secondary {
    background: var(--bg-card);
    color: var(--text-body);
    border: 1px solid var(--border-color);
}

.quick-action-btn.secondary:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

/* Vacancies Section */
.vacancies-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.vacancies-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.vacancies-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
}

.vacancies-section .section-title i {
    color: var(--theme-primary);
}

.vacancy-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-surface);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.vacancy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.vacancy-grid.closed {
    margin-top: 1rem;
    opacity: 0.7;
}

.vacancy-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vacancy-card:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.vacancy-card.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.vacancy-card .card-logo {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.vacancy-card .card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vacancy-card .card-logo i {
    font-size: 1.25rem;
    color: var(--text-tertiary);
}

.vacancy-card .card-content {
    flex: 1;
    min-width: 0;
}

.vacancy-card .card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vacancy-card .card-company {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: block;
}

.vacancy-card .card-deadline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.375rem;
}

.vacancy-card .card-deadline i {
    font-size: 0.875rem;
}

.vacancy-card .closed-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--bg-body);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-top: 0.375rem;
}

.vacancy-card .card-action {
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.vacancy-card:hover .card-action {
    color: var(--theme-primary);
}

/* Closed Vacancies Toggle */
.closed-vacancies {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.toggle-closed-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.toggle-closed-btn:hover {
    color: var(--theme-primary);
}

/* Vacancy Apply View */
.vacancy-apply-view {
    max-width: 700px;
    margin: 0 auto;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
}

.back-btn:hover {
    color: var(--theme-primary);
}

.selected-vacancy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.selected-vacancy-card .vacancy-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.selected-vacancy-card .vacancy-logo {
    width: 64px;
    height: 64px;
    border-radius: 0.75rem;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.selected-vacancy-card .vacancy-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.selected-vacancy-card .vacancy-logo i {
    font-size: 1.75rem;
    color: var(--text-tertiary);
}

.selected-vacancy-card .vacancy-info {
    flex: 1;
}

.selected-vacancy-card .vacancy-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 0.25rem;
}

.selected-vacancy-card .vacancy-company {
    font-size: 1rem;
    color: var(--text-secondary);
    display: block;
}

.selected-vacancy-card .vacancy-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

.selected-vacancy-card .vacancy-status .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.selected-vacancy-card .status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.selected-vacancy-card .status-badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.selected-vacancy-card .vacancy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.selected-vacancy-card .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.selected-vacancy-card .meta-item i {
    color: var(--text-tertiary);
}

.selected-vacancy-card .meta-label {
    color: var(--text-secondary);
}

.selected-vacancy-card .meta-value {
    color: var(--text-heading);
    font-weight: 500;
}

.selected-vacancy-card .meta-item.highlight {
    background: rgba(var(--theme-primary-rgb), 0.08);
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
}

/* Compact Apply Options */
.apply-options.compact {
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.apply-options.compact .option-card {
    padding: 1.25rem;
}

.apply-options.compact .option-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0.75rem;
}

.apply-options.compact .option-icon i {
    font-size: 1.375rem;
}

.apply-options.compact .option-title {
    font-size: 1rem;
}

.apply-options.compact .option-description {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.apply-options.compact .option-features {
    display: none;
}

/* Empty State */
.guest-apply-page .empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.guest-apply-page .empty-state i {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.guest-apply-page .empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 0.5rem;
}

.guest-apply-page .empty-state p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Dark Mode for new components */
[data-bs-theme="dark"] .quick-action-btn.secondary {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .vacancies-section {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .vacancy-count {
    background: #0f172a;
}

[data-bs-theme="dark"] .vacancy-card {
    background: #0f172a;
    border-color: #334155;
}

[data-bs-theme="dark"] .vacancy-card:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .vacancy-card .card-logo {
    background: #1e293b;
}

[data-bs-theme="dark"] .selected-vacancy-card {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .selected-vacancy-card .vacancy-logo {
    background: #0f172a;
}

/* ============================================
   DOCUMENT VIEWER COMPONENT
   A comprehensive inline document viewer
   Redesigned for larger, more professional display
   ============================================ */

/* Overlay - Full screen dark backdrop */
.document-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: docViewerFadeIn 0.25s ease-out;
    backdrop-filter: blur(8px);
}

.document-viewer-overlay.closing {
    animation: docViewerFadeOut 0.2s ease-out forwards;
}

@keyframes docViewerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes docViewerFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Container - Large modal-like viewer */
.document-viewer-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1600px;
    height: 95vh;
    max-height: 1000px;
    background: var(--bg-surface, #ffffff);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 100px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: docViewerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.document-viewer-container:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
}

@keyframes docViewerSlideIn {
    from {
        transform: scale(0.92) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Toolbar - Clean header with file info and controls */
.document-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-elevated, #f8fafc);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    flex-shrink: 0;
    gap: 16px;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-left {
    flex: 1;
    min-width: 0;
}

.toolbar-center {
    flex: 0 0 auto;
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    padding: 6px 8px;
}

.toolbar-right {
    flex: 0 0 auto;
    gap: 8px;
}

/* File icon in toolbar */
.document-viewer-toolbar .file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--theme-primary-subtle, rgba(26, 179, 148, 0.1)), rgba(26, 179, 148, 0.05));
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid rgba(26, 179, 148, 0.15);
}

.document-viewer-toolbar .file-icon i {
    font-size: 22px;
    color: var(--theme-primary, #1ab394);
}

/* File name */
.document-viewer-toolbar .file-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

/* Toolbar buttons */
.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.toolbar-btn:hover:not(:disabled) {
    background: var(--theme-primary-subtle, rgba(26, 179, 148, 0.1));
    border-color: var(--theme-primary, #1ab394);
    color: var(--theme-primary, #1ab394);
    transform: translateY(-1px);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.96);
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.toolbar-btn i {
    font-size: 20px;
}

.toolbar-btn.close-btn {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.toolbar-btn.close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #dc2626;
}

/* Toolbar divider */
.toolbar-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color, #e2e8f0);
    margin: 0 4px;
}

/* Page and zoom indicators */
.page-indicator,
.zoom-indicator {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #334155);
    min-width: 50px;
    text-align: center;
    padding: 0 4px;
}

/* Content Area - Main viewing space */
.document-viewer-content {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 32px;
    position: relative;
}

/* Subtle pattern overlay for content area */
.document-viewer-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.03) 1px, transparent 0);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Loading State */
.viewer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 60px;
    color: var(--text-secondary, #64748b);
    z-index: 1;
}

.viewer-loading .loading-spinner {
    position: relative;
    width: 64px;
    height: 64px;
}

.viewer-loading .spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--theme-primary, #1ab394);
    animation: spinnerRing 1s linear infinite;
}

.viewer-loading .spinner-ring:nth-child(2) {
    inset: 8px;
    border-top-color: var(--theme-secondary, #1c84c6);
    animation-delay: -0.3s;
}

.viewer-loading .spinner-ring:nth-child(3) {
    inset: 16px;
    border-top-color: var(--theme-info, #23c6c8);
    animation-delay: -0.6s;
}

.viewer-loading span {
    font-size: 15px;
    font-weight: 500;
}

@keyframes spinnerRing {
    to { transform: rotate(360deg); }
}

/* Error State */
.viewer-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 60px 80px;
    text-align: center;
    background: var(--bg-surface, #ffffff);
    border-radius: 20px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 40px -8px rgba(0, 0, 0, 0.15);
    z-index: 1;
    max-width: 520px;
}

.viewer-error .unsupported-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 20px;
    border: 1px solid #fcd34d;
}

.viewer-error .unsupported-icon i {
    font-size: 44px;
    color: #d97706;
}

.viewer-error h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin: 0;
}

.viewer-error p {
    font-size: 15px;
    color: var(--text-secondary, #64748b);
    margin: 0;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.error-actions .btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.error-actions .btn-primary {
    background: var(--theme-primary, #1ab394);
    border-color: var(--theme-primary, #1ab394);
    color: white;
}

.error-actions .btn-primary:hover {
    background: var(--theme-primary-hover, #159c80);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 179, 148, 0.3);
}

.error-actions .btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #64748b);
}

.error-actions .btn-outline-secondary:hover {
    background: var(--bg-hover, #f8fafc);
    border-color: var(--text-secondary, #64748b);
    color: var(--text-primary, #334155);
}

/* PDF Viewer */
.pdf-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
    z-index: 1;
}

.pdf-viewer canvas {
    display: block;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 40px -8px rgba(0, 0, 0, 0.2);
    background: white;
    border-radius: 4px;
}

/* Image Viewer */
.image-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.image-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 40px -8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* Video Viewer */
.video-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-viewer video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 40px -8px rgba(0, 0, 0, 0.2);
}

/* Audio Viewer */
.audio-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 60px 80px;
    background: var(--bg-surface, #ffffff);
    border-radius: 20px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 40px -8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.audio-viewer .audio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--theme-primary, #1ab394) 0%, var(--theme-secondary, #1c84c6) 100%);
    border-radius: 50%;
    color: white;
    box-shadow: 0 8px 24px rgba(26, 179, 148, 0.3);
}

.audio-viewer .audio-icon i {
    font-size: 44px;
}

.audio-viewer .audio-filename {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading, #1e293b);
}

.audio-viewer audio {
    width: 100%;
    max-width: 450px;
    height: 48px;
}

/* Office Viewer (Google Docs) */
.office-viewer {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.office-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    background: white;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 40px -8px rgba(0, 0, 0, 0.15);
}

/* Text Viewer */
.text-viewer {
    width: 100%;
    max-width: 900px;
    height: 100%;
    overflow: auto;
    background: var(--bg-surface, #ffffff);
    border-radius: 12px;
    padding: 32px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 40px -8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.text-viewer pre {
    margin: 0;
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-body, #334155);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Unsupported Viewer - Redesigned */
.unsupported-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 60px 80px;
    text-align: center;
    background: var(--bg-surface, #ffffff);
    border-radius: 20px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 40px -8px rgba(0, 0, 0, 0.15);
    z-index: 1;
    max-width: 520px;
}

.unsupported-viewer .unsupported-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.unsupported-viewer .unsupported-icon i,
.unsupported-viewer > i {
    font-size: 44px;
    color: var(--text-tertiary, #94a3b8);
}

.unsupported-viewer h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading, #1e293b);
    margin: 0;
}

.unsupported-viewer p {
    font-size: 15px;
    color: var(--text-secondary, #64748b);
    margin: 0;
    line-height: 1.6;
    max-width: 360px;
}

.unsupported-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.unsupported-actions .btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.unsupported-actions .btn-primary {
    background: var(--theme-primary, #1ab394);
    border-color: var(--theme-primary, #1ab394);
    color: white;
}

.unsupported-actions .btn-primary:hover {
    background: var(--theme-primary-hover, #159c80);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 179, 148, 0.3);
}

.unsupported-actions .btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #64748b);
}

.unsupported-actions .btn-outline-secondary:hover {
    background: var(--bg-hover, #f8fafc);
    border-color: var(--text-secondary, #64748b);
    color: var(--text-primary, #334155);
}

/* Footer (for PDFs) */
.document-viewer-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 24px;
    background: var(--bg-elevated, #f8fafc);
    border-top: 1px solid var(--border-color, #e2e8f0);
    flex-shrink: 0;
}

.footer-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-nav-btn:hover:not(:disabled) {
    background: var(--theme-primary-subtle, rgba(26, 179, 148, 0.1));
    border-color: var(--theme-primary, #1ab394);
    color: var(--theme-primary, #1ab394);
    transform: translateY(-1px);
}

.footer-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.footer-nav-btn i {
    font-size: 18px;
}

.footer-page-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #334155);
    padding: 0 12px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .document-viewer-overlay {
        padding: 12px;
    }

    .document-viewer-container {
        height: 98vh;
        max-height: none;
        border-radius: 12px;
    }

    .document-viewer-toolbar {
        padding: 12px 16px;
    }

    .document-viewer-toolbar .file-name {
        max-width: 200px;
        font-size: 14px;
    }

    .document-viewer-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .document-viewer-overlay {
        padding: 0;
    }

    .document-viewer-container {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    .document-viewer-toolbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .toolbar-left {
        order: 1;
        flex: 1 1 100%;
    }

    .toolbar-center {
        order: 3;
        flex: 1 1 auto;
        justify-content: center;
    }

    .toolbar-right {
        order: 2;
        flex: 0 0 auto;
        margin-left: auto;
    }

    .document-viewer-toolbar .file-icon {
        width: 36px;
        height: 36px;
    }

    .document-viewer-toolbar .file-icon i {
        font-size: 18px;
    }

    .document-viewer-toolbar .file-name {
        font-size: 14px;
        max-width: calc(100vw - 180px);
    }

    .toolbar-btn {
        width: 36px;
        height: 36px;
    }

    .toolbar-btn i {
        font-size: 18px;
    }

    .document-viewer-content {
        padding: 16px;
    }

    .unsupported-viewer {
        padding: 40px 24px;
        margin: 16px;
        border-radius: 16px;
    }

    .unsupported-viewer h4 {
        font-size: 18px;
    }

    .unsupported-viewer p {
        font-size: 14px;
    }

    .unsupported-actions {
        flex-direction: column;
        width: 100%;
    }

    .unsupported-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .document-viewer-footer {
        padding: 12px 16px;
        gap: 12px;
    }

    .footer-nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .footer-page-info {
        font-size: 13px;
    }
}

/* Dark Mode */
[data-bs-theme="dark"] .document-viewer-overlay {
    background: rgba(0, 0, 0, 0.95);
}

[data-bs-theme="dark"] .document-viewer-container {
    background: #1e293b;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

[data-bs-theme="dark"] .document-viewer-toolbar {
    background: #0f172a;
    border-color: #334155;
}

[data-bs-theme="dark"] .toolbar-center {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .document-viewer-toolbar .file-icon {
    background: linear-gradient(135deg, rgba(26, 179, 148, 0.2), rgba(26, 179, 148, 0.1));
    border-color: rgba(26, 179, 148, 0.3);
}

[data-bs-theme="dark"] .document-viewer-toolbar .file-name {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .toolbar-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-bs-theme="dark"] .toolbar-btn:hover:not(:disabled) {
    background: rgba(26, 179, 148, 0.15);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .toolbar-btn.close-btn {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-bs-theme="dark"] .toolbar-btn.close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

[data-bs-theme="dark"] .toolbar-divider {
    background: #334155;
}

[data-bs-theme="dark"] .page-indicator,
[data-bs-theme="dark"] .zoom-indicator {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .document-viewer-content {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

[data-bs-theme="dark"] .document-viewer-content::before {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
}

[data-bs-theme="dark"] .viewer-loading {
    color: #94a3b8;
}

[data-bs-theme="dark"] .viewer-error h4,
[data-bs-theme="dark"] .unsupported-viewer h4 {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .viewer-error p,
[data-bs-theme="dark"] .unsupported-viewer p {
    color: #94a3b8;
}

[data-bs-theme="dark"] .pdf-viewer canvas {
    box-shadow: 0 10px 40px -8px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .image-viewer img {
    box-shadow: 0 10px 40px -8px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .video-viewer video {
    box-shadow: 0 10px 40px -8px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .audio-viewer {
    background: #1e293b;
    box-shadow: 0 10px 40px -8px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .audio-viewer .audio-filename {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .text-viewer {
    background: #1e293b;
    box-shadow: 0 10px 40px -8px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .text-viewer pre {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .unsupported-viewer {
    background: #1e293b;
    box-shadow: 0 10px 40px -8px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .unsupported-viewer .unsupported-icon {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-color: #475569;
}

[data-bs-theme="dark"] .unsupported-viewer .unsupported-icon i,
[data-bs-theme="dark"] .unsupported-viewer > i {
    color: #64748b;
}

[data-bs-theme="dark"] .unsupported-actions .btn-outline-secondary {
    border-color: #475569;
    color: #94a3b8;
}

[data-bs-theme="dark"] .unsupported-actions .btn-outline-secondary:hover {
    background: #334155;
    border-color: #64748b;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .document-viewer-footer {
    background: #0f172a;
    border-color: #334155;
}

[data-bs-theme="dark"] .footer-nav-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-bs-theme="dark"] .footer-nav-btn:hover:not(:disabled) {
    background: rgba(26, 179, 148, 0.15);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

[data-bs-theme="dark"] .footer-page-info {
    color: #e2e8f0;
}
/* ============================================
   FEATURE LOCKED CARD - Premium Upsell Design
   ============================================ */

.feature-locked-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    min-height: 400px;
}

.feature-locked-card {
    position: relative;
    max-width: 520px;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 20px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.feature-locked-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-primary, #3b82f6), var(--theme-secondary, #8b5cf6));
}

.feature-locked-card .locked-icon {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature-locked-card .locked-icon i {
    font-size: 1.1rem;
    color: #64748b;
}

.feature-locked-card .feature-icon {
    width: 80px;
    height: 80px;
    margin: 0.5rem auto 1.5rem;
    background: linear-gradient(135deg, var(--theme-primary, #3b82f6) 0%, var(--theme-secondary, #8b5cf6) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 10px 15px -3px rgba(59, 130, 246, 0.3),
        0 4px 6px -2px rgba(59, 130, 246, 0.2);
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.feature-locked-card:hover .feature-icon {
    transform: rotate(0deg) scale(1.05);
}

.feature-locked-card .feature-icon i {
    font-size: 2.2rem;
    color: #ffffff;
}

.feature-locked-card .feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.feature-locked-card .feature-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.75rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.feature-locked-card .upgrade-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    border: 1px solid #fcd34d;
}

.feature-locked-card .upgrade-text {
    font-size: 0.9rem;
    color: #92400e;
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.feature-locked-card .upgrade-text i {
    color: #f59e0b;
}

.feature-locked-card .btn-upgrade {
    background: linear-gradient(135deg, var(--theme-primary, #3b82f6) 0%, var(--theme-secondary, #8b5cf6) 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 6px -1px rgba(59, 130, 246, 0.3),
        0 2px 4px -1px rgba(59, 130, 246, 0.2);
}

.feature-locked-card .btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 15px -3px rgba(59, 130, 246, 0.4),
        0 4px 6px -2px rgba(59, 130, 246, 0.3);
}

.feature-locked-card .btn-upgrade:active {
    transform: translateY(0);
}

.feature-locked-card .benefits-list {
    text-align: left;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e8f0;
}

.feature-locked-card .benefits-list h6 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.875rem;
}

.feature-locked-card .benefits-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-locked-card .benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.feature-locked-card .benefits-list li i {
    flex-shrink: 0;
    margin-top: 0.125rem;
    font-size: 1rem;
}

.feature-locked-card .benefits-list li:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

/* Dark Mode Support */
[data-bs-theme=dark] .feature-locked-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.2),
        0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

[data-bs-theme=dark] .feature-locked-card .locked-icon {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

[data-bs-theme=dark] .feature-locked-card .locked-icon i {
    color: #94a3b8;
}

[data-bs-theme=dark] .feature-locked-card .feature-title {
    color: #f1f5f9;
}

[data-bs-theme=dark] .feature-locked-card .feature-description {
    color: #94a3b8;
}

[data-bs-theme=dark] .feature-locked-card .upgrade-section {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-color: rgba(251, 191, 36, 0.3);
}

[data-bs-theme=dark] .feature-locked-card .upgrade-text {
    color: #fbbf24;
}

[data-bs-theme=dark] .feature-locked-card .benefits-list {
    background: #0f172a;
    border-color: #334155;
}

[data-bs-theme=dark] .feature-locked-card .benefits-list h6 {
    color: #94a3b8;
}

[data-bs-theme=dark] .feature-locked-card .benefits-list li {
    color: #cbd5e1;
}

[data-bs-theme=dark] .feature-locked-card .benefits-list li:not(:last-child) {
    border-color: #334155;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .feature-locked-container {
        padding: 1rem 0.5rem;
    }
    
    .feature-locked-card {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
    }
    
    .feature-locked-card .feature-icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }
    
    .feature-locked-card .feature-icon i {
        font-size: 1.75rem;
    }
    
    .feature-locked-card .feature-title {
        font-size: 1.25rem;
    }
    
    .feature-locked-card .upgrade-section {
        padding: 1.25rem 1rem;
    }
    
    .feature-locked-card .btn-upgrade {
        width: 100%;
        padding: 0.75rem 1.5rem;
    }
}
