/* ============================================
   GOOWIND SHIPPING V2 - INTELLIGENCE CORE
   New Design System & Layout Components
   ============================================ */

:root {
    /* Global Palette - Mode Neutral */
    --v2-primary: #FFC700;
    /* Zeni Yellow */
    --v2-primary-rgb: 255, 199, 0;
    --v2-accent: #2B5876;
    /* Integrated Management Blue */
    --v2-accent-rgb: 43, 88, 118;

    /* Light Elite (Default) */
    --v2-bg: #ffffff;
    --v2-surface: #fdfdfe;
    --v2-surface-rgb: 253, 253, 254;
    --v2-border: rgba(0, 0, 0, 0.06);
    --v2-text: #000000;
    --v2-text-muted: #475569;
    --v2-glass: rgba(255, 255, 255, 0.9);
    --v2-glass-border: rgba(0, 0, 0, 0.05);
    --v2-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    --v2-card-blur: blur(25px);

    /* V8 Cinematic Transitions */
    --v8-transition-speed: 1.2s;
    --v8-transition-timing: cubic-bezier(0.7, 0, 0.3, 1);
}

.dark {
    --v2-bg: #020617;
    --v2-surface: #0f172a;
    --v2-surface-rgb: 15, 23, 42;
    --v2-border: rgba(255, 255, 255, 0.08);
    --v2-text: #f8fafc;
    --v2-text-muted: #94a3b8;
    --v2-glass: rgba(15, 23, 42, 0.85);
    --v2-glass-border: rgba(255, 255, 255, 0.1);
    --v2-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Bento Layout Core - Login Page */
.v2-bento-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    transition: background 0.4s ease;
}

.v2-bento-hero {
    flex: 0 0 60%;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.4s ease;
}

.dark .v2-bento-hero {
    background: #000;
}

.v2-bento-form {
    flex: 0 0 40%;
    background: var(--v2-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
    position: relative;
    border-left: 1px solid var(--v2-border);
    transition: background 0.4s ease;
}

@media (max-width: 1024px) {
    .v2-bento-wrapper {
        flex-direction: column;
        overflow-y: auto;
    }

    .v2-bento-hero {
        flex: 0 0 300px;
        width: 100%;
    }

    .v2-bento-form {
        flex: 1;
        width: 100%;
        padding: 40px 20px;
        border-left: none;
        border-top: 1px solid var(--v2-border);
    }
}

@media (max-width: 768px) {
    .v2-bento-wrapper {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }

    .v2-bento-hero {
        flex: 0 0 220px;
    }

    .v2-bento-form {
        flex: 1;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .v2-bento-hero {
        flex: 0 0 180px;
    }

    .v2-bento-form {
        padding: 24px 16px;
    }
}

/* ─── Enterprise Scale: Push UI to 110% ─── */
html {
    font-size: 110%;
}

body {
    transition: background-color 0.4s ease, color 0.4s ease;
    background-color: var(--v2-bg);
    color: var(--v2-text);
    font-size: var(--zk-text-sm, 0.875rem);
    line-height: 1.5;
}

.v2-glass {
    background: var(--v2-glass);
    backdrop-filter: var(--v2-card-blur);
    border: 1px solid var(--v2-glass-border);
    border-radius: 20px;
    box-shadow: var(--v2-shadow);
}

/* ============================================
   STATUS INDICATORS (pulse animation)
   ============================================ */
@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* ============================================
   ZENI-TRANSITION FRAMEWORK (V8)
   ============================================ */
.zeni-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.zeni-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* V8 Elite Dashboard Components */
.v8-card {
    background: var(--v2-glass);
    backdrop-filter: var(--v2-card-blur);
    border: 1px solid var(--v2-glass-border);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.4s ease;
}

.v8-card:hover {
    transform: translateY(-3px);
    border-color: var(--v2-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.dark .v8-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   ZENIKIT DOCK RE-STYLED (Moved from base.html)
   ============================================ */
.zk-dock-arrow {
    width: 32px;
    height: 52px;
    min-width: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.zk-dock-arrow:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.zk-dock-arrow svg {
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.zk-dock-arrow-l {
    border-radius: 14px 0 0 14px;
}

.zk-dock-arrow-r {
    border-radius: 0 14px 14px 0;
}

.zk-dock-container.has-overflow .zk-dock-arrow {
    display: flex;
}

.zk-dock-container.at-start .zk-dock-arrow-l,
.zk-dock-container.at-end .zk-dock-arrow-r {
    opacity: 0.3;
    pointer-events: none;
}

.zk-dock {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.zk-dock::-webkit-scrollbar {
    display: none;
}

.dark .zk-dock,
.dark .zk-dock-arrow {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.06);
}

/* Full-width dock when no overflow */
.zk-dock-container:not(.has-overflow) .zk-dock {
    border-radius: 14px;
    border: 1px solid var(--border-color);
    justify-content: center;
}

.zk-dock-container.has-overflow .zk-dock {
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.zk-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 10px;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.zk-dock-item:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.zk-dock-item svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.zk-dock-label {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.zk-dock-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    background: var(--brand-red, #ef4444);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Active dock item */
.zk-dock-item[aria-current="page"] {
    color: var(--brand-yellow, #eab308);
}

.zk-dock-item[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: 1px;
    width: 4px;
    height: 4px;
    background: var(--brand-yellow, #eab308);
    border-radius: 50%;
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {
    .zk-dock-arrow {
        display: flex;
    }

    .zk-dock {
        scroll-snap-type: x mandatory;
    }

    .zk-dock-item {
        min-width: calc((100% - 1rem) / 5);
        scroll-snap-align: start;
        padding: 5px 7px;
    }

    .zk-dock-label {
        display: none;
        font-size: 0.52rem;
    }

    .zk-dock-item svg {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   THEME RIPPLE BUBBLE (VIEW TRANSITIONS API)
   ============================================ */
::view-transition-group(root) {
    animation-timing-function: cubic-bezier(0.2, 0, 0.2, 1);
}

::view-transition-new(root) {
    animation: zk-reveal-light 0.8s forwards;
}

::view-transition-old(root),
.dark::view-transition-old(root) {
    animation: none;
    z-index: -1;
}

.dark::view-transition-new(root) {
    animation: zk-reveal-dark 0.8s forwards;
}

@keyframes zk-reveal-light {
    from {
        clip-path: circle(0% at var(--click-x, 50%) var(--click-y, 50%));
    }

    to {
        clip-path: circle(150% at var(--click-x, 50%) var(--click-y, 50%));
    }
}

@keyframes zk-reveal-dark {
    from {
        clip-path: circle(0% at var(--click-x, 50%) var(--click-y, 50%));
    }

    to {
        clip-path: circle(150% at var(--click-x, 50%) var(--click-y, 50%));
    }
}