:root {
    /* Light mode variables */
    --primary-color: #00c6ff;
    --primary-dark: #0072ff;
    --secondary-color: #0072ff;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --popup-bg: rgba(255, 255, 255, 0.98);
    --navbar-bg: #ffffff;
    --footer-bg: #ffffff;
    --input-bg: #ffffff;
    --table-header-bg: #f8fafc;
    --primary-rgb: 79, 70, 229;
    --primary-dark-rgb: 67, 56, 202;
    --danger-rgb: 239, 68, 68;
    --success-rgb: 34, 197, 94;
    --warning-rgb: 245, 158, 11;
    --notification-bg: rgba(255, 255, 255, 0.98);
}

[data-theme="dark"] {
    --primary-color: #00c6ff;
    --primary-dark: #0072ff;
    --secondary-color: #0072ff;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --background-color: #0f172a;
    --card-background: #1e293b;
    --text-color: #e2e8f0;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --popup-bg: rgba(30, 41, 59, 0.98);
    --navbar-bg: #1e293b;
    --footer-bg: #1e293b;
    --input-bg: #1e293b;
    --table-header-bg: #1e293b;
    --primary-rgb: 99, 102, 241;
    --primary-dark-rgb: 79, 70, 229;
    --danger-rgb: 239, 68, 68;
    --success-rgb: 34, 197, 94;
    --warning-rgb: 245, 158, 11;
    --notification-bg: rgba(30, 41, 59, 0.98);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
}

main {
    flex: 1 0 auto;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
}

@media (max-width: 1024px) {
    .container {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }
}


/* Top Navigation Bar - Logo and User Only */
.navbar {
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1001;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
    max-width: 100%;
    margin: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Left Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--navbar-bg);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar a,
.sidebar .sidebar-link,
.sidebar .sidebar-dropdown-item {
    text-decoration: none !important;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--secondary-color);
    transition: color 0.2s;
}

.sidebar-link:hover {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--text-color);
}

.sidebar-link:hover i {
    color: var(--primary-color);
}

.sidebar-link.active {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--primary-color);
}

/* Sidebar Dropdown - matches sidebar-link style */
.sidebar-dropdown {
    position: relative;
}

.sidebar-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    width: 100%;
    background: transparent;
    border-right: none;
    border-top: none;
    border-bottom: none;
    text-align: left;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.sidebar-dropdown-toggle i.fa-chevron-down {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--text-color);
    opacity: 0.6;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-dropdown.open .sidebar-dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

.sidebar-dropdown-toggle:hover {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--text-color);
}

.sidebar-dropdown-toggle:hover i:not(.fa-chevron-down) {
    color: var(--primary-color);
}

.sidebar-dropdown.open .sidebar-dropdown-toggle {
    background: rgba(var(--primary-rgb), 0.06);
}

.sidebar-dropdown-toggle.active {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sidebar-dropdown-toggle.active i:not(.fa-chevron-down) {
    color: var(--primary-color);
}

.sidebar-dropdown-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 260px;
    margin: 0.75rem auto 0;
    padding: 0;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    border-width: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease, margin 0.3s ease, border-width 0.2s ease;
}

.sidebar-dropdown.open .sidebar-dropdown-menu {
    max-height: 400px;
    opacity: 1;
    padding: 14px;
    border-width: 1px;
}

.sidebar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
}

.sidebar-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.sidebar-dropdown-item:hover i,
.sidebar-dropdown-item.active i {
    color: var(--primary-color);
}

.sidebar-dropdown-item.active {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* Single column when dropdown has few items */
.sidebar-dropdown-menu.single-col {
    grid-template-columns: 1fr;
}

/* Ensure dropdown is not interactive when collapsed */
.sidebar-dropdown:not(.open) .sidebar-dropdown-menu {
    pointer-events: none;
}

/* Main Content Area - Centered */
.main-content {
    margin-left: 260px;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
    padding: 2rem;
    transition: margin-left 0.3s ease;
    width: calc(100% - 260px);
}

@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
}

/* Desktop Layout */
@media (min-width: 1025px) {
    .main-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .container {
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
        padding: 0 2rem;
    }

    .footer {
        margin-left: 260px;
        width: calc(100% - 260px);
    }
}

/* General Navbar Elements - SaaS Style */
.navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.01em;
    transition: color 0.2s;
}

.navbar-brand:hover {
    color: var(--primary-dark);
}

.navbar-brand i {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--text-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.1);
    font-weight: 600;
}

.nav-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

/* Dropdown / Popups */
.nav-popup-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 0;
}

.nav-popup-section-title {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: 0.05em;
}

@media (min-width: 1025px) {
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .mobile-hide {
        display: none !important;
    }

    .nav-section-header {
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
}

.nav-link .fa-chevron-down {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

/* Currency Selector Styles */
.currency-selector {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.currency-selector select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 150px;
}

[data-theme="dark"] .currency-selector select {
    background: #374151;
    border-color: #4b5563;
    color: white;
}

.currency-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 198, 255, 0.2);
}

.dropdown {
    position: relative;
}

.dropdown .nav-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.dropdown .nav-link i.fa-chevron-down {
    margin-left: auto;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    min-width: 160px;
    padding: 0.5rem 0;
}

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

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: var(--background-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    background-color: var(--input-bg);
}

/* Forms with Icons */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    color: var(--secondary-color);
    z-index: 1;
    pointer-events: none;
}

.input-with-icon input,
.input-with-icon textarea,
.input-with-icon select {
    padding-left: 2.75rem;
    width: 100%;
    min-height: 3rem;
    border-radius: 0.75rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    color: var(--text-color);
}

.input-with-icon input:focus,
.input-with-icon textarea:focus,
.input-with-icon select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

.input-with-icon .password-toggle {
    position: absolute;
    left: auto;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    pointer-events: auto;
    color: var(--secondary-color);
    z-index: 2;
    transition: color 0.2s;
    font-size: 1rem;
}

.input-with-icon .password-toggle:hover {
    color: var(--primary-color);
}

/* Cards */
.card {
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 1rem;
    background: var(--card-background);
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    background-color: var(--table-header-bg);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #dcfce7;
    color: var(--success-color);
}

.alert-danger {
    background-color: #fee2e2;
    color: var(--danger-color);
}

/* Premium Inline Alert */
.premium-inline-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    background: rgba(0, 198, 255, 0.08);
    border: 1px solid rgba(0, 198, 255, 0.15);
    color: #0072ff;
    /* Using primary-dark for better readability on light bg */
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    animation: premium-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

[data-theme=\"dark\"] .premium-inline-alert {
    background: rgba(0, 198, 255, 0.12);
    border-color: rgba(0, 198, 255, 0.25);
    color: #00c6ff;
}

.premium-inline-alert.centered {
    justify-content: center;
}

.premium-inline-alert i {
    font-size: 1.1rem;
    color: #00c6ff;
}

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

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



.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.balance-label {
    opacity: 0.9;
    font-size: 0.875rem;
}

/* License Duration Selector */
.duration-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.duration-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.duration-option:hover {
    border-color: var(--primary-color);
}

.duration-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
}

.pagination {
    margin-top: 1rem;
}

/* Custom Date Input */
.custom-date {
    display: none;
}

.custom-date.show {
    display: block;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 6rem 0;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    margin-bottom: 2rem;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.pricing-card {
    text-align: center;
    padding: 2rem;
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - 70px - 200px);
    /* navbar height and footer height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.auth-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    opacity: 0.9;
    font-size: 0.875rem;
}

.auth-form {
    padding: 2.5rem;
}

.auth-form .form-group:last-child {
    margin-bottom: 0;
}

.auth-form .btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
}

/* Activation Lock Mode - minimal layout when platform admin has no subscription */
body.activation-lock-mode .sidebar {
    display: none !important;
}
body.activation-lock-mode .main-content {
    margin-left: 0;
    width: 100%;
}
body.activation-lock-mode .footer {
    margin-left: 0;
    width: 100%;
}
@media (min-width: 1025px) {
    body.activation-lock-mode .footer {
        margin-left: 0;
        width: 100%;
    }
}
/* Activation lock page - centered card, refined header typography */
.activation-lock-container {
    min-height: calc(100vh - 64px - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.activation-lock-card {
    position: relative;
}
.activation-header-refined {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}
.activation-header-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 0.75rem 0;
}
.activation-header-eyebrow i {
    margin-right: 0.4rem;
    opacity: 0.9;
}
.activation-header-refined .auth-icon {
    margin-bottom: 0.5rem;
}
.activation-header-refined h1 {
    margin-bottom: 0.5rem;
}
.activation-header-description {
    font-size: 0.9rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}
.activation-lock-signout-wrap {
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}
.activation-lock-signout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none !important;
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.activation-lock-signout-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 114, 255, 0.06);
}

/* Footer */
.footer {
    flex-shrink: 0;
    background-color: var(--footer-bg);
    padding: 1rem 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h5 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.875rem;
    padding: 1rem 0;
}

/* Password Change Page */
.password-requirements {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
    background: var(--card-background);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.password-requirements ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.password-requirements li:last-child {
    margin-bottom: 0;
}

/* =========================================
   SETTINGS PAGE REDESIGN
   ========================================= */

.settings-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1.5rem;
}

/* Sidebar Navigation */
.settings-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    /* Account for navbar */
}

/* Settings Menu Items */
.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.settings-nav-item:hover {
    background: var(--background-color);
    color: var(--text-color);
}

.settings-nav-item.active {
    background: var(--card-background);
    color: var(--primary-color);
    border-color: var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.settings-nav-item i {
    width: 20px;
    text-align: center;
    color: var(--secondary-color);
    transition: color 0.2s;
}

.settings-nav-item.active i {
    color: var(--primary-color);
}

/* Settings Content Area */
.settings-content {
    flex: 1;
    min-width: 0;
    /* Prevent overflow issues */
}

.settings-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-section.active {
    display: block;
}

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

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

/* Section specific styling */
.settings-card {
    background: var(--card-background);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.settings-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.settings-subtitle {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Form refinement */
.settings-form-group {
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.settings-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
}

.settings-helper {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
    line-height: 1.4;
}

/* Mobile Navigation */
.settings-mobile-nav {
    display: none;
    margin-bottom: 1.5rem;
}

.section-selector {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    color: var(--text-color);
    font-weight: 500;
}

/* Feedback & Messages */
.inline-feedback {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease;
}

.feedback-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.feedback-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

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

/* Availability Section Specifics */
.availability-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 1.25rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
}

.availability-title {
    font-weight: 600;
    color: var(--warning-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.availability-desc {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Action Bar */
.settings-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Behaviour */
@media (max-width: 991px) {
    .settings-layout {
        flex-direction: column;
        gap: 1rem;
    }

    .settings-sidebar {
        display: none;
    }

    .settings-mobile-nav {
        display: block;
    }

    .settings-content {
        width: 100%;
    }

    .settings-actions {
        justify-content: center;
    }

    .settings-actions button {
        width: 100%;
    }
}


.password-requirements li i {
    font-size: 0.75rem;
    color: var(--secondary-color);
    width: 1rem;
    text-align: center;
}

.password-requirements li.valid i {
    color: var(--success-color);
}

.password-match {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

/* Enhanced Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 15px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(var(--primary-color), 0.2), 0 2px 4px -2px rgba(var(--primary-color), 0.1);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(var(--primary-color), 0.3), 0 4px 6px -4px rgba(var(--primary-color), 0.2);
}

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

.btn i {
    transition: transform 0.2s;
}

.btn:hover i {
    transform: translateX(4px);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px 0 var(--shadow-color);
}

.btn-secondary:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(var(--danger-rgb), 0.2), 0 2px 4px -2px rgba(var(--danger-rgb), 0.1);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(var(--danger-rgb), 0.3), 0 4px 6px -4px rgba(var(--danger-rgb), 0.2);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2), 0 2px 4px -2px rgba(245, 158, 11, 0.1);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.3), 0 4px 6px -4px rgba(245, 158, 11, 0.2);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #1d4ed8);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2), 0 2px 4px -2px rgba(59, 130, 246, 0.1);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3), 0 4px 6px -4px rgba(59, 130, 246, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    min-height: 32px;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-group .btn {
    margin: 0;
}

/* License Index Actions */
.license-actions .btn-group {
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 6px -1px rgba(var(--primary-color), 0.2), 0 2px 4px -2px rgba(var(--primary-color), 0.1);
}

/* Product Page Buttons */
.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
}

.product-search-container {
    position: relative;
}

/* product search in buy key */
.product-search-container .list-group {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    border: 1px solid var(--border-color);
    border-top: none;
    box-shadow: 0 2px 4px var(--shadow-color);
    background: var(--background-color);
    z-index: 1000;
}

.product-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.product-item:hover {
    background-color: var(--background-color);
}

@media (max-width: 768px) {
    .product-actions {
        flex-direction: column;
    }
}

.search-add-section {
    margin-bottom: 1.5rem;
}

.existing-products-section {
    margin-top: 1.5rem;
}

.existing-products-section h4 {
    color: var(--text-color);
    font-weight: 600;
}

/* Enhanced Notifications */
.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    background: var(--notification-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 90%;
    width: auto;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid transparent;
}

.notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.notification-success {
    border-color: var(--primary-color);
}

.notification-success i {
    color: var(--primary-color);
}

.notification-error {
    border-color: var(--danger-color);
}

.notification-error i {
    color: var(--danger-color);
}

.notification-warning {
    border-color: var(--warning-color);
}

.notification-warning i {
    color: var(--warning-color);
}

.notification-info {
    border-color: var(--info-color);
}

.notification-info i {
    color: var(--info-color);
}

.nav-popup-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.2);
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.nav-popup-link:hover {
    color: white;
    background: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(var(--primary-rgb), 0.3);
    transform: translateY(-1px);
}

.nav-popup-link i {
    font-size: 1.1rem;
}

/* Enhanced Navigation Popup - SaaS Style */
.nav-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--popup-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0;
    min-width: 280px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
    height: 0;
    visibility: hidden;
    border: 1px solid var(--border-color);
}

.nav-popup.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    height: auto;
    visibility: visible;
}

.nav-popup-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 12px 12px 0 0;
}

.nav-popup-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-popup-name {
    font-weight: 600;
    font-size: 1.125rem;
}

.nav-popup-role {
    font-size: 0.875rem;
    opacity: 0.9;
}

.nav-popup-section {
    padding: 0.75rem 0;
}

.nav-popup-section-title {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    font-weight: 600;
}

.nav-popup-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.nav-popup-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
    width: 100%;
}

.nav-popup-item:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
}

.nav-popup-item i {
    width: 1.25rem;
    text-align: center;
}

/* Search and Filter Bar */
.search-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .search-filter-bar {
        flex-direction: column;
    }
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--input-bg);
    color: var(--text-color);
}

.filter-select {
    min-width: 150px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--input-bg);
    color: var(--text-color);
}

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

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    transition: transform 0.2s;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 0.5rem 0;
    }

    .table td::before {
        content: attr(data-label);
        font-weight: 600;
    }
}

/* Flash Panel */
.flash-panel {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    max-width: 600px;
    margin: 4rem auto;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
}

.flash-panel h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.flash-panel p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.header-actions {
    margin-top: 2rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .header-actions h1 {
        text-align: center;
    }

    .btn {
        text-align: center;
    }

    .card {
        margin: 1rem 0;
    }

    .duration-options {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .theme-toggle {
        bottom: 2rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
    }
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .form-control:disabled {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--secondary-color);
}

[data-theme="dark"] .btn-light {
    background-color: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .btn-light:hover {
    background-color: var(--background-color);
}

/* Improved Mobile Table */
@media (max-width: 768px) {
    .table-container {
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .table tbody tr {
        background-color: var(--card-background);
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 1rem;
        display: grid;
        gap: 0.5rem;
    }

    .table td {
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 0.5rem;
    }

    .table td::before {
        font-weight: 600;
    }

    .btn-group {
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* Mobile Navigation Button */
.mobile-nav-toggle {
    display: none;
}

/* Mobile Navigation */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 0.75rem;
        position: relative;
    }

    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 1.5rem;
        padding: 0.5rem;
        cursor: pointer;
        z-index: 1002;
        border-radius: 6px;
        transition: background 0.2s;
    }

    .mobile-nav-toggle:hover {
        background: rgba(var(--primary-rgb), 0.05);
    }

    /* Sidebar on mobile - hidden by default, slide-in panel */
    .sidebar {
        transform: translateX(-100%);
        width: 80vw;
        max-width: 320px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    /* Main content full width on mobile */
    .main-content {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
        overflow-x: hidden;
    }

    .container {
        padding: 0 1rem;
        max-width: 100%;
    }

    .footer {
        margin-left: 0;
        width: 100%;
    }

    /* Mobile overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        z-index: 999;
    }

    .mobile-nav-overlay.show {
        display: block;
        opacity: 1;
    }

    .nav-popup-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* ---------------------------------------------
   Mobile SaaS Layout Refinements (≤ 768px)
   --------------------------------------------- */
@media (max-width: 768px) {

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Navbar: hamburger (left) — logo (center) — profile (right) */
    .navbar {
        height: 56px;
    }

    .nav-container {
        padding: 0 0.75rem;
    }

    .nav-left {
        gap: 0.5rem;
    }

    .navbar-brand {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 1rem;
    }

    .navbar-brand i {
        font-size: 1.25rem;
    }

    /* Hide any horizontal nav menus on mobile */
    .nav-menu {
        display: none !important;
    }

    /* Slightly calmer heading sizes on mobile */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* Dashboard & module cards: single-column stack with breathing room */
    .stats-grid,
    .dashboard-grid,
    .usage-summary,
    .module-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card,
    .saas-card,
    .module-card,
    .dashboard-card,
    .stat-card {
        margin: 0.5rem 0;
    }

    /* Tables: keep table layout, enable horizontal scroll & tighter padding */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 640px;
    }

    .table thead {
        display: table-header-group;
    }

    .table tbody tr {
        display: table-row;
        padding: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .table th,
    .table td {
        padding: 0.6rem 0.75rem;
    }

    .table td {
        display: table-cell;
        border: 1px solid var(--border-color);
    }

    .table td::before {
        content: none;
    }

    /* Keep action buttons usable on narrow screens */
    .table .btn-group {
        flex-wrap: nowrap;
    }

    .table .btn {
        white-space: nowrap;
    }
}

/* Product Pages */
.product-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.product-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
}

.product-form {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    margin-top: 1rem;
}

.product-form .form-group {
    margin-bottom: 1.5rem;
}

.product-form label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.875rem;
}

.product-form input[type="text"],
.product-form input[type="number"],
.product-form textarea,
.product-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.product-form textarea {
    min-height: 120px;
    resize: vertical;
}

.product-form input[type="text"]:focus,
.product-form input[type="number"]:focus,
.product-form textarea:focus,
.product-form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

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

.product-form .form-check input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    cursor: pointer;
}

.product-form .form-check label {
    margin: 0;
    cursor: pointer;
}

.product-form .form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Money input specific styles */
.product-form .money-group {
    position: relative;
}

.product-form .money-group input {
    padding-left: 1rem;
}

/* Form error styles */
.product-form .form-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.product-form input.is-invalid,
.product-form textarea.is-invalid {
    border-color: var(--danger-color);
}

/* Dark mode specific adjustments */
[data-theme="dark"] .product-form {
    background: var(--card-background);
}

[data-theme="dark"] .product-form input[type="text"],
[data-theme="dark"] .product-form input[type="number"],
[data-theme="dark"] .product-form textarea,
[data-theme="dark"] .product-form select {
    background: var(--input-bg);
    color: var(--text-color);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .product-form {
        padding: 1.5rem;
    }

    .product-form .form-actions {
        flex-direction: column;
    }

    .product-form .form-actions .btn {
        width: 100%;
    }
}

/* Product header styles */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.product-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.product-header .btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .product-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .product-header .btn {
        width: 100%;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    position: relative;
    margin-bottom: 1rem;
    padding: 1rem;
}

.product-card-content {
    padding: 0.5rem 1.5rem;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
}

.product-card.inactive {
    opacity: 0.6;
}

.product-status {
    position: absolute;
    top: 1.5rem;
    right: 1rem;
    opacity: 1 !important;
    z-index: 1;
    display: block !important;
}

.badge {
    padding: 0.5em 1em;
    border-radius: 9999px;
    font-size: 0.75rem;
    display: inline-block;
    font-weight: 600;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.product-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    color: var(--text-color);
}

.license-stats {
    background: var(--card-background);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: var(--secondary-color);
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--card-background);
}

.stat-value.used {
    color: var(--danger-color);
    background: var(--danger-background);
}

.stat-value.available {
    color: var(--success-color);
    background: var(--success-background);
}

.product-header-buttons {
    display: flex;
    gap: 1rem;
}

.duration {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Styles moved from templates/reseller/index.html.twig */
.header-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.5em 1em;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: var(--card-background);
    margin: 15% auto;
    padding: 2rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
}

.close:hover {
    color: var(--danger-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

.text-muted {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Styles moved from templates/admin/dashboard.html.twig */
/* Container Styles */
.dashboard-container {
    padding: 0;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-background);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
}

.stat-card h3 {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: var(--card-background);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
}

.dashboard-card h2 {
    color: var(--text-color);
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.list-item small {
    color: var(--secondary-color);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Styles moved from templates/product/edit.html.twig */
.delete-action {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.delete-action .btn {
    width: 100%;
}

/* Styles moved from templates/reseller/new.html.twig */
.form-actions {
    /* Note: This might conflict with styles from reseller/index.html.twig */
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.auth-card:hover {
    transform: translateY(-5px);
}

.auth-header {
    /* Note: Overrides existing .auth-header styles */
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.auth-icon {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.2);
    width: 5rem;
    height: 5rem;
    line-height: 5rem;
    border-radius: 50%;
}

.auth-header h1 {
    /* Note: Overrides existing .auth-header h1 styles */
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    /* Note: Overrides existing .auth-header p styles */
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.auth-form {
    /* Note: Overrides existing .auth-form styles */
    padding: 2rem;
    background: var(--card-background);
}

.input-with-icon {
    /* Note: Overrides existing .input-with-icon styles */
    position: relative;
}

.input-with-icon i {
    /* Note: Overrides existing .input-with-icon i styles */
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.input-with-icon input {
    /* Note: Overrides existing .input-with-icon input styles */
    padding-left: 2.75rem;
    height: 3rem;
    border-radius: 0.75rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.input-with-icon input:focus {
    /* Note: Overrides existing .input-with-icon input:focus styles */
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

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

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
}

.form-check-label {
    margin: 0;
    cursor: pointer;
    font-size: 0.875rem;
}

.alert-danger {
    /* Note: Overrides existing .alert-danger styles */
    background-color: rgba(var(--danger-rgb, 239, 68, 68), 0.1);
    color: var(--danger-color);
    border-left: 3px solid var(--danger-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .auth-card {
        width: 90%;
        margin: 0 auto;
    }

    .auth-header {
        padding: 2rem 1.5rem 1rem;
    }

    .auth-form {
        padding: 1.5rem;
    }
}

.license-key {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    background: var(--background-color);
    border-radius: 0.25rem;
    font-family: monospace;
}

.license-key:hover {
    background: var(--border-color);
}

.text-muted {
    /* Note: This might conflict with previously added .text-muted styles */
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .search-filter-bar {
        /* Note: This might conflict with previously added .search-filter-bar styles */
        gap: 0.5rem;
    }

    .filter-select {
        /* Note: This might conflict with previously added .filter-select styles */
        width: 100%;
    }
}

/* Styles moved from templates/license/edit.html.twig */
.license-form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.license-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
}

.license-form {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
}

.license-key-display {
    background: var(--background-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.license-key-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.license-key {
    /* Note: Overrides styles from license/index.html.twig */
    font-family: monospace;
    background: var(--card-background);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    flex: 1;
}

.btn-copy {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.btn-copy:hover {
    color: var(--primary-color);
}

.form-group {
    /* Note: Overrides existing .form-group styles */
    margin-bottom: 1.5rem;
}

.form-label {
    /* Note: Overrides existing .form-label styles */
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control:focus {
    /* Note: Overrides existing .form-control:focus styles */
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

.form-check {
    /* Note: Overrides existing .form-check styles */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.form-check-input {
    /* Note: Overrides existing .form-check-input styles */
    width: 1.25rem;
    height: 1.25rem;
}

.form-actions {
    /* Note: Overrides existing .form-actions styles */
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .license-form {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .license-key-display {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .btn-copy {
        position: absolute;
        right: 1rem;
        top: 1rem;
    }
}

/* Styles moved from templates/license/new.html.twig */
.wallet-balance {
    /* Note: Overrides existing .wallet-balance styles */
    margin-bottom: 2rem;
}

.keys-container {
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

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

.keys-header h4 {
    margin: 0;
}

.keys-list {
    max-height: 400px;
    overflow-y: auto;
}

.key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

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

.key-text {
    font-family: monospace;
    font-size: 1rem;
    word-break: break-all;
}

.key-text-purchase {
    font-family: monospace;
    font-size: 1rem;
    margin-right: 0px;
    display: inline-block;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.description-text {
    margin-right: 0px;
    max-width: 170px;
    text-overflow: ellipsis;
    word-break: break-all;
    text-align: right;
}

.copy-btn {
    padding: 0.5rem 0.5rem;
    width: 40px;
    height: 30px;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    height: 30px;
    width: 40px;
}

.copy-btn:hover {
    background-color: #e9ecef;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    padding-left: 0;
    list-style: none;
    border-radius: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-item {
    margin: 0 2px;
}

.page-link {
    position: relative;
    display: block;
    padding: 0.75rem 1rem;
    margin-left: -1px;
    line-height: 1.25;
    color: var(--primary-color);
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    text-decoration: none;
}

.page-link:hover {
    z-index: 2;
    color: var(--primary-dark);
    background-color: var(--background-color);
    border-color: var(--border-color);
}

.page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}

.page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: var(--secondary-color);
    pointer-events: none;
    cursor: auto;
    background-color: var(--card-background);
    border-color: var(--border-color);
    opacity: 0.7;
}

/* Dark mode pagination */
[data-theme="dark"] .page-link {
    color: var(--primary-color);
    /* Use lighter primary for links */
    background-color: var(--card-background);
    border-color: var(--border-color);
}

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

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

[data-theme="dark"] .page-item.disabled .page-link {
    color: var(--secondary-color);
    background-color: var(--card-background);
    border-color: var(--border-color);
}

/* Styles moved from templates/product/manage_keys.html.twig & enhanced */
.filter-form-row {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
    gap: 1rem;
    align-items: flex-end;
    /* Align items to the bottom */
    padding: 15px;
    background-color: var(--card-background);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.filter-form-row .form-group {
    flex: 1 1 160px;
    /* Adjusted base width */
    margin-bottom: 0;
}

.filter-form-row .form-group-search {
    flex: 2 1 200px;
    /* Allow search to take more space, adjusted base */
}

.filter-form-row label {
    font-weight: 500;
    font-size: 0.8rem;
    /* Slightly smaller label */
    margin-bottom: 0.3rem;
    display: block;
}

.filter-form-row .form-control {
    padding: 0.6rem 0.8rem;
    /* Adjusted padding */
    font-size: 0.875rem;
}

.filter-form-row .form-actions-inline {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-form-row .form-actions-inline .btn {
    padding: 0.6rem 1rem;
    /* Adjusted padding */
}

.table-secondary {
    background-color: rgba(0, 0, 0, 0.05) !important;
    /* Use rgba for subtle bg */
    color: var(--secondary-color);
}

[data-theme="dark"] .table-secondary {
    background-color: rgba(255, 255, 255, 0.04) !important;
    /* Darker subtle bg */
}

.bulk-actions {
    display: flex;
    justify-content: center;
    /* Center the button */
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 0.5rem;
}

.bulk-actions button {
    min-width: 150px;
    /* Give button minimum width */
}

.bulk-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Table checkboxes - consistent theme */
.license-checkbox, .key-checkbox, #selectAllCheckbox, #select-all-keys {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Copy key button - Licenses & Manage Keys */
.copy-key-btn {
    background: var(--background-color) !important;
    color: var(--secondary-color) !important;
    border: 1px solid var(--border-color) !important;
}
.copy-key-btn:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* General Responsive Adjustments for Filters and Tables */
@media (max-width: 992px) {
    .filter-form-row {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .filter-form-row .form-group,
    .filter-form-row .form-group-search,
    .filter-form-row .form-actions-inline {
        flex-basis: auto;
        width: 100%;
        margin-bottom: 1rem;
    }

    .filter-form-row .form-actions-inline {
        margin-bottom: 0;
        flex-direction: column;
        /* Stack buttons on mobile */
        align-items: stretch;
        /* Make buttons full width */
    }

    .filter-form-row .form-actions-inline .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {

    .keys-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }

    .keys-header .btn-group {
        margin-top: 0.5rem;
    }

    .key-item {
        padding: 0.8rem 1rem;
    }
}

.filter-section {
    margin-bottom: 20px;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.user-filter {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.date-filters {
    display: flex;
    gap: 15px;
    flex: 2;
}

.filter-item {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.summary-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.summary-box {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-box h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
}

.summary-box .amount {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.credits {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
}

.debits {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
}

.balance {
    background-color: rgba(0, 123, 255, 0.1);
    border-left: 4px solid #007bff;
}

/* Total Price Display */
.total-price-display {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 1rem;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(var(--primary-rgb), 0.2), 0 2px 4px -2px rgba(var(--primary-rgb), 0.1);
}

.total-price-display .label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.total-price-display .amount {
    font-size: 2rem;
    font-weight: 700;
}

[data-theme="dark"] .total-price-display {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
}

/* Floating Action Button for Contact */
.contact-fab-container {
    position: fixed;
    bottom: 1rem;
    left: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 1rem;
}

.contact-fab {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.contact-fab:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.contact-fab.open {
    transform: scale(1.1) rotate(360deg);
}

.contact-fab i {
    transition: transform 0.3s ease;
}

.contact-fab-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.4s ease;
    max-height: 0;
    opacity: 0;
    transform: translateY(20px);
    overflow: hidden;
    pointer-events: none;
}

.contact-fab-container.open .contact-fab-options {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.contact-fab-option {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-fab-option:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.contact-fab-option.whatsapp {
    background: #25D366;
}

.contact-fab-option.telegram {
    background: #0088CC;
}

/* License Information Card */
.license-info-card {
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    margin-bottom: 2rem;
    overflow: hidden;
}

.license-info-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1.5rem;
}

.license-info-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.license-info-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.license-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.license-status.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.license-status.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.license-status.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
    border: 2px solid rgba(245, 158, 11, 0.3);
}

.license-info-body {
    padding: 2rem;
}

.license-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.license-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item label i {
    width: 1rem;
    text-align: center;
    color: var(--primary-color);
}

.info-value {
    color: var(--text-color);
    font-weight: 500;
}

.license-key-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--background-color);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.license-key-display code {
    flex: 1;
    background: none;
    border: none;
    padding: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-color);
}

.btn-copy {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.btn-copy:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.1);
}

.device-policy {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.device-limit {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.device-usage {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.usage-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.usage-text {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Device Activations Table */
.devices-table-container {
    margin-top: 2rem;
}

.devices-table-container h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.devices-table-container .table th {
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.devices-table-container .table td code {
    background: var(--background-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.devices-table-container .badge {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
}

.device-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.badge-info {
    background: linear-gradient(135deg, var(--info-color), #1d4ed8);
    color: white;
}

.badge-secondary {
    background: #6b7280;
    color: white;
}

@media (max-width: 768px) {
    .contact-fab-container {
        left: 1rem;
        bottom: 1rem;
    }

    .license-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .license-info-body {
        padding: 1.5rem;
    }

    .license-info-header {
        padding: 1rem;
    }

    .license-info-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .license-key-display {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .devices-table-container .table td {
        padding: 0.75rem;
    }

    .devices-table-container .btn-sm {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .device-actions {
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* Bulk Actions Bar (Legacy removed or kept for other pages? Keeping it for now but removing heavy shadow) */
.bulk-actions-bar {
    background: var(--card-background);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Reduced shadow */
    position: sticky;
    bottom: 1rem;
    z-index: 20;
}

.bulk-actions-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.bulk-actions-left i {
    color: var(--primary-color);
}

.bulk-actions-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bulk-action-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    min-width: 160px;
}

.bulk-action-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15);
}

@media (max-width: 768px) {
    .bulk-actions-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
    }

    .bulk-actions-right {
        flex-direction: column;
        gap: 0.75rem;
    }

    .bulk-action-select {
        width: 100%;
    }

    .bulk-actions-right .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Phase 3: compact data density + calm structure */
.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 2rem;
    margin-top: 0;
}

.section-header h1,
.section-header h2,
.section-header h3 {
    margin: 0;
}

.section-subtitle {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--text-color);
    font-weight: 600;
    font-size: 12px;
}

.pill-muted {
    background: var(--background-color);
    color: var(--secondary-color);
}

.pill-soft {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--text-color);
}

.pill-success {
    background: rgba(var(--success-rgb, 34, 197, 94), 0.08);
    border-color: rgba(var(--success-rgb, 34, 197, 94), 0.3);
    color: #10b981;
}

.pill-danger {
    background: rgba(var(--danger-rgb, 239, 68, 68), 0.08);
    border-color: rgba(var(--danger-rgb, 239, 68, 68), 0.3);
    color: #ef4444;
}

.pill-warning {
    background: rgba(var(--warning-rgb, 245, 158, 11), 0.08);
    border-color: rgba(var(--warning-rgb, 245, 158, 11), 0.3);
    color: #f59e0b;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.meta-card {
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--card-background);
}

.meta-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.meta-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
}

.table-compact th,
.table-compact td {
    padding: calc(0.65rem - 2px) 0.75rem;
}

.table-compact .btn-group {
    gap: 0.25rem;
}

.muted-helper {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.stacked-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stacked-list li {
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--card-background);
}

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

.calm-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: none;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.text-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.text-title {
    font-weight: 700;
    color: var(--text-color);
}

/* ============================================
   SaaS Dashboard Utility Classes
   ============================================ */

/* SaaS Card - Modern card with soft shadow */
.saas-card {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.saas-card:hover {
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.65);
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.5);
}

/* SaaS Section - Section container */
.saas-section {
    margin-bottom: 2rem;
}

.saas-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    margin-top: 0;
    padding-top: 0;
}

.saas-section-subtitle {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    margin-top: 0;
}

/* Usage Summary - For dashboard summary cards */
.usage-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.usage-summary-item {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.usage-summary-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.usage-summary-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.usage-summary-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.usage-summary-meta {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.usage-summary-item.warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(135deg, var(--card-background), rgba(245, 158, 11, 0.03));
}

.usage-summary-item.emphasis {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--card-background), rgba(0, 198, 255, 0.03));
}

.usage-summary-item.emphasis .usage-summary-value {
    color: var(--primary-color);
}

/* Module Card - For module overview cards */
.module-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.module-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.module-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.module-card-header>div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.module-card-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.module-card-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
}

.module-card-description {
    font-size: 0.9rem;
    color: var(--secondary-color);
    line-height: 1.5;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    flex: 1;
}

.module-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.module-card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.module-card-status.active {
    background: rgba(34, 197, 94, 0.1);
    color: #10b981;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.module-card-status:not(.active) {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.module-card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.module-card-link:hover {
    color: var(--primary-dark);
}

/* Module Grid - For displaying module cards */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 1400px) {
    .module-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 1024px) {
    .module-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .module-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .usage-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* --- License Panel UI Refresh --- */

.saas-page-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 0;
}

.actions-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    margin-bottom: 20px;
}

.page-actions-right {
    display: flex;
    gap: 10px;
}

/* Inline Bulk Action Row */
.bulk-action-row {
    background: #f8fafc !important;
}

[data-theme="dark"] .bulk-action-row {
    background: rgba(30, 41, 59, 0.5) !important;
}

.bulk-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
}

.bulk-count {
    font-weight: 600;
    color: #334155;
}

[data-theme="dark"] .bulk-count {
    color: #e2e8f0;
}

.bulk-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.85rem;
    min-width: 140px;
}

.bulk-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
}

.btn-ghost:hover {
    background: rgba(var(--primary-rgb), 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Inline Bulk Row */
.bulk-actions-row th {
    background: #f8fafc !important;
    /* Neutral light gray */
    padding: 0 !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

[data-theme="dark"] .bulk-actions-row th {
    background: #1e293b !important;
}

.bulk-actions-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 1.5rem;
    min-height: 60px;
}

.bulk-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.selected-text {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

.bulk-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Premium Table Cells */
.key-pill-saas {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--primary-rgb), 0.06);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.copy-trigger {
    background: none;
    border: none;
    padding: 0;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.copy-trigger:hover {
    color: var(--primary-color);
}

.product-context-premium {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-name-bold {
    font-weight: 700;
    color: var(--text-color);
    font-size: 0.95rem;
}

.duration-muted {
    font-size: 0.75rem;
    color: var(--secondary-color);
    opacity: 0.8;
}

.usage-premium {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100px;
}

.usage-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-color);
}

.nano-progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.nano-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.nano-fill.is-danger {
    background: var(--danger-color);
}

/* Icon Pills for Actions */
.action-btn-pill,
.action-btn-gear {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.action-btn-pill:hover,
.action-btn-gear:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.license-row:hover .action-btn-gear {
    opacity: 1;
}


/* Custom Dropdown for Bulk Actions */
.custom-dropdown {
    position: relative;
}

.custom-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
    flex-direction: column;
    z-index: 100;
}

.custom-dropdown.is-open .dropdown-menu {
    display: flex;
}

.custom-dropdown .dropdown-item {
    padding: 0.6rem 1rem;
    text-align: left;
    background: none;
    border: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-color);
}

.custom-dropdown .dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

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

.license-row.is-selected {
    background-color: rgba(79, 70, 229, 0.05) !important;
}

[data-theme="dark"] .license-row.is-selected {
    background-color: rgba(99, 102, 241, 0.1) !important;
}

/* --- LIGHTWEIGHT GRID SYSTEM (Lacking in original app.css) --- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-12 {
    width: 100%;
    padding: 0 15px;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 15px;
}

.col-md-9 {
    flex: 0 0 75%;
    max-width: 75%;
    padding: 0 15px;
}

@media (max-width: 768px) {

    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.d-flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.w-100 {
    width: 100% !important;
}

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

.text-danger {
    color: var(--danger-color) !important;
}

/* Reseller & Entity Premium Styles */
.entity-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px -5px var(--shadow-color);
    margin-bottom: 2rem;
    overflow: hidden;
    display: block;
    width: 100%;
}

.profile-header-premium {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 40px -10px var(--shadow-color);
    position: relative;
    display: block;
}

.profile-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.profile-identity h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.1;
}

.profile-identity p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 500;
}

.profile-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-item .label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    letter-spacing: 0.075em;
}

.meta-item .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.sticky-nav-container {
    position: sticky;
    top: 100px;
    z-index: 90;
}

.profile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.profile-nav-link:hover {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary-color);
    transform: translateX(4px);
}

.profile-nav-link.active {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    box-shadow: 0 4px 12px -5px rgba(var(--primary-rgb), 0.3);
}

.entity-section {
    padding: 2.5rem;
    scroll-margin-top: 120px;
}

.entity-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.entity-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    letter-spacing: -0.01em;
}

.entity-section-subtitle {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
    max-width: 700px;
    line-height: 1.6;
}

.disabled-placeholder-card {
    background: repeating-linear-gradient(45deg, transparent, transparent 15px, rgba(var(--primary-rgb), 0.025) 15px, rgba(var(--primary-rgb), 0.025) 30px);
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    opacity: 0.85;
}

.disabled-placeholder-card i {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    display: block;
    opacity: 0.5;
}

.pill-status {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.05);
}

.pill-status.active {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.pill-status.suspended,
.pill-status.disabled {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.danger-zone {
    background: rgba(239, 68, 68, 0.02);
    border: 2px solid rgba(239, 68, 68, 0.15);
    border-radius: 20px;
    padding: 3rem;
    margin-top: 4rem;
    scroll-margin-top: 120px;
}

.danger-zone-title {
    color: #dc2626;
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: -0.02em;
}

.product-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin: 0.35rem;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.product-pill:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.04);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
}

.product-pill .remove {
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 0.95rem;
    padding: 2px;
}

.product-pill .remove:hover {
    color: var(--danger-color);
    transform: scale(1.1);
}

#selected-product-price {
    background: rgba(var(--primary-rgb), 0.05);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--primary-color);
    font-weight: 700;
    display: inline-block;
}

/* ============================================
   Reseller Module Styles
   ============================================ */

/* Reseller Header */
.reseller-list-header {
    margin-bottom: 2rem;
}

.reseller-list-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.premium-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(var(--primary-rgb), 0.2);
}

.premium-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(var(--primary-rgb), 0.3);
    color: white;
}

/* Reseller Stats Grid */
.reseller-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card-premium {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.stats-card-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stats-card-content {
    display: flex;
    flex-direction: column;
}

.stats-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.stats-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stats-card-value.wallet-value {
    color: var(--primary-color);
}

.stats-card-subtext {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Reseller Filter Bar */
.reseller-filter-bar {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    background: var(--card-background);
    padding: 1.25rem;
    border-radius: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px -10px var(--shadow-color);
}

.reseller-search-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.reseller-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.875rem;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.reseller-search-wrapper .search-icon {
    position: absolute;
    left: 1.125rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.reseller-search-input:focus+.search-icon {
    color: var(--primary-color);
}

.reseller-bulk-actions-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    margin-top: -0.5rem;
}

.reseller-bulk-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: rgba(var(--primary-rgb), 0.035);
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
}

.reseller-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.reseller-search-input::placeholder {
    color: var(--secondary-color);
}

.reseller-bulk-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.reseller-bulk-actions form {
    margin: 0;
    display: flex;
}

.btn-enable-all,
.btn-disable-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-width: 130px;
}

.btn-enable-all {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.btn-enable-all:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

.btn-disable-all {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-disable-all:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Reseller Table Card */
.reseller-table-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table-container-premium {
    overflow-x: auto;
}

.table-premium {
    width: 100%;
    border-collapse: collapse;
}

.table-premium thead {
    background: var(--table-header-bg);
}

.table-premium th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
}

.table-premium td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.table-premium tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.02);
}

.premium-table-row {
    transition: background 0.2s ease;
}

/* Reseller Identity */
.reseller-identity-premium {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reseller-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-color);
}

.reseller-email {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Wallet Info */
.wallet-info-premium {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wallet-balance {
    font-weight: 700;
    font-size: 0.95rem;
    background: transparent !important;
    color: var(--text-color) !important;
}

.wallet-limit {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

/* Finance Actions */
.finance-action-container-premium {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.finance-action-btn-premium {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.finance-action-btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.finance-btn-add {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.finance-btn-add:hover {
    background: var(--primary-color);
    color: white;
}

.finance-btn-sub {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.finance-btn-sub:hover {
    background: var(--danger-color);
    color: white;
}

/* Reseller Actions */
.reseller-actions-premium {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
}

.action-icon-btn-premium {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    cursor: pointer;
}

.action-icon-btn-premium:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Empty State */
.empty-state-premium {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Premium Modal */
.premium-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.premium-modal-content {
    background: var(--card-background);
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.premium-modal-content.show {
    transform: scale(1);
    opacity: 1;
}

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

.premium-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.premium-modal-close {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.premium-modal-close:hover {
    background: var(--background-color);
    color: var(--danger-color);
}

.premium-modal-body {
    padding: 1.5rem;
}

.premium-modal-description {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.premium-form-group {
    margin-bottom: 1.5rem;
}

.premium-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
}

.premium-form-input,
.premium-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

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

.premium-form-textarea {
    resize: vertical;
    min-height: 100px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .reseller-stats-grid {
        grid-template-columns: 1fr;
    }

    .reseller-filter-bar {
        flex-direction: column;
    }

    .reseller-search-wrapper {
        width: 100%;
    }

    .reseller-bulk-actions {
        width: 100%;
        justify-content: stretch;
    }

    .btn-enable-all,
    .btn-disable-all {
        flex: 1;
    }

    .table-premium {
        font-size: 0.85rem;
    }

    .table-premium th,
    .table-premium td {
        padding: 0.75rem 0.5rem;
    }

    .finance-action-container-premium,
    .reseller-actions-premium {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ============================================
   API Documentation Code Blocks - Enterprise Grade
   ============================================ */

/* API Documentation Container */
.api-doc-section {
    margin-bottom: 2rem;
}

.api-doc-header {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), rgba(var(--secondary-color-rgb, 0, 114, 255), 0.05));
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.api-doc-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.api-doc-header p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* API Endpoint Display */
.api-endpoint-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.api-method {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--success-color);
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    letter-spacing: 0.05em;
}

.api-path {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Parameters Table */
.api-params-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: var(--card-background);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.api-params-table th {
    background: var(--table-header-bg);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.api-params-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-color);
}

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

.api-params-table .param-name {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.api-params-table .param-type {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--secondary-color);
}

.api-params-table .param-required {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: rgba(var(--danger-rgb), 0.1);
    color: var(--danger-color);
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.api-params-table .param-optional {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: rgba(var(--secondary-color-rgb, 100, 116, 139), 0.1);
    color: var(--secondary-color);
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

/* Code Block Container */
.api-code-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.api-code-copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    backdrop-filter: blur(4px);
}

.api-code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.api-code-copy-btn.copied {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
}

.api-code-copy-btn i {
    font-size: 0.875rem;
}

/* Code Block Styling */
.api-code-block {
    white-space: pre !important;
    overflow-x: auto;
    line-height: 1.6;
    font-size: 0.875rem;
    margin: 0;
    padding: 1.5rem !important;
    padding-top: 3rem !important;
    /* Space for copy button */
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-radius: 0.5rem;
}

.api-code-block::-webkit-scrollbar {
    height: 8px;
}

.api-code-block::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.api-code-block::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.api-code-block::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Response Example */
.api-response-example {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.api-response-example h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 1rem 0;
}

.api-response-example pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.6;
}

/* Dark mode adjustments */
[data-theme="dark"] .api-endpoint-display {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .api-doc-header {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-color-rgb, 0, 114, 255), 0.1));
}