/* Approved component owner: real-deal-docs; scope: real theme7. */
body[data-theme="7"] .kdc-history,
body[data-theme="7"] .kdc-card-comment { border: 1px solid var(--divider); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
body[data-theme="7"] .kdc-history>summary,
body[data-theme="7"] .kdc-card-comment>summary { display: flex; justify-content: space-between; gap: 9px; align-items: center; list-style: none; cursor: pointer; padding: 12px; min-height: 53px; }
body[data-theme="7"] .kdc-history>summary::-webkit-details-marker,
body[data-theme="7"] .kdc-card-comment>summary::-webkit-details-marker { display: none; }
body[data-theme="7"] .kdc-history>summary>span,
body[data-theme="7"] .kdc-card-comment>summary>span { display: grid; gap: 3px; }
body[data-theme="7"] .kdc-history summary b,
body[data-theme="7"] .kdc-card-comment summary b { font-size: 14px; font-weight: 700; }
body[data-theme="7"] .kdc-history summary small,
body[data-theme="7"] .kdc-card-comment summary small { font-size: 12px; color: var(--muted); }
body[data-theme="7"] .kdc-history summary i,
body[data-theme="7"] .kdc-card-comment summary i { display: grid; place-items: center; min-width: 27px; width: 27px; height: 27px; border: 1px solid var(--divider); border-radius: 7px; font-style: normal; font-size: 22px; color: var(--main); }
body[data-theme="7"] .kdc-history[open] summary i,
body[data-theme="7"] .kdc-card-comment[open] summary i { transform: rotate(90deg); }
body[data-theme="7"] .kdc-history-list { padding: 8px 12px 11px; border-top: 1px solid var(--divider); }
body[data-theme="7"] .kdc-history-event { padding: 9px 0; }
body[data-theme="7"] .kdc-history-event-main { display: grid; grid-template-columns: minmax(0,1fr) max-content 38px; gap: 6px; align-items: center; }
body[data-theme="7"] .kdc-history-event-title { font-size: 13px; color: var(--text); }
body[data-theme="7"] .kdc-history-event-sum { font-size: 13px; font-variant-numeric: tabular-nums; }
body[data-theme="7"] .hist-del { min-height: 35px; border: 1px solid var(--divider); background: var(--surface-soft); color: var(--negative); border-radius: var(--radius); font-size: 17px; }
body[data-theme="7"] .kdc-history-event-channel,
body[data-theme="7"] .kdc-history-event-comment { font-size: 12px; color: var(--muted); padding-top: 6px; }
body[data-theme="7"] .kdc-card-comment p { padding: 3px 12px 13px; margin: 0; font-size: 13px; color: var(--text); }
body[data-theme="7"] .deal-docs-wrap { border: 1px solid var(--divider); border-radius: var(--radius); padding: 10px 12px; }
body[data-theme="7"] .deal-docs-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
body[data-theme="7"] .deal-doc-badge { display: inline-flex; background: var(--surface-selected); border-radius: 7px; padding: 5px 8px; font-size: 12px; color: var(--main); }
body[data-theme="7"] .kdc-actions-bar { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
body[data-theme="7"] .kdc-act-btn { min-height: 43px; min-width: 0; border: 1px solid var(--divider); border-radius: var(--radius); background: var(--surface-soft); color: var(--main); font-size: 13px; font-weight: 700; box-shadow: none; padding: 6px 4px; }
@media (max-width:420px) {
body[data-theme="7"] .kdc-history-event-main { grid-template-columns: minmax(0,1fr) max-content 34px; }
body[data-theme="7"] .kdc-act-btn { font-size: 12px; }
}

/* Attachments: file title left; open/remove always beside each other, never stacked. */
body[data-theme="7"] #m-view #deal-docs-list .doc-row {
 display:grid; grid-template-columns:minmax(0,1fr) auto;
 align-items:center; gap:10px; min-width:0;
 padding:9px 0; border-bottom:1px solid var(--divider);
 color:var(--text); font-size:13px;
}
body[data-theme="7"] #m-view #deal-docs-list .doc-row:last-child {
 border-bottom:0;
}
body[data-theme="7"] #m-view #deal-docs-list .doc-row > span {
 display:block; min-width:0; overflow-wrap:anywhere;
 font-size:13px; line-height:1.35;
}
body[data-theme="7"] #m-view #deal-docs-list .doc-row-actions {
 display:flex; flex:0 0 auto; align-items:center;
 gap:6px; flex-wrap:nowrap; justify-content:flex-end;
}
body[data-theme="7"] #m-view #deal-docs-list .doc-row-actions button {
 display:grid; place-items:center; flex:0 0 auto;
 min-width:36px; min-height:36px; margin:0;
 padding:6px 9px; border-radius:9px; border:1px solid var(--divider);
 background:var(--surface-soft); color:var(--main);
 font-size:12px; font-weight:650; box-shadow:none;
}
body[data-theme="7"] #m-view #deal-docs-list .doc-row-actions .btn-doc-del {
 color:var(--negative); font-size:17px;
}

/* Simple transaction card's sharing strip: exactly four theme-colored buttons.
   CSV/Excel functions remain installed; we only hide their buttons in this card. */
body[data-theme="7"] #m-view #view-data .flex-col-gap > div[style*="position:sticky"] {
 position:static !important;
 padding:12px 0 0 !important;
 background:var(--surface) !important;
 backdrop-filter:none !important;
 border-top:1px solid var(--divider);
}
body[data-theme="7"] #m-view #view-data .flex-col-gap > div[style*="position:sticky"] > div:first-child {
 display:grid !important;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:8px !important;
 overflow:visible !important;
 padding:0 !important;
}
body[data-theme="7"] #m-view #view-data .flex-col-gap > div[style*="position:sticky"] > div:first-child > button {
 min-width:0 !important;
 width:100%; min-height:42px; height:42px;
 border:1px solid var(--divider) !important;
 border-radius:9px !important;
 background:var(--surface-soft) !important;
 color:var(--text) !important;
 font-size:12px; font-weight:650; box-shadow:none !important;
}
body[data-theme="7"] #m-view #view-data .flex-col-gap > div[style*="position:sticky"] > div:first-child > button.pdf-btn-green {
 display:none !important;
}
body[data-theme="7"] #m-view #view-data .flex-col-gap > div[style*="position:sticky"] > div:first-child > .btn-wa,
body[data-theme="7"] #m-view #view-data .flex-col-gap > div[style*="position:sticky"] > div:first-child > .btn-tg {
 background:var(--surface-selected) !important; color:var(--main) !important;
}
body[data-theme="7"] #m-view #view-data .flex-col-gap > div[style*="position:sticky"] > div:first-child > button:last-child {
 background:var(--main) !important;
 color:var(--on-main) !important;
 border-color:var(--main) !important;
}
/* Keep close/comment/delete controls flat and in theme colors, not black/orange strips. */
body[data-theme="7"] #m-view #view-data .flex-col-gap > div[style*="position:sticky"] > div:nth-child(2) > div > button {
 background:var(--surface-soft) !important;
 color:var(--main) !important;
 border:1px solid var(--divider) !important;
 font-size:13px; font-weight:650; border-radius:9px !important;
}
body[data-theme="7"] #m-view #view-data .flex-col-gap > div[style*="position:sticky"] > div:nth-child(2) > button.btn-danger {
 background:var(--surface-soft) !important;
 color:var(--negative) !important;
 border:1px solid var(--divider) !important;
 border-radius:9px !important; box-shadow:none;
}

/* Theme 7: two actions in the simple transaction card.
   PDF retains its original handler; Share uses the already-rendered report text. */
body[data-theme="7"] #m-view #view-data .kit-simple-share-bar {
 display:grid !important;
 grid-template-columns:repeat(2,minmax(0,1fr)) !important;
 gap:8px !important; min-width:0;
}
body[data-theme="7"] #m-view #view-data .kit-simple-share-bar > button:not(.btn-pdf):not(.kit-share-btn):not(.kit-expense-photo-btn) {
 display:none !important;
}
body[data-theme="7"] #m-view #view-data .kit-simple-share-bar > .btn-pdf {
 grid-column:1; min-width:0;
 background:var(--surface-soft) !important;
 color:var(--main) !important;
 border-color:var(--divider) !important;
}
body[data-theme="7"] #m-view #view-data .kit-simple-share-bar > .kit-share-btn {
 grid-column:2; min-width:0; width:100%; min-height:42px;
 display:grid; place-items:center;
 padding:5px 8px; border-radius:9px;
 border:1px solid var(--main) !important;
 background:var(--main) !important;
 color:var(--on-main) !important;
 font-size:13px; font-weight:700; box-shadow:none;
}

/* v1097: theme7 ordinary expense/income card has its parent close button. */
body[data-theme="7"] #m-view #view-data > .flex-col-gap > div:first-child > button.mini{
 display:none;
}

/* KiT v1106: expense actions are ONE ROW in deliberate visual order.
   Share is DOM-appended after Photo, so grid placement must be explicit. */
body[data-theme="7"] #m-view #view-data .kit-simple-share-bar:has(.kit-expense-photo-btn) {
 grid-template-columns:repeat(3,minmax(0,1fr)) !important;
 align-items:stretch;
}
body[data-theme="7"] #m-view #view-data .kit-simple-share-bar:has(.kit-expense-photo-btn) > .btn-pdf {
 grid-column:1; grid-row:1; width:100%; min-height:44px;
}
body[data-theme="7"] #m-view #view-data .kit-simple-share-bar:has(.kit-expense-photo-btn) > .kit-share-btn {
 grid-column:2; grid-row:1; width:100%; min-height:44px; padding:6px 4px;
 font-size:12px; white-space:nowrap;
}
body[data-theme="7"] #m-view #view-data .kit-simple-share-bar:has(.kit-expense-photo-btn) > .kit-expense-photo-btn {
 grid-column:3; grid-row:1; min-width:0; width:100%; min-height:44px;
 padding:6px 4px; border-radius:9px; border:1px solid var(--divider);
 background:var(--surface-soft); color:var(--main);
 font-size:12px; font-weight:700; box-shadow:none; white-space:nowrap;
}
/* KiT v1107: give the existing photo row its own breathing room.
   One rounded border per photo; no touching the amount card or action divider. */
body[data-theme="7"] #m-view #view-data .kit-expense-photo-strip {
 margin:14px 2px 12px; padding:0; border:0; background:transparent;
}
body[data-theme="7"] #m-view #view-data .flex-col-gap > .kit-expense-photo-strip:not(.h) + div[style*="position:sticky"] {
 border-top:0 !important;
 padding-top:0 !important;
}
body[data-theme="7"] #m-view #view-data .kit-expense-photo-strip #deal-docs-list {
 display:grid; gap:7px;
}
body[data-theme="7"] #m-view #view-data .kit-expense-photo-strip #deal-docs-list .doc-row {
 border:1px solid var(--divider); border-radius:12px;
 background:var(--surface-soft); padding:8px 11px;
 grid-template-columns:minmax(0,1fr) auto; gap:8px;
}
body[data-theme="7"] #m-view #view-data .kit-expense-photo-strip #deal-docs-list .doc-row:last-child {
 border-bottom:1px solid var(--divider);
}
body[data-theme="7"] #m-view #view-data .kit-expense-photo-strip #deal-docs-list .doc-row-actions {
 display:flex; gap:7px; align-items:center; flex-wrap:nowrap;
}
body[data-theme="7"] #list .kit-expense-title-line {
 display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0;
}
body[data-theme="7"] #list .kit-expense-title-line > b {
 min-width:0; overflow-wrap:anywhere;
}
body[data-theme="7"] #list .kit-expense-photo-indicator {
 display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center;
 font-size:20px; line-height:1; opacity:1; min-width:25px; min-height:25px;
}

/* v1159: compact edit action inside expanded deal comment */
body[data-theme="7"] .kdc-comment-content {padding: 0 12px 12px;}
body[data-theme="7"] .kdc-card-comment .kdc-comment-content p {padding: 3px 0 9px;white-space:pre-wrap;overflow-wrap:anywhere;}
body[data-theme="7"] .kdc-comment-edit {display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--divider);border-radius:10px;background:var(--surface);color:var(--text);font-family:inherit;font-size:12px;font-weight:600;cursor:pointer;min-height:34px;}
body[data-theme="7"] .kdc-comment-edit:active {transform:scale(.98);}

/* v1160: downward chevrons for comment and operation history */
body[data-theme="7"] .kdc-history summary i,body[data-theme="7"] .kdc-card-comment summary i {font-family:Arial,sans-serif;font-size:23px;font-weight:500;line-height:1;transition:transform .15s ease;}
body[data-theme="7"] .kdc-history[open] summary i,body[data-theme="7"] .kdc-card-comment[open] summary i {transform:rotate(180deg);}

/* v1161: slim vector arrows, original history disclosure layout retained */
body[data-theme="7"] .kdc-history summary i,body[data-theme="7"] .kdc-card-comment summary i {font-size:initial;}
body[data-theme="7"] .kdc-history summary .kdc-chevron-icon,body[data-theme="7"] .kdc-card-comment summary .kdc-chevron-icon {display:block;width:17px;height:17px;}
