/* ============================================
   Jeetofy Workplace - Modern SaaS Dashboard
   Clean, professional, enterprise-ready design
   ============================================ */

/* Top Navigation Bar */
.workplace-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(49, 46, 129, 0.95) 100%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 72px;
    position: relative;
}

.workplace-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-indigo) 0%, var(--primary-purple) 100%);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    height: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacing-lg);
    align-items: center;
    position: relative;
    z-index: 1;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    color: white;
    font-weight: 700;
}

/* Center: Search Bar */
.nav-center {
    display: flex;
    justify-content: center;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.main-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    transition: all 0.2s ease;
    font-weight: 400;
}

.main-search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.main-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 2px;
    pointer-events: none;
}

.search-shortcut kbd {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Right: User Info */
.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-info {
    text-align: right;
    display: none;
}

.user-greeting {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.user-institution {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.8);
}

.user-profile-dropdown {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs);
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-indigo) 0%, var(--primary-purple) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-base);
}

.dropdown-arrow {
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
}

.user-profile-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--spacing-xs));
    right: 0;
    min-width: 240px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-profile-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-user-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.dropdown-user-email {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: var(--spacing-xs) 0;
}

.dropdown-item {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-dark);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f9fafb;
}

/* Main Content Area */
.workplace-main {
    min-height: calc(100vh - 72px);
    background: white;
    padding: var(--spacing-lg) 0;
    padding-bottom: 100px;
}

.workplace-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Section Titles */
.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 var(--spacing-lg) 0;
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

/* Command Center */
.command-center {
    margin-bottom: var(--spacing-2xl);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(79, 70, 229, 0.12) 100%);
    border-radius: 24px;
    padding: var(--spacing-2xl);
    position: relative;
    overflow: hidden;
}

.command-center::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.command-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.command-tile {
    background: white;
    border-radius: 16px;
    padding: var(--spacing-md);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.command-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-indigo) 0%, var(--primary-purple) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.command-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.1);
    border-color: #e5e7eb;
}

.command-tile:hover::before {
    opacity: 1;
}

.command-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-xs);
}

.command-icon-emoji {
    font-size: 28px;
    line-height: 1;
}

.command-info {
    flex: 1;
}

.command-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.command-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
}

.command-description {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
    margin: 0;
}

.command-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-indigo) 0%, var(--primary-purple) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.command-tile:hover .command-arrow {
    transform: scale(1.1);
}

/* App List (Vertical Rows) */
.app-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.app-row {
    background: white;
    border-radius: 12px;
    padding: var(--spacing-md) var(--spacing-lg);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
}

.app-row:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
    border-color: #e5e7eb;
}

.app-row-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-row-icon-emoji {
    font-size: 24px;
    line-height: 1;
}

.app-row-info {
    flex: 1;
    min-width: 0;
}

.app-row-name {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 2px 0;
}

.app-row-description {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
    margin: 0;
}

.app-row-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    pointer-events: none;
}

.app-row:hover .app-row-arrow {
    background: linear-gradient(135deg, var(--primary-indigo) 0%, var(--primary-purple) 100%);
    color: white;
    transform: translateX(2px);
}

/* App Sections */
.app-section {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(79, 70, 229, 0.12) 100%);
    border-radius: 24px;
    padding: var(--spacing-2xl);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--spacing-2xl);
}

.app-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.recent-apps {
    margin-bottom: var(--spacing-2xl);
}

/* App Launcher Drawer */
.app-launcher-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.app-launcher-drawer.active {
    opacity: 1;
    visibility: visible;
}

.drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.drawer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid #e5e7eb;
}

.drawer-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.drawer-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-gray);
    transition: all 0.2s ease;
}

.drawer-close:hover {
    background: #f3f4f6;
    color: var(--text-dark);
}

.drawer-search {
    position: relative;
    padding: var(--spacing-lg);
    border-bottom: 1px solid #e5e7eb;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    background: #f9fafb;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: white;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-icon {
    position: absolute;
    left: calc(var(--spacing-lg) + 16px);
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

.drawer-category {
    margin-bottom: var(--spacing-xl);
}

.drawer-category:last-child {
    margin-bottom: 0;
}

.drawer-category-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 var(--spacing-md) 0;
}

.drawer-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-md);
}

.drawer-app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
}

.drawer-app-card:hover {
    border-color: var(--primary-purple);
    background: #faf5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.15);
}

.drawer-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-app-icon-emoji {
    font-size: 24px;
    line-height: 1;
}

.drawer-app-name {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
}

.drawer-app-card.hidden {
    display: none;
}

.drawer-category:not(:has(.drawer-app-card:not(.hidden))) {
    display: none;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    display: none;
    z-index: 99;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--spacing-sm);
    border: none;
    background: transparent;
    text-decoration: none;
    color: var(--text-gray);
    font-size: var(--font-size-xs);
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease;
}

.mobile-nav-item.active {
    color: var(--primary-purple);
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
}

.mobile-notification-badge {
    position: absolute;
    top: 8px;
    right: calc(50% - 20px);
    width: 16px;
    height: 16px;
    background: var(--accent-rose);
    color: white;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Responsive Design */
@media (min-width: 768px) {
    .user-info {
        display: block;
    }
}

@media (max-width: 768px) {
    .workplace-nav {
        height: 64px;
    }

    .nav-container {
        grid-template-columns: auto 1fr auto;
        gap: var(--spacing-sm);
        padding: 0 var(--spacing-md);
    }

    .logo-text {
        display: none;
    }

    .nav-center {
        max-width: none;
    }

    .search-wrapper {
        max-width: none;
    }

    .search-shortcut {
        display: none;
    }

    .workplace-container {
        padding: 0 var(--spacing-md);
    }

    .command-tiles {
        grid-template-columns: 1fr;
    }
    
    .user-info {
        display: none;
    }

    .drawer-content {
        width: 95%;
        max-height: 85vh;
    }

    .drawer-apps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .workplace-main {
        padding-bottom: 100px;
    }
}

@media (max-width: 480px) {
    .command-tiles {
        grid-template-columns: 1fr;
    }

    .drawer-apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
