/* Traffic Quality Monitor Standalone Admin Stylesheet */
:root {
	--tqm-primary: #4CAF50;
	--tqm-primary-hover: #45a049;
	--tqm-dark: #1e293b;
	--tqm-text: #334155;
	--tqm-border: #cbd5e1;
	--tqm-bg: #f8fafc;
	--tqm-card: #ffffff;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	background: var(--tqm-bg);
	color: var(--tqm-text);
	font-size: 13px;
	line-height: 1.5;
}

/* Top Admin Header Bar */
.tqm-topbar {
	background: #0f172a;
	color: #f8fafc;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* Latar hitam header dibatasi 1800px, sama dengan lebar body (.wrap) */
	max-width: 1800px;
	margin: 0 auto;
	padding: 0 24px;
	position: sticky;
	top: 0;
	z-index: 9999;
	box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.tqm-topbar-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
	text-decoration: none;
}

.tqm-topbar-brand svg {
	fill: var(--tqm-primary);
	width: 20px;
	height: 20px;
}

.tqm-topbar-badge {
	background: rgba(76, 175, 80, 0.2);
	color: #86efac;
	border: 1px solid rgba(76, 175, 80, 0.4);
	padding: 2px 8px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 600;
}

.tqm-topbar-right {
	display: flex;
	align-items: center;
	gap: 16px;
}

.tqm-topbar-link {
	color: #94a3b8;
	text-decoration: none;
	font-size: 12px;
	transition: color 0.2s;
	display: flex;
	align-items: center;
	gap: 5px;
}

.tqm-topbar-link:hover {
	color: #ffffff;
}

.tqm-topbar-btn {
	background: #ef4444;
	color: #ffffff;
	padding: 5px 12px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s;
}

.tqm-topbar-btn:hover {
	background: #dc2626;
}

/* Main Container */
.wrap {
	max-width: 1800px;
	margin: 24px auto;
	padding: 0 24px 60px 24px;
}

h1 {
	font-size: 24px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 16px 0;
	padding: 0;
}

h2 {
	font-size: 18px;
	font-weight: 600;
	color: #1e293b;
	margin: 20px 0 12px 0;
}

h3 {
	font-size: 15px;
	font-weight: 600;
	color: #334155;
	margin: 16px 0 8px 0;
}

/* Navigation Tabs */
.tqm-nav-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	border-bottom: 2px solid var(--tqm-border);
	margin-bottom: 20px;
	padding-bottom: 0;
	flex-wrap: wrap;
	gap: 12px;
}

.nav-tab-wrapper {
	border-bottom: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.nav-tab {
	display: inline-block;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	text-decoration: none;
	background: #e2e8f0;
	border: 1px solid var(--tqm-border);
	border-bottom: none;
	border-radius: 6px 6px 0 0;
	margin-bottom: -2px;
	transition: all 0.2s ease;
}

.nav-tab:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.nav-tab-active,
.nav-tab-active:hover {
	background: #ffffff !important;
	color: #0f172a !important;
	border-color: var(--tqm-border) var(--tqm-border) #ffffff !important;
	border-bottom: 2px solid #ffffff !important;
	margin-bottom: -2px !important;
}

/* Clock */
.tqm-live-clock {
	background: #ffffff;
	border: 1px solid var(--tqm-border);
	border-radius: 6px;
	padding: 6px 14px;
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.tqm-live-clock__sep {
	color: #cbd5e1;
}

/* Notices */
.notice {
	background: #ffffff;
	border: 1px solid var(--tqm-border);
	border-left-width: 4px;
	padding: 12px 16px;
	margin: 16px 0;
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.notice p {
	margin: 0;
	line-height: 1.5;
}

.notice-success {
	border-left-color: #22c55e;
}

.notice-error {
	border-left-color: #ef4444;
}

.notice-warning {
	border-left-color: #f59e0b;
}

.notice-info {
	border-left-color: #3b82f6;
}

/* Buttons */
.button,
.button-secondary,
.button-primary,
button,
input[type="submit"],
input[type="button"] {
	display: inline-block;
	text-decoration: none;
	font-size: 13px;
	line-height: 2.15;
	min-height: 30px;
	margin: 0;
	padding: 0 12px;
	cursor: pointer;
	border-width: 1px;
	border-style: solid;
	border-radius: 4px;
	white-space: nowrap;
	box-sizing: border-box;
	font-weight: 500;
	transition: all 0.15s ease-in-out;
}

.button,
.button-secondary {
	color: #1e293b;
	border-color: #94a3b8;
	background: #ffffff;
}

.button:hover,
.button-secondary:hover {
	background: #f1f5f9;
	border-color: #64748b;
	color: #0f172a;
}

.button-primary {
	background: var(--tqm-primary);
	border-color: var(--tqm-primary);
	color: #ffffff;
	font-weight: 600;
}

.button-primary:hover,
.button-primary:focus {
	background: var(--tqm-primary-hover);
	border-color: var(--tqm-primary-hover);
	color: #ffffff;
}

.button-small {
	min-height: 24px;
	line-height: 2;
	padding: 0 8px;
	font-size: 11px;
}

.button-link {
	border: none;
	background: transparent;
	color: #2563eb;
	text-decoration: underline;
	padding: 0;
	min-height: auto;
	line-height: inherit;
}

/* Form Tables */
.form-table {
	border-collapse: collapse;
	margin-top: 10px;
	width: 100%;
	clear: both;
}

.form-table th {
	vertical-align: top;
	text-align: left;
	padding: 16px 10px 16px 0;
	width: 220px;
	line-height: 1.4;
	font-weight: 600;
	color: #1e293b;
}

.form-table td {
	margin-bottom: 9px;
	padding: 12px 10px;
	line-height: 1.4;
	vertical-align: middle;
}

/* Input Fields */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
textarea {
	border: 1px solid var(--tqm-border);
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.4;
	color: #1e293b;
	background-color: #ffffff;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
	border-color: var(--tqm-primary);
	box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
	outline: none;
}

.regular-text {
	width: 100%;
	max-width: 480px;
}

.large-text {
	width: 100%;
}

.small-text {
	width: 80px;
}

/* Data Tables */
.widefat {
	border-spacing: 0;
	width: 100%;
	clear: both;
	margin: 12px 0;
	background: #ffffff;
	border: 1px solid var(--tqm-border);
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.widefat thead th,
.widefat tfoot th {
	background: #f1f5f9;
	color: #334155;
	font-weight: 600;
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--tqm-border);
}

.widefat tfoot th {
	border-top: 1px solid var(--tqm-border);
	border-bottom: none;
}

.widefat td {
	padding: 10px 12px;
	vertical-align: middle;
	border-bottom: 1px solid #f1f5f9;
}

.widefat tbody tr:last-child td {
	border-bottom: none;
}

.widefat.striped tbody tr:nth-child(odd) {
	background-color: #f8fafc;
}

.widefat tbody tr:hover {
	background-color: #f1f5f9;
}

/* Tablenav & Pagination */
.tablenav {
	clear: both;
	height: 36px;
	margin: 12px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.tablenav .displaying-num {
	color: #64748b;
	font-size: 12px;
}

.tablenav-pages {
	display: flex;
	gap: 4px;
	align-items: center;
}

.tablenav-pages a,
.tablenav-pages .current-page {
	padding: 4px 10px;
	border: 1px solid var(--tqm-border);
	background: #ffffff;
	border-radius: 4px;
	text-decoration: none;
	color: #334155;
	font-size: 12px;
}

.tablenav-pages a:hover {
	background: #f1f5f9;
}

/* Modal and Overlays */
.tqm-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(2px);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tqm-modal-box {
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 10px 25px rgba(0,0,0,0.2);
	max-width: 550px;
	width: 90%;
	padding: 24px;
}

/* ---------------------------------------------------------------------------
 * Dashicons shim — ikon bawaan WordPress (tombol hapus Grup, Smartlink, dll.)
 * Font Dashicons tidak dimuat di versi standalone, jadi ikon digambar dengan
 * SVG + mask dan mengikuti warna teks (currentColor).
 * ------------------------------------------------------------------------- */
.dashicons {
	display: inline-block;
	width: 20px;
	height: 20px;
	vertical-align: middle;
	flex: none;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}
.dashicons-trash {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.4-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.4-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z'/></svg>");
}
.dashicons-no-alt {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z'/></svg>");
}
.dashicons-warning {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2c.4 0 .8.3 1 .6l7.5 13.3c.3.5.3 1.1 0 1.6-.3.4-.7.5-1.2.5H2.7c-.5 0-.9-.1-1.2-.5-.3-.5-.3-1.1 0-1.6L9 2.6c.2-.3.6-.6 1-.6zM9 7v5h2V7H9zm0 6.2v1.8h2v-1.8H9z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2c.4 0 .8.3 1 .6l7.5 13.3c.3.5.3 1.1 0 1.6-.3.4-.7.5-1.2.5H2.7c-.5 0-.9-.1-1.2-.5-.3-.5-.3-1.1 0-1.6L9 2.6c.2-.3.6-.6 1-.6zM9 7v5h2V7H9zm0 6.2v1.8h2v-1.8H9z'/></svg>");
}
.dashicons-shield {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2l7 3v5c0 4-3 7.2-7 8.5C6 17.2 3 14 3 10V5l7-3z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2l7 3v5c0 4-3 7.2-7 8.5C6 17.2 3 14 3 10V5l7-3z'/></svg>");
}
.dashicons-calendar-alt {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M15 4h2c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V5c0-.6.4-1 1-1h2V2h2v2h6V2h2v2zM4 8v8h12V8H4zm2 1h2v2H6V9zm3 0h2v2H9V9zm3 0h2v2h-2V9zm-6 3h2v2H6v-2zm3 0h2v2H9v-2z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M15 4h2c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V5c0-.6.4-1 1-1h2V2h2v2h6V2h2v2zM4 8v8h12V8H4zm2 1h2v2H6V9zm3 0h2v2H9V9zm3 0h2v2h-2V9zm-6 3h2v2H6v-2zm3 0h2v2H9v-2z'/></svg>");
}
.dashicons-image-rotate {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 3c-2.5 0-4.8 1.3-6 3.4L2 5v5h5L5.4 8.4C6.3 6.9 8 6 10 6c2.2 0 4.1 1.3 4.9 3.2l2.8-1C16.5 5.5 13.5 3 10 3zm6 7c-.9 1.9-2.8 3.2-5 3.2-2 0-3.7-.9-4.6-2.4L8 12.4H3v5l1.9-1.4c1.2 2.1 3.5 3.4 6 3.4 3.5 0 6.5-2.5 7.7-5.8L16 10z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 3c-2.5 0-4.8 1.3-6 3.4L2 5v5h5L5.4 8.4C6.3 6.9 8 6 10 6c2.2 0 4.1 1.3 4.9 3.2l2.8-1C16.5 5.5 13.5 3 10 3zm6 7c-.9 1.9-2.8 3.2-5 3.2-2 0-3.7-.9-4.6-2.4L8 12.4H3v5l1.9-1.4c1.2 2.1 3.5 3.4 6 3.4 3.5 0 6.5-2.5 7.7-5.8L16 10z'/></svg>");
}
.dashicons-arrow-right-alt2 {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 15l5-5-5-5 1-2 7 7-7 7z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 15l5-5-5-5 1-2 7 7-7 7z'/></svg>");
}
.dashicons-admin-page {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z'/></svg>");
}

/* ---------------------------------------------------------------------------
 * Gaya inti WordPress yang dipakai plugin asli tapi tidak ada di versi
 * standalone (keterangan, spinner, tombol tutup notifikasi, kotak, dll.)
 * ------------------------------------------------------------------------- */
a { color: #2271b1; }
a:hover, a:focus { color: #135e96; }

code {
	background: rgba(0,0,0,0.07);
	padding: 2px 5px 1px;
	margin: 0 1px;
	font-size: 13px;
}

.description,
p.description {
	color: #646970;
	font-size: 13px;
	font-style: normal;
	margin: 2px 0 5px;
}

.screen-reader-text {
	position: absolute;
	margin: -1px;
	padding: 0;
	height: 1px;
	width: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	word-wrap: normal !important;
}

/* Animasi loading (Tes API, Telegram, Cek Ulang, dll.) */
.spinner {
	background: none;
	display: inline-block;
	visibility: hidden;
	float: right;
	vertical-align: middle;
	opacity: 1;
	width: 18px;
	height: 18px;
	margin: 4px 10px 0;
	border: 2px solid #cbd5e1;
	border-top-color: #2271b1;
	border-radius: 50%;
	box-sizing: border-box;
}
.spinner.is-active {
	visibility: visible;
	animation: tqm-spin 0.8s linear infinite;
}
@keyframes tqm-spin { to { transform: rotate(360deg); } }

/* Notifikasi yang bisa ditutup (tombol X) */
.notice.is-dismissible {
	position: relative;
	padding-right: 40px;
}
.notice.inline {
	display: block;
	margin: 8px 0 12px;
}
.notice-dismiss {
	position: absolute;
	top: 0;
	right: 1px;
	border: none;
	margin: 0;
	padding: 9px;
	background: none;
	color: #787c82;
	cursor: pointer;
	line-height: 1;
}
.notice-dismiss:before {
	content: "\00d7";
	display: block;
	width: 20px;
	height: 20px;
	font-size: 22px;
	line-height: 20px;
	text-align: center;
}
.notice-dismiss:hover,
.notice-dismiss:focus { color: #d63638; }

/* Kotak (dipakai halaman Shopee) */
.postbox {
	background: #ffffff;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 1px rgba(0,0,0,0.04);
	margin-bottom: 20px;
}
