/* Powerup - Common Styles */

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color: #1a1a2e;
	background: #f8f9fb;
}

a { color: #2563eb; text-decoration: none; }
a:hover { color: #1d4ed8; }

h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 600; line-height: 1.3; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

img { max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	border: 1px solid transparent;
	cursor: pointer;
	transition: all 0.15s;
	text-align: center;
}
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.btn-outline { background: transparent; color: #2563eb; border-color: #2563eb; }
.btn-outline:hover { background: #2563eb; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Icon buttons */
.btn-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 6px; border: none;
	background: transparent; color: #6b7280; cursor: pointer; font-size: 14px;
	transition: all 0.15s;
}
.btn-icon:hover { background: #f3f4f6; color: #374151; }
.btn-icon-danger:hover { background: #fef2f2; color: #dc2626; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 500; color: #374151; }
.form-control {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 15px;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Cards */
.card { background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; padding: 24px; margin-bottom: 16px; }

/* App Layout */
.app-layout { display: flex; min-height: 100vh; }

.app-sidebar {
	width: 220px;
	background: #1a1a2e;
	color: #fff;
	display: flex;
	flex-direction: column;
	position: fixed;
	top: 0; bottom: 0; left: 0;
	z-index: 100;
}
.sidebar-logo {
	display: block;
	padding: 20px 20px 16px;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.5px;
}
.sidebar-logo:hover { color: #fff; }
.sidebar-nav { flex: 1; padding: 0 8px; }
.sidebar-nav a {
	display: block;
	padding: 10px 12px;
	color: #94a3b8;
	border-radius: 6px;
	font-size: 14px;
	margin-bottom: 2px;
}
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.sidebar-nav a.active { color: #fff; background: rgba(37,99,235,0.3); }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; }
.sidebar-user { display: block; color: #94a3b8; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer a { color: #64748b; }
.sidebar-footer a:hover { color: #fff; }

.app-main { flex: 1; margin-left: 220px; }
.app-header { padding: 20px 32px; border-bottom: 1px solid #e5e7eb; background: #fff; }
.app-header h1 { font-size: 1.25rem; margin: 0; }
.app-content { padding: 32px; }

/* Tables */
.table { border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.table th { font-size: 13px; font-weight: 500; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; }
.table tbody tr:hover { background: #f9fafb; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-danger { background: #fef2f2; color: #991b1b; }

/* Modals */
.modal {
	position: fixed; top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.4); z-index: 200;
	display: flex; align-items: center; justify-content: center;
}
.modal-content {
	background: #fff; border-radius: 10px; max-width: 600px; width: 90%;
	max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
	display: flex; justify-content: space-between; align-items: center;
	padding: 16px 24px; border-bottom: 1px solid #e5e7eb;
}
.modal-header h3 { margin: 0; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #6b7280; padding: 0 4px; }
.modal-close:hover { color: #1a1a2e; }
.modal-body { padding: 24px; }

/* Secondary button */
.btn-secondary { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.btn-secondary:hover { background: #e5e7eb; color: #1a1a2e; }

/* Utility */
.text-center { text-align: center; }
.text-muted { color: #6b7280; }
.text-sm { font-size: 13px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
