@import url("./shared/theme-ndtechhub.css");

:root {
    --shadow: 0 16px 32px rgba(0, 10, 24, 0.45);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "DM Sans", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, #132f5f 0%, transparent 33%),
        radial-gradient(circle at 92% 10%, #0e2b58 0%, transparent 28%),
        var(--bg);
}

h1, h2, h3 {
    margin-top: 0;
    font-family: "Playfair Display", Georgia, serif;
}

a { color: inherit; text-decoration: none; }

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    z-index: 999;
    background: var(--brand);
    color: #032246;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    font-weight: 700;
}

.skip-link:focus { left: 8px; }

.container {
    width: min(100% - 2rem, 1120px);
    margin-inline: auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(8, 24, 52, 0.92);
    border-bottom: 1px solid var(--line);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand { font-size: 1.2rem; font-weight: 700; }
.brand span { color: var(--brand); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    background: #0f2a55;
    color: #d9e9ff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.menu-btn:focus-visible,
.nav-links a:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(0, 184, 255, 0.55);
    outline-offset: 2px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.nav-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #0f2a55;
    color: #d9e9ff;
    padding: 0.42rem 0.75rem;
}

.nav-links a.active {
    background: var(--brand);
    color: #032246;
    border-color: var(--brand);
}

.drawer {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
}

.drawer.open { display: block; }

.drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(92vw, 360px);
    background: linear-gradient(135deg, rgba(16, 38, 74, 0.6), rgba(6, 17, 38, 0.4));
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -20px 0 40px rgba(0, 10, 24, 0.5), inset 1px 0 1px rgba(255, 255, 255, 0.15);
    padding: 1rem;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.75rem;
}

.drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.drawer-head strong { font-size: 1.05rem; }

.drawer-head button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.42rem 0.7rem;
    background: #0f2a55;
    color: #d9e9ff;
    font: inherit;
    cursor: pointer;
    font-weight: 700;
}

.drawer-links {
    display: grid;
    gap: 0.5rem;
    align-content: start;
}

.drawer-links a {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    background: var(--surface-soft);
    color: var(--text);
}

.drawer-links a.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 184, 255, 0.18);
}

.chat-wrap {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 130;
}

.chat-fab {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    background: var(--brand);
    color: #032246;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.chat-panel {
    display: none;
    width: min(92vw, 420px);
    height: min(70vh, 540px);
    margin-bottom: 0.7rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    grid-template-rows: auto 1fr auto;
}

.chat-wrap.open .chat-panel { display: grid; }

.chat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 184, 255, 0.08);
}

.chat-close {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.42rem 0.7rem;
    background: var(--surface-soft);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    font-weight: 700;
}

.chat-body {
    padding: 0.85rem;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@keyframes msg-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg {
    border: 1px solid var(--line);
    background: var(--surface-soft);
    border-radius: 16px 16px 16px 4px;
    padding: 0.65rem 0.85rem;
    color: var(--text);
    max-width: 85%;
    width: fit-content;
    line-height: 1.5;
    align-self: flex-start;
    animation: msg-enter 0.3s ease forwards;
}

.chat-msg.me {
    border-radius: 16px 16px 4px 16px;
    background: rgba(0, 184, 255, 0.15);
    border-color: rgba(0, 184, 255, 0.4);
    align-self: flex-end;
}

.chat-msg p { margin: 0; color: inherit; }

.chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    padding: 0.75rem;
    border-top: 1px solid var(--line);
}

.chat-input {
    width: 100%;
    border: 1px solid #255293;
    border-radius: 12px;
    padding: 0.58rem 0.7rem;
    font: inherit;
    color: var(--text);
    background: #0a1f42;
}

.hero { padding: 4rem 0 2.8rem; }

.hero-grid {
    display: grid;
    gap: 1rem;
}

.label {
    display: inline-block;
    font-size: 0.83rem;
    background: var(--surface-soft);
    border: 1px solid #23568f;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    background: rgba(0, 184, 255, 0.14);
    color: #9feaff;
}

.sub, .muted { color: var(--muted); }

.hero-actions {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.hero-card, .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 1rem;
    transition: all 0.3s ease;
}

.hero-card:hover, .card:hover {
    background: linear-gradient(135deg, rgba(16, 38, 74, 0.7), rgba(6, 17, 38, 0.5));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 10, 24, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.kpi-row {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.kpi {
    display: grid;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(0, 184, 255, 0.08);
}

.kpi strong { font-size: 1.2rem; }
.kpi span { color: var(--muted); font-size: 0.92rem; }

.section { padding: 2.5rem 0; }

.section.alt {
    background: linear-gradient(180deg, #0b1f41 0%, #0c2348 100%);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.cards-3, .cards-4, .split {
    display: grid;
    gap: 1rem;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: var(--brand);
    color: #032246;
}

.btn-primary:hover { background: var(--brand-dark); }

.btn-outline {
    border: 1px solid var(--brand);
    background: rgba(0, 184, 255, 0.1);
    color: #9eeaff;
}

.btn-link {
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text);
}

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-grid {
    display: grid;
    gap: 0.65rem;
}

label {
    display: grid;
    gap: 0.3rem;
    font-size: 0.92rem;
}

input, select, textarea {
    width: 100%;
    border: 1px solid #255293;
    border-radius: 10px;
    padding: 0.58rem 0.7rem;
    font: inherit;
    color: var(--text);
    background: #0a1f42;
}

.searchbar {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0 1.2rem;
}

.searchbar .row {
    display: grid;
    gap: 0.65rem;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.85rem;
}

.meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
}

.card-actions {
    margin-top: 0.85rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.status {
    min-height: 1.2rem;
    color: var(--brand);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.filter-btn.active {
    background: var(--brand);
    color: #fff;
}

.footer {
    margin-top: 2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 1rem 0 1.7rem;
}

.mini {
    box-shadow: none;
    background: var(--surface-soft);
}

@media (min-width: 840px) {
    .nav-actions {
        display: none;
    }

    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .cards-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cards-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .split {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: start;
    }

    .kpi-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .searchbar .row {
        grid-template-columns: 1.4fr 0.8fr 0.6fr;
        align-items: center;
    }
}

@media (max-width: 839px) {
    .nav-links {
        display: none;
    }
}
