/* BRAHMINS e-Shop — saffron/cream theme, no dark backgrounds anywhere */

.bes-app, .bes-app * { box-sizing: border-box; }
.bes-app {
	background: #FFFDF7;
	color: #3a2c1a;
	font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	max-width: 900px;
	margin: 0 auto;
	padding: 14px;
	border: 1px solid #F0DCB0;
	border-radius: 10px;
}
.bes-loading { padding: 24px; text-align: center; color: #A6531A; font-weight: 700; }

.bes-topbar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px solid #F0DCB0;
}
.bes-brand { font-size: 18px; font-weight: 800; color: #A6531A; }
.bes-brand span { color: #C97A1E; }
.bes-brand small { display: block; font-size: 12px; font-weight: 700; color: #8a6a3a; }
.bes-topbtns { display: flex; flex-wrap: wrap; gap: 8px; }

.bes-btn {
	border: none; border-radius: 8px; padding: 10px 16px; font-weight: 800; font-size: 14px;
	cursor: pointer; background: #FFF6E8; color: #A6531A; border: 1.5px solid #E9C98A;
}
.bes-btn-primary { background: #C97A1E; color: #fff; border-color: #C97A1E; }
.bes-btn-outline { background: #fff; color: #A6531A; border: 1.5px solid #C97A1E; }
.bes-btn-green { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.bes-btn-red { background: #b3261e; color: #fff; border-color: #b3261e; }
.bes-btn-grey { background: #EFE7D6; color: #5a4a30; border-color: #d9c8a0; }
.bes-btn:disabled { opacity: .45; cursor: not-allowed; }
.bes-btn[data-view] { }

.bes-view-root { min-height: 200px; }

/* Language toggle */
.bes-langtoggle { display: flex; gap: 6px; margin-bottom: 10px; }
.bes-langtoggle button {
	border: 1.5px solid #E9C98A; background: #FFF6E8; color: #A6531A; font-weight: 800;
	padding: 6px 14px; border-radius: 20px; cursor: pointer;
}
.bes-langtoggle button.active { background: #C97A1E; color: #fff; border-color: #C97A1E; }

/* Form fields — dark bold text, yellow highlight on focus */
.bes-field-label { font-weight: 800; color: #A6531A; margin: 10px 0 4px; }
.bes-app input[type="text"], .bes-app input[type="password"], .bes-app input[type="number"], .bes-app select {
	width: 100%; padding: 10px 12px; border: 1.5px solid #E9C98A; border-radius: 8px;
	font-size: 15px; font-weight: 700; color: #3a2c1a; background: #fff;
}
.bes-app input:focus, .bes-app select:focus {
	outline: none; background: #FFF9C4; border-color: #C97A1E; color: #3a2c1a; font-weight: 700;
}
.bes-formbox { background: #FFF6E8; border: 1px solid #F0DCB0; border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.bes-hint { font-size: 12px; color: #8a6a3a; font-weight: 600; margin-top: 4px; }
.bes-err { color: #b3261e; font-weight: 800; margin-top: 8px; min-height: 18px; }

/* Aadhaar 4-4-4 boxes */
.bes-aadhaar-row { display: flex; gap: 8px; }
.bes-aadhaar-row input {
	text-align: center; letter-spacing: 2px; font-size: 18px; width: 100%;
}
.bes-aadhaar-reveal {
	background: #FFF9C4; border: 1.5px solid #C97A1E; border-radius: 8px; padding: 10px;
	text-align: center; font-size: 22px; font-weight: 800; letter-spacing: 3px; color: #A6531A; margin-top: 6px;
}

/* PIN-code auto-fill info */
.bes-pinfo { background: #FFF6E8; border: 1px dashed #C97A1E; border-radius: 8px; padding: 8px 10px; margin-top: 6px; font-weight: 700; font-size: 13px; color: #5a4a30; }

/* Search + item picker */
.bes-searchwrap { position: relative; }
.bes-searchresults {
	position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px;
	background: #fff; border: 1.5px solid #E9C98A; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.12);
	max-height: 320px; overflow-y: auto;
}
.bes-searchrow {
	padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #F5EBD6; font-weight: 700; color: #3a2c1a;
}
.bes-searchrow:last-child { border-bottom: none; }
.bes-searchrow:hover, .bes-searchrow.active { background: #FFF9C4; }
.bes-searchrow .bes-cattag { font-size: 11px; font-weight: 700; color: #A6531A; display: block; }
.bes-searchrow.bes-addnew { color: #2e7d32; font-weight: 800; }

.bes-catlist { margin-top: 14px; }
.bes-catgroup { margin-bottom: 14px; }
.bes-cathead { font-weight: 800; color: #A6531A; margin-bottom: 6px; font-size: 14px; }
.bes-chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.bes-chip {
	background: #FFF6E8; border: 1.5px solid #E9C98A; border-radius: 20px; padding: 7px 14px;
	font-weight: 700; font-size: 13px; cursor: pointer; color: #3a2c1a;
}
.bes-chip:hover { background: #FFF9C4; border-color: #C97A1E; }
.bes-chip.bes-chip-custom { border-style: dashed; }

/* Qty mini-picker */
.bes-qtybox {
	background: #FFF9C4; border: 1.5px solid #C97A1E; border-radius: 10px; padding: 12px; margin: 10px 0;
}
.bes-qtybox-title { font-weight: 800; color: #A6531A; margin-bottom: 8px; }
.bes-qtyrow { display: flex; gap: 8px; align-items: center; }
.bes-qtyrow input[type="number"] { width: 90px; }
.bes-qtyrow select { width: 130px; }

/* Cart list */
.bes-cart { margin-top: 16px; }
.bes-cart-title { font-weight: 800; color: #A6531A; margin-bottom: 8px; }
.bes-cartrow {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	background: #fff; border: 1.5px solid #F0DCB0; border-radius: 8px; padding: 10px 12px; margin-bottom: 6px;
}
.bes-cartrow .bes-cartname { font-weight: 800; color: #3a2c1a; }
.bes-cartrow .bes-cartcat { font-size: 12px; color: #8a6a3a; font-weight: 700; }
.bes-cartrow .bes-cartqty { font-weight: 800; color: #A6531A; white-space: nowrap; }
.bes-cartrow .bes-cartremove { background: none; border: none; color: #b3261e; font-weight: 900; font-size: 18px; cursor: pointer; }
.bes-cartempty { color: #8a6a3a; font-weight: 700; padding: 14px; text-align: center; }

/* Popup / modal — position:fixed, appended to body, draggable */
.bes-overlay { position: fixed; inset: 0; background: rgba(58,44,26,.35); z-index: 9998; }
.bes-popup {
	position: fixed; z-index: 9999; top: 8%; left: 50%; transform: translateX(-50%);
	width: min(560px, 92vw); max-height: 84vh; overflow: hidden; display: flex; flex-direction: column;
	background: #FFFDF7; border: 2px solid #C97A1E; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
.bes-popup-drag {
	cursor: move; background: #FFF6E8; padding: 10px 14px; border-bottom: 2px solid #F0DCB0;
	display: flex; align-items: center; justify-content: space-between; font-weight: 800; color: #A6531A;
}
.bes-popup-drag .bes-draghandle { font-size: 18px; letter-spacing: 2px; color: #C97A1E; }
.bes-popup-close {
	background: #EFE7D6; border: none; color: #5a4a30; font-weight: 900; font-size: 16px;
	width: 28px; height: 28px; border-radius: 50%; cursor: pointer; line-height: 1;
}
.bes-popup-body { padding: 14px; overflow-y: auto; }
.bes-popup-foot { padding: 12px 14px; border-top: 2px solid #F0DCB0; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.bes-previewrow {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	border-bottom: 1px solid #F5EBD6; padding: 8px 0;
}
.bes-previewrow-edit { background: none; border: none; color: #C97A1E; font-weight: 800; cursor: pointer; font-size: 13px; }

.bes-successbox { text-align: center; padding: 30px 14px; }
.bes-successbox .bes-successicon { font-size: 46px; }
.bes-successbox .bes-successmsg { font-size: 17px; font-weight: 800; color: #2e7d32; margin-top: 10px; }
.bes-successbox .bes-successsub { font-size: 13px; color: #5a4a30; font-weight: 700; margin-top: 6px; }

/* Login box */
.bes-loginbox { max-width: 380px; margin: 0 auto; }

/* Badges */
.bes-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.bes-badge-pending { background: #FFF3CD; color: #8a6a1a; }
.bes-badge-approved { background: #e6f4ea; color: #2e7d32; }
.bes-badge-rejected { background: #fbe3e1; color: #b3261e; }
.bes-badge-custom { background: #e8f0fe; color: #1a56a6; }

/* Admin */
.bes-admintabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.bes-tabbtn {
	border: 1.5px solid #E9C98A; background: #FFF6E8; color: #A6531A; font-weight: 800;
	padding: 8px 16px; border-radius: 8px; cursor: pointer;
}
.bes-tabbtn.active { background: #C97A1E; color: #fff; border-color: #C97A1E; }

.bes-statboxes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bes-statbox {
	background: #FFF6E8; border: 1.5px solid #E9C98A; border-radius: 10px; padding: 10px 16px; min-width: 100px;
}
.bes-statbox .bes-statnum { font-size: 20px; font-weight: 900; color: #A6531A; }
.bes-statbox .bes-statlabel { font-size: 12px; font-weight: 700; color: #5a4a30; }

.bes-toolbar-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.bes-searchbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bes-searchbar input[type="text"] { max-width: 260px; }
.bes-searchbar select { max-width: 160px; }

.bes-logout { background: #EFE7D6; border: none; color: #5a4a30; font-weight: 800; padding: 8px 14px; border-radius: 8px; cursor: pointer; }

table.bes-admintable { width: 100%; border-collapse: collapse; background: #fff; }
table.bes-admintable th, table.bes-admintable td {
	border: 1px solid #F0DCB0; padding: 8px 10px; text-align: left; font-size: 13px; vertical-align: top;
}
table.bes-admintable th { background: #FFF6E8; color: #A6531A; font-weight: 800; }
table.bes-admintable td { font-weight: 700; color: #3a2c1a; }
.bes-rowactions { display: flex; gap: 6px; flex-wrap: wrap; }
.bes-rowactions .bes-btn { padding: 6px 10px; font-size: 12px; }

.bes-orderdetail-items { margin-top: 8px; }
.bes-orderdetail-item { padding: 4px 0; border-bottom: 1px dashed #F0DCB0; font-weight: 700; }

@media (max-width: 600px) {
	.bes-topbar { flex-direction: column; align-items: flex-start; }
	.bes-qtyrow { flex-wrap: wrap; }
	table.bes-admintable, table.bes-admintable thead, table.bes-admintable tbody, table.bes-admintable th, table.bes-admintable td, table.bes-admintable tr { display: block; }
	table.bes-admintable thead { display: none; }
	table.bes-admintable tr { margin-bottom: 10px; border: 1px solid #F0DCB0; border-radius: 8px; overflow: hidden; }
	table.bes-admintable td { border: none; border-bottom: 1px solid #F5EBD6; }
}
