/* Invoice Ninja admin screens. Builds on wp-admin styles; only adds layout and a few parts. */

.invoiceninja-wrap { max-width: 1200px; }
.invoiceninja-wrap h1 { margin-bottom: 12px; }
.invoiceninja-wrap :focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; }
.in-muted { color: #50575e; }
.in-grow { flex: 1 1 auto; min-width: 0; }
.in-push { margin-left: auto; }
.in-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.in-row--end { align-items: flex-end; }
.in-row--baseline { align-items: baseline; }
.in-links { display: flex; flex-wrap: wrap; gap: 14px; }
.in-link { color: #2271b1; }
.in-separated { border-top: 1px solid #c3c4c7; padding-top: 16px; margin-top: 16px; }
.in-technical { display: block; margin-top: 6px; padding: 8px 10px; background: #f6f7f7; border: 1px solid #dcdcde; color: #3c434a; white-space: pre-wrap; word-break: break-word; font-size: 12px; }

/* Layout */
.in-columns { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.in-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.in-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* Cards */
.in-card { background: #fff; border: 1px solid #c3c4c7; padding: 16px 20px; box-sizing: border-box; }
.in-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -16px -20px 12px; padding: 12px 20px; border-bottom: 1px solid #dcdcde; }
.in-card__head h2 { margin: 0; font-size: 14px; }
.in-row-card { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.in-hero { padding: 28px 32px; }
.in-hero__title { font-size: 22px; margin: 0 0 12px; }
.in-hero ul { list-style: disc; padding-left: 18px; font-size: 14px; }

/* Pills */
.in-pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 11px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; border: 1px solid; }
.in-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.in-pill--success { background: #edfaef; color: #00450c; border-color: #b8e6bf; }
.in-pill--info { background: #f0f6fc; color: #0a4b78; border-color: #c5d9ed; }
.in-pill--warning { background: #fcf9e8; color: #5c4400; border-color: #f0d78a; }
.in-pill--error { background: #fcf0f1; color: #8a2424; border-color: #f4c7c8; }
.in-pill--neutral { background: #f0f0f1; color: #2c3338; border-color: #c3c4c7; }

/* Notices inside our screens */
.in-notice { background: #fff; border: 1px solid #c3c4c7; border-left-width: 4px; padding: 10px 14px; margin: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.in-notice p { margin: 0; }
.in-notice details { margin-top: 4px; }
.in-notice--error { border-left-color: #d63638; }
.in-notice--warning { border-left-color: #dba617; }
.in-notice--success { border-left-color: #00a32a; }
.in-notice--info { border-left-color: #72aee6; }

/* Icons */
.in-icon { display: inline-flex; width: 20px; height: 20px; flex-shrink: 0; }
.in-spin { transform-origin: 10px 10px; animation: in-spin 1s linear infinite; }
@keyframes in-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .in-spin { animation: none; } }

/* Lists and checks */
.in-list { margin: 0; }
.in-list__item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #f0f0f1; margin: 0; }
.in-list__item:last-child { border-bottom: 0; }
.in-checks { margin: 0; border: 1px solid #dcdcde; }
.in-checks li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 14px; border-top: 1px solid #f0f0f1; margin: 0; }
.in-checks li:first-child { border-top: 0; }
.in-checks li > strong { flex: 0 0 170px; }
.in-checks li > span:not(.in-icon):not(.in-checks__action) { flex: 1 1 260px; }
.in-checks li.is-fail { background: #fcf0f1; }
.in-checks li.is-warn { background: #fcf9e8; }
.in-checks__action { flex: 0 0 auto; margin-left: auto; }
.in-checks-card .in-checks { margin: -12px -20px -16px; border: 0; }
.in-checks__toggle { padding: 0 !important; }
.in-checks__toggle button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 14px; border: 0; background: #f6f7f7; font: inherit; text-align: left; cursor: pointer; }

/* Company */
.in-company { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.in-company--large { border: 1px solid #dcdcde; padding: 16px; gap: 16px; }
.in-company__logo { width: 44px; height: 44px; border-radius: 6px; background: #1d2327; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.in-company--large .in-company__logo { width: 64px; height: 64px; font-size: 20px; }
.in-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0; }
.in-dl dt { color: #50575e; }
.in-dl dd { margin: 0; }

/* Wizard */
.in-wizard { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.in-wizard__card { padding: 0; }
.in-wizard__body { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.in-wizard__body > h2 { margin: 0; font-size: 20px; }
/* The title only takes focus so screen readers announce a new step; it's not a control. */
.in-wizard__body > h2:focus { outline: none; }
.in-wizard__body > p.in-muted { margin: -8px 0 0; }
.in-wizard__foot { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 14px 28px; border-top: 1px solid #dcdcde; background: #f6f7f7; }
.in-connect-to { margin: 2px 0 0; }
.in-connect-to code { padding: 2px 6px; font-size: 13px; overflow-wrap: anywhere; }
.in-field { display: flex; flex-direction: column; gap: 4px; }
.in-field label { font-weight: 600; }
.in-field .description { margin: 0; }
.in-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.in-two ol { margin: 0 0 0 20px; }
.in-choices { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.in-choice { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid #c3c4c7; border-radius: 4px; background: #fff; cursor: pointer; min-height: 110px; box-sizing: border-box; }
.in-choice.is-selected { border: 2px solid #2271b1; background: #f0f6fc; padding: 13px 15px; }
.in-choice__title { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.in-choice__title input { margin: 0; }
.in-choice__note { margin-top: auto; align-self: flex-start; display: inline-flex; gap: 5px; align-items: center; padding: 2px 8px 2px 4px; border-radius: 2px; font-size: 12px; font-weight: 600; line-height: 18px; }
.in-choice__note .in-icon, .in-choice__note .in-icon svg { width: 16px; height: 16px; }
.in-choice__note--warn { color: #5c4400; background: #fcf9e8; }
.in-choice__note--pass { color: #00450c; background: #edfaef; }
.in-features { border: 1px solid #dcdcde; margin: 0; padding: 0; }
.in-features > label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid #f0f0f1; cursor: pointer; }
.in-features > label:first-of-type { border-top: 0; }
.in-features > label input { margin-top: 2px; }
.in-features > label > span { display: flex; flex-direction: column; gap: 2px; }
.in-features > p { margin: 0; padding: 10px 14px; border-top: 1px solid #f0f0f1; }
.in-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.in-check > span { display: flex; flex-direction: column; }
.in-check input { flex: none; margin-top: 2px; }
/* WordPress makes a label inside a .form-table fieldset inline-block, which strings radio options side by side. */
.form-table td fieldset label.in-check { display: flex; }
/* Below 782px WordPress also makes a field's first label inline-block, which put the box above its text. */
.invoiceninja-wrap .form-table td label.in-check { display: flex; }

/* Stepper: one line of numbered steps; below 782px just "Connect · Step 1 of 5". */
.in-stepper ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; }
.in-stepper li { margin: 0; display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.in-stepper li:first-child { flex: 0 0 auto; }
.in-stepper li + li::before { content: ""; flex: 1 1 12px; min-width: 12px; height: 1px; background: #c3c4c7; }
.in-stepper li.is-done::before, .in-stepper li.is-now::before { background: #2271b1; }
.in-stepper button { display: flex; align-items: center; gap: 8px; flex: none; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 13px; line-height: 1.3; color: #50575e; cursor: pointer; white-space: nowrap; }
.in-stepper button[disabled] { cursor: default; }
.in-stepper__dot { display: inline-flex; width: 24px; height: 24px; border-radius: 12px; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; box-sizing: border-box; background: #fff; border: 1px solid #8c8f94; color: #50575e; }
.in-stepper li.is-done .in-stepper__dot { background: #2271b1; border: 2px solid #2271b1; color: #fff; }
.in-stepper li.is-done .in-stepper__label { color: #2271b1; }
.in-stepper li.is-now .in-stepper__dot { background: #2271b1; border: 2px solid #2271b1; color: #fff; }
.in-stepper li.is-now .in-stepper__label { color: #1d2327; font-weight: 600; }
.in-stepper button:not([disabled]):hover .in-stepper__dot { box-shadow: 0 0 0 3px #c5d9ed; }
.in-stepper button:not([disabled]):hover .in-stepper__label { text-decoration: underline; }
.in-stepper__compact { display: none; }
/* Six or seven steps don't fit one line with every label: only the current step keeps its label on screen. */
.in-stepper--many li:not(.is-now) .in-stepper__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 782px) {
	.in-stepper ol { display: none; }
	.in-stepper__compact { display: block; }
	.in-wizard__count { display: none; }
	.in-wizard__body { padding: 18px 16px; }
	.in-wizard__foot { padding: 12px 16px; }
}

/* Status */
.in-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0; }
.in-log td { vertical-align: top; }
.in-log tr.is-error td { background: #fcf0f1; }
.in-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.in-tool { display: flex; flex-direction: column; gap: 6px; }
.in-tool h3 { margin: 0; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.in-tool p { margin: 0; }
.in-tool__action { margin-top: auto; padding-top: 6px; }
.in-cli { margin-top: 20px; }
.in-cli summary { cursor: pointer; color: #2271b1; font-weight: 600; }
.in-cli pre { margin: 10px 0 0; white-space: pre-wrap; }
.in-danger { border: 1px solid #e6a5a6; background: #fff; padding: 14px 20px; margin-top: 20px; }
.in-danger h2 { margin: 0 0 8px; font-size: 14px; color: #8a2424; }
.button.in-button-danger { color: #b32d2e; border-color: #b32d2e; }
.button.in-button-danger:hover { color: #8a2424; border-color: #8a2424; background: #fcf0f1; }

@media (max-width: 782px) {
	.in-checks li > strong { flex-basis: 100%; }
}

.in-sample { margin: 6px 0 6px 18px; list-style: disc; }

/* Orders */
.in-views { float: none; margin: 8px 0 0; }
.in-filters--orders { margin-top: 4px; }
.in-orders td { vertical-align: top; }
.in-orders .in-num { text-align: end; white-space: nowrap; }
.in-orders tr.is-attention td { background: #fcf0f1; }
.in-orders tr.is-attention td:first-child { box-shadow: inset 4px 0 0 #d63638; }
.in-orders .in-note { margin-top: 4px; font-size: 12px; color: #50575e; }
.in-orders .in-note--error { color: #8a2424; }
.in-row-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: 4px; font-size: 13px; line-height: 1.6; }
.in-row-actions .button-link, .in-row-actions a, .in-row-actions .components-button.is-link { font-size: 13px; line-height: inherit; height: auto; min-height: 0; padding: 0; vertical-align: baseline; }
.in-sep { color: #a7aaad; }
.in-link-danger { color: #b32d2e !important; }
.in-confirm-row td { background: #fcf9e8 !important; }
.in-confirm p { margin: 0 0 8px; }
@media (max-width: 782px) {
	.in-orders thead { display: none; }
	.in-orders tr, .in-orders td { display: block; width: auto; }
	.in-orders .in-num { text-align: start; }
}

.in-lead { font-size: 15px; max-width: 760px; }

.in-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 782px) { .in-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.in-latest td:first-child, .in-latest .in-num { white-space: nowrap; }
.in-latest .in-num { text-align: end; }
@media (max-width: 782px) {
	/* Recent orders on Home: one card per order (number and total, then customer, then status). */
	.in-latest thead { display: none; }
	.in-latest tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 10px; }
	.in-latest td { display: block; padding: 0; overflow-wrap: anywhere; }
	.in-latest td:nth-child(2), .in-latest td:nth-child(3) { grid-column: 1 / -1; }
	.in-latest td:nth-child(4) { grid-row: 1; grid-column: 2; }
}
.in-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid #dcdcde; border-radius: 4px; }
.in-stat__value { font-size: 20px; font-weight: 600; }

/* ---------- Admin redesign: shared ---------- */

/* Settings sentences stay readable on wide screens; the Connection tab keeps its side column. */
.in-settings { max-width: 960px; }
.in-settings--wide { max-width: none; }
.in-flush { margin: 0; }
.in-indent { margin-left: 28px; }
.in-error-text { color: #b32d2e; }
.in-legend { padding: 0; margin: 0 0 8px; color: #50575e; }
.in-section-break { margin-top: 32px; padding-top: 8px; border-top: 1px solid #c3c4c7; }
.in-check.is-disabled { color: #646970; }
.in-check__inline { display: inline !important; }
/* Checkbox lists (roles, products) in columns. */
.in-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 2px 20px; }
.in-check-grid .in-check { margin: 0; padding: 4px 0; }
/* Buttons wrap their label rather than running out of a card on a narrow screen. */
.invoiceninja-wrap .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.invoiceninja-wrap .notice.inline { margin: 12px 0; }

/* A read-only value with a Copy button. */
.in-copy { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; }
.in-copy input { max-width: 100%; font-size: 13px; background: #f6f7f7; }

/* Store pages / Account page table. */
.in-pages { margin-top: 8px; }
.in-pages tbody th { font-weight: 400; }
.in-pages tbody th .in-pill { margin-left: 4px; }
.in-pages__path { display: block; margin-top: 2px; padding: 0; background: none; font-size: 12px; color: #50575e; overflow-wrap: anywhere; }
.in-pages__actions { text-align: end; white-space: nowrap; }
.in-pages__foot { margin: 10px 0 24px; }
@media (max-width: 782px) {
	/* One stacked row per page, like wp-list-table rows on a phone. */
	.in-pages thead { display: none; }
	.in-pages tr { display: block; padding: 10px 12px; }
	.in-pages tbody th, .in-pages td { display: block; width: auto; padding: 0; }
	.in-pages td { margin-top: 4px; }
	.in-pages__actions { text-align: start; }
	.in-pages__actions .in-links a { display: inline-block; padding: 8px 0; }
}

/* Settings > Customers: Tools card. */
.in-tool-rows { list-style: none; margin: 0; padding: 0; }
.in-tool-row { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; margin: 0; padding: 16px 20px; border-top: 1px solid #f0f0f1; }
.in-tool-row:first-child { border-top: 0; }
.in-tool-row h3 { margin: 0 0 4px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.in-tool-row p { margin: 0; max-width: 62ch; }
.in-tool-row .in-grow { flex: 1 1 320px; }
.in-tool-row__action { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; max-width: 100%; }
.in-tool-row__action select { max-width: 100%; }

/* Settings > Forms: product picker. */
.in-picker__bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 8px; }
.in-picker__search { width: 220px; max-width: 100%; }
.in-picker__grid.is-long { max-height: 320px; overflow-y: auto; padding: 4px 10px; border: 1px solid #dcdcde; background: #fff; }
.in-field.in-indent { margin-top: 4px; align-items: flex-start; }
.in-field.in-indent select { max-width: 100%; }

/* Welcome. */
.in-welcome { max-width: 1040px; }
.in-welcome__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; align-items: start; margin: 16px 0 20px; }
.in-display__options { margin: 0 0 12px; }
.in-display__options dt { font-weight: 600; margin-top: 10px; }
.in-display__options dt:first-child { margin-top: 0; }
.in-display__options dd { margin: 2px 0 0; color: #50575e; }
.in-display__confirm { margin: 12px 0; padding: 12px 14px; background: #fcf9e8; border: 1px solid #f0d78a; }
.in-display__preview { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid #f0f0f1; }
.in-new .in-list__item { align-items: baseline; gap: 16px; }
.in-new__link { white-space: nowrap; }
.in-welcome__next { margin-top: 4px; }

@media (max-width: 782px) {
	.in-indent { margin-left: 0; }
	.in-tool-row { padding: 14px 16px; }
	.in-tool-row__action { justify-content: flex-start; }
	.in-new .in-list__item { flex-wrap: wrap; gap: 4px 16px; }
	.in-new__link { padding: 6px 0; }
}
