/* Global viewport guard: prevent accidental side-to-side page sliding. */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video,
canvas,
svg,
iframe,
table,
input,
select,
textarea,
button {
    max-width: 100%;
}

/* Global link baseline: avoid browser default blue/purple on dark UI. */
a,
a:visited {
    color: inherit;
}

a:hover,
a:focus {
    color: inherit;
}


/* =============================== */
/* Alpha 8 — KILLER HEADER         */
/* =============================== */

.hamburger,
.hamburger-menu {
    display: none !important;
}

.header-logo,
.header-logo img,
.header-logo a {
    display: none !important;
}

/* Centered text-only GigNexus header */
.killer-header-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 700;
    color: #32ff8a;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-shadow: 0 0 8px rgba(50, 255, 138, 0.5);
}

/* =============================== */
/* Alpha 8 — NO MORE UPPERCASE     */
/* =============================== */

.dashboard-tile,
.dashboard-label,
.tile-text,
.tile-label,
.nx-dashboard-title,
.nx-dashboard-tile,
.nx-tile-label,
.nx-tile-text,
.nx-button,
.dash-tile,
.dash-label,
.nav-item,
a,
span,
p,
div {
    text-transform: none !important;
}


/* =============================== */
/* Stack Protocol Shell (no inline styles) */
/* =============================== */

.nx-stack-page{
    min-height: calc(100vh - 80px);
    padding: 24px 16px 40px;
    background:
        radial-gradient(circle at top left, rgba(34,197,94,0.13), transparent 60%),
        radial-gradient(circle at bottom right, rgba(14,165,233,0.13), transparent 60%),
        #020617;
}

.nx-stack-card{
    max-width: 720px;
    margin: 8px auto 40px;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.50);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.95);
    padding: 24px 22px 28px;
}

.nx-stack-section{
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.nx-stack-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap: 10px;
    margin: 0 0 14px 0;
}

.stack-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 0 12px;
    border-radius: 4px;
    height: 30px;
    min-height: 30px;
    width: 110px;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(to right, #22c55e, #4ade80);
    color: #022c22;
    box-shadow: 0 14px 32px rgba(34, 197, 94, 0.28);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
    text-decoration:none;
    white-space:nowrap;
}
.stack-button:hover{
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(34, 197, 94, 0.35);
    text-decoration:none;
}
.stack-button:active{
    transform: translateY(1px);
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.24);
}

/* Inside stack cards, keep forms clean + fully stacked */
.nx-stack-card form.nexus-form{
    max-width: 100%;
    margin: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
}

/* Checkbox sizing (compact) */
.nx-checkline input[type="checkbox"],
.login-checkline input[type="checkbox"]{
    width: 12px;
    height: 12px;
}

/* Stacked form normalization */
.nx-stack-card fieldset,
.nx-stack-card fieldset.stacked-form{
    border: 0;
    padding: 0;
    margin: 0 0 16px 0;
}
.nx-stack-card fieldset.nx-stack-section{
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 16px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.35);
}
.nx-stack-card legend{
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #e5e7eb;
}
.nx-stack-card .stacked-form label{
    display: block;
    margin-bottom: 0.65rem;
}
.nx-stack-card .stacked-form input,
.nx-stack-card .stacked-form select,
.nx-stack-card .stacked-form textarea{
    width: 100%;
    box-sizing: border-box;
}
.nx-checkline,
.nx-checkline span,
.nx-hint{
    font-size: 12px;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: normal;
}
.nx-hint{
    color: #94a3b8;
}

.nx-stack-card .nexus-card{
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.nx-stack-card .nexus-table{
    width:100%;
}

/* =========================================================
   NX Enterprise Polish Overrides
   Scope: Buttons, Tabs, Tiles, Nav, Calendar, Cards
   Notes: No layout changes, interaction-only polish.
   ========================================================= */

/* ---- Buttons (base + interactions) ---- */
.nx-btn,
.nexus-button,
.stack-button,
.nx-square-btn,
.nx-link-btn,
button,
input[type="submit"],
input[type="button"],
a.nx-tile,
.nx-bottom-item{
    border-radius: 6px !important;
    border: 1px solid rgba(110, 240, 255, 0.22) !important;
    background: linear-gradient(180deg, rgba(31, 122, 58, 0.85), rgba(15, 79, 39, 0.9)) !important;
    color: #e7f5ec !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35) !important;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, filter 120ms ease !important;
    cursor: pointer;
    user-select: none;
}

.nx-btn:hover,
.nexus-button:hover,
.stack-button:hover,
.nx-square-btn:hover,
.nx-link-btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a.nx-tile:hover,
.nx-bottom-item:hover,
.nx-row-link:hover{
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.40) !important;
    border-color: rgba(110, 240, 255, 0.35) !important;
    filter: brightness(1.03);
    text-decoration: none;
}

.nx-btn:active,
.nexus-button:active,
.stack-button:active,
.nx-square-btn:active,
.nx-link-btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active,
a.nx-tile:active,
.nx-bottom-item:active,
.nx-row-link:active{
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.35) !important;
    filter: brightness(0.98);
}

.nx-btn:focus-visible,
.nexus-button:focus-visible,
.stack-button:focus-visible,
.nx-square-btn:focus-visible,
.nx-link-btn:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
a.nx-tile:focus-visible,
.nx-bottom-item:focus-visible,
.nx-row-link:focus-visible{
    outline: 2px solid rgba(110, 240, 255, 0.45);
    outline-offset: 2px;
}

.nx-btn:disabled,
.nexus-button:disabled,
.stack-button:disabled,
.nx-square-btn:disabled,
.nx-link-btn:disabled,
button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
a.nx-tile[aria-disabled="true"],
.nx-bottom-item[aria-disabled="true"]{
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* ---- Tabs (manila tabs remain, but make them pressable) ---- */
.nx-tab{
    border-radius: 6px 6px 0 0 !important;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, filter 120ms ease !important;
}
.nx-tab:hover{
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(0,0,0,0.35) !important;
}
.nx-tab:active{
    transform: translateY(1px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.35) !important;
}

/* ---- Tiles (dashboard tiles) ---- */
.nx-tile{
    border-radius: 8px !important;
    border: 1px solid rgba(110, 240, 255, 0.22) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35) !important;
}

/* ---- Bottom nav items ---- */
.nx-bottom-item{
    border-radius: 6px !important;
}

/* ---- Cards / panels ---- */
.nx-stack-card,
.nexus-card,
.nx-card{
    border-radius: 8px !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35) !important;
}

/* ---- Calendar cells ---- */
.nx-cal-cell{
    border-radius: 0 !important;
}
.nx-cal-cell:hover{
    background: rgba(34,197,94,0.08);
}

/* Force square tabs everywhere */
.nx-tabs,
.nx-tabs.nx-tabs-box,
.nx-tab{
    border-radius: 0 !important;
}
