:root {
    --navy: #151314;
    --navy2: #231F20;
    --navy3: #0F0D0E;
    --blue: #403A3C;
    --blue-light: #5A5255;
    --orange: #E5E5E5;
    --orange-light: #FFFFFF;
    --orange-glow: rgba(255, 255, 255, 0.15);
    --white: #ffffff;
    --gray: #8F898A;
    --gray-light: #D1CBCB;
    --green: #22c55e;
    --green-glow: rgba(34, 197, 94, 0.12);
    --red: #ef4444;
    --red-glow: rgba(239, 68, 68, 0.12);
    --yellow: #eab308;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-bg-hover: rgba(255, 255, 255, 0.07);
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --radius: 14px;
    --radius-sm: 8px;
    --sidebar-w: 260px;
    --transition: all 0.25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-main);
    background: var(--navy);
    color: var(--white);
    font-size: 14px;
    line-height: 1.5;
}

/* ===========================
   LAYOUT
=========================== */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--navy3);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 0;
    z-index: 100;
    overflow: hidden;
}

.sidebar-logo {
    padding: 28px 24px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--orange);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
}

.logo-text span {
    color: var(--orange);
}

.logo-sub {
    font-size: 10px;
    color: var(--gray);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray);
    padding: 12px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    margin-bottom: 6px;
    border-radius: 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 500;
    font-size: 13.5px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.085);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.24) 0%, rgba(16, 185, 129, 0.18) 100%);
    color: #ffffff;
    font-weight: 600;
    border: 1px solid rgba(96, 211, 148, 0.45);
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.nav-item .ni {
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-item.active .ni {
    background: rgba(96, 211, 148, 0.25);
    border-color: rgba(96, 211, 148, 0.5);
    color: #60d394;
}

.nav-item .badge-count {
    margin-left: auto;
    background: var(--orange);
    color: var(--navy3);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--gray);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--navy);
    display: flex;
    flex-direction: column;
}

.page {
    display: none;
    flex-direction: column;
    flex: 1;
}

.page.active {
    display: flex;
}

/* PAGE HEADER */
.page-header {
    padding: 28px 36px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--navy3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    flex-shrink: 0;
}

.page-header > div:first-child {
    min-width: 250px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 800;
}

.page-header .ph-sub {
    font-size: 13px;
    color: var(--gray);
    margin-top: 2px;
}

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.page-body {
    flex: 1;
    padding: 28px 36px;
    overflow-y: visible;
}

/* ===========================
   COMPONENTS
=========================== */

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-main);
    white-space: nowrap;
}

.btn-primary {
    background: var(--orange);
    color: var(--navy3);
}

.btn-primary:hover {
    background: var(--orange-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--gray-light);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--card-bg-hover);
    color: white;
}

.btn-success {
    background: var(--green);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: var(--radius);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon-only {
    padding: 9px;
    border-radius: var(--radius-sm);
}

/* ===================================================
   PROGRESS BUTTON ANIMATION (EXPORT DXF & ACTIONS)
   =================================================== */
.btn-progress-btn {
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate !important;
    justify-content: center !important;
    text-align: center !important;
    user-select: none;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.btn-progress-btn .btn-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background: #16a34a;
    transition: width 0.1s linear, opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
}

.btn-progress-btn .btn-progress-label {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    pointer-events: none;
    transition: opacity 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    text-align: center;
}

/* Success state: 100% completed */
.btn-progress-btn.is-success {
    border-color: #16a34a !important;
}

/* CARDS */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.card:hover {
    border-color: var(--border-hover);
}

/* STAT CARDS */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    opacity: 0.12;
}

.stat-card.blue::before {
    background: var(--blue-light);
}

.stat-card.orange::before {
    background: var(--orange);
}

.stat-card.green::before {
    background: var(--green);
}

.stat-card.gray::before {
    background: var(--gray);
}

.stat-label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
}

.stat-card.blue .stat-value {
    color: var(--blue-light);
}

.stat-card.orange .stat-value {
    color: var(--orange);
}

.stat-card.green .stat-value {
    color: var(--green);
}

.stat-card.gray .stat-value {
    color: var(--gray-light);
}

.stat-change {
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    color: var(--green);
}

/* TABLES */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead tr {
    background: rgba(255, 255, 255, 0.04);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: var(--card-bg);
    cursor: pointer;
}

.data-table tfoot td {
    font-weight: 700;
    color: var(--orange);
    border-top: 1px solid var(--border);
    border-bottom: none;
}

.data-table .mono {
    font-family: var(--font-mono);
    font-size: 12px;
}

.data-table .dimmed {
    opacity: 0.38;
}

.data-table .tr-highlight {
    background: rgba(255, 255, 255, 0.06);
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-green {
    background: var(--green-glow);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-orange {
    background: var(--orange-glow);
    color: var(--orange);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.badge-blue {
    background: rgba(200, 200, 200, 0.12);
    color: var(--blue-light);
    border: 1px solid rgba(200, 200, 200, 0.25);
}

.badge-gray {
    background: rgba(148, 163, 184, 0.1);
    color: var(--gray);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* FORMS */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.form-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
@media (max-width: 1200px) {
    .form-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .form-grid-5 { grid-template-columns: 1fr; }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

input[type=text],
input[type=number],
input[type=email],
input[type=tel],
select,
textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 14px;
    transition: var(--transition);
    width: 100%;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
}

select option {
    background: var(--navy2);
    color: var(--white);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray);
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input.editable-price {
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 6px;
    width: 100px;
    text-align: right;
    color: var(--orange-light);
    font-weight: 600;
}

input.editable-price:focus {
    border-color: var(--orange);
    background: rgba(255, 255, 255, 0.08);
}

/* SECTION TITLES */
.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-divider {
    height: 1px;
    background: var(--border);
    margin: 28px 0;
}

/* TABS */
.tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 11px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--white);
}

.tab-btn.active {
    color: var(--orange);
    border-bottom-color: var(--orange);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

#modal-confirm {
    z-index: 10050 !important;
}

.modal {
    background: var(--navy2);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    padding: 32px;
    animation: slideUp 0.3s ease;
}

.modal-sm {
    max-width: 400px;
}

.modal-lg {
    max-width: 800px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

.modal-close:hover {
    background: var(--card-bg);
    color: var(--white);
}

.modal-footer {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* CHECKS GRID */
.checks-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.check-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.check-label {
    font-size: 11px;
    color: var(--gray);
    margin-bottom: 8px;
    font-weight: 600;
}

.check-value {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.check-status {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}

.check-ok {
    background: var(--green-glow);
    color: var(--green);
}

.check-fail {
    background: var(--red-glow);
    color: var(--red);
}

.check-warn {
    background: rgba(234, 179, 8, 0.12);
    color: var(--yellow);
}

/* PRICING CARDS */
.pricing-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.4fr;
    gap: 16px;
    margin-bottom: 28px;
}

.price-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
}

.price-card.accent {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
    border-color: rgba(255, 255, 255, 0.35);
}

.price-card .pc-label {
    font-size: 11px;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.price-card .pc-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
}

.price-card.accent .pc-value {
    font-size: 26px;
    color: var(--orange);
}

.price-card .pc-sub {
    font-size: 11px;
    color: var(--gray);
    margin-top: 4px;
}

/* DRAWING CONTAINERS */
.drawing-container {
    background: #080c10;
    border-radius: var(--radius);
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
}

.drawing-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.drawing-box {}

.drawing-box h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-light);
    margin-bottom: 10px;
}

/* TOAST */
.toast-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--navy2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.3s ease;
    max-width: 340px;
}

.toast.success {
    border-left: 4px solid var(--green);
}

.toast.error {
    border-left: 4px solid var(--red);
}

.toast.info {
    border-left: 4px solid var(--blue-light);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* EMPTY STATE */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--gray);
}

.empty-state .es-icon {
    font-size: 52px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-light);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 320px;
}

/* SCROLLBARS */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* INLINE SEARCH */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
}

.search-bar input {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    flex: 1;
    outline: none;
    color: var(--white);
}

.search-bar input:focus {
    box-shadow: none;
}

/* RESPONSIVE hint */
@media (max-width: 1200px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* CAD REFERENCE DRAWINGS */
.cad-drawing-ref {
    padding: 16px;
    background: #000000;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.cad-drawing-ref img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* ======================================================
   NEW FEATURES STYLES
   ====================================================== */

/* Price card — green accent for markup final price */
.price-card.accent-green {
    background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(34,197,94,0.05));
    border: 1px solid rgba(34,197,94,0.3);
}
.price-card.accent-green .pc-label { color: #4ade80; }
.price-card.accent-green .pc-value { color: #4ade80; }

/* Markup card */
.markup-card {
    border: 1px solid rgba(255, 255, 255,0.25);
}
.markup-card .section-title {
    color: var(--orange-light);
    user-select: none;
}
.markup-card .section-title:hover {
    color: var(--orange);
}

/* Markup preview table */
.markup-preview-table {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

/* Additional material table inputs */
#additional-material-table input {
    background: var(--navy2);
    border: 1px solid var(--border);
    color: var(--white);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 13px;
    font-family: var(--font-main);
}
#additional-material-table input:focus {
    outline: none;
    border-color: var(--blue-light);
    box-shadow: 0 0 0 2px rgba(200, 200, 200,0.2);
}

/* Status badge in projects table */
.badge-status-deal    { background: rgba(34,197,94,0.15); color: #4ade80; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-status-reject  { background: rgba(239,68,68,0.15); color: #f87171; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-status-sent    { background: rgba(200, 200, 200,0.15); color: #60a5fa; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-status-draft   { background: rgba(148,163,184,0.15); color: #94a3b8; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }

/* Report page chart canvas wrapper */
#report-chart {
    width: 100% !important;
    height: 100% !important;
}

/* Copy modal search */
#modal-copy-project .search-bar {
    background: var(--navy2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}
#modal-copy-project .search-bar input {
    background: none;
    border: none;
    color: var(--white);
    width: 100%;
    outline: none;
    font-family: var(--font-main);
    font-size: 14px;
}

/ *   R O L E   R E S T R I C T I O N S   * / 
 b o d y . r o l e - d r a f t e r   . p r i c e - c o l , 
 b o d y . r o l e - d r a f t e r   . p r i c e - c e l l , 
 b o d y . r o l e - d r a f t e r   . b t n - e d i t - p r i c e , 
 b o d y . r o l e - d r a f t e r   # r e s u l t - p r i c i n g , 
 b o d y . r o l e - d r a f t e r   # p r i c e - m a r k u p - c a r d   { 
         d i s p l a y :   n o n e   ! i m p o r t a n t ; 
 } 
 
 b o d y . r o l e - e s t i m a t o r   . b t n - d e l e t e - p r o j e c t   { 
         d i s p l a y :   n o n e   ! i m p o r t a n t ; 
 } 
 
 /* ==============================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE)
   ============================================================== */

@media (max-width: 992px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modal {
        max-width: 95%;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    /* Main Layout & Header */
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 1000;
        width: 280px;
        transition: left 0.3s ease;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-header {
        display: flex !important;
        align-items: center;
        padding: 16px 20px;
        background: var(--navy2);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 900;
    }

    .main-content {
        padding: 15px;
        overflow-y: auto;
        height: 100vh;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .page-actions .btn {
        flex: 1;
        justify-content: center;
    }

    /* Tables (Horizontal scroll) */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }

    .data-table {
        min-width: 600px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    /* Pricing Summary Box */
    .pricing-summary {
        flex-direction: column;
        gap: 15px;
    }

    .price-box {
        width: 100%;
    }
    
    /* Config layout */
    .config-layout {
        flex-direction: column;
    }
    
    .config-left, .config-right {
        width: 100%;
        max-height: none;
        overflow-y: visible;
    }
    
    /* Sidebar Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(3px);
        z-index: 950;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}
