/**
 * app.css
 * Small additions layered on top of ghl.css + Bootstrap 5.
 * Only things genuinely missing from ghl.css live here — do not
 * duplicate anything ghl.css already provides.
 */

:root {
	--np-color: #1a8a4a;      /* net profit accent — used sparingly */
	--np-bg: #e6f6ec;
	--np-bd: #b4e0c5;
	--muted: #6b7280;
	--border-soft: #e5e7eb;
	--menu-width: 320px;
	--header-height: 60px;
	--menu-bg: #ffffff;
	--menu-color: #444;
	--menu-border: #ececec;
	--hover: #f7f7f7;
	--backdrop: rgba(0,0,0,.75);
	--transition: .35s;
}

/* ---- missing layout helpers ghl.css doesn't have ---- */
.mx-auto { margin-left: auto; margin-right: auto; }
.max-1170 { max-width: 1170px; }

/* ---- app shell ---- */
body {
	background: #fff;
	color: #000;
}
footer { color: rgba(0,0,0, 0.5); font-size: 14px; }
footer a { color: rgba(0,0,0, 0.85) }
#sectionContent { background: #fafafa; }

/* ---- navbar (replaces the old .app-navbar block in app.css) ---- */
.app-navbar {
	background: #fff;
	border-bottom: 1px solid var(--border-soft);
	width: 100%;
	/*
	position: fixed;
	top: 0;
	z-index: 100;
	*/
}
.app-navbar .brand {
	font-weight: 700;
	font-size: 18px;
	color: #000;
}
.app-navbar .brand i {
	color: var(--np-color);
}
.app-navbar .brand:hover {
	text-decoration: none;
}
.app-navbar .nav-link {
	color: #4b5563;
	font-size: 14px;
	font-weight: 500;
	padding: 7px 14px;
	border-radius: 6px;
}
.app-navbar .nav-link:hover {
	background: #f5f5f5;
	text-decoration: none;
	color: #000;
}
.app-navbar .nav-link.active {
	background: var(--np-bg);
	color: var(--np-color);
}
.app-navbar .brand-wrap .nav-link {
	color:#000;
	border: 1px solid rgba(0,0,0, 0.3);
	border-radius: 4px;
	padding: 6px 12px;
}

/* user avatar pill */
.user-pill {
	display: flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: 1px solid var(--border-soft);
	border-radius: 999px;
	padding: 4px 10px 4px 4px;
}
.user-pill:hover {
	background: #f5f5f5;
}
.user-avatar {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--np-color);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* mobile/desktop visibility toggle (no BS breakpoint utility collides — plain media query) */
.show-mobile { display: none; }
.show-desktop { display: flex; }
@media (max-width: 767px) {
	.show-mobile { display: inline-flex; }
	.show-desktop { display: none; }
}

/* ---- generic soft card, used across dashboard/report/connections ---- */
.card-soft {
	background: #fff;
	border: 1px solid var(--border-soft);
	border-radius: 12px;
	padding: 20px;
}
.card-soft.table-wrap { overflow:hidden; }
.card-soft.card-filters { background: transparent; padding: 12px; }

/* ---- metric card (dashboard summary cards) ---- */
.metric-card {
	background: #fff;
	border: 1px solid var(--border-soft);
	border-radius: 12px;
	padding: 16px;
}
.metric-card.metric-primary {
	background: var(--np-bg);
	border-color: var(--np-bd);
}
.metric-card .metric-label {
	font-size: 13px;
	color: var(--muted);
	margin-bottom: 6px;
}
.metric-card.metric-primary .metric-label {
	color: var(--np-color);
}
.metric-card .metric-value {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
}
.metric-card.metric-primary .metric-value {
	color: var(--np-color);
}

/* ---- status badges (order status, connection status) ---- */
.status-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 20px;
}
.status-badge.status-completed,
.status-badge.status-active { background: var(--np-bg); color: var(--np-color); border: 1px solid #a7e6bf; }
.status-badge.status-refunded,
.status-badge.status-pending { background: #fff4e0; color: #a15c00; border: 1px solid #decba8; }
.status-badge.status-cancelled,
.status-badge.status-revoked { background: #f1f1f3; color: #6b7280; border: 1px solid #c0c4ce; }

/* ---- simple data table wrapper (keeps BS table but tidies borders) ---- */
.table-clean {
	--bs-table-border-color: var(--border-soft);
}
.table-clean thead th {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--muted);
	font-weight: 600;
	border-bottom-width: 1px;
}
.table-clean thead th a { font-size: 13px; }

.table-clean thead th a.asc::after {
	content: " \F148"; /* bootstrap-icons: arrow-up */
	font-family: "bootstrap-icons";
	font-size: 11px;
	margin-left: 4px;
}
.table-clean thead th a.desc::after {
	content: " \F128"; /* bootstrap-icons: arrow-down */
	font-family: "bootstrap-icons";
	font-size: 11px;
	margin-left: 4px;
}
.table-clean tr.clicked td { background: #faf2dd;}

/* Pagination */
.pagination-wrapper {}
ul.pagination li:first-child a { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
ul.pagination li:last-child a { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
ul.pagination li { font-size: 14px; border: none; }
ul.pagination li a {
    display: block;
    padding: 0.25rem 0.75rem;  /* pagination-sm sizing */
    color: #212529;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
	line-height: 1.3;
	font-size: 16px;
}
ul.pagination li a:hover {
    color: #fff;
    background-color: #212529;
    border-color: #212529;
}
ul.pagination li.active { padding: 0 !important; }
ul.pagination li.active a {
    color: #fff;
    background-color: #212529;
    border-color: #212529;
	pointer-events: none;
}

ul.pagination li.disabled a {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}
/* end Pagination */


/* Forms */
form input::placeholder,
form textarea::placeholder {
	color: rgba(0,0,0, 0.5) !important;
	opacity: 1; /* Ensures Firefox does not make it translucent by default */
	font-size: 14px;
}
form input.form-control,
form textarea.form-control,
form select.form-control {
	border-color: rgba(0,0,0, 0.35);
}
form label {
	color: rgba(0,0,0, 0.75);
}
form .error-message { margin-bottom: 0; }
/* end Forms */

.dropdown-toggle::after { display:none; }
.dropdown-item.active, .dropdown-item:active {
    background-color: var(--bs-dropdown-link-hover-bg);
	color: #000;
}
.alert-dismissible .btn-close {
    width: 0.85em;
    height: 0.85em;
    background-size: 14px;
	top: 50%; transform: translateY(-50%);
}
.text-np-color { color: var(--np-color); }

/* Nav */
/* _____ NAVIGATION _________________________ */
body.menu-open { overflow: hidden; }
button.submenu-toggle,
button.nav-close,
button.nav-toggle { background: transparent; border: none; }

/* _____ HAMBURGER _________________________ */
.nav-toggle {
	/* width: 46px; */
	height: 40px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 6px;
	border: 1px solid rgba(0,0,0, 0.0) !important;
	border-radius: 8px;
	padding: 0 8px;
	transition: .3s;
}
.nav-toggle span {
     display: block;
     width: 26px;
     height: 2px;
     background: #222;
     transition: .3s;
}
.nav-toggle:hover {
	background: #f5f5f5;
	border-color: rgba(0,0,0, 0.15) !important;
	transition: .3s;
}
 body.menu-open .nav-toggle span: nth-child(1){
     transform: translateY(8px) rotate(45deg);
}
 body.menu-open .nav-toggle span: nth-child(2){
     opacity: 0;
}
 body.menu-open .nav-toggle span: nth-child(3){
     transform: translateY(-8px) rotate(-45deg);
}

/* _____ NAV BACKDROP _________________________ */
.menu-backdrop {
     position: fixed;
     inset: 0;
     background: var(--backdrop);
     opacity: 0;
     visibility: hidden;
     transition: var(--transition);
     z-index: 9998;
}
 body.menu-open .menu-backdrop {
     opacity: 1;
     visibility: visible;
}

/* _____ NAV SIDEBAR _________________________ */
.side-menu {
     position: fixed;
     top: 0;
     right: calc(var(--menu-width) * -1);
     width: var(--menu-width);
     height: 100vh;
     background: var(--menu-bg);
     color: var(--menu-color);
     transition: var(--transition);
     z-index: 9999;
     display: flex;
     flex-direction: column;
     box-shadow: -8px 0 30px rgba(0,0,0,.15);
}
body.menu-open .side-menu { right: 0; }

/* _____ NAV HEADER _________________________ */
.side-menu__header {
	padding: 20px;
    border-bottom: 1px solid var(--menu-border);
}
.side-menu__header .title-wrap {
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-shrink: 0;
}
.side-menu__header h2 {
     font-size: 20px;
     font-weight: 600;
}
.nav-close {
     width: 36px;
     height: 36px;
     border-radius: 50%;
     transition: .2s;
}
.nav-close:hover { background: #f2f2f2; }

/* _____ NAV SEARCH _________________________ */
.side-menu__search { width: 100%; padding-top: 12px; padding-bottom: 12px;}
.side-menu__search .input-wrap { width: 100%; display: flex; gap: 4px; }
.side-menu__search .input-wrap input { width: 100%; padding: 4px 10px; border: 1px solid #eee; }
.side-menu__search .input-wrap button { width: auto; padding: 4px 8px; }

/* _____ NAV BODY _________________________ */
.side-menu__body {
     flex: 1;
     overflow-y: auto;
}

/* _____ MENU _________________________ */
.menu { list-style: none; }
.menu-item { border-bottom: 1px solid var(--menu-border); }

/* _____ NAV LINKS _________________________ */
.menu-item>a {
     display: block;
     padding: 15px 20px;
     transition: .2s;
}
.menu-item>a:hover {
     background: var(--hover);
	 text-decoration: none;
}
.menu-item .nav-link.login-btn span { background: #737373; color:#fff; border-radius: 6px; padding: 4px 12px; }

/* _____ NAV ITEM WITH SUBMENU _____________________________________________ */
.menu-link { display: flex; align-items: stretch; }
.menu-link>a {
     flex: 1;
     padding: 15px 20px;
     transition: .2s;
}
.menu-link>a:hover { background: var(--hover); text-decoration: none; }

/* _____ NAV SUBMENU BUTTON _____________________________________________ */
.submenu-toggle {
     width: 52px;
     height: 52px;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: .25s;
     border-left: 1px solid var(--menu-border);
}
.submenu-toggle:hover { background: var(--hover); }
.has-submenu.open>.menu-link>.submenu-toggle em {
     transform: rotate(180deg);
}

/* _____ NAV SUBMENU _____________________________________________ */
.submenu {
     display: none;
     list-style: none;
     background: #fafafa;
	  padding-left: 0;
}
.submenu li {
     border-top: 1px solid #efefef;
}
.submenu a {
     display: block;
     padding: 14px 20px 14px 36px;
     font-size: 14px;
     transition: .2s;
}
.submenu a:hover { background: #f2f2f2; text-decoration:underline; }

/* _____ NAV NESTED SUBMENU _____________________________________________ */
.submenu .submenu { background: #f4f4f4; }
.submenu .submenu a { padding-left: 52px; }
.submenu .submenu .submenu a { padding-left: 68px; }
.submenu .submenu .submenu .submenu a { padding-left: 84px; }

/* _____ NAV ACTIVE STATE _____________________________________________ */
li.menu-item.active > a, li.menu-item.active > .menu-link > a { font-weight:600; }
li.sub-menu-item.active > a, li.sub-menu-item.active > .menu-link > a { font-weight:600; text-underline-offset: 3px; }

/* ____ NAV SCROLLBAR _______________________________*/
.side-menu__body::-webkit-scrollbar { width: 8px; }
.side-menu__body::-webkit-scrollbar-thumb { background: #c9c9c9; }
.side-menu__body::-webkit-scrollbar-track { background: #efefef; }
/* end Nav */

#flashMessage.alert a { font-weight: 600; }

.pages-content ul { padding-left: 18px; margin-bottom: 16px; }
.pages-content ul li { list-style: circle; }


/* ___ MEDIA QUERIES ________________________________*/

/* // Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) { }

/* // Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {}

/* // Large devices (desktops, 992px and up) */
@media (min-width: 992px) { }

/* // X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) { }

/* // XX-Large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) { }

@media (max-width: 1399px) {}
@media (max-width: 1199px) {}
@media (max-width: 991px) {
	#app-nav-links { display: none !important; }
	.card-soft.table-wrap { border: none !important; }
	.table-clean.table-responsive-stack tbody { border-radius: 10px; }
	.table-clean.table-responsive-stack thead { display: none; }
	.table-clean.table-responsive-stack, 
	.table-clean.table-responsive-stack tbody,
	.table-clean.table-responsive-stack tr,
	.table-clean.table-responsive-stack td {
		display: block;
		width: 100%;
	}
	.table-clean.table-responsive-stack tr {
		border: 1px solid var(--border-soft);
		border-radius: 10px;
		margin-bottom: 12px;
		padding: 10px 14px;
	}
	.table-clean.table-responsive-stack tr:last-child { margin-bottom: 0; }
	.table-clean.table-responsive-stack td {
		display: flex;
		justify-content: space-between;
		border: none;
		padding: 4px 0;
		text-align: right;
		border-bottom: 1px solid rgba(0,0,0, 0.10);
	}
	.table-clean.table-responsive-stack td:last-child { border-bottom: none;}
	.table-clean.table-responsive-stack td::before {
		content: attr(data-label);
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.03em;
		font-size: 13px;
		color: var(--muted);
		text-align: left;
	}
	.table-clean.table-responsive-stack tr.clicked { background: #faf2dd;}
}
@media (max-width: 767px) {}
@media (max-width: 575px) {  }
@media (max-width: 380px) {  }

@media (min-width: 576px) and (max-width: 767px) { }
@media (min-width: 768px) and (max-width: 991px) {  }
@media (min-width: 992px) and (max-width: 1199px) {  }

@media (max-width: 1199px) {  }

@media (max-width: 1399px) {  }