/* Great Africa — Supplier Dashboard (front-end) */
.ga-sd {
	display: flex;
	gap: 28px;
	align-items: flex-start;
	max-width: 1180px;
	margin: 24px auto;
	font-family: "Inter", system-ui, sans-serif;
	color: #152b20;
}
.ga-sd * { box-sizing: border-box; }

/* Sidebar */
.ga-sd-nav {
	flex: 0 0 240px;
	background: linear-gradient(165deg, #1A4731 0%, #0F2B1E 100%);
	color: #fff;
	border-radius: 18px;
	padding: 24px 16px;
	position: sticky;
	top: 90px;
	box-shadow: 0 14px 34px rgba(15, 43, 30, 0.18);
}
.ga-sd-brand { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.ga-sd-brand span { display: block; font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase; color: #f5d9a8; font-weight: 600; }
.ga-sd-user { margin: 14px 0 18px; font-size: 0.85rem; color: #d6eade; opacity: 0.85; border-bottom: 1px solid rgba(255,255,255,0.18); padding-bottom: 14px; }
.ga-sd-nav nav { display: flex; flex-direction: column; gap: 4px; }
.ga-sd-link { color: #eaf4ee; text-decoration: none; padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: 0.92rem; transition: background 0.15s, color 0.15s; }
.ga-sd-link:hover { background: rgba(255,255,255,0.12); color: #fff; }
.ga-sd-link.is-active { background: #fff; color: #1A4731; box-shadow: inset 4px 0 0 #C8922A; }
.ga-sd-logout { margin-top: 12px; color: #f5d9a8; }

/* Main */
.ga-sd-main { flex: 1 1 auto; min-width: 0; }
.ga-sd-main h1 { font-family: "Playfair Display", Georgia, serif; font-size: 2rem; font-weight: 800; color: #1A4731; letter-spacing: -.01em; margin: 4px 0 20px; }
.ga-sd-main h2 { font-family: "Playfair Display", Georgia, serif; font-size: 1.3rem; color: #1A4731; margin: 30px 0 14px; }
.ga-sd-main h3 { font-size: 1.05rem; margin: 0 0 12px; }

/* KPI cards */
.ga-sd-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; margin-bottom: 24px; }
.ga-sd-card { position: relative; background: #fff; border: 1px solid #e4ece6; border-top: 3px solid #C8922A; border-radius: 14px; padding: 22px; box-shadow: 0 8px 24px rgba(15,43,30,0.07); transition: transform .15s ease, box-shadow .15s ease; }
.ga-sd-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(15,43,30,0.12); }
.ga-sd-card-val { display: block; font-family: "Playfair Display", Georgia, serif; font-size: 1.95rem; font-weight: 800; color: #1A4731; line-height: 1.1; letter-spacing: -.01em; }
.ga-sd-card-label { display: block; margin-top: 6px; color: #46584d; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }

/* Panels & forms */
.ga-sd-panel { background: #fff; border: 1px solid #e4ece6; border-radius: 14px; padding: 20px; margin-bottom: 18px; box-shadow: 0 6px 20px rgba(19,83,58,0.05); }
.ga-sd-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ga-sd label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.ga-sd input, .ga-sd select, .ga-sd textarea { width: 100%; padding: 10px 12px; border: 1px solid #cdd9d1; border-radius: 9px; font-size: 0.95rem; font-family: inherit; }
.ga-sd textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.ga-sd input:focus, .ga-sd select:focus, .ga-sd textarea:focus { outline: none; border-color: #1f7a4d; box-shadow: 0 0 0 3px rgba(31,122,77,0.15); }
.ga-sd .ga-sd-invalid, .ga-sd .ga-sd-invalid:focus { border-color: #d64541 !important; box-shadow: 0 0 0 3px rgba(214,69,65,0.16) !important; }
.ga-sd-strong { font-weight: 700; font-size: 0.95rem; }
.ga-sd-hint { color: #6c7d72; font-size: 0.82rem; margin: 8px 0 0; }

/* Buttons */
.ga-sd-btn { display: inline-block; background: #eef4f0; color: #13533a; border: 0; border-radius: 10px; padding: 11px 20px; font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none; transition: transform 0.12s, box-shadow 0.15s, background 0.15s; }
.ga-sd-btn:hover { transform: translateY(-1px); }
.ga-sd-btn-primary { background: #1f7a4d; color: #fff; box-shadow: 0 6px 16px rgba(31,122,77,0.25); }
.ga-sd-btn-primary:hover { background: #13533a; }
.ga-sd-btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.ga-sd-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }

/* Tables */
.ga-sd-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e4ece6; border-radius: 12px; overflow: hidden; }
.ga-sd-table th, .ga-sd-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid #eef3ef; font-size: 0.9rem; }
.ga-sd-table thead th { background: #f4f7f2; font-weight: 700; color: #2c4438; }
.ga-sd-table tbody tr:last-child td { border-bottom: 0; }
.ga-sd-right { text-align: right; }
.ga-sd-badge { background: #eaf3ec; color: #13533a; border-radius: 20px; padding: 2px 10px; font-size: 0.78rem; font-weight: 600; }
.ga-sd-link-inline { color: #1f7a4d; font-weight: 600; text-decoration: none; }

/* Product search results */
.ga-sd-search-results { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.ga-sd-result { display: flex; justify-content: space-between; align-items: center; background: #f7faf8; border: 1px solid #e4ece6; border-radius: 9px; padding: 10px 14px; cursor: pointer; text-align: left; font-family: inherit; }
.ga-sd-result:hover { background: #eaf3ec; border-color: #1f7a4d; }
.ga-sd-result em { font-style: normal; font-weight: 700; color: #13533a; }
.ga-sd-noresult, .ga-sd-empty td { color: #6c7d72; font-size: 0.88rem; padding: 10px 4px; }

/* Lines table inputs */
.ga-sd-lines input { padding: 7px 9px; }
.ga-sd-lines .ga-sd-price { width: 90px; }
.ga-sd-lines .ga-sd-qty { width: 70px; }
.ga-sd-price.ga-sd-changed { border-color: #f5a623; background: #fff8ec; font-weight: 700; }
.ga-sd-remove { background: #fdeceb; color: #d64541; border: 0; border-radius: 8px; width: 30px; height: 30px; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.ga-sd-remove:hover { background: #f8d7d5; }

/* Place order */
.ga-sd-place { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ga-sd-place-msg { font-weight: 600; }
.ga-sd-place-msg.is-success, .ga-sd-msg.is-success { color: #1f7a4d; }
.ga-sd-place-msg.is-error, .ga-sd-msg.is-error { color: #d64541; }
.ga-sd-msg { font-size: 0.85rem; margin-left: 10px; }

/* Login + guards */
.ga-sd-login, .ga-sd-guard { max-width: 440px; margin: 56px auto; background: #fff; border: 1px solid #e4ece6; border-top: 4px solid #C8922A; border-radius: 18px; padding: 38px 36px; box-shadow: 0 18px 48px rgba(15,43,30,0.12); }
.ga-sd-login h2, .ga-sd-guard h2 { font-family: "Playfair Display", Georgia, serif; color: #1A4731; font-size: 1.6rem; margin: 0 0 6px; }
.ga-sd-login p { color: #6c7d72; margin: 0 0 22px; font-size: 0.92rem; }

/* Brand lockup */
.ga-sd-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.ga-sd-login-mark { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 13px; background: linear-gradient(135deg, #1A4731, #2D6E4E); color: #C8922A; font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: 27px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(26,71,49,.28); }
.ga-sd-login-name { display: flex; flex-direction: column; font-family: "Playfair Display", Georgia, serif; font-weight: 800; font-size: 1.3rem; color: #1A4731; line-height: 1.1; }
.ga-sd-login-name small { font-family: inherit; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: #C8922A; margin-top: 4px; font-family: "Inter", system-ui, sans-serif; }

/* WordPress login form, styled */
.ga-sd-login form { margin: 0; }
.ga-sd-login label { display: block; font-size: 0.85rem; font-weight: 600; color: #2c4438; margin-bottom: 6px; }
.ga-sd-login .login-username, .ga-sd-login .login-password { margin: 0 0 16px; }
.ga-sd-login input[type=text], .ga-sd-login input[type=password] { width: 100%; padding: 12px 14px; border: 1px solid #cdd9d1; border-radius: 10px; font-size: 0.95rem; box-sizing: border-box; margin: 0; }
.ga-sd-login input[type=text]:focus, .ga-sd-login input[type=password]:focus { outline: none; border-color: #1A4731; box-shadow: 0 0 0 3px rgba(26,71,49,.15); }
.ga-sd-login .login-remember { margin: 0 0 18px; }
.ga-sd-login .login-remember label { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: #46584d; margin: 0; }
.ga-sd-login .login-remember input { margin: 0; }
.ga-sd-login .login-submit { margin: 0; }
.ga-sd-login .button, .ga-sd-login input[type=submit] { width: 100%; background: linear-gradient(135deg, #1A4731, #2D6E4E); color: #fff; border: 0; border-radius: 10px; padding: 13px 22px; font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 8px 20px rgba(26,71,49,.25); transition: filter .15s, transform .12s; }
.ga-sd-login .button:hover, .ga-sd-login input[type=submit]:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* Card details (demo placeholder) */
.ga-sd-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ga-sd-card-grid .ga-sd-span2 { grid-column: 1 / -1; }
.ga-sd-demo { color: #9a6e1a; background: #fff8ec; border: 1px solid #f3e2c0; border-radius: 8px; padding: 9px 12px; }

/* Order builder: layout + numbered step headings */
.ga-sd-order-tool { max-width: 780px; }
.ga-sd-sub { color: #5a6d62; font-size: 0.95rem; line-height: 1.5; margin: -10px 0 22px; max-width: 620px; }
.ga-sd-step { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; }
.ga-sd-step-n { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg,#1A4731,#2D6E4E); color: #fff; font-weight: 800; font-size: 0.95rem; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(26,71,49,.22); }
.ga-sd-step-n--sub { background: #f4f7f2; color: #1f7a4d; box-shadow: none; border: 1px solid #d7e3da; font-weight: 700; }
.ga-sd-step-tx { min-width: 0; padding-top: 1px; }
.ga-sd-step-t { font-family: "Playfair Display", Georgia, serif; font-size: 1.12rem; color: #1A4731; margin: 0; line-height: 1.2; }
.ga-sd-step-s { color: #6c7d72; font-size: 0.82rem; margin: 3px 0 0; line-height: 1.4; }

/* Checkbox (brand accent) + "same as" check row */
.ga-sd input[type=checkbox] { width: auto; accent-color: #1f7a4d; }
.ga-sd-checkline { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 12px 15px; background: #f4f7f2; border: 1px solid #e0eae2; border-radius: 11px; font-weight: 600; font-size: 0.92rem; cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.ga-sd-checkline:hover { border-color: #1f7a4d; background: #eef5f0; }
.ga-sd-checkline input[type=checkbox] { width: 19px; height: 19px; flex: 0 0 auto; margin: 0; cursor: pointer; }

/* Line-items table: scroll on narrow screens instead of squashing */
.ga-sd-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e4ece6; border-radius: 12px; -webkit-overflow-scrolling: touch; }
.ga-sd-table-wrap .ga-sd-table { min-width: 480px; border: 0; border-radius: 0; }

/* Place order — prominent footer panel */
.ga-sd-place { background: linear-gradient(135deg,#f4f9f6,#eef5f0); border-color: #d7e7dd; }
.ga-sd-place .ga-sd-btn-primary { min-width: 200px; }

/* Clickable order rows */
.ga-sd-row { cursor: pointer; transition: background .12s; }
.ga-sd-row:hover { background: #f5f9f6; }
.ga-sd-row a { text-decoration: none; }

/* Order detail */
.ga-sd-back { margin: 0 0 4px; font-size: 0.9rem; }
.ga-sd-od-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 24px; }
.ga-sd-od-item { display: flex; flex-direction: column; gap: 3px; }
.ga-sd-od-l { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: #C8922A; }
.ga-sd-od-v { font-size: 1rem; font-weight: 600; color: #152b20; word-break: break-word; }
.ga-sd-od-h { font-family: "Playfair Display", Georgia, serif; font-size: 1.1rem; color: #1A4731; margin: 0 0 12px; }
.ga-sd-od-addr { font-style: normal; line-height: 1.7; color: #2c4438; }

/* Responsive */
@media (max-width: 860px) {
	.ga-sd { flex-direction: column; align-items: stretch; padding-left: 16px; padding-right: 16px; box-sizing: border-box; }
	.ga-sd-nav { position: static; width: 100%; flex-basis: auto; }
	.ga-sd-nav nav { flex-direction: row; flex-wrap: wrap; }
	.ga-sd-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.ga-sd { margin: 14px auto; gap: 18px; padding-left: 12px; padding-right: 12px; }
	.ga-sd-card-grid { grid-template-columns: 1fr; }
	.ga-sd-card-grid .ga-sd-span2 { grid-column: auto; }
	.ga-sd-main h1 { font-size: 1.6rem; }
	.ga-sd-step-t { font-size: 1.05rem; }
	.ga-sd-panel { padding: 16px; }
	.ga-sd-place { flex-direction: column; align-items: stretch; }
	.ga-sd-place .ga-sd-btn-primary { width: 100%; min-width: 0; }
	.ga-sd-place-msg { text-align: center; }
}

/* Mobile: no horizontal page scroll — stack the orders table into labelled cards,
   and keep any other wide table scrolling inside its own box. */
@media (max-width: 640px) {
	.ga-sd, .ga-sd-main, .ga-sd-order-tool { max-width: 100%; min-width: 0; }
	.ga-sd-order-tool { width: 100%; }

	.ga-sd-stack { display: block; border: 0; box-shadow: none; background: transparent; }
	.ga-sd-stack thead { display: none; }
	.ga-sd-stack tbody { display: block; }
	.ga-sd-stack tr { display: block; background: #fff; border: 1px solid #e4ece6; border-radius: 12px; padding: 4px 2px; margin-bottom: 12px; box-shadow: 0 6px 20px rgba(19,83,58,0.05); }
	.ga-sd-stack td { display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 0 !important; padding: 10px 14px; text-align: right; font-size: 0.9rem; word-break: break-word; }
	.ga-sd-stack td:not(:last-child) { border-bottom: 1px solid #f0f4f1 !important; }
	.ga-sd-stack td::before { content: attr(data-l); font-weight: 700; color: #2c4438; text-align: left; white-space: nowrap; }
	.ga-sd-stack td[colspan] { justify-content: center; }
	.ga-sd-stack td[colspan]::before { content: ''; }

	.ga-sd-table:not(.ga-sd-stack) th, .ga-sd-table:not(.ga-sd-stack) td { word-break: break-word; }
}
