/* ===================================
   GLOBAL STYLES
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #e0e5ec;
    display: flex;
    font-family: Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
    position: relative;
    width: 100vw;
}

/* ===================================
   LAYOUT
   =================================== */

.container {
    align-items: flex-start;
    display: flex;
    flex: 1;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem;

    #app {
        max-width: 1280px;
        width: 100%;
    }
}

/* ===================================
   NAVIGATION
   =================================== */

.hamburger {
    align-items: center;
    background: #e0e5ec;
    border: 1px solid rgba(163, 177, 198, 0.2);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.6),
        -8px -8px 16px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: none;
    height: 50px;
    justify-content: center;
    left: 1rem;
    padding: 0;
    position: fixed;
    top: 1rem;
    transition: all 0.3s;
    width: 50px;
    z-index: 1000;

    svg {
        color: #333;
        height: 24px;
        transition: all 0.3s;
        width: 24px;
    }

    .hamburger-icon {
        display: block;
    }

    .close-icon {
        display: none;
    }

    &.active {
        .hamburger-icon {
            display: none;
        }

        .close-icon {
            display: block;
        }
    }
}

.neu-nav {
    background: #e0e5ec;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.6),
        -8px -8px 16px rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 2rem 1rem;
    width: 380px;
    min-width: 380px;
    transition: transform 0.3s ease-in-out;

    .neu-nav-btn {
        background: #e0e5ec;
        border: none;
        color: #333;
        cursor: pointer;
        font-size: 1rem;
        font-weight: 500;
        padding: 0.75rem 1rem;
        text-align: center;
        transition: all 0.2s;

        &:hover {
            background: #ff8c00;
            box-shadow:
                2px 2px 6px rgba(0, 0, 0, 0.3),
                -2px -2px 6px rgba(255, 165, 0, 0.2);
            cursor: pointer;
        }

        &.active {
            background: #ff8c00;
            box-shadow:
                inset 4px 4px 8px rgba(0, 0, 0, 0.3),
                inset -2px -2px 6px rgba(255, 165, 0, 0.2);
            cursor: pointer;
        }
    }
}

/* ===================================
   PAGE STRUCTURE
   =================================== */

.page {
    width: 100%;

    .page-title {
        color: #333;
        text-align: left;
    }

    .page-subtitle {
        color: #333;
        margin-bottom: 2rem;
        text-align: left;
    }
}

.org-header {
    align-items: center;
    border-bottom: 1px solid rgba(163, 177, 198, 0.2);
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1rem;

    .org-stats {
        align-items: center;
        display: flex;
        gap: 1.5rem;
        flex-wrap: wrap;

        span {
            color: #666;
            font-size: 0.9rem;
            white-space: nowrap;

            strong {
                color: #ff8c00;
                font-size: 1.1rem;
            }
        }
    }
}

/* ===================================
   GRIDS
   =================================== */

.widget-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
}

.members-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
}

/* ===================================
   NEOMORPHIC COMPONENTS
   =================================== */

.neu-widget {
    background: #e0e5ec;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.6),
        -8px -8px 16px rgba(255, 255, 255, 0.5);
    display: grid;
    gap: 1rem;
    grid-template-rows: 1fr auto;
    padding: 1.5rem;
    transition: all 0.3s;

    .neu-widget-header {
        border-bottom: 1px solid rgba(163, 177, 198, 0.2);
        flex: 1;
        padding-bottom: 1rem;

        h3 {
            color: #333;
            font-size: 1.25rem;
        }
    }

    .neu-widget-body {
        color: #666;
        display: grid;
        gap: 1rem;
        grid-template-rows: auto;

        .widget-stat {
            color: #333;
            font-size: 2rem;
            font-weight: bold;
            text-align: center;
        }

        .widget-text {
            font-size: 1rem;
        }
    }
}

.neu-card {
    background: #e0e5ec;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.6),
        -8px -8px 16px rgba(255, 255, 255, 0.5);
    display: grid;
    gap: 1rem;
    grid-template-rows: auto 1fr auto;
    padding: 1.5rem;
    transition: all 0.3s;

    .neu-card-header {
        align-items: center;
        border-bottom: 1px solid rgba(163, 177, 198, 0.2);
        display: flex;
        justify-content: space-between;
        padding-bottom: 1rem;

        h3 {
            color: #333;
            font-size: 1.25rem;
        }
    }

    .neu-card-body {
        color: #666;
        display: grid;
        gap: 1rem;
        grid-template-rows: 1fr auto;

        .member-rank {
            color: #666;
            font-size: 0.95rem;
        }

        .member-status {
            align-items: center;
            color: #333;
            display: inline-flex;
            font-size: 0.85rem;
            font-weight: 600;
            gap: 0.5rem;
            overflow: hidden;
            position: relative;
            width: 32px;

            &::before {
                align-items: center;
                background: #e0e5ec;
                border-radius: 50%;
                box-shadow:
                    inset 4px 4px 8px rgba(163, 177, 198, 0.6),
                    inset -4px -4px 8px rgba(255, 255, 255, 0.5);
                content: '';
                display: flex;
                flex-shrink: 0;
                height: 32px;
                justify-content: center;
                width: 32px;
            }

            &::after {
                border-radius: 50%;
                box-shadow:
                    -2px -2px 6px rgba(255, 255, 255, 0.7),
                    2px 2px 6px rgba(163, 177, 198, 0.5);
                content: '';
                height: 16px;
                left: 8px;
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                width: 16px;
            }

            &.online::after {
                background: #4caf50;
            }

            &.offline::after {
                background: #f44336;
            }
        }
    }
}

/* ===================================
   MISSIONS
   =================================== */

.missions-list {
    display: grid;
    gap: 1.5rem;
    grid-template-rows: 1fr;

    .mission-card {
        .mission-date {
            color: #999;
            font-size: 0.9rem;
        }

        .mission-stats {
            align-items: center;
            border-top: 1px solid rgba(163, 177, 198, 0.2);
            display: flex;
            justify-content: space-between;
            padding-top: 1rem;

            .mission-status {
                align-items: center;
                color: #333;
                display: inline-flex;
                gap: 0.5rem;
                font-size: 0.85rem;
                font-weight: 600;
                overflow: hidden;
                position: relative;
                text-transform: uppercase;
                width: 32px;

                &::before {
                    align-items: center;
                    background: #e0e5ec;
                    border-radius: 50%;
                    box-shadow:
                        inset 4px 4px 8px rgba(163, 177, 198, 0.6),
                        inset -4px -4px 8px rgba(255, 255, 255, 0.5);
                    content: '';
                    display: flex;
                    justify-content: center;
                    flex-shrink: 0;
                    height: 32px;
                    width: 32px;
                }

                &::after {
                    border-radius: 50%;
                    box-shadow:
                        -2px -2px 6px rgba(255, 255, 255, 0.7),
                        2px 2px 6px rgba(163, 177, 198, 0.5);
                    content: '';
                    height: 16px;
                    left: 8px;
                    position: absolute;
                    top: 50%;
                    transform: translateY(-50%);
                    width: 16px;
                }

                &.failed::after {
                    background: #f44336;
                }

                &.partial::after {
                    background: #ffc107;
                }

                &.success::after {
                    background: #4caf50;
                }
            }
        }
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .widget-grid,
    .members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .hamburger {
        display: flex;
    }

    .neu-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        min-width: 100%;
        height: auto;
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 1.5rem 1.5rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid #ffffff20;
        box-shadow:
            0 8px 16px rgba(163, 177, 198, 0.6),
            0 -8px 16px rgba(255, 255, 255, 0.5);
        transform: translateY(-100%);
        z-index: 999;

        &.open {
            transform: translateY(0);
        }

        .neu-nav-btn {
            width: 100%;
            box-sizing: border-box;
        }
    }

    .container {
        padding: 1rem;
        margin-top: 4rem;
        transition: margin-top 0.3s ease-in-out;
    }

    body:has(.neu-nav.open) .container {
        margin-top: 250px;
    }

    .org-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;

        .page-title {
            font-size: 1.5rem;
        }

        .org-stats {
            gap: 1rem;
            justify-content: flex-start;
            width: 100%;

            span {
                font-size: 0.85rem;

                strong {
                    font-size: 1rem;
                }
            }
        }
    }

    .widget-grid,
    .members-grid {
        grid-template-columns: 1fr;
    }

    .page {
        .page-subtitle {
            text-align: center;
        }
    }
}
