/* chatbot.websimplu.ro — Admin styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: #f8fafc;
	color: #1f2937;
	font-size: 14px;
	line-height: 1.5;
	display: flex;
	min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
	width: 240px;
	background: #1e293b;
	color: #e2e8f0;
	padding: 20px 0;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
}
.brand { padding: 0 20px 20px; border-bottom: 1px solid #334155; }
.brand h2 { font-size: 18px; }
.brand small { color: #94a3b8; font-size: 11px; }
.sidebar nav { flex: 1; padding-top: 16px; }
.sidebar nav a {
	display: block;
	padding: 10px 20px;
	color: #cbd5e1;
	text-decoration: none;
	border-left: 3px solid transparent;
	transition: all 0.15s ease;
	font-size: 14px;
}
.sidebar nav a:hover { background: #334155; color: #fff; }
.sidebar nav a.active { background: #334155; border-left-color: #3b82f6; color: #fff; }
.sidebar-foot {
	padding: 16px 20px;
	border-top: 1px solid #334155;
	font-size: 12px;
	display: flex;
	justify-content: space-between;
}
.sidebar-foot a { color: #94a3b8; text-decoration: none; }
.sidebar-foot a:hover { color: #fff; }

/* ===== Content ===== */
.content { flex: 1; padding: 32px; max-width: calc(100% - 240px); overflow-x: auto; }
h1 { font-size: 24px; margin-bottom: 16px; color: #0f172a; }
h2 { font-size: 17px; margin-bottom: 12px; color: #1e293b; }
h3 { font-size: 14px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }

.page-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 12px;
}

/* ===== Stats ===== */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}
.stat-card {
	background: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	text-decoration: none;
	color: inherit;
	border-left: 4px solid;
	transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.stat-card.stat-blue   { border-left-color: #3b82f6; }
.stat-card.stat-green  { border-left-color: #10b981; }
.stat-card.stat-orange { border-left-color: #f59e0b; }
.stat-card.stat-purple { border-left-color: #8b5cf6; }
.stat-card.stat-pink   { border-left-color: #ec4899; }
.stat-value { font-size: 28px; font-weight: 700; color: #0f172a; line-height: 1.1; }
.stat-label { color: #64748b; font-size: 12px; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Dashboard grid ===== */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== Panels ===== */
.panel {
	background: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.panel-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

/* ===== Tables ===== */
.table { width: 100%; border-collapse: collapse; }
.table thead th {
	background: #f1f5f9;
	color: #475569;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #e2e8f0;
}
.table tbody td {
	padding: 12px;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}
.table tbody tr:hover { background: #f8fafc; }
.table.table-sm thead th, .table.table-sm tbody td { padding: 6px 10px; font-size: 12px; }
.table .empty { text-align: center; color: #94a3b8; padding: 24px; font-style: italic; }
.table a { color: #2563eb; text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* ===== Badges ===== */
.badge {
	display: inline-block;
	padding: 3px 8px;
	background: #e0e7ff;
	color: #4338ca;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.badge.badge-active  { background: #d1fae5; color: #065f46; }
.badge.badge-expired { background: #fef3c7; color: #92400e; }
.badge.badge-revoked { background: #fee2e2; color: #991b1b; }

/* ===== Buttons ===== */
.btn-primary, .btn-danger, .btn-link, .btn-sm {
	display: inline-block;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s;
}
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-danger  { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-link    { color: #64748b; }
.btn-link:hover { color: #1e293b; text-decoration: underline; }
.btn-sm { padding: 4px 10px; font-size: 12px; background: #e2e8f0; color: #334155; }
.btn-sm:hover { background: #cbd5e1; }
.btn-sm.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-sm.btn-danger:hover { background: #fecaca; }

/* ===== Forms ===== */
.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	background: #fff;
	padding: 24px;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.form-row { display: flex; flex-direction: column; }
.form-row.form-row-full { grid-column: 1 / -1; }
.form-row label { font-weight: 600; font-size: 12px; color: #475569; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.form-row input, .form-row select, .form-row textarea {
	padding: 9px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-row small { color: #64748b; font-size: 12px; margin-top: 4px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 12px; margin-top: 8px; }

/* ===== Alerts ===== */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.alert.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }

.info-box {
	background: #eff6ff;
	border-left: 4px solid #3b82f6;
	padding: 14px 18px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 13px;
	color: #1e3a8a;
}
.info-box code { background: rgba(0,0,0,0.07); padding: 1px 6px; border-radius: 3px; }

/* ===== Filters ===== */
.filters { margin-bottom: 16px; display: flex; gap: 8px; }
.filter {
	padding: 6px 14px;
	background: #fff;
	color: #475569;
	text-decoration: none;
	border-radius: 6px;
	font-size: 13px;
	border: 1px solid #e2e8f0;
}
.filter:hover { background: #f1f5f9; }
.filter.active { background: #1e293b; color: #fff; border-color: #1e293b; }

/* ===== Key-value table (license details) ===== */
.key-value { width: 100%; }
.key-value th {
	text-align: left;
	color: #64748b;
	font-weight: 500;
	font-size: 13px;
	padding: 8px 0;
	width: 40%;
}
.key-value td { padding: 8px 0; font-size: 13px; }
.key-value tr { border-bottom: 1px solid #f1f5f9; }
.key-value code { background: #f1f5f9; padding: 2px 6px; border-radius: 3px; font-size: 11px; margin-right: 4px; }

/* ===== Login page ===== */
body.login-page { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); justify-content: center; align-items: center; }
.login-box {
	background: #fff;
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	width: 100%;
	max-width: 400px;
}
.login-box h1 { font-size: 22px; text-align: center; }
.login-box .login-sub { text-align: center; color: #64748b; font-size: 13px; margin-bottom: 24px; }
.login-box form { display: flex; flex-direction: column; gap: 14px; }
.login-box label { font-weight: 600; font-size: 12px; color: #475569; text-transform: uppercase; }
.login-box input { padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 15px; }
.login-box button { padding: 12px; font-size: 15px; font-weight: 600; }
.login-box .login-foot { text-align: center; color: #94a3b8; margin-top: 16px; }
