/* static/css/cards.css - Shared Card Styles for Jobto */

/* ============================================
   Card Stack Layout
   ============================================ */
.card-stack {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 1rem 2rem 1rem 1rem;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	min-height: 50vh;
	max-height: 85vh;
	width: 100%;
	height: 100%;
	pointer-events: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.card-stack.single-card {
	margin: 0 auto;
	width: 58vw;
	max-width: 650px;
}

.card-stack::-webkit-scrollbar {
	height: 6px;
}

.card-stack::-webkit-scrollbar-track {
	background: transparent;
}

.card-stack::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.15);
	border-radius: 3px;
}

.card-stack::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.25);
}

.sidebar-spacer {
	flex-shrink: 0;
	width: 280px;
}

/* ============================================
   Base Card Styles
   ============================================ */
.card {

	pointer-events: auto;
}

.stack-card {
	flex-shrink: 0;
	width: 50vw;
	max-width: 600px;
	min-width: 320px;
	min-height: 50vh;
	max-height: 80vh;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	pointer-events: auto;
}

.stack-card.app-card {
	position: relative;
}

/* ============================================
   Card Header
   ============================================ */
.card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	flex-shrink: 0;
}

.card-header-left,
.card-header-right {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.card-header-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.card-header-title {
	font-size: 1rem;
	font-weight: 600;
}

.card-badge {
	font-size: 0.7rem;
	font-weight: 600;
	padding: 0.15rem 0.5rem;
	background: rgba(37, 99, 235, 0.1);
	color: #2563eb;
	border-radius: 10px;
}

.card-close {
	background: none;
	border: none;
	padding: 0.4rem;
	cursor: pointer;
	color: #9ca3af;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
}

.card-close:hover {
	background: rgba(0, 0, 0, 0.05);
	color: #1a1a1a;
}

/* ============================================
   Card Content & Footer
   ============================================ */
.card-content {
	flex: 1;
	padding: 1.25rem;
	overflow-y: auto;
}

.card-content-scroll {
	overflow-y: auto;
}

.card-footer {
	padding: 1rem 1.25rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	flex-shrink: 0;
}

.card-footer.bg-transparent {
	background: transparent;
}

.card-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3rem 1.5rem;
	text-align: center;
}

.card-empty i {
	font-size: 2.5rem;
	margin-bottom: 1rem;
	opacity: 0.5;
}

.card-empty p {
	font-size: 0.9rem;
	margin: 0;
}

/* ============================================
   Search & Filters
   ============================================ */
.card-search {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.filter-item {
	position: relative;
	display: flex;
	align-items: center;
}

.filter-select {
	padding: 0.4rem 1.8rem 0.4rem 0.65rem;
	font-size: 0.8rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: white;
	color: #1a1a1a;
	cursor: pointer;
	transition: all 0.15s;
}

.filter-select:focus {
	outline: none;
	border-color: #2563eb;
}

.filter-select.active {
	border-color: #2563eb;
	background: rgba(37, 99, 235, 0.04);
}

.filter-clear {
	position: absolute;
	right: 1.4rem;
	width: 16px;
	height: 16px;
	padding: 0;
	background: #6b7280;
	border: none;
	border-radius: 50%;
	color: white;
	font-size: 0.65rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.filter-clear:hover {
	background: #1a1a1a;
}

.clear-all-filters {
	padding: 0.4rem 0.75rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: #dc2626;
	background: none;
	border: none;
	cursor: pointer;
}

.clear-all-filters:hover {
	text-decoration: underline;
}

/* Date Range Filter */
.date-range-filter {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.filter-label {
	font-size: 0.8rem;
	font-weight: 500;
	color: #6b7280;
	white-space: nowrap;
}

.date-input {
	padding: 0.4rem 0.5rem;
	font-size: 0.8rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: white;
	color: #1a1a1a;
	width: 130px;
}

.date-input:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.date-input.active {
	border-color: #2563eb;
	background: rgba(37, 99, 235, 0.04);
}

.date-separator {
	color: #9ca3af;
}
.settings-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	padding: 0 1rem;
}

.settings-tab {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	font-size: 0.875rem;
	font-weight: 500;
	color: #6b7280;
	cursor: pointer;
	transition: all 0.15s;
}

.settings-tab:hover {
	color: #1a1a1a;
}

.settings-tab.active {
	color: #2563eb;
	border-bottom-color: #2563eb;
}

.settings-tab i {
	font-size: 1rem;
}

.settings-tab-content {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
/* ============================================
   Type Tabs
   ============================================ */
.type-tabs {
	display: flex;
	gap: 0.25rem;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	overflow-x: auto;
}

.type-tab {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.75rem;
	background: none;
	border: none;
	border-radius: 6px;
	font-size: 0.8rem;
	font-weight: 500;
	color: #6b7280;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.15s;
	text-decoration: none;
}

.type-tab:hover {
	background: rgba(0, 0, 0, 0.04);
	color: #1a1a1a;
}

.type-tab.active {
	background: rgba(37, 99, 235, 0.1);
	color: #2563eb;
}

/* ============================================
   Record List
   ============================================ */
.record-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0.75rem 1rem;
	background: none;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s;
}

.record-item:hover {
	background: rgba(0, 0, 0, 0.04);
}

.record-item-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.record-title {
	font-size: 0.9rem;
	font-weight: 500;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.record-subtitle {
	font-size: 0.75rem;

}

.record-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.25rem;
}

.meta-item {
	font-size: 0.7rem;

	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.meta-item i {
	font-size: 0.65rem;
}

.record-item > .bi-chevron-right {

	font-size: 0.8rem;
}

/* Date urgency */
.date-meta.overdue { color: #dc2626; font-weight: 500; }
.date-meta.urgent { color: #ea580c; font-weight: 500; }
.date-meta.soon { color: #d97706; }
.date-meta.normal { color: #6b7280; }
.date-meta.future { color: #9ca3af; }

/* Currency meta */
.currency-meta {
	font-weight: 500;
	color: #059669;
}

/* ============================================
   Badges
   ============================================ */
.mini-badge,
.record-badge {
	padding: 0.15rem 0.45rem;
	border-radius: 4px;
	font-size: 0.65rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.025em;
}

.record-badge {
	padding: 0.2rem 0.5rem;
	border-radius: 6px;
	font-size: 0.7rem;
	text-transform: capitalize;
	flex-shrink: 0;
}

.mini-badge.primary, .record-badge.primary { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.mini-badge.success, .record-badge.success { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.mini-badge.warning, .record-badge.warning { background: rgba(234, 179, 8, 0.1); color: #b45309; }
.mini-badge.danger, .record-badge.danger { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.mini-badge.info, .record-badge.info { background: rgba(6, 182, 212, 0.1); color: #0891b2; }
.mini-badge.secondary, .record-badge.secondary { background: rgba(107, 114, 128, 0.1); color: #6b7280; }

/* ============================================
   History List
   ============================================ */
.history-list {
	display: flex;
	flex-direction: column;
}

.job-item {
	display: flex;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.15s;
}

.job-item:hover {
	background: rgba(0, 0, 0, 0.03);
}

.job-item.failed {
	opacity: 0.7;
}

.job-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.job-main {
	flex: 1;
	min-width: 0;
}

.job-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.job-credits {
	font-size: 0.75rem;
	color: #6b7280;
}

.job-meta {
	font-size: 0.75rem;
	color: #6b7280;
	margin-top: 0.2rem;
}

.job-error {
	font-size: 0.75rem;
	color: #dc2626;
	margin-top: 0.25rem;
}

/* ============================================
   Settings
   ============================================ */
.settings-content {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.settings-section {
	margin-bottom: 1.5rem;
}

.settings-section:last-child {
	margin-bottom: 0;
}

.settings-section h4 {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 0.75rem 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* Member List */
.member-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.member-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.6rem 0.75rem;
	border-radius: 8px;
}

.member-info {
	display: flex;
	flex-direction: column;
}

.member-name {
	font-size: 0.9rem;
	font-weight: 500;

}

.member-role {
	font-size: 0.75rem;

	text-transform: capitalize;
}

.remove-btn {
	background: none;
	border: none;
	color: #9ca3af;
	cursor: pointer;
	padding: 0.25rem;
	border-radius: 4px;
}

.remove-btn:hover {
	color: #dc2626;
	background: rgba(239, 68, 68, 0.1);
}



	.field-description {
		font-size: 0.75rem;
		color: #6b7280;
		margin-top: -0.15rem;
		margin-bottom: 0.25rem;
	}

/* Config Form */
.config-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.config-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.config-field label {
	font-size: 0.85rem;
	font-weight: 500;
}

.config-field-full {
	grid-column: 1 / -1;
}

.config-field-oauth {
	margin-bottom: 1rem;
}

.field-description {
	margin: 0.25rem 0 0.5rem;
	font-size: 0.8125rem;
}

/* Toggle Switch */
.toggle {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.toggle-slider {
	position: relative;
	width: 44px;
	height: 24px;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 12px;
	cursor: pointer;
	transition: background 0.2s;
}

.toggle-slider::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: white;
	border-radius: 50%;
	transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider {
	background: #2563eb;
}

.toggle input:checked + .toggle-slider::after {
	transform: translateX(20px);
}

.toggle input {
	display: none;
}

/* ============================================
   Success Card
   ============================================ */
.success-card {
	background: rgba(34, 197, 94, 0.05) !important;
}

.success-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem 1.5rem;
	text-align: center;
}

.success-icon {
	font-size: 3rem;
	color: #16a34a;
	margin-bottom: 1rem;
}

.success-message {
	font-size: 1.1rem;
	font-weight: 500;
	color: #1a1a1a;
	margin: 0 0 1.5rem 0;
}

.success-details {
	width: 100%;
	max-width: 300px;
}

.success-field {
	display: flex;
	justify-content: space-between;
	padding: 0.5rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.success-field:last-child {
	border-bottom: none;
}

.success-label {
	font-size: 0.85rem;
	color: #6b7280;
	text-transform: capitalize;
}

.success-value {
	font-size: 0.85rem;
	font-weight: 500;
	color: #1a1a1a;
}

.success-footer {
	justify-content: flex-end;
	display: flex;
	gap: 0.5rem;
}

/* ============================================
   Share Card
   ============================================ */
.share-content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.share-description {
	font-size: 0.9rem;
	color: #6b7280;
	margin: 0;
}

.share-link-box {
	display: flex;
	gap: 0.5rem;
}

.share-link-input {
	flex: 1;
	padding: 0.6rem 0.75rem;
	font-size: 0.85rem;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	background: white;
	color: #1a1a1a;
}

.share-link-input:focus {
	outline: none;
	border-color: #2563eb;
}

/* ============================================
   Footer Actions
   ============================================ */
.footer-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
}

.footer-left,
.footer-right {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}



.spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

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





/* ============================================
   Credits Info
   ============================================ */
.credits-info {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.35rem 0.75rem;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 50px;
	font-size: 0.8rem;
	font-weight: 500;
}

.credits-balance { color: #10b981; }
.credits-separator { color: rgba(0, 0, 0, 0.3); }
.credits-cost { color: rgba(0, 0, 0, 0.6); }
.credits-info i { color: #f59e0b; margin-left: 0.15rem; }

/* ============================================
   Alert
   ============================================ */
.alert {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	border-radius: 10px;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.alert-error {
	background: rgba(239, 68, 68, 0.1);
	color: #dc2626;
}

/* ============================================
   No Permission State
   ============================================ */
.no-permission {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3rem;
	color: #9ca3af;
	text-align: center;
}

.no-permission i {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.no-permission p {
	margin: 0;
	font-size: 0.95rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
	.card-stack {
		flex-direction: column;
		align-items: stretch;
		overflow-x: hidden;
		overflow-y: auto;
		gap: 1rem;
		padding: 1rem;
	}

	.card-stack.single-card {
		margin-left: 0;
		width: 100%;
	}

	.sidebar-spacer {
		display: none;
	}

	.stack-card {
		width: 100%;
		max-width: none;
		min-height: auto;
		max-height: none;
		height: auto;
	}
}