:root {
    --primary: #00bcd4;
    --primary-dark: #0097a7;
    --secondary: #26c6da;
    --accent: #4dd0e1;
    --bg-main: #f8fafc;
    --text-main: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --gradient-side: linear-gradient(135deg, #26c6da 0%, #1e88e5 100%);
    --gradient-app: linear-gradient(180deg, #0284c7 0%, #075985 100%);
    --company-header-bg: #e2e8f0;
}

body {
    background: var(--bg-main);
    font-family: 'Outfit', 'Inter', sans-serif;
    color: var(--text-main);
    margin: 0;
    overflow-x: hidden;
}

/* Auth Layout (Split Screen on Desktop) */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: white;
}

.auth-side-decor {
    flex: 1;
    background: var(--gradient-side);
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    color: white;
    padding: 100px 60px;
}

.auth-side-form {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 32px;
    padding: 60px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.mobile-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--gradient-side);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(38, 198, 218, 0.2);
}

.mobile-header h3 {
    font-weight: 800;
    color: white;
    margin: 0;
    letter-spacing: -0.5px;
}

@media (max-width: 992px) {
    .auth-side-decor {
        display: none;
    }

    .auth-wrapper {
        background: var(--bg-main) !important;
        padding: 20px;
        align-items: center;
        justify-content: center;
    }

    .auth-side-form {
        flex: none;
        width: 100%;
        padding: 0;
    }

    .auth-container {
        padding: 40px 30px;
    }
}

/* Geometric Patterns */
.decor-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -50px;
    left: -50px;
    border: 40px solid rgba(255, 255, 255, 0.05);
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: 50px;
    right: -30px;
    background: rgba(255, 255, 255, 0.08);
}

.circle-3 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 15%;
    border: 20px solid rgba(255, 255, 255, 0.05);
}

.decor-dots {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.3) 2px, transparent 2px);
    background-size: 15px 15px;
}

.dots-1 {
    bottom: 10%;
    left: 10%;
}

.dots-2 {
    top: 15%;
    right: 10%;
}

.decor-content {
    position: relative;
    z-index: 10;
    max-width: 500px;
}

.decor-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.decor-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

.auth-header {
    margin-bottom: 40px;
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-main);
}

.auth-header p {
    color: var(--text-light);
}

.form-group-custom {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-light);
}

.modern-input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 1rem;
    transition: all 0.2s;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.1);
}

.btn-primary-custom {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: var(--gradient-side);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.company-header-custom {
    background: var(--gradient-side) !important;
    color: white !important;
    margin: -1px -1px 0 -1px !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(30, 136, 229, 0.2);
}

.btn-outline-custom {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-outline-custom:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.tenant-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    color: #0369a1;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.registration-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: block;
}

.registration-card {
    width: 100%;
    min-width: 100%;
    padding: 40px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.sidebar {
    width: 280px;
    background: var(--gradient-app);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    color: white;
}
.logo-section {
    margin-bottom: 25px;
}

.logo-section h2 {
    font-size: 1.8rem;
    margin-bottom: 90px;
    color: white;
}

.logo-section h2 span {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-link i {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.nav-link.active i {
    color: white;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    background: var(--bg-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: 80px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 90;
    color: var(--text-main);
}

.content-wrapper {
    padding: 40px;
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #f0f9ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

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

.user-role {
    font-size: 0.8rem;
    color: var(--text-light);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--primary);
    background: white;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Hamburguer menu buttons */
.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hamburger-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
}

.hamburger-menu-btn:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.close-sidebar-btn {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Sidebar overlay/backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    animation: fadeIn 0.2s ease-out;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
    }

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

    .close-sidebar-btn {
        display: flex;
    }

    .hamburger-menu-btn {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .top-bar {
        padding: 0 20px;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .user-details {
        display: none;
    }
    
    .logout-btn span {
        display: none;
    }
    
    .logout-btn {
        padding: 8px 12px;
    }
}

/* Global Language Selector Tabs */
.btn-lang-tab {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.72rem;
    padding: 2px 8px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease-in-out;
}

.btn-lang-tab:hover {
    background: #e2e8f0;
    color: #334155;
}

.btn-lang-tab.active {
    background: var(--primary, #6366f1);
    color: #ffffff;
    border-color: var(--primary, #6366f1);
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.filled {
    background: #10b981;
}

.btn-lang-tab.active .status-dot.filled {
    background: #ffffff;
}

.lang-tab-text {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Custom Pagination */
.pagination-custom .page-link {
    border-radius: 8px;
    margin: 0 4px;
    border: 1px solid #e2e8f0;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-custom .page-item.active .page-link {
    background: var(--gradient-side);
    border-color: transparent;
    color: white;
}

.pagination-custom .page-link:hover:not(.active) {
    background: #f8fafc;
    color: var(--primary);
    border-color: #cbd5e1;
}

.pagination-custom .page-item.disabled .page-link {
    background: #ffffff;
    color: #94a3b8;
    border-color: #e2e8f0;
    opacity: 0.7;
}

/* Custom Nav Tabs styling to avoid side effects from global nav-link styles */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0 !important;
}

.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0 !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    transform: none !important;
    gap: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: none !important;
}

.nav-tabs .nav-link:hover {
    color: #1e293b !important;
    background: #f8fafc !important;
    transform: none !important;
}

.nav-tabs .nav-link.active {
    color: var(--primary, #6366f1) !important;
    background: transparent !important;
    border-bottom: 2px solid var(--primary, #6366f1) !important;
    font-weight: 700 !important;
}