﻿/* =========================================
   NKONNECT COMMAND CENTRE
   Main Stylesheet
========================================= */

:root {
    --brand: #20C8E8;
    --brand-dark: #07152D;
    --background: #07152D;
    --sidebar: #091A35;
    --surface: #102542;
    --surface-hover: #15304F;
    --text: #F4F8FC;
    --muted: #9BAEC4;
    --border: rgba(255,255,255,0.09);
    --shadow: 0 10px 35px rgba(0,0,0,0.15);
    --success: #25C58A;
    --warning: #E9B44C;
    --danger: #EF6461;
    --radius: 14px;
}

body.light-theme {
    --brand: #07152D;
    --brand-dark: #07152D;
    --background: #F4F7FB;
    --sidebar: #FFFFFF;
    --surface: #FFFFFF;
    --surface-hover: #EDF3F8;
    --text: #07152D;
    --muted: #718096;
    --border: rgba(7,21,45,0.10);
    --shadow: 0 8px 28px rgba(7,21,45,0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    transition: background .25s, color .25s;
    min-height: 100vh;
}

button {
    font: inherit;
    cursor: pointer;
}

.app-container {
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform .3s, background .25s;
}

.brand {
    height: 85px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    border-bottom: 1px solid var(--border);
}

.brand-logo {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
     filter: drop-shadow(0 0 0.3px rgba(255, 255, 255, 0.5));
}

.brand-info h2 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--brand);
}

.brand-info span {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--muted);
    font-weight: 700;
}

.sidebar-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--muted);
    padding: 23px 24px 10px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 15px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    width: calc(100% - 24px);
    margin: 3px 12px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: var(--muted);
    border-radius: 9px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    transition: .2s;
}

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

.nav-item:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.nav-item.active {
    color: var(--brand);
    background: rgba(32,200,232,0.10);
    font-weight: 700;
}

body.light-theme .nav-item.active {
    background: rgba(7,21,45,0.07);
}

.nav-indicator {
    width: 7px;
    height: 7px;
    background: var(--warning);
    border-radius: 50%;
    margin-left: auto;
}

.sidebar-bottom {
    padding: 17px 20px;
    border-top: 1px solid var(--border);
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    color: var(--muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--warning);
    border-radius: 50%;
}

.sidebar-version {
    margin-top: 12px;
    font-size: 10px;
    color: var(--muted);
}

.sidebar-close {
    display: none;
    margin-left: auto;
    background: none;
    color: var(--text);
    border: none;
}

/* MAIN CONTENT */

.main-content {
    margin-left: 260px;
    min-height: 100vh;
}

.topbar {
    height: 76px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--sidebar);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-left,
.topbar-right,
.breadcrumb {
    display: flex;
    align-items: center;
}

.topbar-right {
    gap: 17px;
}

.breadcrumb {
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.breadcrumb svg {
    width: 14px;
}

.breadcrumb strong {
    color: var(--text);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    margin-right: 15px;
}

.environment-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9px;
    letter-spacing: .7px;
    font-weight: 800;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(233,180,76,.10);
    color: var(--warning);
}

.environment-badge span {
    width: 6px;
    height: 6px;
    background: var(--warning);
    border-radius: 50%;
}

.icon-button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-button:hover {
    background: var(--surface-hover);
}

.icon-button svg {
    width: 17px;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: var(--danger);
    border-radius: 50%;
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    background: var(--brand);
    color: papayawhip;
    box-shadow: #087E9E;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-info strong {
    font-size: 11px;
}

.profile-info span {
    font-size: 9px;
    color: var(--muted);
}

.profile > svg {
    width: 14px;
    color: var(--muted);
}

/* PAGE CONTENT */

.page-content {
    max-width: 1600px;
    margin: auto;
    padding: 32px;
}

.content-section {
    display: none;
    animation: fadeIn .25s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 27px;
}

.eyebrow {
    color: var(--brand);
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 800;
    margin-bottom: 10px;
}

.page-heading h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.8px;
}

.page-heading p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 9px;
}

.sample-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
    padding: 8px 11px;
    color: var(--warning);
    background: rgba(233,180,76,.10);
    border-radius: 6px;
}

/* WELCOME BANNER */

.welcome-banner {
    background: linear-gradient(115deg, #0D3151, #087E9E);
    border: 1px solid rgba(32,200,232,.20);
    border-radius: var(--radius);
    padding: 29px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 170px;
    margin-bottom: 30px;
    overflow: hidden;
}

body.light-theme .welcome-banner {
    background: linear-gradient(115deg, #07152D, #124B70);
}

.welcome-text > span {
    color: #7FEAFF;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.welcome-text h2 {
    color: white;
    font-size: 25px;
    margin-top: 12px;
}

.welcome-text p {
    color: #D4EAF5;
    font-size: 12px;
    margin-top: 10px;
}

.welcome-icon svg {
    width: 85px;
    height: 85px;
    color: #7FEAFF;
    opacity: .7;
    stroke-width: 1;
}

/* SECTION HEADING */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-heading h2 {
    font-size: 15px;
}

.section-heading span {
    font-size: 10px;
    color: var(--muted);
}

/* STATISTICS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.stat-top > span {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.stat-icon {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 17px;
}

.stat-icon.blue { background: rgba(22,119,255,.15); color: #55A1FF; }
.stat-icon.cyan { background: rgba(32,200,232,.13); color: #20C8E8; }
.stat-icon.purple { background: rgba(164,113,255,.14); color: #B58AFF; }
.stat-icon.green { background: rgba(37,197,138,.13); color: #25C58A; }

.stat-card h3 {
    font-size: 27px;
    margin-top: 19px;
    font-weight: 800;
}

.stat-card .status-text {
    font-size: 22px;
    color: var(--warning);
}

.stat-footer {
    color: var(--muted);
    font-size: 10px;
    margin-top: 8px;
}

/* OVERVIEW GRID */

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    margin-bottom: 18px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 21px;
    box-shadow: var(--shadow);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.panel-header h3 {
    font-size: 13px;
}

.panel-header p {
    font-size: 10px;
    color: var(--muted);
    margin-top: 6px;
}

.panel-header > svg {
    color: var(--muted);
    width: 18px;
}

.text-button {
    border: none;
    background: transparent;
    color: var(--brand);
    font-size: 10px;
    font-weight: 700;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    background: var(--surface-hover);
    border-radius: 10px;
}

.product-logo {
    width: 37px;
    height: 37px;
    background: var(--brand);
    color: #07152D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 9px;
}

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-details strong {
    font-size: 12px;
}

.product-details span {
    font-size: 10px;
    color: var(--muted);
}

.product-status {
    font-size: 9px;
    color: var(--success);
    background: rgba(37,197,138,.10);
    padding: 6px 8px;
    border-radius: 5px;
}

.empty-note {
    color: var(--muted);
    font-size: 10px;
    margin-top: 15px;
}

.control-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid var(--border);
}

.control-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-info strong {
    font-size: 11px;
}

.control-info span {
    font-size: 9px;
    color: var(--muted);
}

.control-badge {
    font-size: 9px;
    color: var(--warning);
    background: rgba(233,180,76,.10);
    padding: 6px 8px;
    border-radius: 5px;
}

/* ACTIVITY */

.activity-panel {
    margin-bottom: 20px;
}

.activity-empty {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.activity-empty svg {
    width: 30px;
    color: var(--muted);
}

.activity-empty strong {
    font-size: 12px;
}

.activity-empty span {
    font-size: 10px;
    color: var(--muted);
}

/* PLACEHOLDER SECTIONS */

.placeholder-panel {
    min-height: 340px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px;
    text-align: center;
    box-shadow: var(--shadow);
}

.placeholder-panel > svg {
    width: 45px;
    height: 45px;
    color: var(--brand);
    margin-bottom: 20px;
    stroke-width: 1.5;
}

.placeholder-panel h2 {
    font-size: 19px;
    margin-bottom: 10px;
}

.placeholder-panel p {
    font-size: 12px;
    color: var(--muted);
    max-width: 390px;
    line-height: 1.7;
}

.coming-soon {
    margin-top: 20px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--warning);
    background: rgba(233,180,76,.10);
    padding: 8px 12px;
    border-radius: 6px;
}

/* FOOTER */

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 22px 0 10px;
    color: var(--muted);
    font-size: 10px;
}

/* MOBILE */

.sidebar-overlay {
    display: none;
}

@media (max-width: 1150px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar {
        padding: 0 20px;
    }
}

@media (max-width: 850px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.55);
        z-index: 90;
    }

    .page-content {
        padding: 25px 20px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 550px) {
    .topbar {
        height: 65px;
        padding: 0 14px;
    }

    .breadcrumb > span,
    .breadcrumb > svg,
    .environment-badge,
    .profile-info,
    .profile > svg,
    .notification-button {
        display: none;
    }

    .topbar-right {
        gap: 10px;
    }

    .page-content {
        padding: 22px 15px;
    }

    .page-heading {
        align-items: flex-start;
    }

    .page-heading h1 {
        font-size: 23px;
    }

    .welcome-banner {
        padding: 22px;
        min-height: 155px;
    }

    .welcome-text h2 {
        font-size: 20px;
    }

    .welcome-text p {
        line-height: 1.7;
    }

    .welcome-icon svg {
        width: 45px;
        height: 45px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card h3 {
        font-size: 22px;
    }

    .stat-top > span {
        font-size: 10px;
    }

    .stat-footer {
        font-size: 9px;
    }

    .section-heading span {
        font-size: 9px;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.6;
    }
}


/* =================================
   NKONNECT ADMIN LOGIN PAGE
================================= */

.login-page {
    min-height: 100vh;
    background: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 18px;
    font-family: 'Inter', sans-serif;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 35px;
}

.login-brand img {
    width: 53px;
    height: 53px;
    object-fit: contain;
}

.login-brand h2 {
    font-size: 20px;
    color: var(--text);
    letter-spacing: 1px;
}

.login-brand span {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 2px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.login-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(32,200,232,0.12);
    color: var(--brand);
    margin-bottom: 23px;
}

.login-eyebrow {
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.login-card h1 {
    color: var(--text);
    font-size: 27px;
    margin: 10px 0;
}

.login-description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 28px;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 9px;
}

.login-input {
    display: flex;
    align-items: center;
    gap: 11px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 13px;
    min-height: 49px;
    color: var(--muted);
}

.login-input:focus-within {
    border-color: var(--brand);
}

.login-input input {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.login-input input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.password-toggle {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    padding: 5px;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 24px;
    font-size: 11px;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
}

.login-options a {
    color: var(--brand);
    text-decoration: none;
}

.login-submit {
    width: 100%;
    min-height: 49px;
    border: none;
    border-radius: 10px;
    background: var(--brand);
    color: #07152D;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-submit:hover {
    opacity: 0.9;
}

.login-message {
    display: none;
    color: var(--brand);
    font-size: 12px;
    line-height: 1.6;
    margin-top: 15px;
}

.login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-size: 10px;
    margin-top: 25px;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.8;
}

.login-footer p {
    margin-bottom: 3px;
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
    }

    .login-card h1 {
        font-size: 24px;
    }
}


/* =========================================
   NKONNECT COMMAND CENTRE - PRODUCT DESIGN
========================================= */

.heading-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.heading-actions button,
#refreshProducts,
#addProductButton {
    min-height: 44px;
    border-radius: 12px;
    padding: 0 18px;
    font-weight: 600;
    transition: all 0.2s ease;
}

#addProductButton {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 5px 18px rgba(32, 200, 232, 0.15);
}

#addProductButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(32, 200, 232, 0.24);
}

#refreshProducts {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

#refreshProducts:hover {
    transform: translateY(-2px);
}

#refreshProducts:disabled,
#addProductButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#refreshProducts svg,
#addProductButton svg {
    width: 17px;
    height: 17px;
}

/* Product grid */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
    padding: 8px 0;
}

.product-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border-color, rgba(128, 128, 128, 0.2));
    border-radius: 18px;
    background: var(--card-background, rgba(128, 128, 128, 0.04));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.product-card-top,
.product-identity,
.product-meta,
.product-control-row {
    display: flex;
    align-items: center;
}

.product-card-top {
    justify-content: space-between;
    gap: 12px;
}

.product-identity {
    gap: 12px;
    min-width: 0;
}

.product-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #07152D, #1677FF, #20C8E8);
    color: #fff;
    font-size: 21px;
    font-weight: 800;
}

.product-title {
    min-width: 0;
}

.product-title h3 {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 700;
}

.product-title span,
.product-description,
.product-control-row small {
    color: var(--muted-color, #8993a4);
}

.product-title span {
    font-size: 12px;
}

.product-description {
    min-height: 38px;
    margin: 18px 0;
    font-size: 13px;
    line-height: 1.6;
}

.product-status {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(128, 128, 128, 0.12);
}

.status-active {
    color: #16a36a;
    background: rgba(22, 163, 106, 0.12);
}

.status-development {
    color: #d99a22;
    background: rgba(217, 154, 34, 0.13);
}

.status-maintenance {
    color: #e28a31;
    background: rgba(226, 138, 49, 0.13);
}

.status-disabled {
    color: #e05252;
    background: rgba(224, 82, 82, 0.12);
}

.product-meta {
    gap: 18px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--border-color, rgba(128, 128, 128, 0.2));
}

.product-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--muted-color, #8993a4);
}

.product-meta svg {
    width: 15px;
    height: 15px;
}

/* Product controls */

.product-controls {
    padding: 8px 0;
}

.product-control-row {
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
}

.product-control-row + .product-control-row {
    border-top: 1px solid var(--border-color, rgba(128, 128, 128, 0.15));
}

.product-control-row strong {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
}

.product-control-row small {
    display: block;
    font-size: 11px;
}

/* Modern toggle switch */

.status-switch {
    width: 43px;
    height: 24px;
    flex-shrink: 0;
    padding: 3px;
    border: 0;
    border-radius: 30px;
    background: #8993a4;
    cursor: pointer;
    transition: background 0.2s ease;
}

.status-switch span {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.status-switch.is-on {
    background: #16b981;
}

.status-switch.is-on span {
    transform: translateX(19px);
}

.status-switch:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* Product actions */

.product-card-actions {
    padding-top: 14px;
    border-top: 1px solid var(--border-color, rgba(128, 128, 128, 0.2));
}

.edit-product-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid var(--border-color, rgba(128, 128, 128, 0.3));
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-product-button:hover {
    border-color: #20C8E8;
    color: #20C8E8;
    background: rgba(32, 200, 232, 0.07);
}

.edit-product-button svg {
    width: 15px;
    height: 15px;
}

/* Loading, empty and error states */

.products-loading,
.products-empty,
.products-error {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 25px;
}

.products-empty > svg,
.products-error > svg {
    width: 35px;
    height: 35px;
    color: #20C8E8;
}

.products-empty h3,
.products-error h3 {
    margin: 5px 0 0;
}

.products-empty p,
.products-error p,
.products-loading p {
    color: var(--muted-color, #8993a4);
    font-size: 13px;
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(32, 200, 232, 0.2);
    border-top-color: #20C8E8;
    border-radius: 50%;
    animation: productSpin 0.8s linear infinite;
}

@keyframes productSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        padding: 17px;
    }

    .heading-actions {
        width: 100%;
    }

    .heading-actions button {
        flex: 1;
    }
}

/* =====================================
   PRODUCT MODAL
===================================== */

#productFormPanel[hidden] {
    display: none !important;
}

#productFormPanel {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    margin: 0;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background: rgba(3, 10, 25, 0.72);
    backdrop-filter: blur(8px);
    border: 0;
    border-radius: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

#productFormPanel.is-visible {
    opacity: 1;
    visibility: visible;
}

#productFormPanel.is-closing {
    opacity: 0;
    visibility: hidden;
}

.product-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 28px;
    border: 1px solid var(--border-color, rgba(128,128,128,.2));
    border-radius: 22px;
    background: var(--card-background, #fff);
    color: var(--text-color, inherit);
    box-shadow: 0 25px 80px rgba(0,0,0,.3);
    transform: translateY(25px) scale(.97);
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
}

#productFormPanel.is-visible .product-modal-dialog {
    transform: translateY(0) scale(1);
}

#productFormPanel.is-closing .product-modal-dialog {
    transform: translateY(15px) scale(.98);
}

.product-modal-dialog .panel-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 0 42px 20px 0;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border-color, rgba(128,128,128,.2));
}

.product-modal-dialog .panel-header h3 {
    margin: 0 0 7px;
    font-size: 21px;
    font-weight: 750;
}

.product-modal-dialog .panel-header p {
    margin: 0;
    color: var(--muted-color, #8993a4);
    font-size: 13px;
}

.modal-close-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-color, rgba(128,128,128,.2));
    border-radius: 11px;
    background: transparent;
    color: inherit;
    font-size: 25px;
    cursor: pointer;
    transition: .2s ease;
}

.modal-close-button:hover {
    background: rgba(224,82,82,.12);
    color: #e05252;
    transform: rotate(90deg);
}

.product-modal-dialog form {
    display: grid;
    gap: 10px;
}

.product-modal-dialog form label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 650;
}

.product-modal-dialog form input,
.product-modal-dialog form textarea,
.product-modal-dialog form select {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid var(--border-color, rgba(128,128,128,.25));
    border-radius: 11px;
    background: var(--input-background, transparent);
    color: inherit;
    font: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.product-modal-dialog form textarea {
    min-height: 95px;
    resize: vertical;
}

.product-modal-dialog form input:focus,
.product-modal-dialog form textarea:focus,
.product-modal-dialog form select:focus {
    border-color: #20C8E8;
    box-shadow: 0 0 0 3px rgba(32,200,232,.12);
}

.product-modal-dialog form .heading-actions {
    margin-top: 20px;
}

.product-modal-dialog form button {
    min-height: 43px;
    border-radius: 11px;
}

body.modal-open {
    overflow: hidden;
}

/* =====================================
   TOAST NOTIFICATIONS
===================================== 

.notification-container {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.app-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid var(--border-color, rgba(128,128,128,.2));
    border-radius: 14px;
    background: var(--card-background, #fff);
    color: var(--text-color, #172033);
    box-shadow: 0 12px 35px rgba(0,0,0,.16);
    opacity: 0;
    transform: translateX(25px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: auto;
}

.app-toast.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.app-toast > svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}

.toast-success > svg {
    color: #16b981;
}

.toast-error > svg {
    color: #e05252;
}

.toast-info > svg {
    color: #20a8d0;
}

.app-toast span {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.app-toast button {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 21px;
    cursor: pointer;
    opacity: .65;
}

.app-toast button:hover {
    opacity: 1;
}

@media (max-width: 600px) {
    #productFormPanel {
        padding: 12px;
        align-items: center;
    }

    .product-modal-dialog {
        max-height: calc(100vh - 24px);
        padding: 20px;
        border-radius: 17px;
    }

    .notification-container {
        top: 12px;
        right: 12px;
    }
}*/

/* =========================================
   NKONNECT — MODERN POLISH & NEW COMPONENTS
   Added: v1.1.0
========================================= */

/* SEARCH BAR */
.search-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 0 13px;
    height: 40px;
    min-width: 230px;
    transition: border-color .2s, box-shadow .2s;
}
.search-bar:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(32,200,232,.12);
}
.search-bar svg { width:16px; height:16px; color: var(--muted); flex-shrink:0; }
.search-bar input {
    border: none; background: transparent; color: var(--text);
    font: inherit; font-size: 13px; outline: none; width: 100%;
}
.search-bar input::placeholder { color: var(--muted); }

/* FILTER SELECT */
.filter-select {
    height: 40px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 11px;
    background: var(--surface); color: var(--text);
    font: inherit; font-size: 13px; cursor: pointer; outline: none;
    transition: border-color .2s;
}
.filter-select:focus { border-color: var(--brand); }

/* DATA TABLE */
.data-table-wrap { overflow-x: auto; }
.data-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th {
    text-align: left; font-size: 11px; font-weight: 700;
    color: var(--muted); text-transform: uppercase;
    letter-spacing: .05em; padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 13px 14px; border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-hover); transition: background .15s; }
.data-table .user-cell { display:flex; align-items:center; gap:10px; }
.data-table .user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #07152D, #1677FF, #20C8E8);
    display: grid; place-items: center;
    color: #fff; font-size: 13px; font-weight: 700; flex-shrink:0;
}
.data-table .user-name { font-weight: 600; font-size: 13px; }
.data-table .user-email { font-size: 11px; color: var(--muted); }

/* STATUS BADGES */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; white-space: nowrap;
}
.badge-green  { color: #16b981; background: rgba(22,185,129,.12); }
.badge-orange { color: #e28a31; background: rgba(226,138,49,.13); }
.badge-red    { color: #e05252; background: rgba(224,82,82,.12); }
.badge-blue   { color: #1677FF; background: rgba(22,119,255,.12); }
.badge-purple { color: #9b59f7; background: rgba(155,89,247,.13); }
.badge-gray   { color: var(--muted); background: rgba(128,128,128,.12); }

/* PAGINATION */
.table-pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0 2px; gap: 10px; flex-wrap: wrap;
}
.table-pagination .page-info { font-size: 12px; color: var(--muted); }
.table-pagination .page-buttons { display:flex; gap:6px; }
.page-btn {
    min-width: 34px; height: 34px; padding: 0 10px;
    border: 1px solid var(--border); border-radius: 9px;
    background: var(--surface); color: var(--text);
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all .2s;
}
.page-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.page-btn.active { background: var(--brand); color: #07152D; border-color: var(--brand); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* LOADING TEXT */
.loading-text {
    text-align: center; padding: 40px; color: var(--muted); font-size: 13px;
}

/* COMING SOON CARD */
.coming-soon-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 48px 24px; gap: 12px;
    min-height: 220px;
}
.coming-soon-card svg {
    width: 44px; height: 44px; color: var(--brand); opacity: .7;
    margin-bottom: 4px;
}
.coming-soon-card h3 { font-size: 17px; font-weight: 700; margin: 0; }
.coming-soon-card p { font-size: 13px; color: var(--muted); max-width: 420px; line-height: 1.6; }

/* MAINTENANCE / DEMO CONTROL ROWS */
.product-control-panel { display: flex; flex-direction: column; gap: 0; }
.control-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 18px 0;
    border-bottom: 1px solid var(--border);
}
.control-toggle-row:last-child { border-bottom: none; }
.control-toggle-info { flex: 1; min-width: 0; }
.control-toggle-info strong { display: block; font-size: 14px; margin-bottom: 4px; }
.control-toggle-info span { font-size: 12px; color: var(--muted); }

/* HEALTH SERVICE ROWS */
.health-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border);
}
.health-row:last-child { border-bottom: none; }
.health-row-left { display: flex; align-items: center; gap: 12px; }
.health-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--muted); flex-shrink: 0;
    box-shadow: 0 0 0 3px transparent;
    transition: background .3s, box-shadow .3s;
}
.health-dot.healthy   { background: #16b981; box-shadow: 0 0 0 3px rgba(22,185,129,.2); }
.health-dot.degraded  { background: #e28a31; box-shadow: 0 0 0 3px rgba(226,138,49,.2); }
.health-dot.unavailable { background: #e05252; box-shadow: 0 0 0 3px rgba(224,82,82,.2); }
.health-dot.checking  { background: var(--brand); box-shadow: 0 0 0 3px rgba(32,200,232,.2); animation: healthPulse 1.2s ease infinite; }
@keyframes healthPulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.health-service-name { font-size: 14px; font-weight: 600; }
.health-service-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.health-latency { font-size: 12px; color: var(--muted); }

/* STAT ICON EXTRA COLOURS */
.stat-icon.orange { background: rgba(226,138,49,.14); color: #e28a31; }
.stat-icon.green  { background: rgba(22,185,129,.14); color: #16b981; }
.stat-icon.purple { background: rgba(155,89,247,.14); color: #9b59f7; }

/* SMOOTH SECTION TRANSITIONS */
.content-section { animation: sectionFadeIn .2s ease; }
@keyframes sectionFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ICON BUTTON hover glow */
.icon-button:hover { color: var(--brand); background: rgba(32,200,232,.08); }

/* TOPBAR environment badge improvement */
.environment-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px; border-radius: 20px;
    background: rgba(32,200,232,.1);
    border: 1px solid rgba(32,200,232,.25);
    font-size: 10px; font-weight: 700; letter-spacing: .07em; color: var(--brand);
}
.environment-badge span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
    display: inline-block; animation: envPulse 2s ease infinite;
}
@keyframes envPulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* WELCOME BANNER shine */
.welcome-banner { position: relative; overflow: hidden; }
.welcome-banner::after {
    content: ""; position: absolute; top: -50%; left: -60%;
    width: 40%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
    transform: skewX(-15deg);
    animation: bannerShine 6s ease infinite;
}
@keyframes bannerShine { 0%,100%{left:-60%} 50%{left:120%} }

/* SIDEBAR NAV ITEM active accent line */
.nav-item.active { position: relative; }
.nav-item.active::before {
    content: ""; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 60%;
    background: var(--brand); border-radius: 0 3px 3px 0;
}

/* PROFILE AVATAR gradient ring */
.profile:hover .profile-avatar { box-shadow: 0 0 0 2px var(--brand); transition: box-shadow .2s; }

/* OVERVIEW STAT ANIMATION */
@keyframes countUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.stat-card h3 { animation: countUp .35s ease; }

/* PANEL hover lift */
.panel { transition: box-shadow .2s; }

/* MOBILE FLEX WRAP */
@media (max-width: 768px) {
    .panel-header { flex-wrap: wrap; gap: 10px; }
    .search-bar { min-width: 0; width: 100%; }
    .heading-actions { flex-wrap: wrap; }
    .table-pagination { flex-direction: column; align-items: flex-start; }
}
