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

:root {
    --bg-main: #0A0A0A;
    --bg-card: rgba(20, 20, 20, 0.7);
    --bg-card-solid: #141414;
    --bg-card-hover: rgba(30, 30, 30, 0.9);
    --primary: #ff000e;
    --primary-hover: #e6000c;
    --secondary: #6D28D9;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 16px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(255, 0, 14, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    font-weight: 400;
    letter-spacing: -0.2px;
}

/* Sidebar */
.sidebar {
    width: 80px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s ease;
    overflow-x: hidden;
    white-space: nowrap;
}
.sidebar:hover {
    width: 260px;
}

.sidebar-header {
    padding: 10px 24px 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
    text-align: center;
}

.sidebar-header span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-logo {
    content: url('../../icon.png');
    width: 48px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 6px auto 0;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
    transition: all 0.3s;
}
.sidebar:hover .brand-logo {
    content: url('../../logo.png');
    width: 160px;
}

.nav-links {
    list-style: none;
    flex: 1;
    padding: 0 16px;
}

.nav-links li {
    margin-bottom: 8px;
}

.nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 10px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
    margin: 4px 8px;
    position: relative;
    overflow: hidden;
}

.nav-links a svg {
    min-width: 24px;
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
    opacity: 1 !important;
    visibility: visible !important;
}

.nav-links a span {
    display: none;
}

.sidebar:hover .nav-links a span {
    display: inline;
}

.sidebar:hover .nav-links a {
    justify-content: flex-start;
    padding: 14px 18px;
}

.nav-links a:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    background: linear-gradient(90deg, rgba(255, 0, 14, 0.15) 0%, rgba(20, 20, 20, 0) 100%);
    border-left: 3px solid var(--primary);
    color: var(--primary);
    box-shadow: inset 0 0 20px rgba(255, 0, 14, 0.05);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 80px;
    padding: 40px;
    width: calc(100% - 80px);
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.main-content > * {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .sidebar:hover {
        width: 60px; /* Do not expand on mobile */
    }
    .main-content {
        margin-left: 60px;
        padding: 15px;
        width: calc(100% - 60px);
        max-width: 100vw;
        overflow-x: hidden;
    }
    .nav-links a {
        padding: 16px 10px;
        margin: 12px 6px;
        justify-content: center;
    }
    .sidebar:hover .nav-links a {
        padding: 16px 10px;
        justify-content: center;
    }
    .nav-links a svg {
        min-width: 24px;
        width: 24px;
        height: 24px;
        display: block;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .brand-logo {
        width: 36px;
    }
}

.page-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards & Widgets */
.grid-3, .grid-4 {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}
.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 0, 14, 0.4);
    box-shadow: var(--shadow-glow), var(--shadow-soft);
}

.stat-card h3 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card .value {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Tables */
.card-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    overflow-x: auto;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

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

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
}

tr:hover td {
    background-color: var(--bg-card-hover);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge.alive { background-color: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge.dead { background-color: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge.pending { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* Buttons & Inputs */
.btn {
    padding: 12px 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 0, 14, 0.3);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 14, 0.4);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 8px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.18);
}

body.gp-modal-open {
    overflow: hidden;
}

.gp-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto;
}

.gp-modal-overlay.is-open {
    display: flex;
}

.gp-modal {
    width: min(520px, 100%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.65);
    max-height: calc(100dvh - 48px);
    overflow: auto;
}

.gp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-card);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gp-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gp-modal-close:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.20);
}

@media (max-width: 520px) {
    .gp-modal-overlay {
        padding: 12px;
    }
    .gp-modal {
        padding: 20px;
        border-radius: 14px;
    }
}
