/* GiMi Productivity Suite — Unified Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --gimi-bg-deep: #06080f;
    --gimi-bg-base: #0a0e1a;
    --gimi-surface: rgba(15, 23, 42, 0.72);
    --gimi-surface-solid: #111827;
    --gimi-surface-elevated: rgba(30, 41, 59, 0.85);
    --gimi-border: rgba(148, 163, 184, 0.12);
    --gimi-border-bright: rgba(34, 211, 238, 0.25);
    --gimi-accent: #22d3ee;
    --gimi-accent-2: #818cf8;
    --gimi-accent-3: #a855f7;
    --gimi-text: #f1f5f9;
    --gimi-text-muted: #94a3b8;
    --gimi-shadow-3d: 0 4px 6px -1px rgba(0,0,0,0.4), 0 12px 28px -4px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
    --gimi-shadow-float: 0 20px 50px -12px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.04);
    --gimi-shadow-glow: 0 0 40px -8px rgba(34, 211, 238, 0.35);
    --gimi-radius-lg: 1.25rem;
    --gimi-radius-xl: 1.5rem;
    --gimi-font: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

/* ── Base App Shell ── */
.gimi-app,
.gimi-app * {
    font-family: var(--gimi-font);
}

.gimi-app {
    background: var(--gimi-bg-deep) !important;
    color: var(--gimi-text);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

.gimi-app::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(34, 211, 238, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(168, 85, 247, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 0%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        linear-gradient(165deg, #06080f 0%, #0a0e1a 40%, #0d1220 100%);
}

.gimi-app > *:not(#login-overlay):not(#loginScreen):not(.gimi-login-backdrop):not(#sidebar-expand-btn):not(.gimi-expand-btn) {
    position: relative;
    z-index: 1;
}

/* Keep modal overlays fixed on top of the board — not inline after the DONE column */
.gimi-app > .fixed,
.gimi-app > .gimi-modal-overlay {
    position: fixed !important;
}

/* ── Login Screen ── */
#login-overlay,
#loginScreen,
.gimi-login-backdrop {
    background: rgba(6, 8, 15, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.gimi-login-card {
    background: var(--gimi-surface) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--gimi-border-bright) !important;
    border-radius: var(--gimi-radius-xl) !important;
    box-shadow: var(--gimi-shadow-float), var(--gimi-shadow-glow);
    position: relative;
    overflow: hidden;
}

.gimi-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,0.5), rgba(168,85,247,0.5), transparent);
}

.gimi-logo-wrap {
    width: auto;
    max-width: 280px;
    height: auto;
    min-height: 80px;
    margin: 0 auto 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(30,41,59,0.9), rgba(15,23,42,0.95));
    border: 1px solid var(--gimi-border-bright);
    box-shadow: var(--gimi-shadow-3d), 0 0 30px -5px rgba(34,211,238,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gimi-logo-wrap img,
.gimi-logo-wrap svg {
    width: auto;
    max-width: 100%;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(34,211,238,0.3));
}

.gimi-brand-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #f1f5f9 0%, #22d3ee 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gimi-brand-sub {
    color: var(--gimi-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.gimi-input {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid var(--gimi-border) !important;
    border-radius: var(--gimi-radius-lg) !important;
    color: var(--gimi-text) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.gimi-input:focus {
    border-color: var(--gimi-accent) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 0 3px rgba(34,211,238,0.15), 0 0 20px -5px rgba(34,211,238,0.3);
    outline: none !important;
}

.gimi-btn-primary {
    background: linear-gradient(135deg, #22d3ee 0%, #6366f1 50%, #818cf8 100%) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: var(--gimi-radius-lg) !important;
    box-shadow: 0 4px 14px -2px rgba(34,211,238,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gimi-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -4px rgba(34,211,238,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
    filter: brightness(1.08);
}

.gimi-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px -2px rgba(34,211,238,0.4), inset 0 2px 4px rgba(0,0,0,0.15);
}

/* ── Sidebars ── */
.gimi-sidebar,
#sidebar,
#tools-sidebar,
#toc-sidebar,
#projectSidebar,
.project-sidebar {
    background: var(--gimi-surface) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--gimi-border) !important;
    box-shadow: 4px 0 24px -4px rgba(0,0,0,0.4);
}

.gimi-sidebar-header {
    border-bottom: 1px solid var(--gimi-border) !important;
    background: linear-gradient(180deg, rgba(30,41,59,0.3) 0%, transparent 100%);
}

.gimi-hamburger {
    background: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid var(--gimi-border) !important;
    border-radius: 12px !important;
    transition: all 0.2s ease;
    box-shadow: var(--gimi-shadow-3d);
}

.gimi-hamburger:hover {
    background: rgba(51, 65, 85, 0.8) !important;
    border-color: var(--gimi-border-bright) !important;
    transform: scale(1.05);
}

.gimi-hamburger span {
    background: linear-gradient(90deg, #e2e8f0, #94a3b8) !important;
}

.gimi-header-logo {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(34,211,238,0.2));
}

/* ── Global Quick-Link Menu ── */
.gimi-global-menu,
#global-menu,
#globalMenuDropdown {
    background: var(--gimi-surface-elevated) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--gimi-border-bright) !important;
    border-radius: var(--gimi-radius-xl) !important;
    box-shadow: var(--gimi-shadow-float) !important;
    padding: 0.5rem !important;
}

.gimi-global-menu .gimi-menu-section,
.gimi-global-menu > div:first-of-type,
#global-menu > div,
#globalMenuDropdown > div {
    letter-spacing: 0.12em;
}

.gimi-menu-item,
.gimi-global-menu button,
#global-menu button,
#globalMenuDropdown button {
    border-radius: 12px !important;
    margin: 2px 4px !important;
    transition: all 0.2s ease !important;
}

.gimi-global-menu button:hover,
#global-menu button:hover,
#globalMenuDropdown button:hover {
    background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(99,102,241,0.12)) !important;
    transform: translateX(4px);
    box-shadow: inset 0 0 0 1px rgba(34,211,238,0.15);
}

/* ── Top Navigation Bar ── */
.gimi-topbar,
.gimi-common-header,
.common-header {
    background: var(--gimi-surface) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gimi-border) !important;
    box-shadow: 0 4px 20px -4px rgba(0,0,0,0.3);
}

.gimi-topbar a:hover,
.gimi-common-header a:hover,
.common-header a:hover {
    color: var(--gimi-accent) !important;
    text-shadow: 0 0 20px rgba(34,211,238,0.4);
}

/* ── Cards & Panels (3D) ── */
.gimi-card,
.gimi-app .bg-zinc-900,
.gimi-app .tool-card {
    background: var(--gimi-surface) !important;
    border: 1px solid var(--gimi-border) !important;
    box-shadow: var(--gimi-shadow-3d);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gimi-app .tool-card:hover,
.gimi-card:hover {
    border-color: var(--gimi-border-bright) !important;
    box-shadow: var(--gimi-shadow-3d), var(--gimi-shadow-glow);
    transform: translateY(-4px);
}

.gimi-app .ticket-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--gimi-shadow-3d), 0 0 30px -8px rgba(34,211,238,0.25);
}

/* ── Kanban Columns ── */
.gimi-app .kanban-column {
    background: var(--gimi-surface) !important;
    border: 1px solid var(--gimi-border) !important;
    border-radius: var(--gimi-radius-xl) !important;
    box-shadow: var(--gimi-shadow-3d);
}

/* ── Inputs & Selects ── */
.gimi-app input:not([type="checkbox"]):not([type="radio"]),
.gimi-app select,
.gimi-app textarea {
    background: rgba(15, 23, 42, 0.7) !important;
    border-color: var(--gimi-border) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gimi-app input:focus,
.gimi-app select:focus,
.gimi-app textarea:focus {
    border-color: var(--gimi-accent) !important;
    box-shadow: 0 0 0 3px rgba(34,211,238,0.12);
}

/* ── Buttons Enhancement ── */
.gimi-app button.bg-cyan-400,
.gimi-app button.bg-cyan-500,
.gimi-app .bg-cyan-400.hover\:bg-white,
.gimi-app #new-project-btn,
.gimi-app #new-ticket-btn {
    background: linear-gradient(135deg, #22d3ee, #6366f1) !important;
    box-shadow: 0 4px 14px -2px rgba(34,211,238,0.35);
    transition: all 0.25s ease;
}

.gimi-app button.bg-white {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0) !important;
    box-shadow: var(--gimi-shadow-3d);
}

.gimi-app button.bg-white:hover {
    background: linear-gradient(135deg, #22d3ee, #67e8f9) !important;
    color: #0f172a !important;
}

/* ── Modals ── */
.gimi-app .modal,
.gimi-app #modal-dialog,
.gimi-app #ticket-modal > div,
.gimi-app [id$="-modal"] > div {
    background: var(--gimi-surface-elevated) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--gimi-border-bright) !important;
    box-shadow: var(--gimi-shadow-float), var(--gimi-shadow-glow) !important;
}

.gimi-app #ticket-modal,
.gimi-app .fixed.inset-0.bg-black {
    backdrop-filter: blur(8px);
}

/* ── User Menu Dropdown ── */
.gimi-app .user-menu,
.gimi-app #user-menu,
.gimi-app #userDropdown {
    background: var(--gimi-surface-elevated) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--gimi-border-bright) !important;
    box-shadow: var(--gimi-shadow-float) !important;
}

/* ── Footer App Badge ── */
.gimi-app-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f172a;
    box-shadow: 0 2px 8px -2px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

.gimi-badge-pms { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.gimi-badge-vortex { background: linear-gradient(135deg, #22d3ee, #06b6d4); }
.gimi-badge-utility { background: linear-gradient(135deg, #34d399, #10b981); }
.gimi-badge-guide { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }

/* ── Tool Sidebar Items ── */
.gimi-app .tool-btn.active,
.gimi-app .sidebar-project.active {
    background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(99,102,241,0.1)) !important;
    border-color: var(--gimi-border-bright) !important;
    box-shadow: inset 0 0 0 1px rgba(34,211,238,0.2), 0 4px 12px -4px rgba(34,211,238,0.2);
}

.gimi-app .tool-btn:hover {
    border-color: rgba(148,163,184,0.3) !important;
    background: rgba(30,41,59,0.5) !important;
}

/* ── Expand Sidebar Button ── */
.gimi-expand-btn,
#sidebar-expand-btn,
#both-expand-btn,
#toc-expand-btn,
#tools-expand-btn,
#sidebarExpandBtn {
    background: var(--gimi-surface-elevated) !important;
    border: 1px solid var(--gimi-border-bright) !important;
    box-shadow: var(--gimi-shadow-float) !important;
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}

.gimi-expand-btn:hover,
#sidebar-expand-btn:hover,
#sidebarExpandBtn:hover {
    color: var(--gimi-accent) !important;
    transform: translateY(-50%) translateX(4px) !important;
    box-shadow: var(--gimi-shadow-float), var(--gimi-shadow-glow) !important;
}

/* ── Tables (Vortex Dashboard) ── */
.gimi-app .enterprise-card,
.gimi-app .data-table,
.gimi-app table {
    border-radius: var(--gimi-radius-lg);
}

.gimi-app .table-row:hover {
    background: rgba(34, 211, 238, 0.05) !important;
}

.gimi-app nav.border-b {
    background: var(--gimi-surface) !important;
    backdrop-filter: blur(16px);
}

/* ── Scrollbars ── */
.gimi-app .custom-scroll::-webkit-scrollbar,
.gimi-app ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.gimi-app .custom-scroll::-webkit-scrollbar-thumb,
.gimi-app ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gimi-accent), var(--gimi-accent-2));
    border-radius: 20px;
}

.gimi-app .custom-scroll::-webkit-scrollbar-track,
.gimi-app ::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

/* ── Toggle Switch ── */
.gimi-app .peer-checked\:bg-cyan-500:checked ~ div,
.gimi-app input:checked + div {
    background: linear-gradient(135deg, #22d3ee, #6366f1) !important;
}

/* ── Search Box ── */
.gimi-search-box {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--gimi-border) !important;
    border-radius: var(--gimi-radius-lg) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

/* ── Dynamic Content Area ── */
.gimi-app #main-content,
.gimi-app #board-container {
    background: transparent !important;
}

.gimi-app #main-content .bg-zinc-900 {
    border-radius: var(--gimi-radius-xl);
}

/* ── Section highlight on navigate ── */
.gimi-app .section h2,
.gimi-app .section h3 {
    scroll-margin-top: 90px;
}

/* ── Priority / Status pills ── */
@media (min-width: 1025px) {
    .gimi-app .label-pill {
        background: #374151;
        color: #f3f4f6;
        border: 1px solid #4b5563;
        box-shadow: none;
    }
}

/* ── Animations ── */
@keyframes gimiFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.gimi-app .dynamic-content,
.gimi-app .modal {
    animation: gimiFadeUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gimiPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.gimi-status-dot {
    animation: gimiPulse 2s ease-in-out infinite;
}

/* ── Vortex brand in dashboard (unified with GiMi) ── */
.gimi-vortex-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(145deg, #22d3ee, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--gimi-shadow-3d), 0 0 20px -5px rgba(34,211,238,0.4);
    font-weight: 800;
    color: #0f172a;
    font-size: 1.1rem;
}

/* ── Responsive polish (extended in gimi-mobile.css) ── */
@media (max-width: 1024px) {
    .gimi-login-card {
        margin: 1rem;
        padding: 2rem !important;
    }
}