/* Hardware Mart v2 frontend skin, ported from the static UI design */
:root {
    --hmv2-navy: #020617;
    --hmv2-navy-2: #0f172a;
    --hmv2-text: #0f172a;
    --hmv2-muted: #64748b;
    --hmv2-border: #e2e8f0;
    --hmv2-orange: #ea580c;
    --hmv2-orange-dark: #c2410c;
    --hmv2-green: #10b981;
    --hmv2-bg: #f8fafc;
}

body {
    background: var(--hmv2-bg);
}

.hm-auth-body,
.hm-auth-body * {
    box-sizing: border-box;
}

.hm-auth-body {
    min-height: 100vh;
    margin: 0;
    background: #f8fafc;
    color: var(--hmv2-text);
    font-family: "Poppins", Arial, sans-serif;
}

.hm-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.hm-auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
    width: min(1120px, 100%);
    min-height: 640px;
    overflow: hidden;
    border: 1px solid var(--hmv2-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .14);
}

.hm-auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
    background: radial-gradient(circle at 88% 12%, rgba(234, 88, 12, .26), transparent 30%),
        linear-gradient(180deg, #020617, #0f172a 62%, #020617);
    color: #fff;
}

.hm-auth-logo img {
    width: 168px;
    max-width: 100%;
    height: auto;
    margin-bottom: 30px;
}

.hm-auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid #334155;
    border-radius: 999px;
    background: rgba(15, 23, 42, .78);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
}

.hm-auth-kicker i {
    color: var(--hmv2-green);
}

.hm-auth-brand h1 {
    margin: 20px 0 14px;
    color: #fff;
    font-size: 38px;
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: 0;
}

.hm-auth-brand p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.75;
}

.hm-auth-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 30px;
    padding: 14px;
    border: 1px solid #334155;
    border-radius: 16px;
    background: rgba(15, 23, 42, .78);
}

.hm-auth-stats strong,
.hm-auth-stats span {
    display: block;
    text-align: center;
}

.hm-auth-stats strong {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.hm-auth-stats span {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

.hm-auth-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hm-auth-chips span {
    padding: 8px 10px;
    border: 1px solid #334155;
    border-radius: 999px;
    background: rgba(30, 41, 59, .72);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 800;
}

.hm-auth-chips i {
    color: #fb923c;
}

.hm-auth-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
}

.hm-auth-topline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 12px;
    font-weight: 800;
}

.hm-auth-topline a {
    color: var(--hmv2-orange);
    text-decoration: none;
}

.hm-auth-content .card {
    margin: 0;
    border: 0;
    box-shadow: none;
}

.hm-auth-content .card-header {
    padding: 0 0 18px;
    border: 0;
    background: transparent;
    color: var(--hmv2-text);
    font-size: 28px;
    line-height: 1.15;
    font-weight: 900;
}

.hm-auth-content .card-body {
    padding: 0;
}

.hm-auth-content .row {
    margin-right: 0;
    margin-left: 0;
}

.hm-auth-content [class*="col-"] {
    width: 100%;
    float: none;
    padding-right: 0;
    padding-left: 0;
}

.hm-auth-content .col-form-label {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    color: #334155;
    text-align: left;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hm-auth-content .mb-3 {
    margin-bottom: 16px;
}

.hm-auth-content .form-control,
.hm-auth-content input,
.hm-auth-content select,
.hm-auth-content textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    color: var(--hmv2-text);
    font-size: 14px;
    font-weight: 600;
}

.hm-auth-content .form-control:focus,
.hm-auth-content input:focus,
.hm-auth-content select:focus,
.hm-auth-content textarea:focus {
    border-color: var(--hmv2-orange);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, .12);
    outline: 0;
}

.hm-auth-content .btn-primary {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 12px;
    background: var(--hmv2-orange);
    color: #fff;
    font-weight: 900;
}

.hm-auth-content .btn-link {
    color: var(--hmv2-orange);
    font-weight: 800;
}

.hm-auth-content .offset-md-4 {
    margin-left: 0;
}

.hm-auth-content .invalid-feedback,
.hm-auth-content .text-danger {
    display: block;
    margin-top: 6px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
}

.hm-public-form-card,
.hm-rfq-form-card,
.hm-customer-onboarding-card,
.hm-product-filter-panel,
.hm-ref-search-card,
.hm-ref-filter-card {
    border: 1px solid var(--hmv2-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

.hm-section-head,
.hm-rfq-hero,
.hm-product-directory__hero {
    position: relative;
    overflow: hidden;
    border: 1px solid #1e293b;
    border-radius: 18px;
    background: radial-gradient(circle at 86% 12%, rgba(234, 88, 12, .20), transparent 30%),
        linear-gradient(135deg, #020617, #0f172a);
    color: #fff;
}

.hm-section-head h1,
.hm-rfq-hero h1,
.hm-product-directory__hero h1 {
    color: #fff;
    letter-spacing: 0;
}

.hm-section-head p,
.hm-rfq-hero p,
.hm-product-directory__hero p {
    color: #cbd5e1;
}

.hm-form input,
.hm-form select,
.hm-form textarea,
.hm-rfq-form input,
.hm-rfq-form select,
.hm-rfq-form textarea,
.hm-customer-onboarding-form input,
.hm-customer-onboarding-form select,
.hm-customer-onboarding-form textarea,
.hm-product-inquiry-form input,
.hm-product-inquiry-form select,
.hm-product-inquiry-form textarea {
    min-height: 46px;
    border-color: #cbd5e1;
    border-radius: 12px;
    color: var(--hmv2-text);
    font-weight: 600;
}

.hm-form textarea,
.hm-rfq-form textarea,
.hm-customer-onboarding-form textarea,
.hm-product-inquiry-form textarea {
    min-height: 120px;
}

.hm-form input:focus,
.hm-form select:focus,
.hm-form textarea:focus,
.hm-rfq-form input:focus,
.hm-rfq-form select:focus,
.hm-rfq-form textarea:focus,
.hm-customer-onboarding-form input:focus,
.hm-customer-onboarding-form select:focus,
.hm-customer-onboarding-form textarea:focus,
.hm-product-inquiry-form input:focus,
.hm-product-inquiry-form select:focus,
.hm-product-inquiry-form textarea:focus {
    border-color: var(--hmv2-orange);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, .12);
    outline: 0;
}

.hm-form label,
.hm-rfq-form label,
.hm-customer-onboarding-form label,
.hm-product-inquiry-form label span,
.hm-product-filter-panel label {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hm-home {
    background: var(--hmv2-bg);
    color: var(--hmv2-text);
    font-family: "Poppins", "Source Sans Pro", Arial, sans-serif;
}

.hm-v2-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.hm-v2-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #1e293b;
    background: radial-gradient(circle at 82% 8%, rgba(234, 88, 12, .2), transparent 28%),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: #fff;
}

.hm-v2-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
    gap: 48px;
    align-items: center;
    min-height: 620px;
    padding: 76px 0 68px;
}

.hm-v2-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #334155;
    border-radius: 999px;
    background: rgba(30, 41, 59, .86);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
}

.hm-v2-pill i {
    color: var(--hmv2-green);
}

.hm-v2-hero h1 {
    max-width: 760px;
    margin: 22px 0 18px;
    color: #fff;
    font-size: clamp(34px, 4.2vw, 58px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: 0;
}

.hm-v2-hero h1 span {
    color: var(--hmv2-orange);
}

.hm-v2-hero__lead {
    max-width: 650px;
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.75;
}

.hm-v2-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hm-v2-hero__actions .hm-btn {
    min-height: 50px;
    padding: 0 22px;
    border-radius: 12px;
}

.hm-v2-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.hm-v2-hero__chips a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #334155;
    border-radius: 999px;
    background: rgba(15, 23, 42, .7);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.hm-v2-hero__chips a:hover {
    border-color: #fb923c;
    color: #fff;
}

.hm-v2-sourcing {
    max-width: 690px;
    margin-top: 26px;
    padding: 16px;
    border: 1px solid #334155;
    border-radius: 16px;
    background: rgba(15, 23, 42, .94);
    box-shadow: 0 26px 80px rgba(0, 0, 0, .32);
}

.hm-v2-sourcing__tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #334155;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
}

.hm-v2-sourcing__tabs span,
.hm-v2-sourcing__tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.hm-v2-sourcing__tabs .is-active {
    background: var(--hmv2-orange);
    color: #fff;
}

.hm-v2-sourcing__tabs a:last-child {
    margin-left: auto;
    color: #fb923c;
}

.hm-v2-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 12px;
}

.hm-v2-search__input {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    background: #fff;
    color: var(--hmv2-text);
}

.hm-v2-search__input input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--hmv2-text);
    font-size: 13px;
    font-weight: 600;
}

.hm-v2-search .hm-btn {
    min-height: 48px;
    border-radius: 12px;
    padding: 0 22px;
    white-space: nowrap;
}

.hm-v2-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
    color: #94a3b8;
    font-size: 12px;
}

.hm-v2-keywords a,
.hm-v2-keywords span:not(:first-child) {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(51, 65, 85, .72);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.hm-v2-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 650px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #1e293b;
}

.hm-v2-metrics strong {
    display: block;
    color: #fff;
    font-size: 22px;
    line-height: 1.1;
}

.hm-v2-metrics span {
    color: #94a3b8;
    font-size: 12px;
}

.hm-v2-hero-card {
    overflow: hidden;
    border: 1px solid #334155;
    border-radius: 18px;
    background: #1e293b;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .35);
}

.hm-v2-hero-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hm-v2-hero-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, .92), #020617);
}

.hm-v2-hero-card__footer strong {
    display: block;
    color: #fff;
    font-size: 15px;
}

.hm-v2-hero-card__footer span {
    color: #94a3b8;
    font-size: 12px;
}

.hm-v2-section {
    padding: 64px 0;
}

.hm-v2-section--white {
    background: #fff;
}

.hm-v2-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.hm-v2-head h2 {
    margin: 0;
    color: var(--hmv2-text);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    font-weight: 900;
}

.hm-v2-head p {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--hmv2-muted);
    font-size: 14px;
    line-height: 1.7;
}

.hm-v2-head a {
    color: var(--hmv2-orange);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.hm-v2-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.hm-v2-category-card,
.hm-v2-product-card,
.hm-v2-factory-card,
.hm-v2-rfq-card,
.hm-v2-cluster-card {
    border: 1px solid var(--hmv2-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.hm-v2-category-card {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 14px;
    min-height: 150px;
    padding: 14px;
    color: inherit;
    text-decoration: none;
}

.hm-v2-category-card img {
    width: 94px;
    height: 94px;
    border-radius: 12px;
    object-fit: contain;
    background: #f8fafc;
}

.hm-v2-category-card h3,
.hm-v2-product-card h3,
.hm-v2-factory-card h3 {
    margin: 0;
    color: var(--hmv2-text);
    font-size: 16px;
    line-height: 1.3;
    font-weight: 900;
}

.hm-v2-category-card p {
    margin: 6px 0 10px;
    color: var(--hmv2-muted);
    font-size: 12px;
    line-height: 1.45;
}

.hm-v2-tag {
    display: inline-flex;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff7ed;
    color: var(--hmv2-orange-dark);
    font-size: 11px;
    font-weight: 800;
}

.hm-v2-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.hm-v2-product-card {
    overflow: hidden;
}

.hm-v2-product-card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #f8fafc;
}

.hm-v2-product-card__body,
.hm-v2-factory-card {
    padding: 18px;
}

.hm-v2-product-card p,
.hm-v2-factory-card p {
    margin: 8px 0 0;
    color: var(--hmv2-muted);
    font-size: 13px;
    line-height: 1.6;
}

.hm-v2-product-card__meta,
.hm-v2-factory-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.hm-v2-product-card__meta span,
.hm-v2-factory-card__meta span {
    padding: 6px 8px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
}

.hm-v2-product-card__actions,
.hm-v2-factory-card__actions {
    display: flex;
    gap: 10px;
}

.hm-v2-product-card__actions .hm-btn,
.hm-v2-factory-card__actions .hm-btn {
    flex: 1;
    min-height: 38px;
    justify-content: center;
}

.hm-v2-cluster-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.hm-v2-cluster-card {
    padding: 18px;
}

.hm-v2-cluster-card h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 900;
}

.hm-v2-cluster-card {
    border-color: #1e293b;
    background: linear-gradient(180deg, #0f172a, #020617);
    color: #cbd5e1;
}

.hm-v2-cluster-card p {
    margin: 0 0 14px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.55;
}

.hm-v2-cluster-card span {
    display: block;
    color: #fb923c;
    font-size: 12px;
    font-weight: 900;
}

.hm-v2-rfq-band {
    padding: 54px 0;
    background: linear-gradient(90deg, #fff7ed, #fff, #f8fafc);
}

.hm-v2-rfq-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 26px;
}

.hm-v2-rfq-card h2 {
    margin: 0;
    color: var(--hmv2-text);
    font-size: 30px;
    font-weight: 900;
}

.hm-v2-rfq-card p {
    margin: 8px 0 0;
    color: var(--hmv2-muted);
    font-size: 14px;
}

.hm-v2-rfq-card .hm-btn {
    min-width: 180px;
    justify-content: center;
}

@media (max-width: 1199px) {
    .hm-v2-hero__grid,
    .hm-v2-card-grid,
    .hm-v2-cluster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hm-v2-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hm-auth-page {
        align-items: flex-start;
        padding: 16px;
    }

    .hm-auth-shell {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 18px;
    }

    .hm-auth-brand,
    .hm-auth-content {
        padding: 26px;
    }

    .hm-auth-brand h1 {
        font-size: 30px;
    }

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

@media (max-width: 767px) {
    .hm-v2-shell {
        width: min(100% - 24px, 1280px);
    }

    .hm-v2-hero__grid,
    .hm-v2-card-grid,
    .hm-v2-cluster-grid,
    .hm-v2-category-grid,
    .hm-v2-rfq-card {
        grid-template-columns: 1fr;
    }

    .hm-v2-hero__grid {
        min-height: 0;
        padding: 42px 0;
    }

    .hm-v2-search {
        grid-template-columns: 1fr;
    }

    .hm-v2-sourcing__tabs {
        flex-wrap: wrap;
    }

    .hm-v2-sourcing__tabs a:last-child {
        margin-left: 0;
    }

    .hm-v2-metrics {
        grid-template-columns: 1fr;
    }

    .hm-v2-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hm-v2-section {
        padding: 42px 0;
    }

    .hm-auth-page {
        padding: 10px;
    }

    .hm-auth-brand,
    .hm-auth-content {
        padding: 20px;
    }

    .hm-auth-topline {
        flex-direction: column;
        gap: 8px;
    }

    .hm-auth-stats {
        grid-template-columns: 1fr;
    }

    .hm-auth-content .card-header {
        font-size: 24px;
    }
}
