/* Admin Panel Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --purple: #8b5cf6;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    color: var(--gray-700);
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 15px;
}

.login-header p {
    color: var(--gray-500);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 14px;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.login-footer p {
    font-size: 14px;
    margin-bottom: 10px;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--gray-500);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.btn-copy {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    margin-left: 8px;
}

.btn-copy:hover {
    color: var(--primary);
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    background: #f9f8f6;
    color: var(--gray-700);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    border-right: 1px solid var(--gray-200);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-header img {
    display: block;
    width: 100%;
    height: auto;
}

.sidebar-user-name {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    text-align: right;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.user-name {
    font-weight: 500;
    color: var(--gray-800);
}

.user-role {
    font-size: 12px;
    color: var(--gray-500);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.btn-logout:hover {
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
}

.top-bar {
    background: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
}

.top-bar h1 {
    font-size: 24px;
    font-weight: 700;
}

.content {
    padding: 30px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--gray-200);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.primary { background: #e0e7ff; color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: var(--success); }
.stat-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-icon.info { background: #e0f2fe; color: var(--info); }
.stat-icon.purple { background: #ede9fe; color: var(--purple); }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 14px;
    color: var(--gray-500);
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-500);
    text-transform: uppercase;
}

.table tr:hover {
    background: var(--gray-50);
}

.site-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-cell i {
    color: var(--gray-400);
}

.license-key {
    background: var(--gray-100);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success { background: #d1fae5; color: #059669; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 100;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}
