.casa-shell,
[data-color-mode="g"] .casa-shell {
    --font-serif: inherit;
    --font-sans: inherit;
    --ink: #531a06;
    --deep: #382013;
    --green: #75300b;
    --mint: #fff4e3;
    --orange: #de852c;
    --orange2: #b35b18;
    --peach: #fdf3df;
    --sand: #fffdf9;
    --paper: #ffffff;
    --line: #e8ddd1;
    --muted: #75503a;
    --blue: #de852c;
    --tab-icon-border: rgba(83, 26, 6, 0.2);
    --tab-shadow: rgba(83, 26, 6, 0.22);
    font-family: var(--font-sans);
    color: var(--deep);
    background: var(--sand);
    font-size: 14px;
    padding: 20px;
    border-radius: 20px;
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(83, 26, 6, 0.05);
}

[data-color-mode="c"] .casa-shell,
html[data-color-mode="c"] .casa-shell,
body.color-mode-c .casa-shell {
    --ink: #0B2A4E;
    --deep: #06182C;
    --green: #1E4E8C;
    --mint: #E8F0FE;
    --orange: #f26a21;
    --orange2: #d95414;
    --peach: #fff0e6;
    --sand: #F8F9FA;
    --paper: #FFFFFF;
    --line: #E2E8F0;
    --muted: #6e7771;
    --blue: #1779b7;
    --tab-icon-border: #0B2A4E30;
    --tab-shadow: #0B2A4E38;
    color: var(--deep);
    background: var(--sand);
    box-shadow: 0 4px 20px rgba(11, 42, 78, 0.05);
}
.casa-shell * { box-sizing: border-box; }

.casa-global-client {
    display: grid;
    grid-template-columns: 1fr 1fr 150px;
    gap: 15px;
    margin-bottom: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
@media (max-width: 900px) {
    .casa-global-client {
        grid-template-columns: 1fr;
    }
}
.casa-global-client .field > span {
    margin-bottom: 7px;
}
.casa-search-inner {
    position: relative;
    display: flex;
    align-items: center;
}
.casa-search-inner .search-icon {
    position: absolute;
    left: 15px;
    font-size: 16px;
}
.casa-search-inner input {
    width: 100%;
    padding: 15px 40px;
    font-size: 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.casa-search-inner input:focus {
    border-color: var(--orange);
    outline: none;
}
#casa-search-clear {
    position: absolute;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
}
.casa-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-top: 5px;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
}
.casa-search-results .res-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.casa-search-results .res-item:hover {
    background: var(--peach);
}
.casa-search-results .res-item strong {
    color: var(--orange2);
}
.casa-search-results .res-item span {
    font-size: 11px;
    color: var(--muted);
}

.casa-tabs {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px;
    margin-bottom: 24px; padding: 7px;
    border: 1px solid rgba(23, 60, 50, 0.22); border-radius: 24px;
    background: rgba(255, 253, 249, 0.88);
}
.casa-tabs .tab {
    position: relative; min-height: 75px; padding: 10px 18px 10px 58px;
    border: 0; border-radius: 18px; background: transparent;
    text-align: left; cursor: pointer;
}
.casa-tabs .tab i {
    position: absolute; left: 20px; top: 50%; width: 26px; height: 26px;
    display: grid; place-items: center; border: 1px solid var(--tab-icon-border, rgba(83, 26, 6, 0.2));
    border-radius: 50%; font: normal 800 9px/1 Arial; color: var(--muted);
    transform: translateY(-50%);
}
.casa-tabs .tab b { display: block; font-size: 13px; }
.casa-tabs .tab small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.casa-tabs .tab.active { color: #fff; background: var(--ink); box-shadow: 0 11px 24px var(--tab-shadow, rgba(83, 26, 6, 0.22)); }
.casa-tabs .tab.active i { border-color: #ffffff50; color: #ffd7c0; }
.casa-tabs .tab.active small { color: #ffffffa8; }

.casa-app {
    display: grid; grid-template-columns: minmax(370px, .72fr) minmax(0, 1.68fr);
    gap: 24px; align-items: start;
}
@media (max-width: 900px) {
    .casa-app {
        grid-template-columns: 1fr;
    }
    .casa-shell {
        padding: 10px;
    }
    .output {
        padding: 15px !important;
    }
}
.casa-card {
    border: 1px solid rgba(23, 60, 50, 0.2); border-radius: 28px;
    background: rgba(255, 253, 249, 0.92);
}
.controls { padding: 28px; }
.pane { display: none; }
.pane.active { display: block; }

.kicker { margin-bottom: 7px; color: var(--orange2); font-size: 9px; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.controls h2 { margin: 0 0 20px 0; font: 600 32px/1.05 var(--font-serif); }

.stack { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { color: #4f5e59; font-size: 10px; font-weight: 800; }
.casa-shell input, .casa-shell select, .casa-shell .money { width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 13px; background: #fff; outline: 0; padding: 0 12px; margin: 0; box-shadow: none; }
.casa-shell .money { display: flex; align-items: center; overflow: hidden; padding: 0; }
.casa-shell .money input { flex: 1; height: 45px; border: 0; background: transparent; font-weight: 750; font-size: 14px; }
.casa-shell .money b { width: 68px; display: grid; place-items: center; height: 45px; border-left: 1px solid var(--line); background: #fbf9f5; color: var(--muted); font-size: 10px; font-weight: 700; }

.divider { margin: 25px 0 13px; display: flex; align-items: center; gap: 11px; }
.divider:after { content: ""; height: 1px; flex: 1; background: var(--line); }
.divider span { font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }


.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 7px; }
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method span { min-height: 62px; padding: 8px 4px; display: grid; place-content: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center; cursor: pointer; }
.method b { font-size: 9px; display: block; }
.method small { margin-top: 4px; color: var(--muted); font-size: 8px; display: block; }
.method input:checked + span { border-color: var(--orange); color: var(--orange2); background: var(--peach); }

.discounts { display: grid; gap: 7px; }
.discount { padding: 11px; display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: start; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; }
.discount:has(input[type=checkbox]:checked) { border-color: rgba(222, 133, 44, 0.35); background: var(--peach); }
.discount > input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 32px; height: 19px; margin-top: 2px; border-radius: 99px; background: #c8ceca; transition: .2s; }
.switch:after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px #0003; transition: .2s; }
.discount > input:checked + .switch { background: var(--orange); }
.discount > input:checked + .switch:after { transform: translateX(13px); }
.dcopy b { font-size: 10px; display: block; }
.dcopy small { margin-top: 3px; color: var(--muted); font-size: 8px; display: block; }
.discount > strong { color: var(--orange2); font-size: 11px; }

.subfield { display: none; margin-top: 9px; max-width: 170px; grid-column: 1 / -1; }
.discount > input:checked ~ .subfield { display: flex; }
.subfield input { min-height: 38px; height: 38px; border-radius: 10px 0 0 10px; }
.subfield b { padding: 10px; border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; background: #fff; }

.groupbox { margin-top: 20px; padding: 15px; border: 1px solid rgba(222, 133, 44, 0.28); border-radius: 18px; background: #fffdf9; }
.groupbox.blue { border-color: rgba(246, 179, 74, 0.35); background: #fdf3df; }
.group-title { margin-bottom: 14px; font-size: 10px; font-weight: 850; display: flex; gap: 8px; align-items: center; }
.group-title i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #fff; }
.groupbox.blue .group-title i { background: var(--blue); }

.output { padding: 34px; }
.quote-head { padding-bottom: 26px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.quote-head h2 { font-size: 28px; margin: 10px 0; font-family: var(--font-serif); }
.meta { display: grid; gap: 7px; margin-top: 15px; }
.meta span { display: flex; justify-content: space-between; border-bottom: 1px dotted #bbb; padding-bottom: 5px; font-size: 10px; color: var(--muted); }
.meta b { color: var(--deep); }

.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.summary.three-cols { grid-template-columns: 1fr 1fr 1fr; }
.stat { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.stat.orange { border-color: rgba(222, 133, 44, 0.28); background: var(--peach); }
.stat.blue { border-color: rgba(246, 179, 74, 0.35); background: #fdf3df; }
.stat span { color: var(--muted); font-size: 9px; font-weight: 750; display: block; }
.stat strong { margin-top: 7px; font-size: 18px; display: block; }
.stat small { margin-top: 4px; font-size: 8px; color: var(--muted); display: block; }

.section-title { margin: 25px 0 15px; display: flex; justify-content: space-between; align-items: center; }
.section-title h3 { margin: 0; font-size: 18px; font-family: var(--font-serif); }
.discount-list { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 1px; }
.discount-list div { padding: 12px 14px; background: #fff; display: flex; justify-content: space-between; font-size: 10px; }
.discount-list b { color: var(--orange2); }

.total { margin: 20px 0; padding: 20px; background: var(--ink); color: #fff; border-radius: 20px; display: flex; justify-content: space-between; align-items: center; }
.total strong { font-size: 28px; color: #ffb187; display: block; margin-top: 5px; }
.total span, .total small { font-size: 9px; color: #ffffffaa; }

.tablewrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
.casa-shell table { width: 100%; border-collapse: collapse; font-size: 10px; }
.casa-shell th, .casa-shell td { padding: 10px; border-bottom: 1px solid #ebe7df; text-align: left; }
.casa-shell th { background: var(--mint); font-size: 9px; text-transform: uppercase; }
.casa-shell .num { text-align: right; }
.casa-shell tfoot td { background: var(--ink); color: #fff; border: 0; }
.pill { padding: 4px 7px; border-radius: 99px; background: var(--peach); color: var(--orange2); font-size: 8px; font-weight: bold; }
.pill.blue { background: #e7f4fc; color: #176d9e; }

@media print {
    .no-print { display: none !important; }
    .casa-app { grid-template-columns: 1fr; }
    .output { padding: 0; border: 0; }
    .casa-modal-content { border: 0; box-shadow: none; margin: 0; width: 100%; }
}
