@import url("./style.css");

html {
	height: 100dvh;
	width: 100dvw;
}

@font-face {
	font-family: "Outfit";
	src: url("./Outfit/Outfit-VariableFont_wght.ttf") format("truetype");
}

@font-face {
	font-family: "Eightone";
	src: url('./eightone.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

@media (max-width: 480px) {
	.config-grid {
		grid-template-columns: 1fr;
	}

	.stats-grid {
		grid-template-columns: 1fr;
	}

	.topbar {
		padding: 0 clamp(0.5rem, 2vw, 0.875rem);
	}

	.server-status,
	.server-url-badge {
		display: none !important;
	}

	.main {
		padding: clamp(0.5rem, 2.5vw, 0.875rem);
	}

	.filter-bar {
		align-items: stretch;
		flex-direction: column;
	}

	.filter-bar input,
	.filter-bar select {
		width: 100%;
	}

	.branding-row {
		grid-template-columns: 1fr;
	}

	.card {
		padding: 0.85rem 0.65rem;
	}
}

/* Mobile Stacked Card View (<= 640px) */
@media (max-width: 640px) {
	.table-wrapper {
		overflow-x: visible;
	}

	.table-wrapper table,
	.table-wrapper thead,
	.table-wrapper tbody,
	.table-wrapper th,
	.table-wrapper td,
	.table-wrapper tr {
		display: block;
	}

	.table-wrapper table {
		min-width: 100% !important;
		width: 100% !important;
	}

	.table-wrapper thead tr {
		left: -9999px;
		position: absolute;
		top: -9999px;
	}

	.table-wrapper tbody tr {
		background: rgba(255, 255, 255, 0.02);
		border: 1px solid var(--border);
		border-radius: var(--radius-sm);
		margin-bottom: 0.75rem;
		padding: 0.6rem 0.85rem;
	}

	.table-wrapper tbody tr:hover {
		background: rgba(255, 255, 255, 0.05);
	}

	.table-wrapper tbody td {
		align-items: center;
		border: none;
		border-bottom: 1px solid rgba(255, 255, 255, 0.04);
		display: flex;
		justify-content: space-between;
		padding: 0.45rem 0;
		text-align: right;
		white-space: normal;
		word-break: break-all;
	}

	.table-wrapper tbody td:last-child {
		border-bottom: none;
	}

	.table-wrapper tbody td[data-label]::before {
		color: var(--text-muted);
		content: attr(data-label);
		flex-shrink: 0;
		font-size: 0.75rem;
		font-weight: 600;
		letter-spacing: 0.04em;
		margin-right: 1rem;
		text-transform: uppercase;
	}
}

/* --------------------------------------------------------------------------
   2. Medium / Tablet Devices (<= 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.menu-toggle-btn {
		display: inline-flex !important;
	}

	.sidebar {
		transform: translateX(-100%);
		transition: transform 0.3s ease-in-out;
		z-index: 1000;
	}

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

	.topbar {
		left: 0;
	}

	.main {
		flex: 1;
		margin-left: 0;
		padding: clamp(0.75rem, 2vw, 1.25rem);
	}

	.card {
		padding: 1rem;
		min-width: 0;
	}

	.table-wrapper {
		display: grid;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.stats-grid {
		grid-template-columns: repeat(auto-fit, minmax(clamp(160px, 25vw, 220px), 1fr));
	}

	.strategy-target {
		align-items: stretch;
		flex-direction: column;
		gap: clamp(0.5rem, 1.5vw, 0.875rem);
	}

	.strategy-target .btn {
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   3. Ultra-Small Screens (<= 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
	.main {
		padding: clamp(0.35rem, 1.5vw, 0.5rem);
	}

	.stats-grid {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   4. Short Height Viewports / Landscape (max-height: 600px)
   -------------------------------------------------------------------------- */
@media (max-height: 600px) {
	.topbar {
		height: clamp(2.5rem, 8vh, 3.25rem);
	}

	.main {
		padding-top: clamp(3rem, 10vh, 3.75rem);
	}
}