:root {
	--primary-color: #008069; /* Official WhatsApp Green */
	--secondary-color: #075e54;
	--background-color: #ffffff;
	--panel-color: #ffffff;
	--dark-text: #111b21;
	--light-text: #ffffff;
	--border-color: #e0e0e0;
	--shadow-color: rgba(17, 27, 33, 0.15);
	--backdrop-color: rgba(0, 0, 0, 0.4);
	--error-color: #d32f2f;
	--transition-speed: 0.4s;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	margin: 0;
	height: 100vh;
	background-color: var(--background-color);
	color: var(--dark-text);
	overflow: hidden;
}

#main-layout {
	display: flex;
	width: 100%;
	height: 100%;
	position: relative; /* Ensure it respects the body padding */
}

#app-container {
	flex-grow: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative; /* For the views */
}

/* View transition styles */
.view {
	position: absolute;
	width: 100%;
	max-width: 400px;
	padding: 2rem;
	text-align: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--transition-speed) ease,
		visibility var(--transition-speed) ease;
}

.view.active {
	opacity: 1;
	visibility: visible;
}

/* Button Styles */
.btn {
	cursor: pointer;
	border: none;
	padding: 15px 30px;
	border-radius: 50px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--light-text);
	background-color: var(--primary-color);
	transition: background-color 0.3s ease, transform 0.2s ease;
	box-shadow: 0 4px 15px var(--shadow-color);
}

.btn:hover {
	background-color: var(--secondary-color);
	transform: translateY(-2px);
}

.btn:active {
	transform: translateY(0);
}

.btn.loading {
	pointer-events: none;
}

.btn.loading::after {
	content: " ...";
	animation: dots 1s steps(5, end) infinite;
}

@keyframes dots {
	from,
	to {
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
}

/* QR Code Styles */
#qr-view p {
	margin-bottom: 1.5rem;
	font-size: 1rem;
	color: #667781;
}

#qr-code-container {
	position: relative;
	width: 250px;
	height: 250px;
	margin: auto;
	background-color: var(--panel-color);
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 30px var(--shadow-color);
	padding: 20px;
	box-sizing: border-box;
}

#qr-code-img {
	width: 100%;
	height: 100%;
	border-radius: 8px;
	opacity: 0;
	transition: opacity var(--transition-speed) ease;
}

/* Spinner */
.spinner {
	position: absolute;
	width: 60px;
	height: 60px;
	border: 5px solid var(--border-color);
	border-top-color: var(--primary-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Connected View Styles */
#connected-view h1 {
	font-size: 2rem;
	margin-bottom: 0.5rem;
	color: var(--dark-text);
}

#connected-view p {
	color: #667781;
	font-size: 1.1rem;
}

.connected-video {
	width: 100%;
	max-width: 600px;
	border-radius: 12px;
	overflow: hidden;
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.connected-video.hidden-video {
	opacity: 0;
	transform: scale(0.9);
	pointer-events: none;
}

/* Sidebar Styles */
#sidebar {
	width: 350px;
	flex-shrink: 0;
	background-color: #f7f8fa; /* Subtle background for separation */
	z-index: 10;
	display: flex;
	flex-direction: column;
	border-left: 1px solid #e9edef;
}

.sidebar-header {
	padding: 24px;
	background-color: transparent; /* Cleaner header */
	color: var(--dark-text);
	border-bottom: 1px solid #e9edef;
}

.sidebar-header h3 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
}
.sidebar-header p {
	margin: 8px 0 0;
	font-size: 0.9rem;
	opacity: 0.6;
}

#add-to-blacklist-form {
	padding: 24px;
	border-bottom: 1px solid #e9edef;
}

#blacklist-input {
	flex-grow: 1;
	border: 1px solid transparent;
	background-color: #e9edef;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 0.95rem;
	outline: none;
	transition: all 0.3s ease;
	border-right: none;
}

#blacklist-input:focus {
	border-color: var(--primary-color);
	background-color: #fff;
	box-shadow: 0 0 0 2px rgba(0, 128, 105, 0.2);
}

#blacklist-input.error {
	border-color: var(--error-color);
}
#blacklist-input.error:focus {
	box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
}

#add-blacklist-btn {
	border: none;
	background-color: var(--primary-color);
	color: white;
	width: 46px;
	height: 46px;
	border-radius: 8px;
	margin-left: 10px;
	font-size: 1.8rem;
	line-height: 1;
	font-weight: 300;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.3s ease;
}

#add-blacklist-btn:hover {
	background-color: var(--secondary-color);
}

#blacklist {
	list-style: none;
	padding: 24px;
	margin: 0;
	flex-grow: 1;
	overflow-y: auto;
}

#blacklist.loading::before {
	content: "Loading...";
	display: block;
	text-align: center;
	color: #667781;
	padding: 20px 0;
}

.blacklist-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px;
	margin-bottom: 10px;
	border: 1px solid #e9edef;
	border-radius: 8px;
	font-family: "Courier New", Courier, monospace;
	font-size: 1rem;
	color: var(--dark-text);
	background-color: #fff;
}

.delete-btn {
	border: none;
	background: transparent;
	color: #d32f2f;
	font-size: 1.1rem;
	cursor: pointer;
}

.delete-btn:hover {
	color: #b71c1c;
}

#loading-view p {
	margin-top: 1rem;
	color: #667781;
}

.hidden {
	display: none !important;
}

/* System Prompt Sidebar */
#system-prompt-sidebar {
	width: 350px;
	flex-shrink: 0;
	background-color: #f7f8fa;
	border-right: 1px solid #e9edef;
	display: flex;
	flex-direction: column;
}

#system-prompt-sidebar .sidebar-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

#system-prompt-textarea {
	flex-grow: 1;
	border: 1px solid #e9edef;
	background-color: #fff;
	border-radius: 8px;
	padding: 16px;
	font-family: "Menlo", "Courier New", monospace;
	font-size: 0.9rem;
	line-height: 1.6;
	outline: none;
	transition: all 0.3s ease;
	resize: none;
}

#system-prompt-textarea:focus {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 2px rgba(0, 128, 105, 0.2);
}

#save-prompt-btn {
	margin-top: 16px;
	border-radius: 8px;
	width: 100%;
}

#save-prompt-btn:disabled {
	background-color: #e9edef;
	color: #aebac1;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Toast Notification */
#toast {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	padding: 12px 20px;
	border-radius: 8px;
	background-color: var(--dark-text);
	color: var(--light-text);
	font-size: 0.95rem;
	z-index: 1001; /* Higher than modals */
	transition: opacity 0.3s ease, transform 0.3s ease;
	opacity: 0;
	pointer-events: none;
}

/* Toast variants */
.toast.info {
	background-color: #333;
}
.toast.success {
	background-color: #4caf50;
}
.toast.warning {
	background-color: #ff9800;
}
.toast.danger {
	background-color: #f44336;
}

/* Modal */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--backdrop-color);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}
.modal-content {
	background-color: var(--panel-color);
	padding: 32px;
	border-radius: 12px;
	max-width: 500px;
	width: 95%;
	text-align: center;
	font-size: 1.1rem;
	position: relative; /* Needed for loading overlay */
}
.modal-actions {
	margin-top: 20px;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}
.btn.secondary {
	background-color: #e9edef;
	color: #111b21;
	box-shadow: none;
}
.btn.secondary:hover {
	background-color: #d1d7db;
}
.modal.hidden,
.toast.hidden {
	display: none;
}

/* Listener Control */
.listener-control {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 0;
}

.switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 26px;
}
.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: 0.4s;
	border-radius: 26px;
}
.slider:before {
	position: absolute;
	content: "";
	height: 20px;
	width: 20px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.4s;
	border-radius: 50%;
}
input:checked + .slider {
	background-color: var(--primary-color);
}
input:checked + .slider:before {
	transform: translateX(24px);
}

/* Small spinner */
.spinner.small {
	position: relative;
	width: 24px;
	height: 24px;
	border-width: 3px;
}

.controls-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}

.controls-row h1 {
	margin: 0;
	font-size: 2rem;
	color: var(--dark-text);
	text-align: center;
	white-space: nowrap;
}

.listener-control {
	margin-top: 0;
	justify-content: center;
}

/* Sheets Integration Styles */
.sidebar-section {
	padding: 16px;
	border-top: 1px solid #e9edef;
}
#manage-sheets-btn {
	width: 100%;
	margin-top: 12px;
}
.sheets-summary-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.sheets-summary-item {
	display: flex;
	align-items: center;
	padding: 12px;
	background-color: var(--background-color);
	border-radius: 10px;
	border: 1px solid var(--border-color);
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
	gap: 12px;
}
.sheets-summary-item:hover {
	background-color: #f5f5f5; /* A slightly off-white for hover */
	box-shadow: 0 2px 8px var(--shadow-color);
}
.sheet-icon {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
}
.sheet-summary-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex-grow: 1;
	overflow: hidden; /* Prevents long text from breaking layout */
}
.sheet-title {
	font-weight: 600;
	color: var(--dark-text);
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sheet-name {
	font-size: 0.85rem;
	color: #667781; /* Softer color for sub-text */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sheet-summary-status {
	font-size: 0.8rem;
	color: #667781;
	text-align: right;
	white-space: nowrap;
	flex-shrink: 0;
}
/* Remove old styles */
.sheet-summary-main,
.sheet-summary-name,
.sheet-summary-rows,
.sheet-summary-last-update {
	display: none;
}
.modal-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: transparent;
	border: none;
	font-size: 2rem;
	cursor: pointer;
	color: #aaa;
}
.modal-close:hover {
	color: #666;
}
.add-sheet-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}
.add-sheet-form input {
	flex-grow: 1;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 1rem;
}
.add-sheet-form button {
	width: 100%;
}
.synced-sheets-list {
	max-height: 300px;
	overflow-y: auto;
}
.synced-sheet-item {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 10px;
	align-items: center;
	padding: 10px;
	border-bottom: 1px solid #eee;
}
.synced-sheet-name {
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.synced-sheet-item .btn {
	padding: 4px 10px;
	font-size: 0.9rem;
}

/* Drag handle for asides */
.drag-handle {
	position: absolute;
	top: 0;
	width: 6px;
	height: 100%;
	background: linear-gradient(to right, #e0e0e0 60%, #fff 100%);
	cursor: ew-resize;
	z-index: 100;
	opacity: 0.7;
}
.drag-handle-left {
	right: -3px;
	border-radius: 0 6px 6px 0;
}
.drag-handle-right {
	left: -3px;
	border-radius: 6px 0 0 6px;
}
.drag-handle:hover {
	opacity: 1;
	background: linear-gradient(to right, #b2dfdb 60%, #fff 100%);
}

.sheet-summary-view-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
}
.sheet-summary-view-btn svg {
	width: 20px;
	height: 20px;
	fill: #667781;
	transition: fill 0.2s;
}
.sheet-summary-view-btn:hover svg {
	fill: var(--primary-color);
}
.modal-content.large {
	max-width: 90vw;
	width: 1200px;
}
.table-container {
	max-height: 70vh;
	overflow: auto;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	margin-top: 15px;
}
.sheet-details-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}
.sheet-details-table th,
.sheet-details-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #e0e0e0;
	white-space: nowrap;
}
.sheet-details-table thead th {
	background-color: #f7f8fa;
	font-weight: 600;
	position: sticky;
	top: 0;
}
.synced-sheet-name {
	text-align: left;
}
.sheet-details-table tbody tr:hover {
	background-color: #f3f6f8;
}

.empty-list-message {
	text-align: center;
	color: #667781;
	padding: 0 20px;
	padding-top: 0;
}

/* --- Main Application Container --- */
main {
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden; /* Ensures children with border-radius clip correctly */
}

#chat-container {
	display: flex;
}

/* New styles for sheets modal steps */
.sheet-step {
	display: none;
}
.sheet-step.active {
	display: block;
}

#sheet-url-form,
#sheet-select-form {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

#sheet-url-form .input-wrapper {
	width: 100%;
}
#sheet-url-form input {
	width: 100%;
	padding: 12px 16px;
	font-size: 1rem;
	border-radius: 6px;
	border: 1px solid #ccc;
	box-sizing: border-box; /* Ensures padding doesn't add to width */
}

.form-error {
	color: var(--error-color);
	font-size: 0.9rem;
	min-height: 1.2em; /* Prevent layout shift */
	text-align: left;
}

.select-wrapper {
	position: relative;
	width: 100%;
}
#sheet-select-dropdown {
	width: 100%;
	padding: 12px 16px;
	font-size: 1rem;
	border-radius: 6px;
	border: 1px solid #ccc;
	background-color: #fff;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23667781%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.4-5.4-13z%22%2F%3E%3C%2Fsvg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 0.65em auto;
	padding-right: 2.5rem; /* Make space for arrow */
}

.modal-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	z-index: 10;
}

#sheet-details-header {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-top: 20px;
}
#sheet-controls {
	display: flex;
	gap: 10px;
	align-items: center;
}
#update-sheet-duration-form {
	display: flex;
	gap: 5px;
}
#sheet-duration-input {
	width: 70px;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 6px;
}
#disconnect-sheet-btn.btn.danger {
	background-color: var(--error-color);
}
#disconnect-sheet-btn.btn.danger:hover {
	background-color: #b71c1c;
}

/* New Top Navbar Styles */
#top-navbar {
	width: 200px;
	height: 60px;
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--panel-color);
	box-shadow: 0 2px 15px var(--shadow-color);
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 40px;
	z-index: 100;
}

#nav-logo {
	height: 70px;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.nav-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease;
}

.nav-btn:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

.nav-btn svg {
	width: 24px;
	height: 24px;
	stroke: var(--dark-text);
}

#confirm-modal {
	z-index: 1002; /* Ensure confirm is on top of other modals */
}

#update-sync-modal .modal-content {
	max-width: 450px;
	text-align: center;
}

#update-sync-modal h3 {
	margin-top: 0;
	margin-bottom: 8px;
	font-size: 1.5rem;
}

#update-sync-modal p {
	margin-top: 0;
	margin-bottom: 24px;
	color: #667781;
	font-size: 0.95rem;
}

#update-sync-modal .input-wrapper {
	margin-bottom: 24px;
}

#update-sync-modal input {
	text-align: center;
	font-size: 1rem;
	padding: 12px;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	width: 100%;
	box-sizing: border-box;
}

#update-sync-modal .modal-actions {
	justify-content: center;
}

/* Make disconnect button more prominent */
#disconnect-sheet-btn.btn.danger {
	background-color: var(--error-color);
}
#disconnect-sheet-btn.btn.danger:hover {
	background-color: #b71c1c;
}

/* Hint and Error styling for forms */
.hint {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	color: var(--text-color-light);
	margin-top: 8px;
	padding: 0 4px;
	min-height: 20px; /* Reserve space */
}

.hint svg {
	flex-shrink: 0;
}

.form-error {
	font-size: 0.8rem;
}

/* blacklist */

.blacklist-number{
	margin-bottom: 18px;
}
.blacklist-item-hint{
	font-size: small;
    position: absolute;
    bottom: 9px;
	
}
.blacklist-item{
	/* padding: 26px 14px; */
	position: relative;
}

/* ===== Settings Modal Styles ===== */

/* Tab Navigation */
.tab-nav {
	display: flex;
	gap: 0;
	margin-bottom: 24px;
	border-bottom: 2px solid var(--border-color);
}

.tab-btn {
	background: none;
	border: none;
	padding: 12px 20px;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--text-color-light);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: all 0.2s ease;
	position: relative;
}

.tab-btn:hover {
	color: var(--primary-color);
	background-color: var(--bg-color-secondary);
}

.tab-btn.active {
	color: var(--primary-color);
	border-bottom-color: var(--primary-color);
}

/* Tab Content */
.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
}

.settings-section {
	max-width: 600px;
}

.settings-section h4 {
	color: var(--text-color);
	margin-bottom: 8px;
	font-size: 1.2rem;
}

.settings-description {
	color: var(--text-color-light);
	margin-bottom: 24px;
	line-height: 1.5;
}

/* API Key Section */
.api-key-section {
	background: var(--bg-color-secondary);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
}

.api-key-display-container {
	margin-bottom: 20px;
}

.api-key-display-container label {
	display: block;
	font-weight: 500;
	color: var(--text-color);
	margin-bottom: 8px;
}

.api-key-input-group {
	display: flex;
	gap: 8px;
	align-items: center;
}

.api-key-input {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	background: var(--bg-color);
	color: var(--text-color);
	font-family: 'Courier New', monospace;
	font-size: 0.9rem;
}

.api-key-input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn.small {
	padding: 8px 12px;
	font-size: 0.85rem;
	min-width: auto;
}

.btn.small svg {
	width: 14px;
	height: 14px;
}

.api-key-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.api-key-status {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 0.9rem;
	border: 1px solid;
}

.api-key-status.success {
	background-color: rgba(34, 197, 94, 0.1);
	border-color: rgba(34, 197, 94, 0.3);
	color: #059669;
}

.api-key-status.error {
	background-color: rgba(239, 68, 68, 0.1);
	border-color: rgba(239, 68, 68, 0.3);
	color: #dc2626;
}

.api-key-status.info {
	background-color: rgba(59, 130, 246, 0.1);
	border-color: rgba(59, 130, 246, 0.3);
	color: #2563eb;
}

/* API Documentation Section */
.api-documentation-section {
	border-top: 1px solid var(--border-color);
	padding-top: 24px;
}

.api-documentation-section h5 {
	color: var(--text-color);
	margin-bottom: 12px;
	font-size: 1rem;
}

.code-example {
	background: var(--bg-color);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 16px;
	margin: 16px 0;
	overflow-x: auto;
}

.code-example pre {
	margin: 0;
	font-family: 'Courier New', monospace;
	font-size: 0.85rem;
	line-height: 1.4;
	color: var(--text-color);
}

.link {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 500;
}

.link:hover {
	text-decoration: underline;
}

/* General Settings */
.setting-item {
	margin-bottom: 20px;
}

.setting-item label {
	display: block;
	font-weight: 500;
	color: var(--text-color);
	margin-bottom: 8px;
}

.readonly-input {
	background: var(--bg-color-secondary);
	border: 1px solid var(--border-color);
	color: var(--text-color-light);
	cursor: not-allowed;
}

/* Loading states */
.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.btn.loading {
	position: relative;
	color: transparent;
}

.btn.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 16px;
	height: 16px;
	border: 2px solid transparent;
	border-top: 2px solid currentColor;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	color: white;
}

@keyframes spin {
	0% { transform: translate(-50%, -50%) rotate(0deg); }
	100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.api-key-actions {
		flex-direction: column;
	}
	
	.api-key-input-group {
		flex-wrap: wrap;
	}
	
	.api-key-input {
		flex: 1;
		min-width: 200px;
	}
	
	.tab-nav {
		flex-wrap: wrap;
	}
}