/* ========================= */
/* GLOBAL */
/* ========================= */
:root {
    --primary: #2fa182;
    --primary-dark: #ffffff;
    --accent: #73d1b8;
    --accent-soft: #cbf5ea;

    --bg: #e8eef5;
    --card-bg: #ffffff;
    --field-bg: #f9fafb;

    --text: #111827;
    --muted: #6b7280;
    --border: #d1d5db;
    --border-soft: #e5e7eb;
    --border-black: #000000;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: #0f172a;
    font-size: 14px;
}

/* ========================= */
/* HEADER */
/* ========================= */
.header {
    background: var(--accent);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    height: 58px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    letter-spacing: 0;
}
.logo {
    height: 50px;   /* fits nicely inside 58px header */
    width: auto;
    margin-right: 10px;
}

/* ========================= */
/* GRID */
/* ========================= */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.15fr 1.25fr;
    gap: 16px;
    padding: 16px;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========================= */
/* CARD */
/* ========================= */
.card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


/* ========================= */
/* INPUT FIELDS */
/* ========================= */
.field,
.field-3col {
    display: grid;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.field {
    grid-template-columns: minmax(120px, 1fr) 150px;
}

.field-3col {
    grid-template-columns: minmax(140px, 1fr) 90px 48px;
    /* grid-template-columns: 10fr 2.5fr 0.5fr; */
}


.field-3col--bore {
    grid-template-columns: 10fr 2.5fr 0.5fr;
}

.field:hover,
.field-3col:hover {
    background: var(--field-bg);
}

.field label,
.field-3col label,
.field-3col span {
    font-size: 14px;
    color: var(--muted);
	text-align: left;
/* 	margin-left: -4px; */
}

.field input,
.field select,
.field-3col input {
    width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--field-bg);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.field input,
.field-3col input {
    text-align: right;
}

.field select {
    text-align: left;
    cursor: pointer;
}

.field input:focus,
.field select:focus,
.field-3col input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#bore {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.brochure-link {
    display: inline-block;
    margin-top: 4px; /* creates visual height */
}

/* ========================= */
/* ROW OUTPUT */
/* ========================= */
.row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 4px;
    font-size: 14px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
	text-align: left;
}

.row:last-child {
    border-bottom: none;
}

.row span:first-child {
    color: var(--muted);
}

.row span:last-child {
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

/* ========================= */
/* VIEWER */
/* ========================= */
.viewer-box {
    height: 350px;
    background: #111827;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ========================= */
/* TEXT */
/* ========================= */
h3 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    font-size: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
}

.desc-list {
    margin: 10px 0 0 18px;
    padding: 0;
    font-size: 13px;
    color: #374151;
}

.desc-list li {
    margin-bottom: 5px;
}

/* ========================= */
/* FEATURES */
/* ========================= */
.features-card {
    text-align: left;
}

.features-card .toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

/* SWITCH */
.switch {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.25s ease;
}

.slider::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
    background: var(--primary);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

/* ========================= */
/* BOM TABLE */
/* ========================= */
.bom-wrapper {
    max-height: 1090px;
    overflow-y: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
}

.bom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
}

.bom-table thead {
    position: sticky;
    top: 0;
    background: var(--accent);
    color: #ffffff;
    z-index: 2;
}

.bom-table th,
.bom-table td {
    padding: 6px 8px;
    vertical-align: middle;
}

.bom-table th {
    text-align: left;
    font-weight: 600;
}

.bom-table td {
    border-bottom: 1px solid var(--border-soft);
}

.bom-table tbody tr:nth-child(even) {
    background: var(--field-bg);
}

.bom-table tbody tr:hover {
    background: #eef2ff;
}

.bom-table th:nth-child(1),
.bom-table td:nth-child(1) {
    width: 40px;
    text-align: center;
    font-weight: 600;
}

.bom-table th:nth-child(2),
.bom-table td:nth-child(2),
.bom-table th:nth-child(3),
.bom-table td:nth-child(3) {
    width: 40%;
}

.bom-table th:nth-child(4),
.bom-table td:nth-child(4) {
    width: 60px;
    text-align: center;
    font-weight: 600;
}

.bom-edited {
    background: #e0f2fe !important;
}

/* SELECT INSIDE BOM */
.bom-select {
    width: 100%;
    border: none;
    background-color: transparent;
    color: #0000ff;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%236b7280' height='10' viewBox='0 0 20 20' width='10' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 18px;
}

.bom-select:focus {
    outline: none;
}

/* ========================= */
/* SCROLLBAR */
/* ========================= */
.bom-wrapper::-webkit-scrollbar {
    width: 6px;
}

.bom-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.bom-wrapper::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 10px;
}

.bom-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a5b4fc;
}

/* ========================= */
/* BUTTON */
/* ========================= */
.btn-primary {
    margin-top: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
	color: #000000 ;
	border: 1px solid var(--border-black);
    border-radius: var(--radius-sm);
;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */
@media (max-width: 1200px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .field,
    .field-3col {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .field input,
    .field select,
    .field-3col input {
        text-align: left;
    }

    .viewer-box {
        height: 260px;
    }
}
