/* ============================================
   DYNAMIC ISLAND NAVIGATION - FINAL LAYOUT
   Based on User Screenshot
   ============================================ */

:root {
    --island-blue: #0066FF;
    --island-cyan: #00D4FF;
    --hover-blue: #0052CC;
    --active-blue: #0066FF;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f0fe 100%);
    min-height: 100vh;
}

.system-wrapper {
    position: relative;
    min-height: 100vh;
    padding-top: 140px;
}

/* ============================================
   DYNAMIC ISLAND CONTAINER
   ============================================ */
.dynamic-island-nav {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: calc(100% - 4rem);
    max-width: calc(1400px - 4rem);
}

/* ============================================
   MENU HORIZONTAL (Top)
   ============================================ */
.island-menu-horizontal-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 0.3rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    box-shadow: 0 6px 24px rgba(0, 102, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.9);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
}

.island-menu-horizontal-bar::-webkit-scrollbar {
    display: none;
}

.menu-item-island {
    padding: 0.4rem 1rem;
    border-radius: 40px;
    color: #6c757d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    position: relative;
    border: 2px solid transparent;
}

.menu-item-island i {
    font-size: 0.9rem;
}

.menu-item-island:hover {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.12), rgba(0, 212, 255, 0.12));
    color: var(--island-blue);
    transform: translateY(-2px);
    border-color: rgba(0, 102, 255, 0.2);
}

.menu-item-island.active {
    background: linear-gradient(135deg, var(--island-blue), var(--island-cyan));
    color: white;
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.4);
    border-color: transparent;
}

/* ============================================
   THE DYNAMIC ISLAND (Bottom, Large with User)
   ============================================ */
.the-dynamic-island {
    background: linear-gradient(135deg, var(--island-blue), var(--island-cyan));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    box-shadow: 0 8px 32px rgba(0, 102, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.25);
    width: 100%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.the-dynamic-island:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 102, 255, 0.45);
}

/* Left: Logo & System Info */
.island-branding-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.island-logo-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    padding: 2px;
}

.island-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.island-logo-placeholder {
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
}

.island-system-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.island-system-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.island-system-tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Middle: User Profile */
.island-user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: center;
}

.island-user-avatar-big {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.island-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.island-user-name-big {
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.island-user-meta-big {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
}

.island-position {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.island-dot {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.island-role-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.3rem 0.9rem;
    border-radius: 25px;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.8px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

/* Right: Actions */
.island-actions-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-lihat-public-in-island {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.btn-lihat-public-in-island:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-keluar-in-island {
    background: linear-gradient(135deg, #dc3545, #ff6b7a);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(220, 53, 69, 0.3);
}

.btn-keluar-in-island:hover {
    background: linear-gradient(135deg, #c82333, #e85566);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.4);
    color: white;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content-island {
    padding: 2rem;
    width: calc(100% - 4rem);
    max-width: calc(1400px - 4rem);
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
.island-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--island-blue), var(--island-cyan));
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.4);
    z-index: 1001;
    transition: all 0.3s ease;
}

.island-mobile-toggle:hover {
    transform: scale(1.1);
}

.island-mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.island-mobile-drawer.active {
    right: 0;
}

.island-mobile-header {
    background: linear-gradient(135deg, var(--island-blue), var(--island-cyan));
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.island-mobile-header .island-user-avatar-big {
    border: 2px solid white;
}

.island-mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.island-mobile-menu .menu-item-island {
    width: 100%;
    justify-content: flex-start;
    padding: 1rem 1.5rem;
}

.island-mobile-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(0, 102, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.island-mobile-footer .btn-lihat-public-in-island,
.island-mobile-footer .btn-keluar-in-island {
    width: 100%;
    justify-content: center;
}

.island-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 1001;
    transition: all 0.3s ease;
}

.island-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   TABLET & MOBILE
   ============================================ */
@media (max-width: 1200px) {
    .the-dynamic-island {
        padding: 1.5rem 2rem;
    }

    .island-user-name-big {
        font-size: 1.15rem;
    }

    .menu-item-island {
        padding: 0.7rem 1.3rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .system-wrapper {
        padding-top: 20px;
    }

    .dynamic-island-nav {
        display: none;
    }

    .island-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-content-island {
        padding: 1rem;
        padding-bottom: 100px;
    }
}

@media (max-width: 480px) {
    .island-mobile-drawer {
        width: 280px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.dynamic-island-nav {
    animation: slideDown 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}