/* =========================================================
   NPAV Upgrade Page CSS
   File: public/assets/css/upgrade.css
========================================================= */

:root {
    --npav-green-primary: rgb(0, 143, 79);
    --npav-green-dark: #007a44;
    --npav-light-bg: #f8f9fa;
    --npav-dark-bg: #01180d;
    --npav-text-color: #c0c0c0;
    --npav-buy-button-light-green: #e0f2e0;
    --npav-border-color: #e5e7eb;
}

/* =========================================================
   GLOBAL
========================================================= */

body {
    margin: 0;
    background: var(--npav-light-bg);
    font-family: Arial, sans-serif;
    color: #1f2937;
}

a {
    text-decoration: none;
}

/* =========================================================
   HEADER
========================================================= */

.top-header {
    background: linear-gradient(135deg, #01180d 0%, #022715 50%, #034a26 100%);
    border-bottom: 3px solid var(--npav-green-primary);
}

.header-container {
    max-width: 920px;
    margin: auto;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-box {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-box img {
    width: 42px;
    height: auto;
}

.brand-text h1 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.brand-text p {
    margin: 4px 0 0;
    color: var(--npav-text-color);
    font-size: 12px;
    line-height: 1.5;
}

.release-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #d1fae5;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.release-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

/* =========================================================
   MAIN
========================================================= */

.main-wrapper {
    max-width: 920px;
    margin: 24px auto;
    padding: 0 16px;
}

.main-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--npav-border-color);
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}

.card-body-custom {
    padding: 24px;
}

/* =========================================================
   UPDATE ALERT
========================================================= */

.update-alert {
    background: var(--npav-buy-button-light-green);
    padding: 14px 18px;
    font-weight: 600;
    color: var(--npav-green-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--npav-green-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* =========================================================
   SECTION TITLE
========================================================= */

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
}

/* =========================================================
   RELEASE VERSION
========================================================= */

.release-version-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.version-card {
    background: #fff;
    border: 1px solid #e4ece7;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: .2s ease;
}

.version-card:hover {
    transform: translateY(-2px);
    border-color: var(--npav-green-primary);
    box-shadow: 0 4px 14px rgba(0, 143, 79, .08);
}

.version-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 143, 79, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.version-icon i {
    color: var(--npav-green-primary);
    font-size: 18px;
}

.version-details span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.version-details strong {
    font-size: 22px;
    font-weight: 700;
    color: var(--npav-green-dark);
}

/* =========================================================
   PRODUCT GRID
========================================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.product-item {
    background: #ffffff;
    border: 1px solid #e8ecef;
    border-radius: 12px;
    padding: 14px 16px;
    transition: .2s ease;
}

.product-item:hover {
    border-color: #d7dee3;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.product-info {
    width: 100%;
}

.product-title {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.product-title span {
    flex: 1;
}

.product-title i {
    color: var(--npav-green-primary);
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.datasheet-inline {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f4f6f8;
    color: #6b7280;
    transition: .2s ease;
}

.datasheet-inline:hover {
    background: #eef7f2;
    color: var(--npav-green-primary);
}

.datasheet-inline i {
    font-size: 13px;
}

/* =========================================================
   DOWNLOAD BUTTON
========================================================= */

.btn-download {
    background: var(--npav-green-primary);
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 13px 28px;
    font-weight: 600;
    transition: .2s ease;
}

.btn-download:hover {
    background: var(--npav-green-dark);
    color: #fff;
}

.download-url {
    margin-top: 8px;
    font-size: 12px;
    color: #777;
}

/* =========================================================
   CERTIFICATION
========================================================= */

.cert-box {
    border: 1px solid #d7eadf;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    line-height: 1.7;
}

.cert-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: rgba(0, 143, 79, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-icon i {
    font-size: 20px;
    color: var(--npav-green-primary);
}

.cert-content {
    flex: 1;
}

.cert-text {
    font-size: 14px;
    line-height: 1.7;
    font-weight: 500;
}

.cert-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.cert-images img {
    height: 120px;
    width: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    border: 1px solid #dcefe4;
}

/* =========================================================
   ACTION SECTION
========================================================= */

.action-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    transition: .2s ease;
}

.info-link i {
    color: var(--npav-green-primary);
    font-size: 14px;
}

.info-link:hover {
    color: var(--npav-green-dark);
}

/* =========================================================
   BUTTONS
========================================================= */

.btn-poc {
    border: 1px solid var(--npav-green-primary);
    color: var(--npav-green-dark);
    background: #fff;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    transition: .2s ease;
}

.btn-poc:hover {
    background: var(--npav-buy-button-light-green);
    color: var(--npav-green-dark);
}

.btn-submit {
    width: 100%;
    background: var(--npav-green-primary);
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 13px;
    font-weight: 600;
    transition: .2s ease;
}

.btn-submit:hover {
    background: var(--npav-green-dark);
    color: #fff;
}

/* =========================================================
   FORM
========================================================= */

.form-wrapper {
    margin-top: 20px;
    border-top: 1px solid #ececec;
    padding-top: 20px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--npav-green-primary);
    box-shadow: 0 0 0 3px rgba(0, 143, 79, .10);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* =========================================================
   FOOTER
========================================================= */

.footer {
    text-align: center;
    padding: 18px;
    font-size: 13px;
    color: #777;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 992px) {

    .header-container,
    .main-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }

    .release-version-list,
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-wrap {
        width: 100%;
    }

    .release-version-list,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .card-body-custom {
        padding: 20px;
    }

    .btn-download,
    .btn-poc,
    .btn-submit,
    .info-link {
        width: 100%;
        justify-content: center;
    }

    .action-section {
        flex-direction: column;
        align-items: stretch;
    }

    .download-url {
        word-break: break-word;
    }
}

@media (max-width: 576px) {

    body {
        font-size: 14px;
    }

    .header-container {
        padding: 14px;
        gap: 14px;
    }

    .brand-wrap {
        align-items: flex-start;
    }

    .logo-box {
        width: 48px;
        height: 48px;
    }

    .logo-box img {
        width: 36px;
    }

    .brand-text h1 {
        font-size: 16px;
    }

    .brand-text p {
        font-size: 11px;
    }

    .release-badge {
        margin: 0 auto;
        width: fit-content;
    }

    .main-wrapper {
        margin: 16px auto;
        padding-left: 12px;
        padding-right: 12px;
    }

    .card-body-custom {
        padding: 16px;
    }

    .update-alert {
        padding: 12px 14px;
        font-size: 13px;
        line-height: 1.5;
    }

    .version-card {
        padding: 14px;
    }

    .version-icon {
        width: 44px;
        height: 44px;
    }

    .version-details span {
        font-size: 11px;
    }

    .version-details strong {
        font-size: 18px;
    }

    .product-item {
        padding: 12px;
        font-size: 13px;
    }

    .cert-box {
        flex-direction: column;
    }

    .cert-content {
        width: 100%;
        text-align: center;
    }

    .cert-images {
        justify-content: center;
        gap: 10px;
    }

    .cert-images img {
        height: 70px;
    }

    .form-wrapper {
        margin-top: 16px;
        padding-top: 16px;
    }

    .form-control,
    .form-select {
        padding: 11px 12px;
    }

    textarea.form-control {
        min-height: 90px;
    }

    .footer {
        padding: 16px 12px;
        font-size: 12px;
        line-height: 1.6;
    }
}

@media (max-width: 380px) {

    .brand-text h1 {
        font-size: 15px;
    }

    .version-details strong {
        font-size: 17px;
    }

    .btn-download,
    .btn-poc,
    .btn-submit {
        font-size: 14px;
    }
}