:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #3b82f6;
    --accent: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary);
}

.logo i {
    color: var(--secondary);
}

.logo-text {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-login {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-login:hover {
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.login-mobile-icon {
    display: none;
}

.login-desktop-icon {
    display: inline-flex;
    margin-left: 8px;
}

.mobile-menu-btn {
    display: none;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

/* Hamburguer SVG Animation logic */
.mobile-menu-btn svg line {
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links.active+.nav-actions .line-mid,
.menu-active .line-mid {
    opacity: 0;
}

.nav-links.active+.nav-actions .line-top,
.menu-active .line-top {
    transform: translateY(6px) rotate(45deg);
    transform-origin: center;
}

.nav-links.active+.nav-actions .line-bot,
.menu-active .line-bot {
    transform: translateY(-6px) rotate(-45deg);
    transform-origin: center;
}

.mobile-menu-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

/* Hamburguer SVG Animation */
.mobile-menu-btn svg line {
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-btn.menu-active .line-mid {
    opacity: 0;
}

.mobile-menu-btn.menu-active .line-top {
    transform: translateY(6px) rotate(45deg);
    transform-origin: center;
}

.mobile-menu-btn.menu-active .line-bot {
    transform: translateY(-6px) rotate(-45deg);
    transform-origin: center;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 1rem 2rem;
    position: relative;
    overflow: hidden;
}

.blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: 20%;
    left: 20%;
    width: 300px;
    height: 300px;
    background: var(--primary);
}

.blob-2 {
    bottom: 10%;
    right: 15%;
    width: 400px;
    height: 400px;
    background: var(--secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: var(--accent);
    animation-delay: -2s;
}

@keyframes float {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(30px, -30px);
    }
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero h1 span {
    background: linear-gradient(to right, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-inline: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* About Section */
.about-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.about-content h2 span {
    color: var(--primary);
}

.about-content p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.about-content p strong {
    color: var(--text-main);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-box h3 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.stat-box span {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.about-image {
    position: relative;
    height: 100%;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-mockup {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    z-index: 2;
}

.glass-mockup i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.glass-mockup h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.glass-mockup p {
    color: var(--text-muted);
}

.secondary-mockup {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 2rem;
    z-index: 1;
    transform: scale(0.85);
    opacity: 0.8;
    background: rgba(59, 130, 246, 0.1);
}

.secondary-mockup i {
    color: var(--secondary);
}

/* Features */
.features-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title h2 span {
    color: var(--primary);
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* Pricing Section */
.pricing-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: center;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pricing-card.popular {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
    z-index: 2;
    background: rgba(30, 41, 59, 0.85);
}

.popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.4rem 1.5rem;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-header h4 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.price {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 2rem 0;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
}

.price span {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.features-list {
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.features-list ul {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.features-list i {
    color: var(--accent);
}

.pricing-card .btn {
    width: 100%;
    justify-content: center;
}

/* Contact Section */
.contact-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.input-element {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.input-element label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-element input,
.input-element textarea {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    resize: none;
}

.input-element input:focus,
.input-element textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.btn-submit {
    margin-top: 1rem;
    justify-content: center;
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 10px;
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-brand h3 i {
    color: var(--secondary);
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

/* Dashboard Core Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: #0b0f1a;
}

.sidebar {
    width: 280px;
    background: #151b2d;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height */
    position: sticky;
    top: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    padding-bottom: 20px;
    /* Redus de la 80px pentru a elimina spatiul gol pe desktop */
    will-change: transform;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-spacer {
    height: 10px;
    /* Mic spatiu pe desktop */
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.main-content {
    flex: 1;
    padding: 40px;
    max-width: 100%;
    overflow-x: hidden;
}

/* Sidebar Styles & Themes */
.dashboard-layout {
    --theme-primary: #8b5cf6;
    --theme-accent: rgba(139, 92, 246, 0.1);
    --primary: var(--theme-primary);
    /* Pasam culoarea temei catre variabila globala */
}

.sidebar-menu-nested,
.submenu-items {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

/* Administrare Globala - Violet */
.theme-admin {
    --theme-primary: #a855f7;
    --theme-accent: rgba(168, 85, 247, 0.15);
    --secondary: #d8b4fe;
}

/* Facturare B2B/B2C - Cyan/Blue */
.theme-billing {
    --theme-primary: #06b6d4;
    --theme-accent: rgba(6, 182, 212, 0.15);
    --secondary: #3b82f6;
}

/* Modul Horeca - Orange */
.theme-horeca {
    --theme-primary: #f59e0b;
    --theme-accent: rgba(245, 158, 11, 0.15);
    --secondary: #fbbf24;
}

/* ERP & Contabilitate - Emerald */
.theme-erp {
    --theme-primary: #10b981;
    --theme-accent: rgba(16, 185, 129, 0.15);
    --secondary: #34d399;
}

/* Retea Partener - Rose */
.theme-partner {
    --theme-primary: #f43f5e;
    --theme-accent: rgba(244, 63, 94, 0.15);
    --secondary: #fb7185;
}

.sidebar-menu-nested a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--theme-primary);
    /* Dinamic pe baza temei */
    transition: color 0.3s ease;
}

.sidebar-menu-nested a:hover,
.sidebar-menu-nested a.active {
    background: var(--theme-accent);
    color: white;
    box-shadow: inset 4px 0 0 var(--theme-primary);
}

.sidebar-brand .logo-icon {
    background: var(--theme-primary) !important;
    box-shadow: 0 0 20px var(--theme-accent) !important;
}

.sidebar-brand .brand-name span {
    color: var(--theme-primary);
}

.sidebar-group .group-title {
    transition: color 0.3s ease;
}

.theme-admin .group-admin .group-title {
    color: var(--theme-primary);
    opacity: 1;
}

.theme-billing .group-billing .group-title {
    color: var(--theme-primary);
    opacity: 1;
}

.theme-horeca .group-horeca .group-title {
    color: var(--theme-primary);
    opacity: 1;
}

/* Mobile Header Styles */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0 20px;
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 992px) {
    .mobile-header {
        display: flex;
    }

    .dashboard-layout {
        padding-top: 70px;
    }
}

.mobile-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-erp .group-erp .group-title {
    color: var(--theme-primary);
    opacity: 1;
}

.theme-partner .group-partner .group-title {
    color: var(--theme-primary);
    opacity: 1;
}

.sidebar-menu-nested a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-menu-nested a:hover,
.sidebar-menu-nested a.active {
    background: var(--theme-accent);
    color: white;
}

.logout-link {
    color: #f87171 !important;
}

.logout-link i {
    color: #f87171 !important;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
}



.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Base Mobile Elements (Hidden by default on Desktop) */
.mobile-header {
    display: none !important;
}

.mobile-toggle {
    display: none !important;
}

/* Responsive Setup */
@media (max-width: 900px) {
    .mobile-menu-btn {
        display: flex !important;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #111827;
        /* Solid darker color for better contrast */
        flex-direction: column;
        padding: 0.5rem 0;
        /* Remove side padding, handle in links */
        gap: 0;
        /* Clear gap, handle with borders */
        border-bottom: 3px solid var(--primary);
        text-align: center;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
        z-index: 1001;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 16px 20px;
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        transition: all 0.2s ease;
        display: block;
        color: var(--text-main);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a:hover {
        background: rgba(139, 92, 246, 0.1);
        color: var(--primary);
    }

    .nav-container {
        padding: 0.8rem 1.2rem;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.4rem;
        flex-shrink: 0;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }

    /* Keep full text on tablets where menu is hidden */
    .btn-login .btn-text {
        display: inline;
    }

    .btn-login .login-desktop-icon {
        display: inline-flex;
    }

    .btn-login .login-mobile-icon {
        display: none;
    }

    /* Small screens: Switch to Icon as per user suggestion */
    @media (max-width: 600px) {

        .btn-login .btn-text,
        .btn-login .login-desktop-icon {
            display: none !important;
        }

        .btn-login .login-mobile-icon {
            display: inline-block !important;
            font-size: 1.25rem !important;
        }

        .btn-login {
            width: 44px !important;
            height: 44px !important;
            padding: 0 !important;
            justify-content: center !important;
            border-radius: 12px !important;
        }

        .nav-container {
            padding: 0.8rem 1rem !important;
        }
    }

    /* Extra small screens: Scale logo */
    @media (max-width: 400px) {
        .logo {
            font-size: 1.25rem !important;
        }

        .logo svg {
            width: 28px;
            height: 28px;
        }
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-content {
        text-align: center;
    }

    .about-content h2 {
        font-size: 2.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Dashboard Mobile Responsive Fixes */
    .dashboard-layout {
        flex-direction: column !important;
    }

    .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        /* Use dynamic viewport height for mobile browser bars */
        width: 280px !important;
        z-index: 2000 !important;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5) !important;
        display: flex !important;
        flex-direction: column !important;
        background: #151b2d !important;
        transform: translateX(-100%) !important;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        visibility: hidden;
        padding-bottom: 50px !important;
        /* Redus de la 80px */
    }

    .sidebar-spacer {
        height: 0 !important;
        /* Eliminat spatiul suplimentar, padding-ul e suficient */
    }

    .sidebar.active {
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    /* Hide redundant logo in sidebar on mobile as it's already in mobile-header */
    .sidebar-brand {
        display: none !important;
    }

    .mobile-toggle-close {
        display: flex !important;
    }

    .mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 15px 25px;
        background: #151b2d;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .mobile-header .logo {
        font-size: 1.3rem;
    }

    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(139, 92, 246, 0.15);
        border: 1.5px solid rgba(139, 92, 246, 0.3);
        color: white;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        cursor: pointer;
        padding: 0;
        transition: all 0.2s;
        box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2);
    }

    .mobile-toggle svg {
        transition: transform 0.2s;
    }

    .mobile-toggle:active svg {
        transform: scale(0.9);
    }

    .main-content {
        padding: 20px !important;
        width: 100% !important;
        flex: none !important;
        overflow-x: hidden;
    }

    /* Fix for tables inside containers */
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-radius: 12px;
    }

    /* Magic link / Connection controls */
    .connection-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    /* Modal scaling & Scrolling Fix */
    .modal {
        padding: 15px !important;
        overflow-y: auto !important;
        display: none;
        align-items: flex-start !important;
    }

    .modal.active,
    .modal[style*="display: flex"],
    .modal[style*="display: block"] {
        display: flex !important;
    }

    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 10px !important;
        margin-bottom: 20px !important;
        height: auto !important;
        max-height: none !important;
        border-radius: 20px !important;
        padding: 24px !important;
    }

    .profile-tab {
        padding: 12px 15px !important;
        font-size: 0.8rem !important;
    }

    /* Form rows stacking */
    .form-row {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .form-row>div {
        width: 100% !important;
        flex: none !important;
    }

    /* Top bar (title and user info) stacking */
    .top-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
        margin-bottom: 25px !important;
        width: 100% !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding-bottom: 15px !important;
    }

    .top-bar h1 {
        font-size: 1.5rem !important;
    }

    .user-profile {
        width: 100% !important;
        justify-content: flex-start !important;
        padding: 10px 15px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .profile-section form {
        grid-template-columns: 1fr !important;
    }

    .sidebar-menu-nested a {
        padding: 12px 20px !important;
        /* Larger touch target */
        font-size: 0.95rem !important;
    }
}

/* Base styles for profile tabs if not present */
.profile-tab {
    padding: 15px 25px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.profile-tab.active {
    color: white !important;
    border-bottom: 3px solid var(--primary) !important;
}