/**
 * SmartSend Africa - Modern Dashboard Styles
 * Responsive, modern design matching the frontend application
 */

/* === RESET & BASE === */
* {
	box-sizing: border-box;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
	background: #f8f9fa !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 100vh;
}

.container-fluid {
	padding: 0 !important;
	margin: 0 !important;
}

/* === LAYOUT STRUCTURE === */
.dashboard-wrapper {
	display: flex;
	min-height: 100vh;
	width: 100%;
}

/* === SIDEBAR === */
.sidebar-wrapper {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	width: 260px;
	background: linear-gradient(135deg, #0c311c 0%, #1a5032 50%, #0c311c 100%);
	color: white;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease;
	overflow-y: auto;
}

.sidebar-wrapper::-webkit-scrollbar {
	width: 6px;
}

.sidebar-wrapper::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
}

.sidebar-wrapper::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
}

/* Logo Section */
.sidebar-logo {
	padding: 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo-text {
	font-size: 28px;
	font-weight: 700;
	color: white;
	letter-spacing: -0.5px;
	text-decoration: none !important;
	display: block;
}

.sidebar-logo-text span {
	color: #bfff00;
	text-shadow: 0 0 20px rgba(191, 255, 0, 0.3);
}

/* Mobile logo in top bar (white background) */
.mobile-logo.sidebar-logo-text {
	color: #0c311c;
}

.mobile-logo.sidebar-logo-text span {
	color: #bfff00;
	text-shadow: none;
}

/* Navigation */
.sidebar-nav {
	flex: 1;
	padding: 16px;
	overflow-y: auto;
}

.nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-header {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: rgba(255, 255, 255, 0.5);
	padding: 12px 16px 8px;
	margin-top: 16px;
	font-weight: 600;
}

.nav-header:first-child {
	margin-top: 0;
}

.nav-list > li > a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.7) !important;
	text-decoration: none !important;
	transition: all 0.2s ease;
	font-size: 14px;
	font-weight: 500;
}

.nav-list > li > a:hover {
	background: rgba(255, 255, 255, 0.1);
	color: white !important;
}

.nav-list > li.active > a {
	background: rgba(255, 255, 255, 0.1) !important;
	color: white !important;
	font-weight: 600;
}

.nav-list > li > a i {
	width: 20px;
	height: 20px;
	font-size: 18px;
}

/* User Section */
.sidebar-user {
	padding: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	margin-bottom: 8px;
}

.user-avatar {
	width: 40px;
	height: 40px;
	background: #bfff00;
	color: #0c311c;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
}

.user-details {
	flex: 1;
	min-width: 0;
}

.user-name {
	font-size: 14px;
	font-weight: 600;
	color: white;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.user-email {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.logout-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.7) !important;
	text-decoration: none !important;
	transition: all 0.2s ease;
	font-size: 14px;
	font-weight: 500;
	border: none;
	background: transparent;
	width: 100%;
	cursor: pointer;
}

.logout-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: white !important;
}

/* === MAIN CONTENT === */
.main-content-wrapper {
	margin-left: 260px;
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	width: calc(100% - 260px);
}

/* Top Bar */
.top-bar {
	background: white;
	border-bottom: 1px solid #e5e7eb;
	position: sticky;
	top: 0;
	z-index: 999;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
}

.top-bar-left {
	display: flex;
	align-items: center;
	gap: 16px;
}

.mobile-menu-btn {
	display: none;
	background: transparent;
	border: none;
	padding: 8px;
	cursor: pointer;
	border-radius: 8px;
	transition: background 0.2s;
}

.mobile-menu-btn:hover {
	background: #f3f4f6;
}

.mobile-menu-btn i {
	font-size: 24px;
	color: #374151;
}

.mobile-logo {
	display: none;
	height: 32px;
}

.top-bar-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.btn-new-campaign {
	background: linear-gradient(135deg, #bfff00 0%, #a3dd00 100%) !important;
	color: #0c311c !important;
	border: none !important;
	padding: 12px 24px !important;
	border-radius: 8px !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(191, 255, 0, 0.3);
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.btn-new-campaign:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(191, 255, 0, 0.4);
	background: linear-gradient(135deg, #d0ff20 0%, #b4ee00 100%) !important;
}

.btn-new-campaign i {
	font-size: 16px;
}

/* Page Content */
.page-content {
	flex: 1;
	padding: 24px;
	max-width: 100%;
}

/* Content wrapper improvements */
.page-content .span10 > div:first-child {
	margin-bottom: 24px;
}

/* Page title and brand section */
.page-content h2 {
	font-size: 28px !important;
	font-weight: 700 !important;
	color: #0c311c !important;
	margin: 0 0 24px 0 !important;
}

.page-content h3 {
	font-size: 20px !important;
	font-weight: 600 !important;
	color: #0c311c !important;
	margin: 0 0 16px 0 !important;
}

/* Add white card background to main content */
.page-content .span10 {
	background: white;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 1024px) {
	.sidebar-wrapper {
		transform: translateX(-100%);
	}

	.sidebar-wrapper.mobile-open {
		transform: translateX(0);
	}

	.main-content-wrapper {
		margin-left: 0;
		width: 100%;
	}

	.mobile-menu-btn {
		display: block;
	}

	.mobile-logo {
		display: block;
	}

	.top-bar {
		padding: 0 16px;
	}

	.page-content {
		padding: 16px;
	}
}

/* Mobile Overlay */
.mobile-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999;
}

.mobile-overlay.active {
	display: block;
}

/* === CARDS & CONTENT === */
.well, .sidebar-box {
	background: white;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	margin-bottom: 24px;
}

.well h2, .well h3, .sidebar-box h2, .sidebar-box h3 {
	color: #0c311c;
	margin-top: 0;
	font-weight: 600;
}

/* === TABLES === */
table {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	width: 100%;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border: 1px solid #e5e7eb !important;
	margin: 20px 0 !important;
}

table thead th {
	background: #f9fafb !important;
	color: #374151 !important;
	font-weight: 600 !important;
	font-size: 11px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	padding: 16px !important;
	border-bottom: 2px solid #e5e7eb !important;
	border-top: none !important;
	text-align: left !important;
}

table tbody td {
	padding: 16px !important;
	border-bottom: 1px solid #f3f4f6 !important;
	border-top: none !important;
	background: white !important;
	color: #374151 !important;
	font-size: 14px !important;
}

table tbody tr:last-child td {
	border-bottom: none !important;
}

table tbody tr:hover {
	background: #f9fafb !important;
}

table tbody tr:hover td {
	background: #f9fafb !important;
}

/* Table striped styling */
.table-striped tbody tr:nth-child(odd) td {
	background: #f9fafb !important;
}

.table-striped tbody tr:nth-child(even) td {
	background: white !important;
}

.table-striped tbody tr:hover td {
	background: #f3f4f6 !important;
}

/* Remove old table borders */
table.table {
	border: 1px solid #e5e7eb !important;
}

table.table thead th,
table.table tbody td {
	border-left: none !important;
	border-right: none !important;
}

/* === BUTTONS === */
.btn {
	border-radius: 8px !important;
	font-weight: 600 !important;
	padding: 12px 24px !important;
	transition: all 0.2s ease !important;
	border: 1px solid #e5e7eb !important;
	background: white !important;
	color: #374151 !important;
	font-size: 14px !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	text-decoration: none !important;
	cursor: pointer !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.btn:hover {
	background: #f9fafb !important;
	border-color: #d1d5db !important;
	color: #0c311c !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn i {
	font-size: 16px !important;
}

.btn-primary {
	background: #0c311c !important;
	border-color: #0c311c !important;
	color: white !important;
}

.btn-primary:hover {
	background: #1a5032 !important;
	border-color: #1a5032 !important;
	color: white !important;
}

.btn-success {
	background: linear-gradient(135deg, #bfff00 0%, #a3dd00 100%) !important;
	border-color: #bfff00 !important;
	color: #0c311c !important;
	box-shadow: 0 4px 12px rgba(191, 255, 0, 0.3) !important;
}

.btn-success:hover {
	background: linear-gradient(135deg, #d0ff20 0%, #b4ee00 100%) !important;
	border-color: #a3dd00 !important;
	color: #0c311c !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 16px rgba(191, 255, 0, 0.4) !important;
}

.btn-danger {
	background: #ef4444 !important;
	border-color: #ef4444 !important;
	color: white !important;
}

.btn-danger:hover {
	background: #dc2626 !important;
	border-color: #dc2626 !important;
	color: white !important;
}

.btn-info {
	background: #3b82f6 !important;
	border-color: #3b82f6 !important;
	color: white !important;
}

.btn-info:hover {
	background: #2563eb !important;
	border-color: #2563eb !important;
	color: white !important;
}

.btn-warning {
	background: #f59e0b !important;
	border-color: #f59e0b !important;
	color: white !important;
}

.btn-warning:hover {
	background: #d97706 !important;
	border-color: #d97706 !important;
	color: white !important;
}

/* Small buttons in tables */
.btn-mini, .btn-small {
	padding: 6px 12px !important;
	font-size: 12px !important;
}

/* Button groups */
.btn-group {
	display: inline-flex !important;
	gap: 0 !important;
}

.btn-group .btn {
	border-radius: 0 !important;
	margin: 0 !important;
}

.btn-group .btn:first-child {
	border-radius: 8px 0 0 8px !important;
}

.btn-group .btn:last-child {
	border-radius: 0 8px 8px 0 !important;
}

.btn-group.open .dropdown-toggle {
	background: #f3f4f6 !important;
}

/* === FORMS === */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
	border: 2px solid #e5e7eb !important;
	border-radius: 8px !important;
	padding: 12px 16px !important;
	font-size: 14px !important;
	transition: all 0.2s ease !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
	border-color: #bfff00 !important;
	outline: none !important;
	box-shadow: 0 0 0 4px rgba(191, 255, 0, 0.1) !important;
}

/* === ALERTS === */
.alert {
	border-radius: 12px !important;
	padding: 16px 20px !important;
	border: none !important;
	font-weight: 500;
}

.alert-success {
	background: #ecfdf5 !important;
	color: #065f46 !important;
}

.alert-danger, .alert-error {
	background: #fef2f2 !important;
	color: #991b1b !important;
}

.alert-info {
	background: #eff6ff !important;
	color: #1e40af !important;
}

.alert-warning {
	background: #fffbeb !important;
	color: #92400e !important;
}

/* === LEGACY OVERRIDES === */
.navbar {
	display: none !important;
}

body > .container-fluid > .row-fluid {
	margin: 0 !important;
}

/* Hide old sidebar and adjust content area */
.row-fluid .span2 {
	display: none !important;
}

.row-fluid .span10 {
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
}

/* Adjust container for new layout */
body > .container-fluid {
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
}

/* Page title styling */
.lead {
	font-size: 18px !important;
	font-weight: 600 !important;
	color: #6b7280 !important;
	margin-bottom: 8px !important;
}

.lead a {
	color: #0c311c !important;
	text-decoration: none !important;
	transition: color 0.2s;
}

.lead a:hover {
	color: #1a5032 !important;
}

h2, h3 {
	color: #0c311c !important;
	font-weight: 600 !important;
	margin-bottom: 20px !important;
}

/* Buttons improvements */
.btn-group .btn {
	border-radius: 8px !important;
}

.dropdown-menu {
	border-radius: 12px !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
	border: 1px solid #e5e7eb !important;
	padding: 8px !important;
}

.dropdown-menu > li > a {
	padding: 10px 16px !important;
	border-radius: 6px !important;
	transition: all 0.2s !important;
}

.dropdown-menu > li > a:hover {
	background: #f3f4f6 !important;
	color: #0c311c !important;
}

.dropdown-header {
	padding: 8px 16px 4px !important;
	color: #6b7280 !important;
	font-size: 11px !important;
	text-transform: uppercase !important;
	font-weight: 600 !important;
	letter-spacing: 0.5px !important;
}

.divider {
	margin: 8px 0 !important;
	border-top: 1px solid #e5e7eb !important;
}

/* Labels and badges */
.label {
	padding: 4px 12px !important;
	border-radius: 6px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
}

.label-info {
	background: #3b82f6 !important;
	color: white !important;
}

.label-success {
	background: #10b981 !important;
	color: white !important;
}

.label-warning {
	background: #f59e0b !important;
	color: white !important;
}

.label-danger, .label-important {
	background: #ef4444 !important;
	color: white !important;
}

/* Pagination */
.pagination {
	margin: 20px 0 !important;
}

.pagination ul > li > a {
	border-radius: 6px !important;
	margin: 0 4px !important;
	border: 1px solid #e5e7eb !important;
}

.pagination ul > li.active > a {
	background: #0c311c !important;
	border-color: #0c311c !important;
}

/* Progress bars */
.progress {
	background: #f3f4f6 !important;
	border-radius: 8px !important;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.progress .bar {
	background: linear-gradient(135deg, #bfff00 0%, #a3dd00 100%) !important;
	border-radius: 8px !important;
}

/* Modal improvements */
.modal {
	border-radius: 16px !important;
	overflow: hidden !important;
}

.modal-header {
	background: #f9fafb !important;
	border-bottom: 1px solid #e5e7eb !important;
	padding: 20px 24px !important;
}

.modal-header h3 {
	margin: 0 !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	color: #0c311c !important;
}

.modal-body {
	padding: 24px !important;
}

.modal-footer {
	background: #f9fafb !important;
	border-top: 1px solid #e5e7eb !important;
	padding: 16px 24px !important;
}

/* Improve spacing */
.page-content > * {
	margin-bottom: 24px;
}

.page-content > *:last-child {
	margin-bottom: 0;
}

/* Search and input styling */
input[type="search"],
input.search-query {
	border: 2px solid #e5e7eb !important;
	border-radius: 8px !important;
	padding: 10px 16px !important;
	font-size: 14px !important;
	transition: all 0.2s ease !important;
	width: 300px !important;
	max-width: 100% !important;
}

input[type="search"]:focus,
input.search-query:focus {
	border-color: #bfff00 !important;
	outline: none !important;
	box-shadow: 0 0 0 4px rgba(191, 255, 0, 0.1) !important;
}

/* Status badges and labels */
.badge {
	padding: 6px 12px !important;
	border-radius: 6px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 50px !important;
}

.badge-success {
	background: #10b981 !important;
	color: white !important;
}

.badge-info {
	background: #3b82f6 !important;
	color: white !important;
}

.badge-warning {
	background: #f59e0b !important;
	color: white !important;
}

.badge-danger, .badge-important {
	background: #ef4444 !important;
	color: white !important;
}

/* Icon buttons in tables */
table a.icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 32px !important;
	height: 32px !important;
	border-radius: 6px !important;
	transition: all 0.2s !important;
	color: #6b7280 !important;
	text-decoration: none !important;
}

table a.icon:hover {
	background: #f3f4f6 !important;
	color: #0c311c !important;
}

/* RSS and action icons */
a[href*="rss"] {
	color: #f97316 !important;
}

/* Draft label */
table tbody td:first-child {
	font-weight: 500 !important;
}

/* Percentage displays */
table tbody td[style*="text-align: center"] {
	text-align: center !important;
	font-weight: 600 !important;
}

/* Clear floats properly */
.clearfix::after,
div[style*="clear:both"]::after {
	content: "";
	display: table;
	clear: both;
}

/* Action buttons container */
.page-content .dropdown {
	margin-bottom: 20px !important;
}

/* Edit icon in brand name */
.top-brand-pencil {
	opacity: 0.5;
	transition: opacity 0.2s;
	margin-left: 8px;
	font-size: 14px !important;
}

.lead a:hover .top-brand-pencil {
	opacity: 1;
}

/* Improve link styling in tables */
table a {
	color: #0c311c !important;
	text-decoration: none !important;
	font-weight: 500 !important;
	transition: color 0.2s !important;
}

table a:hover {
	color: #1a5032 !important;
	text-decoration: underline !important;
}

/* Status indicators */
table .label {
	text-transform: capitalize !important;
	font-weight: 600 !important;
}

/* Footer styling */
footer {
	margin-top: 40px !important;
	padding: 24px 32px !important;
	border-top: 1px solid #e5e7eb !important;
	color: #6b7280 !important;
	font-size: 13px !important;
}

footer a {
	color: #0c311c !important;
	text-decoration: none !important;
}

footer a:hover {
	text-decoration: underline !important;
}
