/* Jira-style Layout with White Theme */
:root {
    --sidebar-width: 260px;
    --navbar-height: 48px;
    --primary-color: #144690;
    --primary-hover: #0747a6;
    --secondary-color: #42526e;
    --text-primary: #172b4d;
    --text-secondary: #011a45;
    --text-muted: #97a0af;
    --border-color: #dfe1e6;
    --border-light: #f4f5f7;
    --background-primary: #ffffff;
    --background-secondary: #fafbfc;
    --background-hover: #f4f5f7;
    --background-active: #deebff;
    --shadow-sm: 0 1px 3px rgba(9, 30, 66, 0.13);
    --shadow-md: 0 4px 8px rgba(9, 30, 66, 0.13);
    --shadow-lg: 0 8px 16px rgba(9, 30, 66, 0.13);
    --transition-speed: 0.2s;
    --border-radius: 3px;
    --border-radius-lg: 6px;
}

body {
    background-color: var(--background-secondary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
    padding-top: var(--navbar-height);
}

/* Global Fixed Navbar */
.global-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--background-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.navbar-left {
    display: flex;
    align-items: center;
    min-width: 200px;
}

.navbar-left .logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-left .logo-icon {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.navbar-left .logo-icon:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.navbar-left .logo-icon:active {
    transform: scale(0.95);
}

.navbar-left .logo-icon i {
    transition: transform var(--transition-speed) ease;
}

.navbar-left h5 {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.navbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Navigation Links in Navbar */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links .nav-link {
    color: var(--text-secondary);
    padding: 8px 12px;
    transition: all var(--transition-speed) ease;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
    width: 36px;
    height: 36px;
}

.nav-links .nav-link:hover {
    color: var(--text-primary);
    background: var(--background-hover);
    text-decoration: none;
}

.nav-links .nav-link.active {
    color: var(--primary-color);
    background: var(--background-active);
}

.nav-links .nav-link i {
    font-size: 16px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.auth-button, .user-info-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    text-decoration: none;
}

.auth-button:hover, .user-info-button:hover {
    background: var(--background-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform var(--transition-speed) ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 9999;
    padding: 4px 0;
    margin: 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: var(--background-hover);
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-item i {
    width: 16px;
    font-size: 14px;
    flex-shrink: 0;
}

/* Main Container */
.main-container {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
}

/* Sidebar Container */
.sidebar-container {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    z-index: 1040;
    overflow-y: auto;
    transition: left var(--transition-speed) ease-in-out;
    background: var(--background-primary);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Main Content Area */
.main-content-area {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: margin-left var(--transition-speed) ease-in-out, width var(--transition-speed) ease-in-out;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--navbar-height));
}

/* Sidebar Styles */
.sidebar {
    height: 100%;
    background: var(--background-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

/* Sidebar Auth Section */
.sidebar-auth {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-secondary);
}

/* Form Styles */
.form-control {
    background-color: var(--background-primary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    font-size: 14px;
    transition: all var(--transition-speed) ease;
}

.form-control:focus {
    background-color: var(--background-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
    color: var(--text-primary);
    outline: none;
}

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

.form-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    transform: none;
    box-shadow: var(--shadow-sm);
}

.btn-outline-primary {
    background: var(--background-active);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

.btn-outline-info {
    background: #e3f7ff;
    color: #0065ff;
    border: 1px solid #0065ff;
}

.btn-outline-info:hover {
    background: #0065ff;
    color: white;
    border-color: #0065ff;
}

.btn-outline-light {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

.btn-success {
    background: #36b37e;
    color: white;
    border: 1px solid #36b37e;
}

.btn-success:hover {
    background: #00875a;
    border-color: #00875a;
    color: white;
}

/* Navigation Links */
.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    margin: 2px 8px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: var(--background-hover);
    text-decoration: none;
}

.sidebar-link.active {
    color: var(--primary-color);
    background: var(--background-active);
    font-weight: 600;
}

.sidebar-link i {
    width: 20px;
    font-size: 16px;
    margin-right: 12px;
    text-align: center;
}

/* Global Navbar Links */
.nav-link {
    color: var(--text-secondary);
    padding: 8px 12px;
    transition: all var(--transition-speed) ease;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--background-hover);
    text-decoration: none;
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--background-active);
}

.navbar-toggler {
    border: none;
    padding: 8px;
    border-radius: var(--border-radius);
    background: var(--background-hover);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.navbar-toggler i {
    font-size: 14px;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
}

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

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.user-status {
    font-size: 12px;
    color: var(--text-muted);
}

/* Content Body */
.content-body {
    background: #ffffff;
    flex: 1;
    padding: 16px;
}

/* Footer */
.footer {
    background: var(--background-primary);
    border-top: 1px solid var(--border-color);
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .sidebar-container {
        left: -100%;
        width: 280px;
        z-index: 1050;
    }

    .sidebar-container.show {
        left: 0;
    }

    .main-content-area {
        margin-left: 0;
        width: 100%;
    }

    .navbar-left {
        min-width: auto;
    }

    .navbar-right {
        min-width: auto;
    }

    .navbar-center {
        display: none;
    }

    /* Mobile dropdown adjustments */
    .global-navbar .dropdown-menu {
        right: 0 !important;
        left: auto !important;
        min-width: 140px !important;
    }

    .global-navbar .dropdown:hover .dropdown-menu {
        display: block !important;
    }
}

/* Touch device support for dropdown */
@media (hover: none) and (pointer: coarse) {
    .global-navbar .dropdown-menu {
        display: none !important;
    }
    
    .global-navbar .dropdown.active .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Additional Utility Classes */
.text-light {
    color: var(--text-secondary) !important;
}

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

.bg-transparent {
    background-color: transparent !important;
}

.border-end-0 {
    border-right: 0 !important;
}

.border-start-0 {
    border-left: 0 !important;
}

.input-group-text {
    background: var(--background-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    font-size: 14px;
}

.input-group .form-control {
    border-left: 0;
}

.input-group .input-group-text {
    border-right: 0;
}

/* Loading and Disabled States */
.loading-spinner {
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* User Info Compact */
.user-info-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: 600;
}

.user-name-sm {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--border-radius);
}
.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: rgb(0 0 0 / 50%);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    margin-bottom: 4px;
}

.sidebar-nav {
    padding: 16px 0;
}

.sidebar-link {
    margin: 0 8px;
    border-radius: var(--border-radius);
}

.sidebar-link:hover {
    background: var(--background-hover);
}

.sidebar-link.active {
    background: var(--background-active);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-link i {
    width: 20px;
    font-size: 16px;
    margin-right: 12px;
    text-align: center;
}

.sidebar-link span {
    font-size: 14px;
    font-weight: 500;
}

.dropdown-menu[data-bs-popper] {
    display: none !important;
}

/* Ensure our dropdown works */
.global-navbar .dropdown-menu {
    display: block !important;
    position: absolute !important;
    float: none !important;
    transform: none !important;
}

.global-navbar .dropdown:hover .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Additional dropdown fixes */
.global-navbar .dropdown {
    position: relative !important;
}

.global-navbar .dropdown-menu {
    margin-top: 4px !important;
    border: 1px solid var(--border-color) !important;
    background-color: var(--background-primary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Sidebar Collapsed State */
.sidebar-container.collapsed {
    left: calc(-1 * var(--sidebar-width));
}

.main-content-area.expanded {
    margin-left: 0;
    width: 100%;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1039;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}