/* ============================================================================
   ElectricInk Website Factory — Admin Dashboard Styles
   ============================================================================ */

/* ---------------------------------------------------------------------------
   Reset & Base
   --------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 15px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #333;
	background-color: #f4f5f7;
	line-height: 1.5;
}

a {
	color: #2563eb;
	text-decoration: none;
}

a:hover {
	color: #1d4ed8;
}

/* ---------------------------------------------------------------------------
   Admin Layout
   --------------------------------------------------------------------------- */
.admin_wrapper {
	display: flex;
	min-height: 100vh;
}

.admin_content {
	flex: 1;
	margin-left: 250px;
	padding: 0;
	transition: margin-left 0.25s ease;
}

.admin_content__header {
	background: #fff;
	border-bottom: 1px solid #e2e5e9;
	padding: 16px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 10;
}

.admin_content__title {
	font-size: 1.25rem;
	font-weight: 600;
	color: #1a1a2e;
}

.admin_content__body {
	padding: 32px;
}

/* ---------------------------------------------------------------------------
   Sidebar
   --------------------------------------------------------------------------- */
.admin_sidebar {
	width: 250px;
	background: #1a1a2e;
	color: #c2c7d0;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	z-index: 100;
	transition: transform 0.25s ease;
	overflow-y: auto;
}

.admin_sidebar__brand {
	padding: 20px 20px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin_sidebar__brand a {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	font-weight: 700;
	font-size: 1.1rem;
}

.admin_sidebar__logo {
	font-size: 1.5rem;
}

.admin_sidebar__nav {
	flex: 1;
	padding: 12px 0;
}

.admin_sidebar__menu {
	list-style: none;
}

.admin_sidebar__section {
	padding: 16px 20px 6px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #6b7280;
}

.admin_sidebar__item a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 20px;
	color: #c2c7d0;
	font-size: 0.9rem;
	transition: background 0.15s ease, color 0.15s ease;
}

.admin_sidebar__item a:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.admin_sidebar__item a i {
	width: 20px;
	text-align: center;
	font-size: 0.85rem;
}

.admin_sidebar__item--active a {
	background: rgba(37, 99, 235, 0.2);
	color: #60a5fa;
	border-right: 3px solid #60a5fa;
}

.admin_sidebar__footer {
	padding: 12px 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.75rem;
	color: #6b7280;
}

.admin_sidebar_toggle {
	display: none;
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 200;
	background: #1a1a2e;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 1rem;
}

/* ---------------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------------- */
.card {
	background: #fff;
	border: 1px solid #e2e5e9;
	border-radius: 8px;
	margin-bottom: 24px;
}

.card__header {
	padding: 16px 24px;
	border-bottom: 1px solid #e2e5e9;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.card__title {
	font-size: 1rem;
	font-weight: 600;
	color: #1a1a2e;
}

.card__body {
	padding: 24px;
}

/* ---------------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------------- */
.table_wrap {
	overflow-x: auto;
}

.admin_table {
	width: 100%;
	border-collapse: collapse;
}

.admin_table th {
	background: #f8f9fb;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6b7280;
	padding: 10px 16px;
	text-align: left;
	border-bottom: 2px solid #e2e5e9;
	white-space: nowrap;
}

.admin_table td {
	padding: 12px 16px;
	border-bottom: 1px solid #f0f1f3;
	font-size: 0.9rem;
	vertical-align: middle;
}

.admin_table tbody tr:hover {
	background: #f8f9fb;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	font-size: 0.875rem;
	font-weight: 500;
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
	line-height: 1.4;
}

.btn--primary {
	background: #2563eb;
	color: #fff;
	border-color: #2563eb;
}

.btn--primary:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
	color: #fff;
}

.btn--secondary {
	background: #fff;
	color: #374151;
	border-color: #d1d5db;
}

.btn--secondary:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
}

.btn--danger {
	background: #dc2626;
	color: #fff;
	border-color: #dc2626;
}

.btn--danger:hover {
	background: #b91c1c;
	border-color: #b91c1c;
	color: #fff;
}

.btn--small {
	padding: 4px 10px;
	font-size: 0.8rem;
}

/* ---------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------- */
.form_group {
	margin-bottom: 20px;
}

.form_label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.form_input,
.form_select,
.form_textarea {
	width: 100%;
	padding: 8px 12px;
	font-size: 0.9rem;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #333;
	transition: border-color 0.15s ease;
	font-family: inherit;
}

.form_input:focus,
.form_select:focus,
.form_textarea:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form_textarea {
	min-height: 100px;
	resize: vertical;
}

.form_hint {
	font-size: 0.78rem;
	color: #9ca3af;
	margin-top: 4px;
}

.form_row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.form_actions {
	padding-top: 16px;
	border-top: 1px solid #e2e5e9;
	display: flex;
	gap: 10px;
}

/* ---------------------------------------------------------------------------
   Status Badges
   --------------------------------------------------------------------------- */
.badge {
	display: inline-block;
	padding: 3px 10px;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 20px;
	line-height: 1.4;
}

.badge--active {
	background: #dcfce7;
	color: #166534;
}

.badge--inactive {
	background: #fee2e2;
	color: #991b1b;
}

.badge--draft {
	background: #fef9c3;
	color: #854d0e;
}

.badge--published {
	background: #dcfce7;
	color: #166534;
}

/* ---------------------------------------------------------------------------
   Toast Notifications
   --------------------------------------------------------------------------- */
.lr_toast_overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 9998;
}

.lr_toast {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 24px 40px;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	z-index: 9999;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.lr_toast__success {
	background: #166534;
	color: #fff;
}

.lr_toast__error {
	background: #991b1b;
	color: #fff;
}

/* ---------------------------------------------------------------------------
   Utility
   --------------------------------------------------------------------------- */
.text-muted {
	color: #9ca3af;
}

.text-right {
	text-align: right;
}

.mt-0 {
	margin-top: 0;
}

.mb-16 {
	margin-bottom: 16px;
}

.empty_state {
	text-align: center;
	padding: 60px 20px;
	color: #9ca3af;
}

.empty_state i {
	font-size: 3rem;
	margin-bottom: 16px;
	display: block;
}

.empty_state p {
	font-size: 1rem;
	margin-bottom: 16px;
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.admin_sidebar {
		transform: translateX(-100%);
	}

	.admin_sidebar--open {
		transform: translateX(0);
	}

	.admin_sidebar_toggle {
		display: block;
	}

	.admin_content {
		margin-left: 0;
	}

	.form_row {
		grid-template-columns: 1fr;
	}
}
