:root {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --border: #30363d;
    --accent-blue: #58a6ff;
    --accent-green: #238636;
    --accent-red: #da3633;
    --text: #c9d1d9;
    --text-muted: #8b949e;
}

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
}


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

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#admin-email {
    font-weight: bold;
    color: var(--accent-blue);
}


.main-grid {
    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 600px; 
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    flex-shrink: 0;
}

.card h2 { margin: 0; font-size: 1.1rem; color: white; }


.pending-section {
    border: 1px solid var(--accent-blue);
    margin-bottom: 30px;
    background: rgba(88, 166, 255, 0.05);
    max-height: none;
}

.pending-item {
    background: #1f242c;
    border-left: 3px solid var(--accent-blue) !important;
    padding: 15px !important;
}


.item-list {
    overflow-y: auto; 
    flex-grow: 1; 
    padding-right: 5px;
}


.item-list::-webkit-scrollbar { width: 6px; }
.item-list::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 15px; 
}

.list-item:last-child { border-bottom: none; }


.list-item > span {
    white-space: nowrap; 
    overflow: hidden;  
    text-overflow: ellipsis; 
    font-size: 0.9rem;
    flex-grow: 1;         
    display: block;
}


.list-item .actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0; 
}


.btn {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid rgba(240,246,252,0.1);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.2s;
    white-space: nowrap;
}

.btn-sm { padding: 4px 8px; font-size: 0.75rem; }

.btn-primary { background: var(--accent-blue); color: white; border: none; }
.btn-success { background: var(--accent-green); color: white; border: none; }
.btn-danger { background: var(--accent-red); color: white; border: none; }
.btn-warning { background: #d29922; color: black; border: none; }
.btn-secondary { background: #21262d; color: var(--text); }

.btn:hover { opacity: 0.9; transform: translateY(-1px); }

.badge {
    background: var(--accent-red);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.badge-type {
    background: #30363d;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 5px;
    color: var(--text-muted);
}


.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}
.close-modal:hover { color: white; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    background: #0d1117;
    border: 1px solid var(--border);
    color: white;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 0.95rem;
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-blue);
    outline: none;
}

#loading-overlay {
    position: fixed; inset: 0; background: #0d1117; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.spinner {
    width: 40px; height: 40px; border: 4px solid #333;
    border-top: 4px solid var(--accent-blue); border-radius: 50%;
    animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }