/*
Theme Name: Theme Nexus by Snivertech
Theme URI: https://snivertech.com/
Description: Lightweight private app theme for the Nexus production-management application.
Author: Snivertech
Author URI: https://snivertech.com/
Version: 1.0.27
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: theme-nexus-by-snivertech
*/

:root {
    --theme-nexus-accent: #01c4c6;
    --theme-nexus-accent-dark: #007c89;
    --theme-nexus-text: #182235;
    --theme-nexus-muted: #64748b;
    --theme-nexus-border: #e2e8f0;
    --theme-nexus-surface: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body.theme-nexus-app {
    min-height: 100%;
    margin: 0;
    background: var(--theme-nexus-body-bg, #f1f5f9);
    color: var(--theme-nexus-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

body.theme-nexus-app.admin-bar .theme-nexus-header {
    margin-top: 0;
}

img {
    max-width: 100%;
    height: auto;
}

.screen-reader-text,
.theme-nexus-skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.theme-nexus-skip-link:focus {
    z-index: 100000;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    background: #111827;
    color: #fff;
    border-radius: 6px;
}

.theme-nexus-header {
    background: var(--theme-nexus-header-bg, #fff);
    border-bottom: 0;
    position: relative;
    z-index: 50;
    /* box-shadow: 0 1px 0 rgba(15, 23, 42, .04); */
}

.theme-nexus-header__inner {
    width: min(1200px, calc(100% - 64px));
    min-height: 108px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 0 8px;
}

.theme-nexus-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.theme-nexus-logo img {
    display: block;
    width: 161px;
    max-height: 72px;
    object-fit: contain;
}

.theme-nexus-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
}

.theme-nexus-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
}

.theme-nexus-menu li {
    position: relative;
    margin: 0;
}

.theme-nexus-menu>li {
    padding: 15px 0px;
}

.theme-nexus-menu a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: var(--theme-nexus-menu-text, #111827);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease;
}

.theme-nexus-menu a:hover,
.theme-nexus-menu .current-menu-item > a,
.theme-nexus-menu .current-menu-ancestor > a {
    color: var(--theme-nexus-menu-hover, #0f766e);
}

.theme-nexus-menu > .current-menu-item > a::before,
.theme-nexus-menu > .current-menu-ancestor > a::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 22px;
    height: 2px;
    margin: auto;
    background: var(--theme-nexus-menu-active, var(--theme-nexus-accent));
    border-radius: 999px;
}

.theme-nexus-menu__item--has-children > a::after,
.theme-nexus-menu .menu-item-has-children > a::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.theme-nexus-submenu,
.theme-nexus-menu .sub-menu {
    position: absolute;
    /*top: calc(100% + 0px);*/
    left: 50%;
    min-width: 230px;
    transform: translateX(-50%) translateY(8px);
    padding: 10px 0;
    margin: 0;
    list-style: none;
    background: var(--theme-nexus-submenu-bg, #fff);
    border-top: 2px solid var(--theme-nexus-submenu-border, #000);
    border-radius: 0 0 7px 7px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.theme-nexus-menu li:hover > .theme-nexus-submenu,
.theme-nexus-menu li:focus-within > .theme-nexus-submenu,
.theme-nexus-menu li:hover > .sub-menu,
.theme-nexus-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /*transform: translateX(-50%) translateY(0);*/
}

.theme-nexus-submenu a,
.theme-nexus-menu .sub-menu a {
    width: 100%;
    min-height: auto;
    padding: 11px 18px;
    justify-content: flex-start;
    color: var(--theme-nexus-menu-text, #243244);
    font-size: 13px;
    font-weight: 700;
}

.theme-nexus-submenu a:hover,
.theme-nexus-submenu .current-menu-item > a,
.theme-nexus-menu .sub-menu a:hover,
.theme-nexus-menu .sub-menu .current-menu-item > a {
    color: var(--theme-nexus-menu-hover, var(--theme-nexus-accent-dark));
    background: #f8fafc;
}

.theme-nexus-submenu .current-menu-item > a::before,
.theme-nexus-menu .sub-menu .current-menu-item > a::before {
    display: none;
}

.theme-nexus-submenu-toggle {
    display: none;
}

.theme-nexus-mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--theme-nexus-border);
    border-radius: 6px;
    background: var(--theme-nexus-header-bg, #fff);
    cursor: pointer;
}

.theme-nexus-mobile-toggle span:not(.screen-reader-text) {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--theme-nexus-menu-text, #111827);
    border-radius: 99px;
}

body.theme-nexus-mobile-menu-open {
    overflow: hidden;
}

/*.theme-nexus-content {
    min-height: calc(100vh - 108px);
    padding-bottom: 42px;
}*/

body.page-template-ProductionEntry .main-content-area,
body.page-template-ProductionEntry #app-production-entry-form {
    width: 100% !important;
    max-width: none !important;
}

.app-main-content {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    background: var(--theme-nexus-main-content-bg, #fff) !important;
}

.app-main-content-inner {
    width: 100%;
    box-sizing: border-box;
    padding: 30px 0 50px 0;
    /*background: linear-gradient(0deg, #edf9f9 0%, #edf9f92e 10%);*/
    margin-bottom: 2px;
}

form#app-production-entry-form select {
    border-color: #ddd;
    max-width: 503px;
    padding: 13px;
    color: #000;
}

table th, table td {
    padding: 7px 7px;
}

.notes-textarea{
    border-color: #ddd;
}

.theme-nexus-content > .app-main-content {
    width: min(1200px, calc(100% - 64px));
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
}

.app-main-content > :first-child {
    margin-top: 0;
}

/*.app-main-content > :last-child {
    margin-bottom: 0;
}*/

.theme-nexus-page {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--theme-nexus-border);
    border-radius: 8px;
}

.theme-nexus-footer {
    background: var(--theme-nexus-footer-bg, #fff);
}

.theme-nexus-footer__inner {
    width: min(1200px, calc(100% - 64px));
    margin: 0 auto;
    padding: 22px 30px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(170px, auto);
    gap: 22px;
    align-items: center;
    background: #edf9f9;
}

.theme-nexus-footer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.theme-nexus-footer__brand img {
    width: 82px;
    height: auto;
    flex: 0 0 auto;
}

.theme-nexus-footer__brand strong,
.theme-nexus-footer__brand span {
    display: block;
}

.theme-nexus-footer__brand strong {
    color: var(--theme-nexus-footer-text, #0f172a);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
}

.theme-nexus-footer__brand span,
.theme-nexus-footer__copy {
    color: var(--theme-nexus-footer-text, var(--theme-nexus-muted));
    font-size: 12px;
    font-weight: 700;
}

.theme-nexus-footer__copy {
    margin: 0;
    text-align: right;
}

/* Migrated app shared styles. */
.app-page-head,
.app_head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 92px;
    /*margin: 0 0 20px;*/
    padding: 18px 22px;
    box-sizing: border-box;
    /*border-radius: 8px;*/
    background: linear-gradient(135deg, var(--theme-nexus-page-head-start, #0f766e) 0%, var(--theme-nexus-page-head-middle, #01c4c6) 68%, var(--theme-nexus-page-head-end, #38bdf8) 100%);
    color: var(--theme-nexus-page-head-text, #fff);
}

.app-page-head__main,
.app-head-flex {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 16px;
}

.app-page-head__icon,
.report-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--theme-nexus-page-head-icon-bg, #fff);
    color: var(--theme-nexus-page-head-icon-color, #0f766e);
    font-size: 26px;
}

.app-page-head__content,
.app-head-content {
    min-width: 0;
}

.app-page-head__title,
.report-title,
.app-page-head h1,
.app_head h1 {
    margin: 0;
    color: var(--theme-nexus-page-head-text, #fff);
    font-size: 28px;
    line-height: 1.18;
    font-weight: 800;
}

.app-page-head__content p,
.app-head-content p,
.app-page-head p,
.app_head p {
    margin: 5px 0 0;
    color: var(--theme-nexus-page-head-text, #fff);
    opacity: .88;
    font-size: 14px;
    font-weight: 600;
}

.app-page-head__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.app-btn {
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: .2s ease;
    font-weight: 700;
    height: 40px;
    padding: 0 18px;
}

.app-btn--primary {
    background: linear-gradient(318deg, #0f766e, #14b8a6);
    color: #fff;
}

.app-btn--secondary {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.app-btn--blue {
    background: linear-gradient(135deg, #2196F3, #014881);
    color: #fff;
    border: none;
    border-radius: 5px;
}

.app-btn--primary:hover {
    transform: translateY(-1px);
}

.app-btn--secondary:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.app-btn--accent {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
}

.app-btn--danger {
    background: linear-gradient(135deg, #be123c, #e11d48);
    color: #fff;
}

.app-btn--pill {
    border-radius: 5px;
    padding: 0 18px;
}

.app-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 28px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    position: relative;
    overflow: hidden;
    flex-wrap: wrap;
}

.app-popup-header::before {
    content: "";
    position: absolute;
    inset: auto 50% 50% auto;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    pointer-events: none;
}

.app-popup-header::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    pointer-events: none;
}

.hbg-1 {
    background: linear-gradient(135deg, rgba(15, 118, 110, .96) 0%, rgba(3, 105, 161, .96) 55%, rgba(37, 99, 235, .92) 100%);
}

.hbg-2 {
    background: linear-gradient(135deg, #0f766e 0%, #115e59 48%, #0f172a 100%);
}

@media (max-width: 880px) {
    .theme-nexus-header {
        position: relative;
        z-index: 80;
    }

    .theme-nexus-header__inner {
        width: min(100% - 28px, 1200px);
        min-height: 82px;
        gap: 16px;
        position: relative;
        z-index: 2;
    }

    .theme-nexus-logo img {
        width: 138px;
        max-height: 62px;
    }

    .theme-nexus-mobile-toggle {
        display: inline-block;
        position: relative;
        z-index: 3;
        color: var(--theme-nexus-mobile-menu-icon, var(--theme-nexus-mobile-menu-text, #fff));
        border-color: currentColor;
        background: transparent;
    }

    .theme-nexus-mobile-toggle span:not(.screen-reader-text) {
        background: currentColor;
    }

    .theme-nexus-nav {
        position: fixed;
        inset: 0;
        display: none;
        min-height: 100vh;
        padding: 102px 24px 32px;
        background: var(--theme-nexus-mobile-menu-bg, var(--theme-nexus-header-bg, #0f172a));
        color: var(--theme-nexus-mobile-menu-text, #fff);
        border-top: 0;
        box-shadow: none;
        overflow-y: auto;
        z-index: 1;
    }

    .theme-nexus-nav--open {
        display: block;
    }

    .theme-nexus-menu {
        display: block;
        width: min(100%, 520px);
        margin: 0 auto;
        padding-bottom: 24px;
    }

    .theme-nexus-menu a {
        width: 100%;
        min-height: 50px;
        padding: 0 4px;
        justify-content: space-between;
        color: var(--theme-nexus-mobile-menu-text, #fff);
        font-size: 16px;
    }

    .theme-nexus-menu a:hover,
    .theme-nexus-menu .current-menu-item > a,
    .theme-nexus-menu .current-menu-ancestor > a {
        color: var(--theme-nexus-menu-hover, #01c4c6);
    }

    .theme-nexus-menu .current-menu-item > a::after {
        display: none;
    }

    .theme-nexus-menu > .current-menu-item > a::before,
    .theme-nexus-menu > .current-menu-ancestor > a::before {
        display: none;
    }

    .theme-nexus-submenu,
    .theme-nexus-menu .sub-menu {
        position: static;
        display: none;
        min-width: 0;
        padding: 0 0 8px 14px;
        margin-bottom: 6px;
        background: transparent;
        border-top: 0;
        border-left: 2px solid currentColor;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .theme-nexus-submenu a,
    .theme-nexus-menu .sub-menu a {
        min-height: 42px;
        padding: 0 4px;
        color: var(--theme-nexus-mobile-menu-text, #fff);
        background: transparent;
        font-size: 14px;
    }

    .theme-nexus-submenu a:hover,
    .theme-nexus-submenu .current-menu-item > a,
    .theme-nexus-menu .sub-menu a:hover,
    .theme-nexus-menu .sub-menu .current-menu-item > a {
        color: var(--theme-nexus-menu-hover, #01c4c6);
        background: transparent;
    }

    .theme-nexus-menu__item--open > .theme-nexus-submenu,
    .theme-nexus-menu .menu-item-has-children:focus-within > .sub-menu {
        display: block;
    }

    .theme-nexus-submenu-toggle {
        display: block;
        position: absolute;
        top: 4px;
        right: 0;
        width: 42px;
        height: 36px;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .theme-nexus-submenu-toggle::before {
        content: "";
        display: block;
        width: 8px;
        height: 8px;
        margin: 11px auto 0;
        border-right: 2px solid var(--theme-nexus-mobile-menu-text, #fff);
        border-bottom: 2px solid var(--theme-nexus-mobile-menu-text, #fff);
        transform: rotate(45deg);
    }

    .theme-nexus-content {
        min-height: calc(100vh - 82px);
        padding-bottom: 28px;
    }

    .theme-nexus-content > .app-main-content {
        width: min(100% - 7px, 1200px) !important;
    }

    .theme-nexus-footer__inner {
        width: min(100% - 28px, 1200px);
        grid-template-columns: 1fr;
        gap: 14px;
        justify-items: center;
        text-align: center;
    }

    .theme-nexus-footer__brand {
        justify-content: center;
    }

    .theme-nexus-footer__copy {
        text-align: center;
    }
}
