/* FariDocs 1.20.4 — customer quick-create actions and sales document branches */
.customer-list { overflow: visible; }
.customer-directory-card {
    position: relative;
    gap: 16px;
    overflow: visible;
}
.customer-directory-card .customer-card-info {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.customer-card-info strong,
.customer-card-info span,
.customer-card-info small { overflow-wrap: anywhere; }
.customer-card-info .customer-address { margin-top: 4px; color: #78909b; line-height: 1.45; }
.customer-directory-card .customer-card-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}
.customer-card-tools > b {
    padding: 5px 8px;
    border-radius: 10px;
    background: #e8f6f4;
    color: #0d8579;
    font-size: 8px;
    white-space: nowrap;
}
.customer-quick-actions { display: flex; gap: 6px; }
.customer-quick-action {
    position: relative;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #a9d7d1;
    border-radius: 9px;
    background: linear-gradient(145deg, #f5fcfb, #e8f6f4);
    color: #0b7f75;
    box-shadow: 0 4px 12px rgba(14, 76, 87, .07);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.customer-quick-action.quotation-action { border-color: #aec8dc; background: linear-gradient(145deg, #f6fafc, #eaf2f7); color: #215f83; }
.customer-quick-action:hover,
.customer-quick-action:focus-visible { z-index: 15; transform: translateY(-2px); box-shadow: 0 9px 20px rgba(14, 76, 87, .15); outline: none; }
.customer-quick-action svg,
.sales-document-branches svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.customer-quick-action::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 50%;
    min-width: max-content;
    padding: 6px 8px;
    border-radius: 6px;
    background: #092f45;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -4px);
    transition: opacity .15s ease, transform .15s ease;
}
.customer-quick-action:hover::after,
.customer-quick-action:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

.sales-document-branches {
    margin: 5px 0 18px;
    padding: 16px;
    border: 1px solid #b8d8df;
    border-radius: 12px;
    background: linear-gradient(135deg, #f7fbfc, #edf8f6);
}
.sales-document-branches > header { display: grid; gap: 3px; margin-bottom: 12px; }
.sales-document-branches > header span { color: #11877c; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.sales-document-branches > header strong { font-size: 11px; }
.sales-branch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sales-branch-grid > article {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(105px, .42fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #d7e7ea;
    border-radius: 10px;
    background: #fff;
}
.branch-source { display: flex; align-items: center; gap: 8px; min-width: 0; }
.branch-source > span { width: 30px; height: 30px; display: grid; flex: 0 0 30px; place-items: center; border-radius: 8px; background: #e5f5f2; color: #0a8378; }
.branch-source strong { overflow-wrap: anywhere; font-size: 10px; }
.branch-targets { display: flex; flex-wrap: wrap; gap: 6px; }
.branch-targets a,
.branch-targets > span,
.branch-targets button {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border: 1px solid #b9d6de;
    border-radius: 7px;
    background: #eef7f8;
    color: #174e66;
    font: 800 8px/1.25 Inter, sans-serif;
}
.branch-targets a::before,
.branch-targets > span::before,
.branch-targets button::before { content: "→"; margin-right: 5px; color: #159b8f; }
.branch-targets a:hover { border-color: #188e83; background: #e3f7f3; color: #08776e; }
.branch-targets > span { border-style: dashed; opacity: .62; }
.branch-targets form { margin: 0; }
.branch-targets button { border-color: #e2bdc1; background: #fff6f6; color: #a7434b; cursor: pointer; }

html[data-theme="dark"] .customer-card-info .customer-address { color: #91abb4; }
html[data-theme="dark"] .customer-card-tools > b { background: #12443f; color: #8adfd4; }
html[data-theme="dark"] .customer-quick-action { border-color: #2c6965; background: #103b3c; color: #8de2d7; }
html[data-theme="dark"] .customer-quick-action.quotation-action { border-color: #365f75; background: #113246; color: #add7e9; }
html[data-theme="dark"] .sales-document-branches { border-color: #315966; background: linear-gradient(135deg, #0d2b38, #10353a); }
html[data-theme="dark"] .sales-document-branches > header strong { color: #e8f4f6; }
html[data-theme="dark"] .sales-branch-grid > article { border-color: #315462; background: #102b38; }
html[data-theme="dark"] .branch-source > span { background: #144842; color: #8be3d7; }
html[data-theme="dark"] .branch-targets a,
html[data-theme="dark"] .branch-targets > span { border-color: #365f6e; background: #143744; color: #c0dbe1; }
html[data-theme="dark"] .branch-targets button { border-color: #6d4149; background: #35272e; color: #ffb8c0; }

@media (max-width: 1100px) {
    .sales-branch-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .customer-directory-card { align-items: flex-start; flex-direction: column; }
    .customer-directory-card .customer-card-tools { width: 100%; justify-content: space-between; }
    .sales-document-branches { padding: 12px; }
    .sales-branch-grid > article { grid-template-columns: 1fr; }
}
