/**
 * Yuva Testing Utilities - Admin Styles
 *
 * @package YUTU
 * @since   1.0.0
 */

/* =========================================================
   Variables
   ========================================================= */
:root {
	--yutu-primary:       #4f46e5;
	--yutu-primary-hover: #4338ca;
	--yutu-success:       #16a34a;
	--yutu-error:         #dc2626;
	--yutu-warning:       #d97706;
	--yutu-bg:            #f8fafc;
	--yutu-card-bg:       #ffffff;
	--yutu-border:        #e2e8f0;
	--yutu-text:          #1e293b;
	--yutu-text-muted:    #64748b;
	--yutu-radius:        10px;
	--yutu-shadow:        0 2px 8px rgba(0,0,0,.08);
	--yutu-shadow-hover:  0 6px 20px rgba(79,70,229,.15);
}

/* =========================================================
   Page Wrap
   ========================================================= */
.yutu-wrap {
	max-width: 1400px;
	padding: 10px 20px 40px;
}

.yutu-page-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 22px !important;
	color: var(--yutu-text) !important;
	margin-bottom: 6px !important;
}

.yutu-page-title .dashicons {
	color: var(--yutu-primary);
	font-size: 26px;
	width: 26px;
	height: 26px;
}

.yutu-page-desc {
	color: var(--yutu-text-muted);
	margin-bottom: 28px !important;
}

.yutu-page-subtitle {
	font-size: 16px;
	font-weight: 400;
	color: var(--yutu-text-muted);
}

/* Back link */
.yutu-back-link {
	display: inline-flex;
	align-items: center;
	color: var(--yutu-primary);
	text-decoration: none;
	font-size: 20px;
	margin-right: 4px;
}
.yutu-back-link:hover { color: var(--yutu-primary-hover); }

/* =========================================================
   Dashboard Cards Grid
   ========================================================= */
.yutu-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 22px;
	margin-top: 24px;
}

.yutu-card {
	background: var(--yutu-card-bg);
	border: 1px solid var(--yutu-border);
	border-radius: var(--yutu-radius);
	box-shadow: var(--yutu-shadow);
	padding: 24px;
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s, transform .2s;
}

.yutu-card:hover {
	box-shadow: var(--yutu-shadow-hover);
	transform: translateY(-2px);
}

.yutu-card-title {
	font-size: 16px !important;
	font-weight: 600 !important;
	margin: 0 0 8px !important;
	color: var(--yutu-text) !important;
}

.yutu-card-desc {
	font-size: 13px;
	color: var(--yutu-text-muted);
	flex: 1;
	margin: 0 0 20px !important;
	line-height: 1.55;
}

.yutu-card-footer {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
}

.yutu-manage-btn {
	background: var(--yutu-primary) !important;
	border-color: var(--yutu-primary) !important;
	border-radius: 6px !important;
}
.yutu-manage-btn:hover {
	background: var(--yutu-primary-hover) !important;
	border-color: var(--yutu-primary-hover) !important;
}

/* =========================================================
   Tabs
   ========================================================= */
.yutu-tabs {
	margin: 20px 0 0 !important;
	border-bottom: 2px solid var(--yutu-border) !important;
}

.yutu-tabs .nav-tab {
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}

.yutu-tabs .nav-tab-active {
	border-bottom-color: var(--yutu-primary) !important;
	color: var(--yutu-primary) !important;
}

.yutu-tab-content {
	margin-top: 24px;
}

/* =========================================================
   Box / Panel
   ========================================================= */
.yutu-box {
	background: var(--yutu-card-bg);
	border: 1px solid var(--yutu-border);
	border-radius: var(--yutu-radius);
	padding: 24px;
	margin-bottom: 20px;
}

.yutu-box h3 {
	margin: 0 0 12px !important;
	font-size: 15px !important;
	font-weight: 600;
	color: var(--yutu-text);
}

/* =========================================================
   Two Column Layout
   ========================================================= */
.yutu-two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

@media (max-width: 900px) {
	.yutu-two-col { grid-template-columns: 1fr; }
}

/* =========================================================
   Inline Form
   ========================================================= */
.yutu-inline-form {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* =========================================================
   Badges
   ========================================================= */
.yutu-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.yutu-badge-success {
	background: #dcfce7;
	color: var(--yutu-success);
}

.yutu-badge-error {
	background: #fee2e2;
	color: var(--yutu-error);
}

.yutu-badge-warning {
	background: #fef3c7;
	color: var(--yutu-warning);
}

/* =========================================================
   Settings Form
   ========================================================= */
.yutu-settings-form .yutu-form-table th {
	width: 220px;
}

/* =========================================================
   Modal
   ========================================================= */
.yutu-modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.yutu-modal-content {
	background: #fff;
	border-radius: var(--yutu-radius);
	padding: 30px;
	max-width: 700px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
}

.yutu-modal-close {
	position: absolute;
	top: 14px;
	right: 18px;
	font-size: 24px;
	cursor: pointer;
	color: var(--yutu-text-muted);
	line-height: 1;
}
.yutu-modal-close:hover { color: var(--yutu-text); }

.yutu-email-preview-body {
	background: var(--yutu-bg);
	border: 1px solid var(--yutu-border);
	border-radius: 6px;
	padding: 16px;
	font-size: 13px;
	line-height: 1.6;
}

/* =========================================================
   Batch Progress Overlay
   ========================================================= */
.yutu-batch-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.6);
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
}

.yutu-batch-box {
	background: #fff;
	border-radius: var(--yutu-radius);
	padding: 36px 40px;
	max-width: 460px;
	width: 90%;
	text-align: center;
}

.yutu-batch-box h3 {
	margin: 0 0 20px;
	font-size: 17px;
}

.yutu-progress-bar {
	height: 10px;
	background: var(--yutu-border);
	border-radius: 5px;
	overflow: hidden;
	margin-bottom: 14px;
}

.yutu-progress-fill {
	height: 100%;
	background: var(--yutu-primary);
	border-radius: 5px;
	width: 0%;
	transition: width .3s;
}

/* =========================================================
   Debug Log Viewer
   ========================================================= */
.yutu-log-viewer {
	background: #0f172a;
	color: #94a3b8;
	font-size: 12px;
	line-height: 1.6;
	padding: 16px;
	border-radius: 6px;
	overflow: auto;
	max-height: 500px;
	white-space: pre-wrap;
	word-break: break-all;
}

/* =========================================================
   Result / Feedback Messages
   ========================================================= */
.yutu-msg {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 4px;
	font-size: 13px;
}
.yutu-msg-success { background: #dcfce7; color: var(--yutu-success); }
.yutu-msg-error   { background: #fee2e2; color: var(--yutu-error);   }

/* =========================================================
   Tables (dynamic results)
   ========================================================= */
.yutu-result-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	margin-top: 12px;
}

.yutu-result-table th,
.yutu-result-table td {
	padding: 8px 12px;
	border: 1px solid var(--yutu-border);
	text-align: left;
	vertical-align: top;
}

.yutu-result-table th {
	background: var(--yutu-bg);
	font-weight: 600;
}

.yutu-result-table tr:hover td {
	background: #f1f5f9;
}

.yutu-value-cell {
	font-family: monospace;
	font-size: 12px;
	max-width: 300px;
	word-break: break-all;
}

/* Edit / delete inline */
.yutu-editable-value {
	width: 100%;
	min-width: 200px;
	font-family: monospace;
	font-size: 12px;
}

/* =========================================================
   Notifications inline
   ========================================================= */
#yutu-test-email-result,
#yutu-dl-result,
#yutu-sample-result,
#yutu-users-result {
	font-size: 13px;
}

/* =========================================================
   Downloader — plugin / theme zip table
   ========================================================= */
.yutu-dl-table td,
.yutu-dl-table th {
	vertical-align: middle;
	padding: 8px 10px;
}

.yutu-dl-table .button {
	white-space: nowrap;
}

/* Test Email */
.yutu-test-email-form label {
	display: inline-block;
	width: 20%;
}

.yutu-test-email-form p {
	display: flex;
	align-items: center;
}

.yutu-test-email-form p span {
	margin-left: 5px;
}
