/* CraftValley Panel - CSS */
:root {
    --bg: #0f0f1a;
    --bg-dark: #0a0a12;
    --bg-card: #1a1a2e;
    --bg-hover: #252540;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #e5e7eb;
    --text-muted: #6b7280;
    --border: #2d2d44;
}

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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg));
}

.login-card {
    background: var(--bg-card);
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.login-header h1 { font-size: 32px; margin-bottom: 5px; }
.login-header p { color: var(--text-muted); margin-bottom: 30px; }

.discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #5865F2;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s;
}
.discord-btn:hover { background: #4752c4; transform: translateY(-2px); }

.login-hint { margin-top: 25px; color: var(--text-muted); font-size: 14px; }

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid var(--danger); color: #fca5a5; }

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

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--bg-dark);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.sidebar-brand {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-brand h2 { font-size: 20px; color: var(--accent); }
.sidebar-brand span { font-size: 12px; color: var(--text-muted); }

.sidebar-nav {
    flex: 1;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.sidebar-nav a {
    display: block;
    padding: 12px 15px;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
}
.sidebar-nav a:hover { background: var(--bg-hover); }
.sidebar-nav a.active { background: var(--accent); }

.sidebar-user {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-user img { width: 36px; height: 36px; border-radius: 50%; }
.sidebar-user span { flex: 1; font-size: 14px; }
.logout-btn {
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}
.logout-btn:hover { background: var(--danger); }

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

.topbar {
    background: var(--bg-dark);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 24px; }
.date { color: var(--text-muted); }

.content { padding: 30px; }

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

.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.stat-icon { font-size: 32px; }
.stat-value { display: block; font-size: 28px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 25px;
}
.card h3 { margin-bottom: 20px; font-size: 18px; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.card-header h3 { margin-bottom: 0; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}
.table tbody tr:hover { background: var(--bg-hover); }
.row-muted { opacity: 0.5; }

/* Code */
code {
    background: var(--bg-dark);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}
code.small { font-size: 11px; }
code.code-big {
    font-size: 18px;
    padding: 6px 12px;
    background: var(--accent);
    color: white;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--accent);
    color: white;
}
.badge-primary { background: var(--accent); }
.badge-success { background: var(--success); }
.badge-warning { background: var(--warning); color: #1a1a2e; }
.badge-danger { background: var(--danger); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.btn:hover { background: var(--accent-hover); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Search */
.search-form { display: flex; gap: 10px; }
.search-form input {
    padding: 10px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    width: 200px;
}
.search-form input:focus { outline: none; border-color: var(--accent); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Info Box */
.info-box {
    background: rgba(124,58,237,0.1);
    border: 1px solid var(--accent);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Responsive */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .grid-2 { grid-template-columns: 1fr; }
}
