/* AuSOM Manager — staff centre styles */

.ausom {
	--blue: #009eff;
	--ink: #0b0f12;
	--navy: #0f212f;
	--line: #dfe6ec;
	--muted: #64748b;
	--bg: #f6f9fb;
}

.ausom .ausom-head {
	display: flex; flex-wrap: wrap; gap: 14px 24px;
	align-items: flex-start; justify-content: space-between;
	margin: 6px 0 20px; padding-bottom: 16px; border-bottom: 2px solid var(--line);
}
.ausom .ausom-head h1 { margin: 0; font-size: 1.7rem; line-height: 1.2; }
.ausom .ausom-sub { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.ausom .ausom-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Stat tiles */
.ausom-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); margin-bottom: 24px; }
.ausom-stat {
	display: block; padding: 18px 20px; background: #fff; border: 1px solid var(--line);
	border-radius: 10px; text-decoration: none; color: inherit; border-left: 4px solid var(--blue);
	transition: box-shadow .15s, transform .15s;
}
.ausom-stat:hover { box-shadow: 0 6px 18px rgba(11, 15, 18, .08); transform: translateY(-1px); color: inherit; }
.ausom-stat__n { display: block; font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.ausom-stat__l { display: block; margin-top: 4px; color: var(--muted); font-size: .9rem; }

/* Cards & columns */
.ausom-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin: 0 0 18px; }
.ausom-card h2 { margin: 0 0 14px; font-size: 1.12rem; }
.ausom-card h3 { margin: 18px 0 6px; font-size: 1rem; }
.ausom-cols { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1100px) {
	.ausom-cols { grid-template-columns: 1fr 1fr; }
	.ausom-cols--detail { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
}
.ausom-cols > * { min-width: 0; }

/* Tabs */
.ausom-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; border-bottom: 2px solid var(--line); }
.ausom-tabs a {
	padding: 9px 14px; text-decoration: none; color: var(--ink); font-weight: 600;
	border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.ausom-tabs a:hover { color: var(--blue); }
.ausom-tabs a.is-on { color: var(--blue); border-bottom-color: var(--blue); }
.ausom-n { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 9px; background: #eef3f7; color: var(--muted); font-size: .76rem; text-align: center; }

/* Filters */
.ausom-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.ausom-filters__f { display: flex; flex-direction: column; gap: 3px; }
.ausom-filters label { font-weight: 600; font-size: .83rem; }
.ausom-filters input, .ausom-filters select { min-height: 34px; }
.ausom-reset { align-self: center; }

/* Forms */
.ausom-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ausom-f { display: flex; flex-direction: column; gap: 4px; margin: 0 0 16px; }
.ausom-f--wide { grid-column: 1 / -1; }
.ausom-f > label { font-weight: 600; font-size: .9rem; }
.ausom-f input[type="text"], .ausom-f input[type="email"], .ausom-f input[type="tel"],
.ausom-f input[type="number"], .ausom-f input[type="date"], .ausom-f input[type="datetime-local"],
.ausom-f select, .ausom-f textarea { width: 100%; max-width: 100%; }
.ausom-hint { color: var(--muted); font-size: .84rem; }
.req { color: #c0392b; }
.ausom-check { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.ausom-check input { margin-top: 2px; }
.ausom-mono { font-family: Consolas, Monaco, monospace; font-size: .86rem; }
.ausom-hidden { display: none; }

/* Tables */
.ausom table.widefat { margin-bottom: 14px; }
.ausom table.widefat th { font-weight: 700; }
.ausom .num { text-align: right; }
.ausom .num input { width: 92px; text-align: right; }
.ausom-off td { opacity: .55; }
.ausom-muted { color: var(--muted); }
.ausom-warn { color: #a05a00; background: #fff6e5; border-left: 3px solid #d98324; padding: 10px 12px; margin: 12px 0 0; }

.ausom-prices .ausom-price-in { width: 100px; text-align: right; }
.ausom-prices .is-unset { background: #fff6e5; border-color: #e0b070; }
.ausom-cat { margin: 22px 0 8px; font-size: 1.05rem; }
.ausom-sticky-save { position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--line); padding: 12px 0; margin: 0; display: flex; gap: 14px; align-items: center; }

/* Lists */
.ausom-list { list-style: none; margin: 0; padding: 0; }
.ausom-list li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ausom-list li:last-child { border-bottom: 0; }

.ausom-dl { width: 100%; border-collapse: collapse; }
.ausom-dl th { text-align: left; padding: 7px 14px 7px 0; vertical-align: top; color: var(--muted); font-weight: 600; width: 36%; }
.ausom-dl td { padding: 7px 0; }

/* Badges */
.ausom-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: .78rem; font-weight: 700; }
.ausom-badge--blue { background: #e4f3ff; color: #0063a8; }
.ausom-badge--green { background: #e4f7ed; color: #10693f; }
.ausom-badge--amber { background: #fdf0dd; color: #8a5200; }
.ausom-badge--red { background: #fdeaea; color: #9d2222; }
.ausom-badge--purple { background: #efe8fb; color: #5a2d9c; }
.ausom-badge--grey { background: #eef1f4; color: #4b5a67; }

/* Thread */
.ausom-thread { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.ausom-msg { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.ausom-msg--customer { background: #f4f9fd; border-color: #cfe4f5; }
.ausom-msg.is-internal { background: #fffbf2; border-color: #e8d6ae; }
.ausom-msg__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: .84rem; color: var(--muted); margin-bottom: 6px; }
.ausom-msg__meta strong { color: var(--ink); font-size: .92rem; }
.ausom-msg__body p { margin: 0 0 .6em; }
.ausom-msg__body p:last-child { margin-bottom: 0; }
.ausom-tag { background: #eef1f4; padding: 1px 7px; border-radius: 8px; font-size: .75rem; font-weight: 600; }
.ausom-tag--ok { background: #e4f7ed; color: #10693f; }
.ausom-replyrow { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }

/* Totals */
.ausom-totals { margin-top: 16px; border-top: 2px solid var(--line); padding-top: 12px; display: grid; gap: 5px; max-width: 340px; margin-left: auto; }
.ausom-totals div { display: flex; justify-content: space-between; gap: 20px; }
.ausom-totals__grand { font-size: 1.16rem; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.ausom-totals__grand strong { color: var(--blue); }

.ausom-empty { background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 34px 24px; text-align: center; color: var(--muted); }
.ausom-empty p { margin: 0 0 12px; }
.ausom-pager { margin-top: 10px; }

@media (max-width: 782px) {
	.ausom .num input { width: 78px; }
	.ausom-sticky-save { flex-direction: column; align-items: stretch; }
}
