/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Root variables */
:root {
	--primary: #5E35B1;
	--primary-light: #8c44c3;
	--accent: #f0db4f;
	--text-dark: #333;
	--text-light: #fff;
	--background: #f9f9f9;
	--border: #e0e0e0;
	--shadow: rgba(0, 0, 0, 0.1);
	--error: #ff6347;
	--success: #28a745;
	--warning: #ffc107;
	--info: #17a2b8;
	--card-bg: #ffffff;
}

/* Basic reset */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Container width utility class */
.container-width {
	max-width: 1400px;
	width: 100%;
	margin: 0 auto;
	padding: 0 2rem;
}

/* Base body styles */
body {
	font-family: 'Roboto', sans-serif;
	line-height: 1.6;
	background-color: var(--background);
	color: var(--text-dark);
}

/* Header */
.header {
	background-color: var(--primary);
	color: var(--text-dark);
	box-shadow: 0 2px 4px var(--shadow);
	width: 100%;
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
}

.logo-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 0.5rem 0;
}

.jsra-logo {
	height: 35px;
	width: auto;
}

.sp-logo {
	height: 35px;
	width: auto;
}

.logout-container {
	position: absolute;
	right: 2rem;
	top: 1rem;
}

.logout-button {
	background-color: transparent;
	color: var(--text-light);
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease;
	font-size: 0.875rem;
}

.logout-button:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

/* Navigation */
.navbar {
	background-color: #f0f0f0;
	border-bottom: 1px solid var(--border);
	width: 100%;
}

.navbar ul {
	list-style: none;
	display: flex;
	gap: 1rem;
	margin: 0;
	padding: 0.5rem 0;
}

.navbar li {
	margin: 0;
	padding: 0;
}

.navbar a {
	text-decoration: none;
	color: var(--text-dark);
	padding: 0.5rem 1rem;
	border-radius: 4px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
	background-color: var(--primary);
	color: var(--text-light);
}

/* Dashboard container */
.dashboard-container {
	width: 100%;
}

/* Content Container */
.content {
	width: 100%;
	padding: 2rem 0;
}

/* Dashboard Grid */
.dashboard-grid {
	display: grid;
	gap: 2rem;
}

.stats-container {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.stat-card {
	flex: 1;
	min-width: 180px;
	max-width: 220px;
	background: var(--card-bg);
	border-radius: 10px;
	padding: 1.5rem;
	box-shadow: 0 2px 4px var(--shadow);
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.stat-card:last-child {
	min-width: 450px;
	max-width: 500px;
	padding: 1rem 2rem;
	display: flex;
	justify-content: center;
	align-items: center;
}

.stat-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 45px;
	height: 45px;
	background: var(--background);
	border-radius: 8px;
}

.stat-icon i {
	font-size: 1.4rem;
	color: var(--primary);
}

.stat-details {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.stat-value {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--text-dark);
}

.stat-label {
	font-size: 0.875rem;
	color: #6c757d;
}

.quick-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	width: 100%;
}

.search-section {
	background: var(--card-bg);
	border-radius: 10px;
	padding: 1.5rem;
	box-shadow: 0 2px 4px var(--shadow);
	grid-column: 1 / -1;
}

.search-bar {
	display: flex;
	gap: 1rem;
}

.search-input {
	flex: 1;
	padding: 0.75rem 1rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.875rem;
}

/* Advanced Search Filter Styles */
.filter-grid {
	background: #fff;
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	margin-bottom: 1rem;
}

.filter-group {
	margin-bottom: 1.5rem;
}

.filter-group h3 {
	font-size: 1rem;
	margin-bottom: 0.75rem;
	color: #495057;
}

.filter-inputs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.75rem;
}

.search-input {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #ced4da;
	border-radius: 0.25rem;
	font-size: 0.875rem;
}

.checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.5rem;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
	margin: 0;
}

.filter-actions {
	display: flex;
	gap: 0.5rem;
	justify-content: flex-end;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #dee2e6;
}


/* API Test */
.test-progress {
	margin: 20px 0;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #dee2e6;
}

.test-progress h4 {
	margin-bottom: 15px;
	color: #495057;
}

.test-steps {
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 0.85rem;
}

.test-step {
	display: flex;
	align-items: center;
	padding: 6px 10px;
	border-radius: 4px;
	background: white;
	border: 1px solid #dee2e6;
	transition: all 0.3s ease;
}

.test-step.pending {
	border-color: #ffc107;
	background-color: #fff8e5;
}

.test-step.success {
	border-color: #28a745;
	background-color: #f0fff4;
}

.test-step.error {
	border-color: #dc3545;
	background-color: #fff5f5;
}

.test-step.warning {
	border-color: #ffc107;
	background-color: #fff8e5;
}

.step-icon {
	margin-right: 10px;
	font-size: 1.2em;
}

.step-name {
	min-width: 100px;
}

.step-message {
	color: #666;
	flex: 1;
}

.permission-details {
	margin-left: 25px;
	margin-top: 5px;
}

.permission-item {
	display: flex;
	align-items: center;
	padding: 4px 8px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.5);
}

.perm-icon {
	margin-right: 8px;
	font-size: 0.9em;
}

.perm-name {
	font-size: 0.9em;
	color: #495057;
}

.test-final {
	margin-top: 15px;
	padding: 12px;
	border-radius: 4px;
	font-weight: 500;
	display: flex;
	align-items: center;
}

.test-final.success {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.test-final.error {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

.test-final small {
	font-weight: normal;
	opacity: 0.8;
}

.initial-state {
	color: #6c757d;
	text-align: center;
	padding: 20px;
	font-size: 0.9rem;
}

/* Location Badge Styles */
.location-badge {
	display: inline-block;
	padding: 0.25em 0.5em;
	border-radius: 4px;
	background-color: #e2e8f0;
	font-size: 0.75em;
}

.filter-group select {
	width: 100%;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	line-height: 1.5;
	border: 1px solid #ced4da;
	border-radius: 0.25rem;
	margin-bottom: 0.5rem;
}

.filter-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.filter-group {
	background: var(--background);
	padding: 1rem;
	border-radius: 8px;
}

.filter-inputs {
	display: grid;
	gap: 1rem;
}

.checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 0.5rem;
}

.devices-section {
	background: var(--card-bg);
	border-radius: 10px;
	padding: 1.5rem;
	box-shadow: 0 2px 4px var(--shadow);
	grid-column: 1 / -1;
}

.devices-header {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-bottom: 1.5rem;
}

.device-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
	padding: 1rem;
}

.device-card {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	padding: 1rem;
}

.device-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

 .device-content {
	margin-bottom: 1rem;
}

.device-content p {
	margin: 0.5rem 0;
}

.location-info {
	margin-top: 0.5rem;
}

.device-table {
	width: 100%;
	border-collapse: collapse;
}

.device-table th,
.device-table td {
	padding: 1rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

.device-table th {
	background: var(--background);
	font-weight: 600;
}

 .device-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e9ecef;
}

.btn {
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	border: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 120px;
	justify-content: center;
}

.btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:active {
	transform: translateY(1px);
	box-shadow: none;
}

.btn-primary {
	background: var(--primary);
	color: var(--text-light);
}

.btn-primary:hover {
	background: #b4d84d;
}

.btn-secondary {
	background: var(--background);
	color: var(--text-dark);
	border: 1px solid var(--border);
}

.btn-secondary:hover {
	background: #e9ecef;
}

.btn-outline {
	background: transparent;
	border: 1px solid var(--primary);
	color: var(--primary);
}

.btn-outline:hover {
	background: var(--primary);
	color: var(--text-light);
}

.btn-outline:active {
	background: #b4d84d;
	border-color: #b4d84d;
	color: var(--text-light);
}

.action-button {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.3rem 0.6rem;
	border-radius: 4px;
	cursor: pointer;
	background: var(--background);
	border: 1px solid var(--border);
	color: var(--text-dark);
	font-size: 0.75rem;
	transition: all 0.2s ease;
}

.action-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-button:active {
	transform: translateY(1px);
	box-shadow: none;
}

.action-button i {
	font-size: 0.75rem;
}

.action-button.primary {
	background: var(--primary);
	color: var(--text-light);
	border: none;
}

.action-button.primary:hover {
	background: #b4d84d;
}

.action-button.secondary {
	background: var(--background);
	color: var(--text-dark);
	border: 1px solid var(--border);
}

.action-button.secondary:hover {
	background: #e9ecef;
}

.action-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.status-badge {
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 500;
}

.status-online {
	background: var(--success);
	color: var(--text-light);
}

.status-offline {
	background: var(--error);
	color: var(--text-light);
}

.loading-spinner {
	text-align: center;
	padding: 2rem;
	color: #6c757d;
}

.error-message {
	color: var(--error);
	text-align: center;
	padding: 1rem;
}

.no-results {
	text-align: center;
	padding: 2rem;
	color: #6c757d;
}

/* Styled dropdown */
select {
	appearance: none;  /* Remove default appearance */
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 100%;
	padding: 10px 35px 10px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: white;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 1em;
	cursor: pointer;
}

/* Hover state */
select:hover {
	border-color: #999;
}

/* Focus state */
select:focus {
	outline: none;
	border-color: #007bff;
	box-shadow: 0 0 0 2px rgba(0,123,255,.25);
}

/* Disabled state */
select:disabled {
	background-color: #f5f5f5;
	cursor: not-allowed;
}

/* Option styling */
select option {
	padding: 10px;
}

/* Form group styling for the select */
.form-group select {
	margin-top: 5px;
	margin-bottom: 10px;
}

/* Modal Styles */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	display: none;
}

.modal-overlay.show {
	display: block;
}

.preferences-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	z-index: 10001;
	min-width: 300px;
	max-width: 600px;
	max-height: 80vh;
	overflow-y: auto;
}

.preferences-content {
	position: relative;
}

.column-option {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px;
	border-bottom: 1px solid #eee;
	background: white;
}

.column-list {
	margin: 10px 0;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.drag-handle {
	cursor: move;
	color: #999;
	padding: 0 8px;
}

.preference-actions {
	margin-top: 20px;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.view-preference {
	margin: 20px 0;
}

.view-preference label {
	margin-right: 20px;
}

.preferences-modal h3 {
	margin-top: 0;
	margin-bottom: 20px;
}

.preferences-modal h4 {
	margin: 15px 0 10px;
}

.column-selection {
	margin-bottom: 20px;
}

/* Login styles */
.login-container {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: calc(100vh - 200px);
}

.login-box {
	background: var(--card-bg);
	border-radius: 10px;
	padding: 2rem;
	box-shadow: 0 2px 4px var(--shadow);
	width: 100%;
	max-width: 400px;
}

/* Setup styles */
.setup-container {
	background: var(--card-bg);
	border-radius: 10px;
	padding: 2rem;
	box-shadow: 0 2px 4px var(--shadow);
	max-width: 600px;
	margin: 2rem auto;
}

.setup-container .form-actions {
	margin-top: 2rem;
}

.setup-container .btn {
	width: 100%;
	padding: 1rem;
	font-size: 1rem;
}

.setup-container .btn-primary {
	background: var(--primary);
	color: var(--text-light);
}

.setup-container .btn-primary:disabled {
	background-color: #cccccc;
	cursor: not-allowed;
}

/* First Login Styles */

.api-config-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}

.api-config-layout {
	display: grid;
	grid-template-columns: 1fr 300px;  /* Form takes remaining space, results fixed width */
	gap: 20px;
	align-items: start;
}

.config-form-section {
	min-width: 0;  /* Allows content to shrink if needed */
}

.test-results-section {
	position: sticky;
	top: 20px;  /* Keeps results visible when scrolling */
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	max-height: calc(100vh - 40px);  /* Full height minus margins */
	overflow-y: auto;
}

.test-results {
	display: block !important;  /* Override previous display:none */
	padding: 15px;
}

.test-results h3 {
	margin-top: 0;
	margin-bottom: 15px;
}

.setup-form .button {
	width: 100%;
	padding: 1rem;
	background-color: var(--primary);
	color: var(--text-light);
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.setup-form .button:hover {
	background-color: #b4d84d;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.setup-form .button:active {
	transform: translateY(1px);
	box-shadow: none;
}

.setup-form .button:disabled {
	background-color: #cccccc;
	cursor: not-allowed;
	transform: none;
}

.setup-form .form-actions {
	margin-top: 2rem;
}

.setup-form .password-requirements {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: #666;
}

.setup-form .password-requirements ul {
	margin-top: 0.5rem;
	padding-left: 1.5rem;
}

.setup-form .password-requirements li {
	margin-bottom: 0.25rem;
}

.setup-form .password-requirements li.valid {
	color: var(--success);
}

/* API Configuration */
.button-group {
	display: flex;
	gap: 1rem;
	align-items: center;
}

.button-group .btn {
	min-width: auto;  /* Override the default min-width */
	padding: 0.5rem 1rem;  /* Reduce padding */
	font-size: 0.8rem;  /* Smaller font size */
}

.btn-test {
	background-color: #ffc107;  /* Dark yellow */
	color: #000;  /* Black text */
	border: none;
}

.btn-test:hover {
	background-color: #e0a800;  /* Darker shade for hover */
}

.btn-danger {
	background-color: var(--error);
	color: var(--text-light);
}

.btn-danger:hover {
	background-color: #dc3545;
}

/* API Config Form Styles */
.setup-form .input-field {
	width: 30%;  /* Reduce width to 30% */
}

.setup-form .input-group {
	display: flex;
	align-items: center;
	width: 30%;  /* Match input field width */
}

.setup-form .input-group .input-field {
	width: 100%;  /* Make input take full width of its container */
}

.setup-form .input-group-text {
	padding: 0.75rem;
	background: var(--background);
	border: 1px solid var(--border);
	border-left: none;
	border-radius: 0 6px 6px 0;
	color: #666;
}

/* Adjust form spacing */
.setup-form .form-group {
	margin-bottom: 1rem;
}

.setup-form .form-text {
	font-size: 0.75rem;
	color: #666;
	margin-top: 0.25rem;
}

/* API Setup Guide Styles */
.setup-guide {
	margin-bottom: 2rem;
}

.setup-guide ol {
	padding-left: 2rem;  /* Align numbers with content */
}

.setup-guide ul {
	list-style-type: disc;
	padding-left: 2rem;  /* Match nested list indentation */
	margin: 0.5rem 0;    /* Add some vertical spacing */
}

.setup-guide li {
	margin-bottom: 0.5rem;  /* Space between list items */
}

.setup-guide ul li {
	margin-bottom: 0.25rem;  /* Less space between nested list items */
}

/* Settings styles */
.settings-grid {
	display: grid;
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.settings-card {
	background: var(--card-bg);
	border-radius: 10px;
	padding: 1.5rem;
	box-shadow: 0 2px 4px var(--shadow);
}

.settings-card.wide {
	grid-column: 1 / -1;
}

/* Device Groups Settings Styles */
.groups-header {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 1rem;
}

.group-actions {
	display: flex;
	gap: 0.5rem;
}

.group-card {
	background: var(--background);
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1rem;
}

.group-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
}

.group-header h4 {
	margin: 0;
	color: var(--primary);
	font-size: 1rem;
}

.group-description {
	color: #666;
	font-size: 0.875rem;
	margin: 0;
}

.btn-sm {
	padding: 0.25rem 0.5rem;
	font-size: 0.75rem;
	min-width: auto;
}

.btn-danger {
	background-color: var(--error);
	color: var(--text-light);
	border: none;
}

.btn-danger:hover {
	background-color: #dc3545;
}


/* Device Groups Styles */
.groups-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.groups-info {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.group-badge {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	background-color: #e9ecef;
	font-size: 0.75rem;
}

.group-card {
	background: var(--card-bg);
	border-radius: 8px;
	padding: 1rem;
	box-shadow: 0 2px 4px var(--shadow);
}

.group-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
}

.group-header h4 {
	margin: 0;
	color: var(--primary);
}

.group-description {
	color: #666;
	font-size: 0.875rem;
	margin: 0;
}

.group-config {
	background: var(--background);
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.group-config h3 {
	margin-top: 0;
	margin-bottom: 1rem;
	color: var(--primary);
}

.modal-description {
	margin-bottom: 1.5rem;
	color: #666;
}

.btn-sm {
	padding: 0.25rem 0.5rem;
	font-size: 0.875rem;
}

.group-members, .available-devices {
	width: 48%; /* Two columns */
	float: left;
	margin-right: 2%;
	border: 1px solid #ccc;
	border-radius: 4px;
	min-height: 200px;
}

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

.device-list li {
	padding: 8px;
	border-bottom: 1px solid #eee;
	cursor: move;
}

.device-groups-section {
	margin-bottom: 1rem;
	padding: 1rem;
	background: #f8f9fa;
	border-radius: 4px;
}

.device-group-selection {
	margin-top: 1rem;
}

.selected-groups {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.selected-group-tag {
	background: #e3f2fd;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.device-group-item {
	padding: 0.5rem;
	margin: 0.25rem 0;
	background: white;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	cursor: pointer;
}

.device-group-item:hover {
	background: #f8f9fa;
}

.group-devices-table {
	margin-top: 1rem;
	background: white;
	border-radius: 4px;
	overflow: hidden;
}



/* Form styles */
.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
}

.input-field {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.875rem;
}

.form-actions {
	margin-top: 1.5rem;
}

.location-badge {
	display: inline-block;
	padding: 0.25em 0.5em;
	border-radius: 0.25em;
	background-color: #e9ecef;
	font-size: 0.875em;
	margin-right: 0.5em;
}

.filter-group select {
	width: 100%;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	line-height: 1.5;
	border: 1px solid #ced4da;
	border-radius: 0.25rem;
	margin-bottom: 0.5rem;
}

.color-picker-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}

.color-picker {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 50px;
	height: 50px;
	background-color: transparent;
	border: none;
	cursor: pointer;
}

.color-preview {
	width: 30px;
	height: 30px;
	border-radius: 4px;
	border: 1px solid #ddd;
}



/* Alert styles */
.alert {
	padding: 1rem;
	border-radius: 6px;
	margin-bottom: 1rem;
}

.alert-error {
	background-color: #fee2e2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.alert-success {
	background-color: #d1fae5;
	color: #059669;
	border: 1px solid #a7f3d0;
}

/* Password Requirements Styles */
.password-requirements {
	margin-top: 0.5rem;
	padding: 1rem;
	background: var(--background);
	border-radius: 6px;
	font-size: 0.875rem;
}

.password-requirements ul {
	list-style: none;
	margin-top: 0.5rem;
	padding-left: 0.5rem;
}

.password-requirements li {
	margin-bottom: 0.25rem;
	color: #666;
}

.password-requirements li.valid {
	color: var(--success);
}

/* Setup Progress Styles */
.progress-steps {
	display: flex;
	justify-content: space-between;
	margin: 2rem 0;
	position: relative;
}

.progress-steps::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--border);
	z-index: 1;
}

.step {
	position: relative;
	background: var(--card-bg);
	padding: 0.5rem 1rem;
	border-radius: 20px;
	border: 2px solid var(--border);
	color: #666;
	z-index: 2;
}

.step.active {
	background: var(--primary);
	border-color: var(--primary);
	color: var(--text-light);
}

/* Device Details Modal Styles */
.device-details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin: 1.5rem 0;
}

.detail-group {
	background: var(--background);
	padding: 1rem;
	border-radius: 8px;
}

.detail-group h3 {
	margin-bottom: 1rem;
	font-size: 1rem;
	color: var(--primary);
}

.detail-group p {
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
}

.detail-group strong {
	color: var(--text-dark);
}

.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
}

/* Modal base styles if not already present */
.modal {
	display: block;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
	background-color: #fefefe;
	margin: 5% auto;
	padding: 20px;
	border-radius: 8px;
	width: 80%;
	max-width: 1000px;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;     
}

.close {
	position: absolute;
	right: 20px;
	top: 20px;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
}

.close:hover {
	color: var(--primary);
}

/* App Container Layout */
.app-container {
	display: flex;
	min-height: 100vh;
}

/* Sidebar */
.sidebar {
	width: 250px;
	background-color: #2c3e50;
	color: #ecf0f1;
	display: flex;
	flex-direction: column;
	position: fixed;
	height: 100vh;
	overflow-y: auto;
	z-index: 1000;
}


/* Submenu */
.nav-section .section-toggle {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.toggle-icon {
	transition: transform 0.3s;
	margin-left: auto;
}

.section-toggle.active .toggle-icon {
	transform: rotate(180deg);
}

.submenu {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease-out;
	background-color: rgba(0, 0, 0, 0.2);
}

.submenu.expanded {
	max-height: 500px; /* Adjust based on content */
}

.submenu a {
	padding-left: 50px;
}

/* Sidebar Footer */
.sidebar-footer {
	padding: 15px 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	text-align: center;
	margin-top: auto;
}

/* Main Content */
.main-content {
	flex-grow: 1;
	margin-left: 250px;
	padding: 20px;
	background-color: #f5f7fa;
	min-height: 100vh;
}

.content-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e9ecef;
}

.content-header h1 {
	margin: 0;
	font-size: 1.8rem;
	color: #2c3e50;
}

.user-info {
	color: #7f8c8d;
}

.content-body {
	background-color: white;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	padding: 20px;
	min-height: calc(100vh - 160px);
}

.content-footer {
	margin-top: 20px;
	text-align: center;
	color: #7f8c8d;
	font-size: 0.9rem;
}
/* End of not sure this is required */

/* Footer styling */
.footer {
	text-align: center;
	padding: 1rem 0;
	background-color: #f8f9fa;
	border-top: 1px solid #dee2e6;
	margin-top: 2rem;
}

.footer p {
	margin: 0;
	font-size: 0.875rem;
	color: #6c757d;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
	.container-width {
		padding: 0 1rem;
	}
	
	/* API Configuration Responsive Styles */
	.api-config-layout {
		grid-template-columns: 1fr;
	}
	
	.test-results-section {
		position: static;
		max-height: none;
	}    
	
	.dashboard-container {
		padding: 0;
	}
	
	.stats-container {
		flex-direction: column;
	}
	
	.stat-card {
		max-width: none;
	}
	
	.stat-card:last-child {
		min-width: 0;
		max-width: none;
	}
	
	.nav-menu {
		flex-direction: column;
		padding: 1rem;
	}
	
	.logo-container {
		flex-direction: column;
		gap: 1rem;
	}

	.preferences-modal {
		width: 95%;
		max-width: none;
		height: 95%;
		max-height: none;
	}

	.quick-actions {
		flex-direction: column;
	}

	.search-bar {
		flex-direction: column;
	}

	.filter-grid {
		grid-template-columns: 1fr;
	}
	
	.filter-actions {
		flex-direction: column;
	}
	
	.filter-actions button {
		width: 100%;
	}
	
	.groups-grid {
		grid-template-columns: 1fr;  /* Stack groups in single column on mobile */
	}
	
	.group-card {
		margin-bottom: 1rem;
	}
	
	.group-header {
		flex-direction: column;
		gap: 0.5rem;
		align-items: flex-start;
	}

	.modal-content {
		width: 95%;
		margin: 10% auto;
		padding: 15px;
	}

	.device-details-grid {
		grid-template-columns: 1fr;  /* Stack detail groups in single column */
	}

	.modal-actions {
		flex-direction: column;
		gap: 0.5rem;
	}

	.modal-actions button {
		width: 100%;
	}

	.group-config {
		padding: 0.75rem;
	}

	/* Progress Steps Mobile Adjustments */
	.progress-steps {
		flex-direction: column;
		gap: 1rem;
		align-items: flex-start;
	}

	.progress-steps::before {
		display: none;
	}

	.step {
		width: 100%;
		text-align: center;
	}

	/* Setup Form Mobile Adjustments */
	.setup-container {
		margin: 1rem;
		padding: 1rem;
	}

	.password-requirements {
		padding: 0.75rem;
	}

	.password-requirements ul {
		padding-left: 0;
	}

	/* Form Mobile Adjustments */
	.form-group {
		margin-bottom: 1rem;
	}

	.input-field {
		padding: 0.5rem;
	}

	.form-actions {
		margin-top: 1rem;
	}

	.form-actions button {
		width: 100%;
	}
	
	/* Dropdown menu mobile adjustments */
	.dropdown-menu {
		position: static;
		box-shadow: none;
		border-top: 1px solid #eee;
		border-bottom: 1px solid #eee;
		padding: 0;
	}
	
	.dropdown-menu a {
		padding-left: 2rem;
	}
	
	/* Sidebar mobile adjustments */
	.sidebar {
		width: 70px;
		overflow: visible;
	}
	
	.sidebar:hover {
		width: 250px;
	}
	
	.vertical-nav a span {
		display: none;
	}
	
	.sidebar:hover .vertical-nav a span {
		display: inline;
	}
	
	.main-content {
		margin-left: 70px;
	}
	
	.submenu a {
		padding-left: 25px;
	}
	
	.sidebar:hover .submenu a {
		padding-left: 50px;
	}
}
